aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSerguei Katkov <serguei.katkov@azul.com>2020-10-16 14:23:02 +0700
committerSerguei Katkov <serguei.katkov@azul.com>2020-10-20 10:33:59 +0700
commit38799975ceb21da0e3d2ce70c3f23ba69adf0269 (patch)
treec74b001c3285df5113ae38ec4ecfa00a942d9981 /clang/lib/Frontend/CompilerInvocation.cpp
parentad0b2d9d46a368248ed27bd27d3500cc8028456e (diff)
downloadllvm-38799975ceb21da0e3d2ce70c3f23ba69adf0269.zip
llvm-38799975ceb21da0e3d2ce70c3f23ba69adf0269.tar.gz
llvm-38799975ceb21da0e3d2ce70c3f23ba69adf0269.tar.bz2
[IRCE] Do not transform if loop has small number of iterations
IRCE has some overhead for runtime checks and in case number of iteration is small the overhead can kill the benefit from optimizations. This CL bases on BlockFrequencyInfo of pre-header and header to estimate the number of loop iterations. If it is less than irce-min-estimated-iters we do not transform the loop. Probably it is better to make more complex cost model but for simplicity it seems the be enough. The usage of BFI is added only for new pass manager and tries to use it efficiently. Reviewers: ebrevnov, dantrushin, asbirlea, mkazantsev Reviewed By: mkazantsev Subscribers: llvm-commits, fhahn Differential Revision: https://reviews.llvm.org/D89541
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions