Commit 7392432
authored
[LLVM] Remove the "ret_void" argument of AddFunction (#15127)
Prior to this commit, the `"ret_void"` argument needed to be
explicitly provided to `CodeGenLLVM::AddFunction` and
`CodeGenLLVM::DeclareFunction`. If this was inconsistent with the
`builtin::ret()` usage within the `PrimFunc`, this could cause
the incorrect return type in the generated LLVM-IR, resulting in LLVM
IR verification failures.
This commit removes the `"ret_void"` argument, instead using the type
annotation in `PrimFunc::ret_type`, removing this opportunity for
inconsistency.
This PR is intended to fix a ROCm regression reported in
#14901 (comment).1 parent bee073b commit 7392432
File tree
4 files changed
+16
-16
lines changed- src/target/llvm
4 files changed
+16
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
262 | | - | |
| 261 | + | |
263 | 262 | | |
264 | 263 | | |
265 | 264 | | |
| |||
275 | 274 | | |
276 | 275 | | |
277 | 276 | | |
278 | | - | |
279 | | - | |
280 | | - | |
| 277 | + | |
281 | 278 | | |
282 | | - | |
| 279 | + | |
283 | 280 | | |
284 | 281 | | |
285 | 282 | | |
| |||
297 | 294 | | |
298 | 295 | | |
299 | 296 | | |
300 | | - | |
| 297 | + | |
301 | 298 | | |
302 | 299 | | |
303 | | - | |
| 300 | + | |
304 | 301 | | |
305 | 302 | | |
306 | 303 | | |
| |||
341 | 338 | | |
342 | 339 | | |
343 | 340 | | |
344 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
0 commit comments