Add targets to skip running the GC passes.

llvm-svn: 170836
This commit is contained in:
Evan Cheng 2012-12-21 02:57:04 +00:00
parent 3df909d030
commit 59421aee3d
2 changed files with 15 additions and 3 deletions

View File

@ -241,6 +241,11 @@ protected:
return false;
}
/// addGCPasses - Add late codegen passes that analyze code for garbage
/// collection. This should return true if GC info should be printed after
/// these passes.
virtual bool addGCPasses();
/// Add standard basic block placement passes.
virtual void addBlockPlacement();

View File

@ -513,9 +513,10 @@ void TargetPassConfig::addMachinePasses() {
}
// GC
addPass(&GCMachineCodeAnalysisID);
if (addGCPasses()) {
if (PrintGCInfo)
addPass(createGCInfoPrinter(dbgs()));
}
// Basic block placement.
if (getOptLevel() != CodeGenOpt::None)
@ -732,6 +733,12 @@ void TargetPassConfig::addMachineLateOptimization() {
printAndVerify("After copy propagation pass");
}
/// Add standard GC passes.
bool TargetPassConfig::addGCPasses() {
addPass(&GCMachineCodeAnalysisID);
return true;
}
/// Add standard basic block placement passes.
void TargetPassConfig::addBlockPlacement() {
AnalysisID PassID = 0;