mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Allow targets to inject passes before the virtual register rewriter.
Such passes can be used to tweak the register assignments in a target-dependent way, for example to avoid write-after-write dependencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -603,7 +603,11 @@ void TargetPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) {
|
||||
|
||||
// Add the selected register allocation pass.
|
||||
PM->add(RegAllocPass);
|
||||
printAndVerify("After Register Allocation");
|
||||
printAndVerify("After Register Allocation, before rewriter");
|
||||
|
||||
// Allow targets to change the register assignments before rewriting.
|
||||
if (addPreRewrite())
|
||||
printAndVerify("After pre-rewrite passes");
|
||||
|
||||
// Finally rewrite virtual registers.
|
||||
addPass(VirtRegRewriterID);
|
||||
|
Reference in New Issue
Block a user