summaryrefslogtreecommitdiff
path: root/tools/llc
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2001-10-18 18:20:20 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2001-10-18 18:20:20 +0000
commit712ac2b951ea563dec9d0fc33a469fade3fe832e (patch)
treebb9bfbc8d759c3da5483dab4dff0209fc7545fc8 /tools/llc
parent631b9a3523f883cd2c018d4082a8e90ad89be941 (diff)
downloadllvm-712ac2b951ea563dec9d0fc33a469fade3fe832e.tar.gz
llvm-712ac2b951ea563dec9d0fc33a469fade3fe832e.tar.bz2
llvm-712ac2b951ea563dec9d0fc33a469fade3fe832e.tar.xz
Move malloc/free lowering after tracing until lli supports
calls to external malloc/free functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llc')
-rw-r--r--tools/llc/llc.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index 76364aabc2..3761b3aa89 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -121,9 +121,6 @@ int main(int argc, char **argv) {
// Build up all of the passes that we want to do to the module...
vector<Pass*> Passes;
- // Replace malloc and free instructions with library calls
- Passes.push_back(new LowerAllocations(Target.DataLayout));
-
// Hoist constants out of PHI nodes into predecessor BB's
Passes.push_back(new HoistPHIConstants());
@@ -148,10 +145,16 @@ int main(int argc, char **argv) {
} else {
Passes.push_back(new PrintModulePass("", os,
/*deleteStream*/ true,
- /*printAsBytecode*/ ! DebugTrace));
+ /*printPerMethod*/ false,
+ /*printAsBytecode*/ !DebugTrace));
}
}
+ // 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.push_back(new LowerAllocations(Target.DataLayout));
+
// If LLVM dumping after transformations is requested, add it to the pipeline
if (DumpAsm)
Passes.push_back(new PrintModulePass("Code after xformations: \n",&cerr));