aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorWilliam S. Moses <gh@wsmoses.com>2022-02-12 16:33:22 -0500
committerWilliam S. Moses <gh@wsmoses.com>2022-02-17 20:13:07 -0500
commitd9da6a535f21946cfaac1516ef28ac7646211d56 (patch)
tree5220739dd4ee10b2610e9648869ebff8a3195ce0 /clang/lib/CodeGen/CodeGenFunction.cpp
parentf0dd818be389e193cbe5817996e434696f37a702 (diff)
downloadllvm-d9da6a535f21946cfaac1516ef28ac7646211d56.zip
llvm-d9da6a535f21946cfaac1516ef28ac7646211d56.tar.gz
llvm-d9da6a535f21946cfaac1516ef28ac7646211d56.tar.bz2
[LICM][PhaseOrder] Don't speculate in LICM until after running loop rotate
LICM will speculatively hoist code outside of loops. This requires removing information, like alias analysis (https://github.com/llvm/llvm-project/issues/53794), range information (https://bugs.llvm.org/show_bug.cgi?id=50550), among others. Prior to https://reviews.llvm.org/D99249 , LICM would only be run after LoopRotate. Running Loop Rotate prior to LICM prevents a instruction hoist from being speculative, if it was conditionally executed by the iteration (as is commonly emitted by clang and other frontends). Adding the additional LICM pass first, however, forces all of these instructions to be considered speculative, even if they are not speculative after LoopRotate. This destroys information, resulting in performance losses for discarding this additional information. This PR modifies LICM to accept a ``speculative'' parameter which allows LICM to be set to perform information-loss speculative hoists or not. Phase ordering is then modified to not perform the information-losing speculative hoists until after loop rotate is performed, preserving this additional information. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D119965
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions