diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-03-21 09:52:22 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-03-21 09:52:22 +0000 |
commit | c57f5dd8bd399667d2b93d3ca05f47feae17629c (patch) | |
tree | e6d434097d19ed4f3fb09472cf59158ceabe9f7d /lib/Support/PathV2.cpp | |
parent | d647ec52396ed0f1886537114ab587c71fc43565 (diff) |
Hoist the definition of getTypeSizeInBits to be inlinable and in the
header.
This method is called in the hot path for *many* passes, SROA is what
caught my interest. A common pattern is that which branch of the switch
should be taken is known in the callsite and so it is a very good
candidate for inlining and simplification. Moving it into the header
allows the optimizer to fold a lot of boring, repeatitive code in
callers of this routine.
I'm seeing pretty significant speedups in parts of SROA and I suspect
other passes will see similar speedups if they end up working with type
sizes frequently. I've not seen any significant growth of the binaries
as a consequence, but let me know if you see anything suspicious here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177632 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/PathV2.cpp')
0 files changed, 0 insertions, 0 deletions