This is an archive of the discontinued LLVM Phabricator instance.

Split LiveRangeCalc in LiveRangeCalc/LiveIntervalCalc. NFC
ClosedPublic

Authored by kariddi on Mar 22 2020, 8:53 PM.

Details

Summary

Refactor LiveRangeCalc such that it is now split into two classes

The objective is to split all the "register specific" logic away
from LiveRangeCalc.
The two new classes created are:

  • LiveRangeCalc - is meant as a generic class to compute and modify live ranges in a generic way. This class should deal only with SlotIndices and VNInfo objects.
  • LiveIntervalCals - is meant to be equivalent to the old LiveRangeCalc. It computes the liveness virtual registers tracked by a LiveInterval object.

With this refactoring LiveRangeCalc can be used to implement tracking of
liveness of LiveRanges that represent other things than just registers.

Diff Detail

Event Timeline

kariddi created this revision.Mar 22 2020, 8:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2020, 8:53 PM
arsenm added inline comments.Mar 23 2020, 10:54 AM
llvm/include/llvm/CodeGen/LiveIntervalCalc.h
52

s/unsigned/Register

61

Ditto

67

MCRegister

kariddi updated this revision to Diff 252241.Mar 24 2020, 1:03 AM

Addressing Matt's suggestions

kariddi marked 3 inline comments as done.Mar 24 2020, 1:04 AM
arsenm accepted this revision.Apr 1 2020, 12:19 PM

LGTM

This revision is now accepted and ready to land.Apr 1 2020, 12:19 PM
This revision was automatically updated to reflect the committed changes.