llvm-project
1768978e - [Analysis] Cache generation of SCEV expander overflow checks (#213013)

Commit
6 days ago
[Analysis] Cache generation of SCEV expander overflow checks (#213013) When creating SCEV checks as part of loop vectorisation we often generate overflow checks, which leads to lots of duplicated calls to the umul_with_overflow intrinsic. These calls should be cleaned up during codegen. However, it is unfortunate that the current LLVM method of calculating the cost of IR in a block involves looping over each instruction and adding the costs individually with no thought to the trivial CSE or DCE optimisations that would take place. In the absence of a more sophisticated method of cost analysis, for now I've chosen to explicitly CSE these overflow checks during SCEV expansion.
Author
Parents
Loading