Commit 90c738e
[IR] Introduce
The goal is to have ability to change logic compile time based on PGO
data.
Our primary application is removing UBSAN checks from hot code.
Then we'd like to use this for libc++ hardening and regular debug
asserts.
Previous attempt is #84214.
Benefits from special intrinsic vs #84214:
1. Resulting binary is 3% faster than removing traps (on
"test-suite/MultiSource/Benchmarks" with PGO+ThinLTO)
2. Intrinsic can be used from source code to change behavior from C/C++
program. E.g. enabling asserts in cold code.
3. Easier to match basic blocks.
RFC:
https://discourse.llvm.org/t/rfc-add-llvm-experimental-hot-intrinsic-or-llvm-hot/77641
---------
Co-authored-by: Nikita Popov <[email protected]>llvm.allow.{runtime,ubsan}.check() (#84850)1 parent 70deb7b commit 90c738e
2 files changed
+124
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27839 | 27839 | | |
27840 | 27840 | | |
27841 | 27841 | | |
| 27842 | + | |
| 27843 | + | |
| 27844 | + | |
| 27845 | + | |
| 27846 | + | |
| 27847 | + | |
| 27848 | + | |
| 27849 | + | |
| 27850 | + | |
| 27851 | + | |
| 27852 | + | |
| 27853 | + | |
| 27854 | + | |
| 27855 | + | |
| 27856 | + | |
| 27857 | + | |
| 27858 | + | |
| 27859 | + | |
| 27860 | + | |
| 27861 | + | |
| 27862 | + | |
| 27863 | + | |
| 27864 | + | |
| 27865 | + | |
| 27866 | + | |
| 27867 | + | |
| 27868 | + | |
| 27869 | + | |
| 27870 | + | |
| 27871 | + | |
| 27872 | + | |
| 27873 | + | |
| 27874 | + | |
| 27875 | + | |
| 27876 | + | |
| 27877 | + | |
| 27878 | + | |
| 27879 | + | |
| 27880 | + | |
| 27881 | + | |
| 27882 | + | |
| 27883 | + | |
| 27884 | + | |
| 27885 | + | |
| 27886 | + | |
| 27887 | + | |
| 27888 | + | |
| 27889 | + | |
| 27890 | + | |
| 27891 | + | |
| 27892 | + | |
| 27893 | + | |
| 27894 | + | |
| 27895 | + | |
| 27896 | + | |
| 27897 | + | |
| 27898 | + | |
| 27899 | + | |
| 27900 | + | |
| 27901 | + | |
| 27902 | + | |
| 27903 | + | |
| 27904 | + | |
| 27905 | + | |
| 27906 | + | |
| 27907 | + | |
| 27908 | + | |
| 27909 | + | |
| 27910 | + | |
| 27911 | + | |
| 27912 | + | |
| 27913 | + | |
| 27914 | + | |
| 27915 | + | |
| 27916 | + | |
| 27917 | + | |
| 27918 | + | |
| 27919 | + | |
| 27920 | + | |
| 27921 | + | |
| 27922 | + | |
| 27923 | + | |
| 27924 | + | |
| 27925 | + | |
| 27926 | + | |
| 27927 | + | |
| 27928 | + | |
| 27929 | + | |
| 27930 | + | |
| 27931 | + | |
| 27932 | + | |
| 27933 | + | |
| 27934 | + | |
| 27935 | + | |
| 27936 | + | |
| 27937 | + | |
| 27938 | + | |
| 27939 | + | |
| 27940 | + | |
| 27941 | + | |
| 27942 | + | |
| 27943 | + | |
| 27944 | + | |
| 27945 | + | |
| 27946 | + | |
| 27947 | + | |
| 27948 | + | |
| 27949 | + | |
| 27950 | + | |
| 27951 | + | |
| 27952 | + | |
| 27953 | + | |
| 27954 | + | |
| 27955 | + | |
27842 | 27956 | | |
27843 | 27957 | | |
27844 | 27958 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1731 | 1731 | | |
1732 | 1732 | | |
1733 | 1733 | | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
1734 | 1744 | | |
1735 | 1745 | | |
1736 | 1746 | | |
| |||
0 commit comments