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 | df973ed626b9ce119c133026bb29809ec0f75059 (patch) | |
| tree | 0e556763a8df07a8a40cf82eb08418e699566582 /clang/lib/Driver/ToolChains.cpp | |
| parent | 34f0c7fcafad61d2292aa6d95e6efdb141447fdf (diff) | |
| download | bcm5719-llvm-df973ed626b9ce119c133026bb29809ec0f75059.tar.gz bcm5719-llvm-df973ed626b9ce119c133026bb29809ec0f75059.zip | |
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.
llvm-svn: 177632
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
0 files changed, 0 insertions, 0 deletions

