Initialize all common codegen passes before configuration so we can use their PassIDs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149705 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick 2012-02-03 20:14:47 +00:00
parent 36b7beb429
commit f1f78d5266
2 changed files with 8 additions and 2 deletions

View File

@ -42,8 +42,7 @@ protected:
public:
TargetPassConfig(TargetMachine *tm, PassManagerBase &pm,
bool DisableVerifyFlag)
: TM(tm), PM(pm), DisableVerify(DisableVerifyFlag) {}
bool DisableVerifyFlag);
virtual ~TargetPassConfig() {}

View File

@ -125,6 +125,13 @@ LLVMTargetMachine::LLVMTargetMachine(const Target &T, StringRef Triple,
"and that InitializeAllTargetMCs() is being invoked!");
}
TargetPassConfig::TargetPassConfig(TargetMachine *tm, PassManagerBase &pm,
bool DisableVerifyFlag)
: TM(tm), PM(pm), DisableVerify(DisableVerifyFlag) {
// Register all target independent codegen passes to activate their PassIDs.
initializeCodeGen(*PassRegistry::getPassRegistry());
}
/// createPassConfig - Create a pass configuration object to be used by
/// addPassToEmitX methods for generating a pipeline of CodeGen passes.
TargetPassConfig *LLVMTargetMachine::createPassConfig(PassManagerBase &PM,