Commit afc0557
authored
[IR][Attribute] Add support for intersecting AttributeLists; NFC (llvm#109719)
Add support for taking the intersection of two AttributeLists s.t the
result list contains attributes that are valid in the context of both
inputs.
i.e if we have `nonnull align(32) noundef` intersected with `nonnull
align(16) dereferenceable(10)`, the result is `nonnull align(16)`.
Further it handles attributes that are not-droppable. For example
dropping `byval` can change the nature of a callsite/function so its
impossible to correct a correct intersection if its dropped from the
result. i.e `nonnull byval(i64)` intersected with `nonnull` is
invalid.
The motivation for the infrastructure is to enable sinking/hoisting
callsites with differing attributes.1 parent 0dab022 commit afc0557
File tree
6 files changed
+731
-120
lines changed- llvm
- include/llvm/IR
- lib/IR
- unittests/IR
- utils/TableGen
6 files changed
+731
-120
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
| |||
208 | 213 | | |
209 | 214 | | |
210 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
211 | 220 | | |
212 | | - | |
| 221 | + | |
213 | 222 | | |
214 | 223 | | |
215 | 224 | | |
| |||
295 | 304 | | |
296 | 305 | | |
297 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
298 | 310 | | |
299 | 311 | | |
300 | 312 | | |
| |||
383 | 395 | | |
384 | 396 | | |
385 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
386 | 404 | | |
387 | 405 | | |
388 | 406 | | |
| |||
775 | 793 | | |
776 | 794 | | |
777 | 795 | | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
778 | 802 | | |
779 | 803 | | |
780 | 804 | | |
| |||
0 commit comments