Commit 9f271dd
committed
[AMDGPU][SplitModule] Fix a couple of issues
A static analysis tool found that ModuleCost could be zero, so would
perform divide by zero when being printed. Perhaps this is unreachable
in practice, but the fix is straightforward enough and unlikely to be a
performance concern.
The same tool warned that a division was always being performed in
integer division, so was either 0.0 or 1.0. This doesn't seem
intentional, so has been fixed to return a true ratio using
floating-point division. This has a knock-on effect on how a test was
splitting modules.1 parent 99fd1c5 commit 9f271dd
File tree
2 files changed
+10
-8
lines changed- llvm
- lib/Target/AMDGPU
- test/tools/llvm-split/AMDGPU
2 files changed
+10
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| |||
1101 | 1102 | | |
1102 | 1103 | | |
1103 | 1104 | | |
1104 | | - | |
| 1105 | + | |
1105 | 1106 | | |
1106 | 1107 | | |
1107 | 1108 | | |
| |||
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | | - | |
29 | 31 | | |
30 | | - | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
0 commit comments