This is an archive of the discontinued LLVM Phabricator instance.

MachineSSAUpdater: insert IMPLICIT_DEF at top of basic block
ClosedPublic

Authored by nhaehnle on Sep 28 2019, 9:40 AM.

Details

Summary

When getValueInMiddleOfBlock happens to be called for a basic block
that has no incoming value at all, an IMPLICIT_DEF is inserted in that
block via GetValueAtEndOfBlockInternal. This IMPLICIT_DEF must be at
the top of its basic block or it will likely not reach the use that
the caller intends to insert.

Issue: https://github.com/GPUOpen-Drivers/llpc/issues/204

Diff Detail

Event Timeline

nhaehnle created this revision.Sep 28 2019, 9:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2019, 9:40 AM
arsenm accepted this revision.Oct 4 2019, 3:44 PM

LGTM

This revision is now accepted and ready to land.Oct 4 2019, 3:44 PM
This revision was automatically updated to reflect the committed changes.