Commit 97e3eb7
committed
Don't record chain or glue operands in stackmap DAG nodes.
In the last LLVM sync, I tickled a bug in the "large stackmap locations"
support that we added to ykllvm a while back. It manifested when building
yklua. An "I shouldn't have already visited this node" assertion fails:
```
ld.lld: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:393: void llvm::ScheduleDAGSDNodes::BuildSchedUnits(): Assertion `N->getNodeId() == -1 && "Node already inserted!"' failed.
```
Upon inspecting the DAGs, the stackmap nodes contain glue and chain operands as
constituents of live variables. That makes zero sense! We are effectively
asking the compiler to record the location of something which isn't a piece of
data!
It causes two incoming glue and chains edges for some stackmap nodes, hence the
assertion failure (two visits instead of one).
This change omits chain and glue nodes when pushing stackmap operands and adds
an assertion to catch this problem should it arise again.1 parent 3a6ecd0 commit 97e3eb7
1 file changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9531 | 9531 | | |
9532 | 9532 | | |
9533 | 9533 | | |
| 9534 | + | |
| 9535 | + | |
| 9536 | + | |
| 9537 | + | |
| 9538 | + | |
9534 | 9539 | | |
9535 | 9540 | | |
9536 | 9541 | | |
| |||
9542 | 9547 | | |
9543 | 9548 | | |
9544 | 9549 | | |
9545 | | - | |
9546 | | - | |
| 9550 | + | |
| 9551 | + | |
| 9552 | + | |
| 9553 | + | |
| 9554 | + | |
9547 | 9555 | | |
9548 | 9556 | | |
9549 | 9557 | | |
| |||
9556 | 9564 | | |
9557 | 9565 | | |
9558 | 9566 | | |
| 9567 | + | |
| 9568 | + | |
| 9569 | + | |
| 9570 | + | |
| 9571 | + | |
| 9572 | + | |
| 9573 | + | |
| 9574 | + | |
9559 | 9575 | | |
9560 | 9576 | | |
9561 | 9577 | | |
| |||
0 commit comments