This is an archive of the discontinued LLVM Phabricator instance.

[MachineOutliner] Check the last instruction from the sequence when updating liveness
ClosedPublic

Authored by thegameg on Jul 13 2018, 7:49 AM.

Details

Summary

The MachineOutliner was doing an std::for_each from the call (inserted before the outlined sequence) to the iterator at the end of the sequence.

std::for_each needs the iterator past the end, so the last instruction was not taken into account when propagating the liveness information.

This fixes the machine verifier issue in machine-outliner-disubprogram.ll.

Diff Detail

Repository
rL LLVM

Event Timeline

thegameg created this revision.Jul 13 2018, 7:49 AM
thegameg edited reviewers, added: paquette; removed: jpaquette.
paquette accepted this revision.Jul 13 2018, 8:56 AM

LGTM, thanks for catching that!

This revision is now accepted and ready to land.Jul 13 2018, 8:56 AM
This revision was automatically updated to reflect the committed changes.