diff options
author | Eric Christopher <echristo@apple.com> | 2010-02-09 00:35:38 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-02-09 00:35:38 +0000 |
commit | 1926b648e132631282aa15d25e4f8278f87c24fb (patch) | |
tree | 32cf8d41d89dc064e6650a1ea998a588e9e2ea79 /include | |
parent | b8d6e98e566724f58344d275a4bd675249bb713a (diff) |
Add a new pass to do llvm.objsize lowering using SCEV.
Initial skeleton and SCEVUnknown lowering implemented,
the rest should come relatively quickly. Move testcase
to new directory.
Move pass to right before SimplifyLibCalls - which is
moved down a bit so we can take advantage of a few opts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95628 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/LinkAllPasses.h | 1 | ||||
-rw-r--r-- | include/llvm/Support/StandardPasses.h | 5 | ||||
-rw-r--r-- | include/llvm/Transforms/Scalar.h | 6 |
3 files changed, 10 insertions, 2 deletions
diff --git a/include/llvm/LinkAllPasses.h b/include/llvm/LinkAllPasses.h index a7e2e05b93..49bb713bb6 100644 --- a/include/llvm/LinkAllPasses.h +++ b/include/llvm/LinkAllPasses.h @@ -138,6 +138,7 @@ namespace { (void) llvm::createGEPSplitterPass(); (void) llvm::createSCCVNPass(); (void) llvm::createABCDPass(); + (void) llvm::createObjectSizeLoweringPass(); (void)new llvm::IntervalPartition(); (void)new llvm::FindUsedTypes(); diff --git a/include/llvm/Support/StandardPasses.h b/include/llvm/Support/StandardPasses.h index f233c18de3..6de1b3aeb7 100644 --- a/include/llvm/Support/StandardPasses.h +++ b/include/llvm/Support/StandardPasses.h @@ -118,8 +118,6 @@ namespace llvm { // Start of function pass. PM->add(createScalarReplAggregatesPass()); // Break up aggregate allocas - if (SimplifyLibCalls) - PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations PM->add(createInstructionCombiningPass()); // Cleanup for scalarrepl. PM->add(createJumpThreadingPass()); // Thread jumps. PM->add(createCFGSimplificationPass()); // Merge & remove BBs @@ -128,6 +126,9 @@ namespace llvm { PM->add(createTailCallEliminationPass()); // Eliminate tail calls PM->add(createCFGSimplificationPass()); // Merge & remove BBs PM->add(createReassociatePass()); // Reassociate expressions + PM->add(createObjectSizeLoweringPass()); // Lower Intrinsic::objsize + if (SimplifyLibCalls) + PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations PM->add(createLoopRotatePass()); // Rotate Loop PM->add(createLICMPass()); // Hoist loop invariants PM->add(createLoopUnswitchPass(OptimizeSize || OptimizationLevel < 3)); diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h index 7159f86e1e..c24a12d0cf 100644 --- a/include/llvm/Transforms/Scalar.h +++ b/include/llvm/Transforms/Scalar.h @@ -336,6 +336,12 @@ FunctionPass *createSCCVNPass(); // FunctionPass *createABCDPass(); +//===----------------------------------------------------------------------===// +// +// ObjSizeLowering - Lower Intrinsic::objsize +// +FunctionPass *createObjectSizeLoweringPass(); + } // End llvm namespace #endif |