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

Yingwei Zheng via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 30 09:26:37 PDT 2024


dtcxzyw wrote:

> This causes some compile-time regression on lencod with LTO (https://llvm-compile-time-tracker.com/compare.php?from=eaf87d32754beb5bec10bab517bf56e25575b48e&to=b03af0f9bc4e83de8ed78b55b1e0fc0abb9af24e&stat=instructions%3Au). I've seen a similar regression when testing a similar change in CVP (#99620), so it seems that the extra range information has some kind of negative compile-time effect. Unfortunately, I have not been able to reproduce it locally. callgrind on the link step only gives a pretty small difference in instructions.

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`.


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


More information about the cfe-commits mailing list