Commit 1222bbb
committed
[Clang] Enable -fpointer-tbaa by default.
Support for more precise TBAA metadata has been added a while ago
(behind the -fpointer-tbaa flag). The more precise TBAA metadata allows
treating accesses of different pointer types as no-alias.
This helps to remove more redundant loads and stores in a number of
workloads.
Some highlights on the impact across llvm-test-suite's MultiSource,
SPEC2006 & SPEC2017 include:
* +2% more NoAlias results for memory access
* +4% more loops vectorized
* +3% more stores removed by DSE.
This closes a relatively big gap to GCC, which has been supporting
disambiguating based on pointer types for a long time.
(https://clang.godbolt.org/z/K7Wbhrz4q)
Pointer-TBAA support for pointers to builtin types has been added in
llvm#76612.
Support for user-defined types has been added in
llvm#110569.
There are 2 pending PRs with bug fixes for special cases uncovered
during some of my testing:
* llvm#116991
* llvm#1165961 parent 157d847 commit 1222bbb
File tree
11 files changed
+459
-439
lines changed- clang
- docs
- include/clang
- Basic
- Driver
- lib/Driver/ToolChains
- test
- CodeGenCXX
- CodeGenOpenCL
- CodeGen
- OpenMP
- unittests/CodeGen
11 files changed
+459
-439
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
214 | 218 | | |
215 | 219 | | |
216 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7361 | 7361 | | |
7362 | 7362 | | |
7363 | 7363 | | |
7364 | | - | |
7365 | | - | |
7366 | | - | |
| 7364 | + | |
| 7365 | + | |
| 7366 | + | |
| 7367 | + | |
| 7368 | + | |
| 7369 | + | |
7367 | 7370 | | |
7368 | 7371 | | |
7369 | 7372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5935 | 5935 | | |
5936 | 5936 | | |
5937 | 5937 | | |
5938 | | - | |
| 5938 | + | |
5939 | 5939 | | |
5940 | | - | |
| 5940 | + | |
5941 | 5941 | | |
5942 | 5942 | | |
5943 | 5943 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
Large diffs are not rendered by default.
Lines changed: 222 additions & 222 deletions
Large diffs are not rendered by default.
0 commit comments