Change LowerAllocations pass to 'require' TargetData instead of it being
authorChris Lattner <sabre@nondot.org>
Wed, 25 Sep 2002 23:47:49 +0000 (23:47 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 25 Sep 2002 23:47:49 +0000 (23:47 +0000)
passed in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3930 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Scalar.h
tools/llc/llc.cpp

index 188e3e298f3de4855d626cfb6e945e42534ceb63..79f10298a5b47e05ce11d4847ba9c1a18b49eaec 100644 (file)
@@ -9,7 +9,6 @@
 #define LLVM_TRANSFORMS_SCALAR_H
 
 class Pass;
-class TargetData;
 class GetElementPtrInst;
 class PassInfo;
 
@@ -191,11 +190,9 @@ extern const PassInfo *BreakCriticalEdgesID;
 
 //===----------------------------------------------------------------------===//
 // These two passes convert malloc and free instructions to and from %malloc &
-// %free function calls.  The LowerAllocations transformation is a target
-// dependant tranformation because it depends on the size of data types and
-// alignment constraints.
+// %free function calls.
 //
-Pass *createLowerAllocationsPass(const TargetData &TD);
+Pass *createLowerAllocationsPass();
 Pass *createRaiseAllocationsPass();
 
 
index 5aa88afd0e6442c5170c4603a75e71ce31ec8d5f..f524e32d8bb7593d6470e537e86e72e3410ac61d 100644 (file)
@@ -220,7 +220,7 @@ main(int argc, char **argv)
   // Replace malloc and free instructions with library calls.
   // Do this after tracing until lli implements these lib calls.
   // 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 (DumpAsm)