Commit 1815f81
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 56ab56c commit 1815f81
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 | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
243 | 247 | | |
244 | 248 | | |
245 | 249 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
7387 | 7387 | | |
7388 | 7388 | | |
7389 | 7389 | | |
7390 | | - | |
7391 | | - | |
7392 | | - | |
| 7390 | + | |
| 7391 | + | |
| 7392 | + | |
| 7393 | + | |
| 7394 | + | |
| 7395 | + | |
7393 | 7396 | | |
7394 | 7397 | | |
7395 | 7398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5937 | 5937 | | |
5938 | 5938 | | |
5939 | 5939 | | |
5940 | | - | |
| 5940 | + | |
5941 | 5941 | | |
5942 | | - | |
| 5942 | + | |
5943 | 5943 | | |
5944 | 5944 | | |
5945 | 5945 | | |
| |||
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