This is an archive of the discontinued LLVM Phabricator instance.

Do not track subregister liveness when it brings no benefits
ClosedPublic

Authored by MatzeB on Mar 18 2015, 4:24 PM.

Details

Summary

Some subregisters are only to indicate different access sizes, while not
providing any way to actually divide the register up into multiple
disjunct parts. Avoid tracking subregister liveness in these cases as it
is not beneficial.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 22228.Mar 18 2015, 4:24 PM
MatzeB retitled this revision from to Do not track subregister liveness when it brings no benefits.
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).
qcolombet accepted this revision.Mar 18 2015, 4:53 PM
qcolombet edited edge metadata.

Hi Matthias,

The change LGTM with a few minor nitpicks.

As a follow up I would like a way to specify in table gen that we do not want to track some specific register classes.
For those cases, we do not want to generate the lanemask if we can, but at first we could abuse this flag I guess.
Could you file a PR for that?

Thanks,
-Quentin

include/llvm/CodeGen/MachineRegisterInfo.h
188 ↗(On Diff #22228)

Call subRegLivenessEnabled instead of checking the underlying variable.

191 ↗(On Diff #22228)

assert that VReg is a virtual register.

lib/CodeGen/LiveIntervalAnalysis.cpp
203 ↗(On Diff #22228)

The local variable seems useless.

This revision is now accepted and ready to land.Mar 18 2015, 4:53 PM
This revision was automatically updated to reflect the committed changes.