This is an archive of the discontinued LLVM Phabricator instance.

[FastISel][SelectionDAG]Teach fastISel about GC intrinsics
ClosedPublic

Authored by anna on Jun 20 2017, 2:43 PM.

Details

Summary

We are crashing in LLC at O0 when gc intrinsics are present in the block.
The reason being FastISel performs basic block ISel by modifying GC.relocates
to be the first instruction in the block. This can cause us to visit the GC
relocate before it's corresponding GC.statepoint is visited, which is incorrect.
When we lower the statepoint, we record the base and derived pointers, along
with the gc.relocates. After this we can visit the gc.relocate.

This patch avoids fastISel from incorrectly creating the block with gc.relocate
as the first instruction.

Diff Detail

Repository
rL LLVM

Event Timeline

anna created this revision.Jun 20 2017, 2:43 PM
anna edited reviewers, added: mcrosier, apilipenko; removed: qikon.Jun 29 2017, 10:34 AM

Still LGTM :)

anna accepted this revision.Jul 4 2017, 6:57 AM

I'm going ahead and accepting the revision based on @skatkov 's LGTM above (and haven't heard any comments from other reviewers). If there's some future comments, I'll address it in post commit review. Thanks.

This revision is now accepted and ready to land.Jul 4 2017, 6:57 AM
This revision was automatically updated to reflect the committed changes.