This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Commit f445e39
authored
[SimplifyCFG] Use isWritableObject() API (llvm#110127)
SimplifyCFG store speculation currently has some homegrown code to check
for a writable object, handling the alloca special case only.
Switch it to use the generic isWritableObject() API, which means that we
also support byval arguments, allocator return values, and writable
arguments.
I've adjusted isWritableObject() to also check for the noalias attribute
when handling writable. Otherwise, I don't think that we can generalize
from at-entry writability. This was not relevant for previous uses of
the function, because they'd already require noalias for other reasons
anyway.1 parent dd2792a commit f445e39
File tree
3 files changed
+20
-24
lines changed- llvm
- lib
- Analysis
- Transforms/Utils
- test/Transforms/SimplifyCFG
3 files changed
+20
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
892 | 892 | | |
893 | 893 | | |
894 | 894 | | |
895 | | - | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
896 | 899 | | |
897 | 900 | | |
898 | 901 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
3057 | 3058 | | |
3058 | 3059 | | |
3059 | 3060 | | |
3060 | | - | |
3061 | | - | |
3062 | | - | |
3063 | | - | |
3064 | | - | |
3065 | | - | |
3066 | | - | |
3067 | | - | |
| 3061 | + | |
| 3062 | + | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
3068 | 3069 | | |
3069 | 3070 | | |
| 3071 | + | |
3070 | 3072 | | |
3071 | 3073 | | |
3072 | 3074 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 204 | + | |
| 205 | + | |
209 | 206 | | |
210 | 207 | | |
211 | 208 | | |
| |||
235 | 232 | | |
236 | 233 | | |
237 | 234 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 235 | + | |
| 236 | + | |
243 | 237 | | |
244 | 238 | | |
245 | 239 | | |
| |||
267 | 261 | | |
268 | 262 | | |
269 | 263 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 264 | + | |
| 265 | + | |
275 | 266 | | |
276 | 267 | | |
277 | 268 | | |
| |||
0 commit comments