mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
[CodeGen] Add print and verify pass after each MachineFunctionPass by default
Previously print+verify passes were added in a very unsystematic way, which is annoying when debugging as you miss intermediate steps and allows bugs to stay unnotice when no verification is performed. To make this change practical I added the possibility to explicitely disable verification. I used this option on all places where no verification was performed previously (because alot of places actually don't pass the MachineVerifier). In the long term these problems should be fixed properly and verification enabled after each pass. I'll enable some more verification in subsequent commits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -46,8 +46,8 @@ public:
|
||||
|
||||
void addIRPasses() override;
|
||||
bool addInstSelector() override;
|
||||
bool addPreSched2() override;
|
||||
bool addPreEmitPass() override;
|
||||
void addPreSched2() override;
|
||||
void addPreEmitPass() override;
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
@ -60,14 +60,13 @@ bool SystemZPassConfig::addInstSelector() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SystemZPassConfig::addPreSched2() {
|
||||
void SystemZPassConfig::addPreSched2() {
|
||||
if (getOptLevel() != CodeGenOpt::None &&
|
||||
getSystemZTargetMachine().getSubtargetImpl()->hasLoadStoreOnCond())
|
||||
addPass(&IfConverterID);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SystemZPassConfig::addPreEmitPass() {
|
||||
void SystemZPassConfig::addPreEmitPass() {
|
||||
// We eliminate comparisons here rather than earlier because some
|
||||
// transformations can change the set of available CC values and we
|
||||
// generally want those transformations to have priority. This is
|
||||
@ -92,11 +91,10 @@ bool SystemZPassConfig::addPreEmitPass() {
|
||||
// between the comparison and the branch, but it isn't clear whether
|
||||
// preventing that would be a win or not.
|
||||
if (getOptLevel() != CodeGenOpt::None)
|
||||
addPass(createSystemZElimComparePass(getSystemZTargetMachine()));
|
||||
addPass(createSystemZElimComparePass(getSystemZTargetMachine()), false);
|
||||
if (getOptLevel() != CodeGenOpt::None)
|
||||
addPass(createSystemZShortenInstPass(getSystemZTargetMachine()));
|
||||
addPass(createSystemZShortenInstPass(getSystemZTargetMachine()), false);
|
||||
addPass(createSystemZLongBranchPass(getSystemZTargetMachine()));
|
||||
return true;
|
||||
}
|
||||
|
||||
TargetPassConfig *SystemZTargetMachine::createPassConfig(PassManagerBase &PM) {
|
||||
|
Reference in New Issue
Block a user