mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +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:
@ -154,9 +154,8 @@ public:
|
||||
void addIRPasses() override;
|
||||
bool addInstSelector() override;
|
||||
bool addILPOpts() override;
|
||||
bool addPreRegAlloc() override;
|
||||
bool addPostRegAlloc() override;
|
||||
bool addPreEmitPass() override;
|
||||
void addPostRegAlloc() override;
|
||||
void addPreEmitPass() override;
|
||||
};
|
||||
} // namespace
|
||||
|
||||
@ -188,32 +187,19 @@ bool X86PassConfig::addILPOpts() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool X86PassConfig::addPreRegAlloc() {
|
||||
return false; // -print-machineinstr shouldn't print after this.
|
||||
}
|
||||
|
||||
bool X86PassConfig::addPostRegAlloc() {
|
||||
void X86PassConfig::addPostRegAlloc() {
|
||||
addPass(createX86FloatingPointStackifierPass());
|
||||
return true; // -print-machineinstr should print after this.
|
||||
}
|
||||
|
||||
bool X86PassConfig::addPreEmitPass() {
|
||||
bool ShouldPrint = false;
|
||||
if (getOptLevel() != CodeGenOpt::None && getX86Subtarget().hasSSE2()) {
|
||||
addPass(createExecutionDependencyFixPass(&X86::VR128RegClass));
|
||||
ShouldPrint = true;
|
||||
}
|
||||
void X86PassConfig::addPreEmitPass() {
|
||||
if (getOptLevel() != CodeGenOpt::None && getX86Subtarget().hasSSE2())
|
||||
addPass(createExecutionDependencyFixPass(&X86::VR128RegClass), false);
|
||||
|
||||
if (UseVZeroUpper) {
|
||||
addPass(createX86IssueVZeroUpperPass());
|
||||
ShouldPrint = true;
|
||||
}
|
||||
if (UseVZeroUpper)
|
||||
addPass(createX86IssueVZeroUpperPass(), false);
|
||||
|
||||
if (getOptLevel() != CodeGenOpt::None) {
|
||||
addPass(createX86PadShortFunctions());
|
||||
addPass(createX86PadShortFunctions(), false);
|
||||
addPass(createX86FixupLEAs());
|
||||
ShouldPrint = true;
|
||||
}
|
||||
|
||||
return ShouldPrint;
|
||||
}
|
||||
|
Reference in New Issue
Block a user