Change LowerAllocations pass to 'require' TargetData instead of it being

passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3930 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-09-25 23:47:49 +00:00
parent 3b2106ff84
commit 1751b7ed27
2 changed files with 3 additions and 6 deletions

View File

@@ -9,7 +9,6 @@
#define LLVM_TRANSFORMS_SCALAR_H #define LLVM_TRANSFORMS_SCALAR_H
class Pass; class Pass;
class TargetData;
class GetElementPtrInst; class GetElementPtrInst;
class PassInfo; class PassInfo;
@@ -191,11 +190,9 @@ extern const PassInfo *BreakCriticalEdgesID;
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// These two passes convert malloc and free instructions to and from %malloc & // These two passes convert malloc and free instructions to and from %malloc &
// %free function calls. The LowerAllocations transformation is a target // %free function calls.
// dependant tranformation because it depends on the size of data types and
// alignment constraints.
// //
Pass *createLowerAllocationsPass(const TargetData &TD); Pass *createLowerAllocationsPass();
Pass *createRaiseAllocationsPass(); Pass *createRaiseAllocationsPass();

View File

@@ -220,7 +220,7 @@ main(int argc, char **argv)
// Replace malloc and free instructions with library calls. // Replace malloc and free instructions with library calls.
// Do this after tracing until lli implements these lib calls. // Do this after tracing until lli implements these lib calls.
// For now, it will emulate malloc and free internally. // For now, it will emulate malloc and free internally.
Passes.add(createLowerAllocationsPass(Target.DataLayout)); Passes.add(createLowerAllocationsPass());
// If LLVM dumping after transformations is requested, add it to the pipeline // If LLVM dumping after transformations is requested, add it to the pipeline
if (DumpAsm) if (DumpAsm)