Commit 9190ad1
committed
PHIElimination: add target hook to control reuse.
Add PHI reuse hook so that a target can decide if temporary register
during PHI node elimination can be reused. By default, two phis are
allowed to use the same temporary register if their right-hand-sides
are the same.
However, the left-hand sides of phis need to be checked as well
for some targets, such as a GPU target. If the register banks of
phis's left-hand sides are diffrerent, reuse is not allowed.
Thus, this change adds a target hook for this kind of checking
as it is target-dependent.
This change has no functional change.
This is to resolve the issue:
#1635001 parent b9ea93c commit 9190ad1
File tree
2 files changed
+14
-3
lines changed- llvm
- include/llvm/CodeGen
- lib/CodeGen
2 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2169 | 2169 | | |
2170 | 2170 | | |
2171 | 2171 | | |
2172 | | - | |
| 2172 | + | |
2173 | 2173 | | |
2174 | 2174 | | |
2175 | 2175 | | |
| |||
2179 | 2179 | | |
2180 | 2180 | | |
2181 | 2181 | | |
2182 | | - | |
| 2182 | + | |
2183 | 2183 | | |
2184 | 2184 | | |
2185 | 2185 | | |
| |||
2191 | 2191 | | |
2192 | 2192 | | |
2193 | 2193 | | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
2194 | 2205 | | |
2195 | 2206 | | |
2196 | 2207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| |||
0 commit comments