forked from OSchip/llvm-project
cd7c8cdfa1
infrastructure to do promotion without a domtree the same smarts about looking through GEPs, bitcasts, etc., that I just taught mem2reg about. This way, if SROA chooses to promote an alloca which still has some noisy instructions this code can cope with them. I've not used as principled of an approach here for two reasons: 1) This code doesn't really need it as we were already set up to zip through the instructions used by the alloca. 2) I view the code here as more of a hack, and hopefully a temporary one. The SSAUpdater path in SROA is a real sore point for me. It doesn't make a lot of architectural sense for many reasons: - We're likely to end up needing the domtree anyways in a subsequent pass, so why not compute it earlier and use it. - In the future we'll likely end up needing the domtree for parts of the inliner itself. - If we need to we could teach the inliner to preserve the domtree. Part of the re-work of the pass manager will allow this to be very powerful even in large SCCs with many functions. - Ultimately, computing a domtree has gotten significantly faster since the original SSAUpdater-using code went into ScalarRepl. We no longer use domfrontiers, and much of domtree is lazily done based on queries rather than eagerly. - At this point keeping the SSAUpdater-based promotion saves a total of 0.7% on a build of the 'opt' tool for me. That's not a lot of performance given the complexity! So I'm leaving this a bit ugly in the hope that eventually we just remove all of this nonsense. I can't even readily test this because this code isn't reachable except through SROA. When I re-instate the patch that fast-tracks allocas already suitable for promotion, I'll add a testcase there that failed before this change. Before that, SROA will fix any test case I give it. llvm-svn: 187347 |
||
---|---|---|
.. | ||
ADCE.cpp | ||
BasicBlockPlacement.cpp | ||
CMakeLists.txt | ||
CodeGenPrepare.cpp | ||
ConstantProp.cpp | ||
CorrelatedValuePropagation.cpp | ||
DCE.cpp | ||
DeadStoreElimination.cpp | ||
EarlyCSE.cpp | ||
GVN.cpp | ||
GlobalMerge.cpp | ||
IndVarSimplify.cpp | ||
JumpThreading.cpp | ||
LICM.cpp | ||
LLVMBuild.txt | ||
LoopDeletion.cpp | ||
LoopIdiomRecognize.cpp | ||
LoopInstSimplify.cpp | ||
LoopRotation.cpp | ||
LoopStrengthReduce.cpp | ||
LoopUnrollPass.cpp | ||
LoopUnswitch.cpp | ||
LowerAtomic.cpp | ||
Makefile | ||
MemCpyOptimizer.cpp | ||
Reassociate.cpp | ||
Reg2Mem.cpp | ||
SCCP.cpp | ||
SROA.cpp | ||
Scalar.cpp | ||
ScalarReplAggregates.cpp | ||
SimplifyCFGPass.cpp | ||
Sink.cpp | ||
StructurizeCFG.cpp | ||
TailRecursionElimination.cpp |