This is an archive of the discontinued LLVM Phabricator instance.

VirtRegMap: Add undef flag when reading undefined subregisters.
ClosedPublic

Authored by MatzeB on Jun 15 2015, 6:50 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 27745.Jun 15 2015, 6:50 PM
MatzeB retitled this revision from to VirtRegMap: Add undef flag when reading undefined subregisters..
MatzeB updated this object.
MatzeB edited the test plan for this revision. (Show Details)
MatzeB added a reviewer: qcolombet.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: Unknown Object (MLST).

As for a testcase: I couldn't create a test with any no in-tree target where the undef reads wouldn't be optimized away earlier.

qcolombet accepted this revision.Jun 16 2015, 9:33 AM
qcolombet edited edge metadata.

Hi Matthias,

LGTM with a couple of comments.

Cheers,
-Quentin

lib/CodeGen/RegisterCoalescer.cpp
2637 ↗(On Diff #27745)

Not a big deal, but I’d do the API update as a separate commit.
Now, it feels kind of strange to have a coalescer change given we are fixing the VirtRegMap :).

lib/CodeGen/VirtRegMap.cpp
301 ↗(On Diff #27745)

Add a message in the assert, like precondition is violated, subreg must be != 0.

This revision is now accepted and ready to land.Jun 16 2015, 9:33 AM
This revision was automatically updated to reflect the committed changes.