[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 30 11:40:33 PDT 2024


nikic wrote:

> Compilation time impact looks acceptable. If you want to further reduce compile-time impact, you can remove/stop inferring unnecessary range attributes on intrinsic calls (e.g., `call i32 range(i32 0, -2147483648) @llvm.abs(i32 %x)`). These trivial cases are already handled by `getRangeForIntrinsic`.

SCCP only infers ranges on function definitions. I think the extra ranges on intrinsic calls are because we first infer a range on the calling function and then it gets inlined, which back-propagates the range to the intrinsic call.

https://github.com/llvm/llvm-project/pull/106732


More information about the cfe-commits mailing list