This is an archive of the discontinued LLVM Phabricator instance.

RegisterPressure: Simplify close{Top|Bottom}()
ClosedPublic

Authored by MatzeB on Sep 11 2015, 1:46 PM.

Details

Summary
  • There are no duplicate registers in LiveRegs list we are copying from and so we do not need to sort the registers.
  • Simply use SmallVector::apend instead of a loop between begin() and end() with push_back().

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 34580.Sep 11 2015, 1:46 PM
MatzeB retitled this revision from to RegisterPressure: Simplify close{Top|Bottom}().
MatzeB updated this object.
MatzeB added a reviewer: atrick.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
atrick accepted this revision.Sep 11 2015, 11:27 PM
atrick edited edge metadata.

The sorting was needed at one point, but since you're integrating the register pressure result into the tracker it should be self-contained and safe.

This revision is now accepted and ready to land.Sep 11 2015, 11:27 PM
This revision was automatically updated to reflect the committed changes.