aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Disassembler.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-07-29 09:06:53 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-07-29 09:06:53 +0000
commite1361ec325834dc05b94c3e2764fb32173b363ac (patch)
treeb48488ae7966b25451d773760b18b6b1d2830636 /lib/Support/Disassembler.cpp
parent3202f6cdb9193fe5365462118f499f6e164a1738 (diff)
downloadexternal_llvm-e1361ec325834dc05b94c3e2764fb32173b363ac.zip
external_llvm-e1361ec325834dc05b94c3e2764fb32173b363ac.tar.gz
external_llvm-e1361ec325834dc05b94c3e2764fb32173b363ac.tar.bz2
Teach the AllocaPromoter which is wrapped around the SSAUpdater
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Disassembler.cpp')
0 files changed, 0 insertions, 0 deletions