Commit 8e7461e
authored
[LoadStoreVectorizer] Batch alias analysis results to improve compile time (llvm#147555)
This should be generally good for a lot of LSV cases, but the attached
test demonstrates a specific compile time issue that appears in the
event where the `CaptureTracking` default max uses is raised.
Without using batching alias analysis, this test takes 6 seconds to
compile in a release build. With, less than a second. This is because
the mechanism that proves `NoAlias` in this case is very expensive
(`CaptureTracking.cpp`), and caching the result leads to 2 calls to that
mechanism instead of ~300,000 (run with -stats to see the difference)
This test only demonstrates the compile time issue if
`capture-tracking-max-uses-to-explore` is set to at least 1024, because
with the default value of 100, the `CaptureTracking` analysis is not
run, `NoAlias` is not proven, and the vectorizer gives up early.1 parent 54ec521 commit 8e7461e
File tree
2 files changed
+72
-5
lines changed- llvm
- lib/Transforms/Vectorize
- test/Transforms/LoadStoreVectorizer
2 files changed
+72
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
| 326 | + | |
326 | 327 | | |
327 | 328 | | |
328 | 329 | | |
| |||
543 | 544 | | |
544 | 545 | | |
545 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
546 | 551 | | |
547 | 552 | | |
548 | 553 | | |
| |||
569 | 574 | | |
570 | 575 | | |
571 | 576 | | |
572 | | - | |
| 577 | + | |
573 | 578 | | |
574 | 579 | | |
575 | 580 | | |
| |||
999 | 1004 | | |
1000 | 1005 | | |
1001 | 1006 | | |
1002 | | - | |
| 1007 | + | |
| 1008 | + | |
1003 | 1009 | | |
1004 | 1010 | | |
1005 | 1011 | | |
| |||
1066 | 1072 | | |
1067 | 1073 | | |
1068 | 1074 | | |
1069 | | - | |
| 1075 | + | |
| 1076 | + | |
1070 | 1077 | | |
1071 | 1078 | | |
1072 | 1079 | | |
| |||
1077 | 1084 | | |
1078 | 1085 | | |
1079 | 1086 | | |
1080 | | - | |
| 1087 | + | |
1081 | 1088 | | |
1082 | 1089 | | |
1083 | 1090 | | |
| |||
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
0 commit comments