mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +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. This is the 2nd attempt at this after realizing that PassManager::add() may actually delete the pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224059 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -162,9 +162,9 @@ public:
|
||||
bool addPreISel() override;
|
||||
bool addILPOpts() override;
|
||||
bool addInstSelector() override;
|
||||
bool addPreRegAlloc() override;
|
||||
bool addPreSched2() override;
|
||||
bool addPreEmitPass() override;
|
||||
void addPreRegAlloc() override;
|
||||
void addPreSched2() override;
|
||||
void addPreEmitPass() override;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
@@ -216,28 +216,24 @@ bool PPCPassConfig::addInstSelector() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PPCPassConfig::addPreRegAlloc() {
|
||||
void PPCPassConfig::addPreRegAlloc() {
|
||||
initializePPCVSXFMAMutatePass(*PassRegistry::getPassRegistry());
|
||||
insertPass(VSXFMAMutateEarly ? &RegisterCoalescerID : &MachineSchedulerID,
|
||||
&PPCVSXFMAMutateID);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PPCPassConfig::addPreSched2() {
|
||||
addPass(createPPCVSXCopyCleanupPass());
|
||||
void PPCPassConfig::addPreSched2() {
|
||||
addPass(createPPCVSXCopyCleanupPass(), false);
|
||||
|
||||
if (getOptLevel() != CodeGenOpt::None)
|
||||
addPass(&IfConverterID);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PPCPassConfig::addPreEmitPass() {
|
||||
void PPCPassConfig::addPreEmitPass() {
|
||||
if (getOptLevel() != CodeGenOpt::None)
|
||||
addPass(createPPCEarlyReturnPass());
|
||||
addPass(createPPCEarlyReturnPass(), false);
|
||||
// Must run branch selection immediately preceding the asm printer.
|
||||
addPass(createPPCBranchSelectionPass());
|
||||
return false;
|
||||
addPass(createPPCBranchSelectionPass(), false);
|
||||
}
|
||||
|
||||
void PPCTargetMachine::addAnalysisPasses(PassManagerBase &PM) {
|
||||
|
Reference in New Issue
Block a user