aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineTraceMetrics.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-10-04 12:33:50 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-10-04 12:33:50 +0000
commitac8317fd360fcb7f89e36f964d39294eb898b17e (patch)
tree2f74b09ad0feb5c35fc5bf8173af6550a9cefdfb /llvm/lib/CodeGen/MachineTraceMetrics.cpp
parent3197f8e6cbdfae9410b2b149714165a3d0465657 (diff)
downloadllvm-ac8317fd360fcb7f89e36f964d39294eb898b17e.zip
llvm-ac8317fd360fcb7f89e36f964d39294eb898b17e.tar.gz
llvm-ac8317fd360fcb7f89e36f964d39294eb898b17e.tar.bz2
Fix PR13969, a mini-phase-ordering issue with the new SROA pass.
Currently, we re-visit allocas when something changes about the way they might be *split* to allow better scalarization to take place. However, we weren't handling the case when the *promotion* is what would change the behavior of SROA. When an address derived from an alloca is stored into another alloca, we consider the first to have escaped. If the second is ever promoted to an SSA value, we will suddenly be able to run the SROA pass on the first alloca. This patch adds explicit support for this form if iteration. When we detect a store of a pointer derived from an alloca, we flag the underlying alloca for reprocessing after promotion. The logic works hard to only do this when there is definitely going to be promotion and it might remove impediments to the analysis of the alloca. Thanks to Nick for the great test case and Benjamin for some sanity check review. llvm-svn: 165223
Diffstat (limited to 'llvm/lib/CodeGen/MachineTraceMetrics.cpp')
0 files changed, 0 insertions, 0 deletions