https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/119013
This fix the case, when single hot inlined callsite, prevent checks for all other. This helps to reduce number of removed checks up to 50% (deppedes on `cutoff-hot` value) . `ScalarOptimizerLateEPCallback` was happening during CGSCC walk, after each inlining, but this is effectively after inlining. Example, order in comments: ``` static void overflow() { // 1. Inline get/set if possible // 2. Simplify // 3. LowerAllowCheckPass set(get() + get()); } void test() { // 4. Inline // 5. Nothing for LowerAllowCheckPass overflow(); } ``` With this patch it will look like: ``` static void overflow() { // 1. Inline get/set if possible // 2. Simplify set(get() + get()); } void test() { // 3. Inline // 4. Simplify overflow(); } // Later, after inliner CGSCC walk complete: // 5. LowerAllowCheckPass for `overflow` // 6. LowerAllowCheckPass for `test` ``` _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits