This is an archive of the discontinued LLVM Phabricator instance.

MachineBasicBlock: Save LaneMask with livein registers.
ClosedPublic

Authored by MatzeB on Aug 28 2015, 11:43 AM.

Details

Summary

With subregister liveness we can detect the case where only parts of a
register are live in, this is expressed as a 32bit lanemask. The current
code only keeps registers in the live-in list and therefore enumerated
all subregisters affected by the lanemask. This turned out to be too
conservative as the subregister may also cover additional parts of the
lanemask which are not live. Expressing a given lanemask by enumerating
a minimum set of subregisters is computationally expensive so the best
solution is to simply change the live-in list to store the lanemasks as
well. This will reduce memory usage for targets using subregister
liveness and slightly increase it for other targets.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 33449.Aug 28 2015, 11:43 AM
MatzeB retitled this revision from to MachineBasicBlock: Save LaneMask with livein registers..
MatzeB updated this object.
MatzeB added a reviewer: qcolombet.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added subscribers: atrick, llvm-commits.
qcolombet added inline comments.Aug 31 2015, 4:58 PM
lib/CodeGen/MachineBasicBlock.cpp
327 ↗(On Diff #33449)

In theory, we could remove just a sub register of an existing live range.
Shouldn’t this API take a LaneMask as well?

335 ↗(On Diff #33449)

Ditto.
We may want to query just a given lane, don’t we?

MatzeB updated this revision to Diff 33991.Sep 3 2015, 4:53 PM

New version with lanemask aware isLiveIn() and removeLiveIn()

qcolombet accepted this revision.Sep 3 2015, 7:19 PM
qcolombet edited edge metadata.

Hi Matthias,

LGTM.

Thanks,
-Quentin

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