[PATCH] D19950: Use frequency info to guide Loop Invariant Code Motion.

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 16:38:59 PDT 2016


davidxl added a comment.

Static prediction has been conservative in estimating loop trip count -- it produces something like 30ish iterations. If the a very hot loop has a big if-then-else (or switch), it is very likely to mark many bbs' to be colder than the loop header.   Turning on this for static prediction really depends on the false rate. It seems to be this can get wrong pretty easily for very hot loops (which is also the most important thing to optimize for).


http://reviews.llvm.org/D19950





More information about the llvm-commits mailing list