mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Remove double-def checking from MachineVerifier, so a register does not have to
be killed before being redefined. These checks are usually disabled, and usually fail when enabled. We de facto allow live registers to be redefined without a kill, the corresponding assertions in RegScavenger were removed long ago. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110362 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -236,13 +236,12 @@ static void printNoVerify(PassManagerBase &PM, const char *Banner) {
|
||||
}
|
||||
|
||||
static void printAndVerify(PassManagerBase &PM,
|
||||
const char *Banner,
|
||||
bool allowDoubleDefs = false) {
|
||||
const char *Banner) {
|
||||
if (PrintMachineCode)
|
||||
PM.add(createMachineFunctionPrinterPass(dbgs(), Banner));
|
||||
|
||||
if (VerifyMachineCode)
|
||||
PM.add(createMachineVerifierPass(allowDoubleDefs));
|
||||
PM.add(createMachineVerifierPass());
|
||||
}
|
||||
|
||||
/// addCommonCodeGenPasses - Add standard LLVM codegen passes used for both
|
||||
@@ -339,8 +338,7 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
|
||||
return true;
|
||||
|
||||
// Print the instruction selected machine code...
|
||||
printAndVerify(PM, "After Instruction Selection",
|
||||
/* allowDoubleDefs= */ true);
|
||||
printAndVerify(PM, "After Instruction Selection");
|
||||
|
||||
// Optimize PHIs before DCE: removing dead PHI cycles may make more
|
||||
// instructions dead.
|
||||
@@ -353,8 +351,7 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
|
||||
// used by tail calls, where the tail calls reuse the incoming stack
|
||||
// arguments directly (see t11 in test/CodeGen/X86/sibcall.ll).
|
||||
PM.add(createDeadMachineInstructionElimPass());
|
||||
printAndVerify(PM, "After codegen DCE pass",
|
||||
/* allowDoubleDefs= */ true);
|
||||
printAndVerify(PM, "After codegen DCE pass");
|
||||
|
||||
PM.add(createOptimizeExtsPass());
|
||||
if (!DisableMachineLICM)
|
||||
@@ -362,21 +359,18 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM,
|
||||
PM.add(createMachineCSEPass());
|
||||
if (!DisableMachineSink)
|
||||
PM.add(createMachineSinkingPass());
|
||||
printAndVerify(PM, "After Machine LICM, CSE and Sinking passes",
|
||||
/* allowDoubleDefs= */ true);
|
||||
printAndVerify(PM, "After Machine LICM, CSE and Sinking passes");
|
||||
}
|
||||
|
||||
// Pre-ra tail duplication.
|
||||
if (OptLevel != CodeGenOpt::None && !DisableEarlyTailDup) {
|
||||
PM.add(createTailDuplicatePass(true));
|
||||
printAndVerify(PM, "After Pre-RegAlloc TailDuplicate",
|
||||
/* allowDoubleDefs= */ true);
|
||||
printAndVerify(PM, "After Pre-RegAlloc TailDuplicate");
|
||||
}
|
||||
|
||||
// Run pre-ra passes.
|
||||
if (addPreRegAlloc(PM, OptLevel))
|
||||
printAndVerify(PM, "After PreRegAlloc passes",
|
||||
/* allowDoubleDefs= */ true);
|
||||
printAndVerify(PM, "After PreRegAlloc passes");
|
||||
|
||||
// Perform register allocation.
|
||||
PM.add(createRegisterAllocator(OptLevel));
|
||||
|
||||
Reference in New Issue
Block a user