Commit 0edb80c
[flang][OMPIRbuilder] Set debug loc on terminator created by splitBB. (llvm#125897)
Fixes llvm#125088.
When splitBB is called with createBranch=true, it creates a branch
instruction in the old block. But no debug loc is set on that branch
instruction. If that is used as InsertPoint in the restoreIP, it has the
potential to set the current debug location to null and subsequent
instruction will come out without a debug location. This caused the
verification check to fail as shown in the bug report.
This PR changes splitBB and spliceBB function to also take a debugLoc
parameter which can be used to set the debug location of the branch
instruction.1 parent 6a5af62 commit 0edb80c
File tree
5 files changed
+76
-15
lines changed- llvm
- include/llvm/Frontend/OpenMP
- lib/Frontend/OpenMP
- unittests/Frontend
- mlir
- lib/Target/LLVMIR/Dialect/OpenMP
- test/Target/LLVMIR
5 files changed
+76
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | | - | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
326 | 328 | | |
327 | 329 | | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
332 | | - | |
| 334 | + | |
333 | 335 | | |
334 | 336 | | |
335 | 337 | | |
| |||
341 | 343 | | |
342 | 344 | | |
343 | 345 | | |
344 | | - | |
| 346 | + | |
345 | 347 | | |
346 | 348 | | |
347 | 349 | | |
348 | 350 | | |
349 | | - | |
| 351 | + | |
350 | 352 | | |
351 | 353 | | |
352 | 354 | | |
353 | 355 | | |
354 | 356 | | |
355 | 357 | | |
356 | 358 | | |
357 | | - | |
| 359 | + | |
358 | 360 | | |
359 | 361 | | |
360 | 362 | | |
| |||
368 | 370 | | |
369 | 371 | | |
370 | 372 | | |
371 | | - | |
| 373 | + | |
372 | 374 | | |
373 | 375 | | |
374 | 376 | | |
| |||
5413 | 5415 | | |
5414 | 5416 | | |
5415 | 5417 | | |
5416 | | - | |
| 5418 | + | |
5417 | 5419 | | |
5418 | 5420 | | |
5419 | 5421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7680 | 7680 | | |
7681 | 7681 | | |
7682 | 7682 | | |
| 7683 | + | |
| 7684 | + | |
| 7685 | + | |
| 7686 | + | |
| 7687 | + | |
| 7688 | + | |
| 7689 | + | |
| 7690 | + | |
| 7691 | + | |
| 7692 | + | |
| 7693 | + | |
| 7694 | + | |
| 7695 | + | |
| 7696 | + | |
| 7697 | + | |
| 7698 | + | |
7683 | 7699 | | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1544 | 1544 | | |
1545 | 1545 | | |
1546 | 1546 | | |
1547 | | - | |
| 1547 | + | |
| 1548 | + | |
1548 | 1549 | | |
1549 | 1550 | | |
1550 | 1551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments