diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-31 01:52:50 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-31 01:52:50 +0000 |
commit | 933c762371fe8cc6e2ef5d00d6866f4924852fed (patch) | |
tree | 7ed04e07511afdbf1ed211a509a0c9314caca84d /lib/CodeGen/LLVMTargetMachine.cpp | |
parent | 376cd007ec2da67bddd15d68623e51a6e122869c (diff) |
Manage MachineFunctions with an analysis Pass instead of the Annotable
mechanism. To support this, make MachineFunctionPass a little more
complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 0f33ee3df8..6f0581a7fc 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -18,6 +18,7 @@ #include "llvm/Analysis/LoopPass.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/GCStrategy.h" +#include "llvm/CodeGen/MachineFunctionAnalysis.h" #include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetRegistry.h" @@ -118,9 +119,6 @@ bool LLVMTargetMachine::addPassesToEmitFileFinish(PassManagerBase &PM, PM.add(createGCInfoDeleter()); - // Delete machine code for this function - PM.add(createMachineCodeDeleter()); - return false; // success! } @@ -137,9 +135,6 @@ bool LLVMTargetMachine::addPassesToEmitFileFinish(PassManagerBase &PM, PM.add(createGCInfoDeleter()); - // Delete machine code for this function - PM.add(createMachineCodeDeleter()); - return false; // success! } @@ -156,9 +151,6 @@ bool LLVMTargetMachine::addPassesToEmitFileFinish(PassManagerBase &PM, PM.add(createGCInfoDeleter()); - // Delete machine code for this function - PM.add(createMachineCodeDeleter()); - return false; // success! } @@ -184,9 +176,6 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(PassManagerBase &PM, PM.add(createGCInfoDeleter()); - // Delete machine code for this function - PM.add(createMachineCodeDeleter()); - return false; // success! } @@ -212,9 +201,6 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(PassManagerBase &PM, PM.add(createGCInfoDeleter()); - // Delete machine code for this function - PM.add(createMachineCodeDeleter()); - return false; // success! } @@ -265,6 +251,9 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, // Standard Lower-Level Passes. + // Set up a MachineFunction for the rest of CodeGen to work on. + PM.add(new MachineFunctionAnalysis(*this, OptLevel)); + // Enable FastISel with -fast, but allow that to be overridden. if (EnableFastISelOption == cl::BOU_TRUE || (OptLevel == CodeGenOpt::None && EnableFastISelOption != cl::BOU_FALSE)) |