summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetPassConfig.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-08-30 22:11:37 +0000
committerHans Wennborg <hans@hanshq.net>2017-08-30 22:11:37 +0000
commit24775a0a6ccfeae5e091b5e9990cb910913c2963 (patch)
tree1d3e32a5884e595573fc1f5d2c45060ac1358c09 /llvm/lib/CodeGen/TargetPassConfig.cpp
parent01d026510630203b1217a0d5550a86e6eaa05b12 (diff)
downloadbcm5719-llvm-24775a0a6ccfeae5e091b5e9990cb910913c2963.tar.gz
bcm5719-llvm-24775a0a6ccfeae5e091b5e9990cb910913c2963.zip
Revert r312154 "Re-enable "[MachineCopyPropagation] Extend pass to do COPY source forwarding""
It caused PR34387: Assertion failed: (RegNo < NumRegs && "Attempting to access record for invalid register number!") > Issues identified by buildbots addressed since original review: > - Fixed ARMLoadStoreOptimizer bug exposed by this change in r311907. > - The pass no longer forwards COPYs to physical register uses, since > doing so can break code that implicitly relies on the physical > register number of the use. > - The pass no longer forwards COPYs to undef uses, since doing so > can break the machine verifier by creating LiveRanges that don't > end on a use (since the undef operand is not considered a use). > > [MachineCopyPropagation] Extend pass to do COPY source forwarding > > This change extends MachineCopyPropagation to do COPY source forwarding. > > This change also extends the MachineCopyPropagation pass to be able to > be run during register allocation, after physical registers have been > assigned, but before the virtual registers have been re-written, which > allows it to remove virtual register COPY LiveIntervals that become dead > through the forwarding of all of their uses. llvm-svn: 312178
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index c76903a24da..34d96a81130 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -88,8 +88,6 @@ static cl::opt<bool> DisableCGP("disable-cgp", cl::Hidden,
cl::desc("Disable Codegen Prepare"));
static cl::opt<bool> DisableCopyProp("disable-copyprop", cl::Hidden,
cl::desc("Disable Copy Propagation pass"));
-static cl::opt<bool> DisableCopyPropPreRegRewrite("disable-copyprop-prerewrite", cl::Hidden,
- cl::desc("Disable Copy Propagation Pre-Register Re-write pass"));
static cl::opt<bool> DisablePartialLibcallInlining("disable-partial-libcall-inlining",
cl::Hidden, cl::desc("Disable Partial Libcall Inlining"));
static cl::opt<bool> EnableImplicitNullChecks(
@@ -250,9 +248,6 @@ static IdentifyingPassPtr overridePass(AnalysisID StandardID,
if (StandardID == &MachineCopyPropagationID)
return applyDisable(TargetID, DisableCopyProp);
- if (StandardID == &MachineCopyPropagationPreRegRewriteID)
- return applyDisable(TargetID, DisableCopyPropPreRegRewrite);
-
return TargetID;
}
@@ -1061,10 +1056,6 @@ void TargetPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) {
// Allow targets to change the register assignments before rewriting.
addPreRewrite();
- // Copy propagate to forward register uses and try to eliminate COPYs that
- // were not coalesced.
- addPass(&MachineCopyPropagationPreRegRewriteID);
-
// Finally rewrite virtual registers.
addPass(&VirtRegRewriterID);
OpenPOWER on IntegriCloud