Page MenuHomePhabricator

[TBLGEN] Allow to override RC weight
ClosedPublic

Authored by rampitec on Feb 12 2020, 2:53 PM.

Diff Detail

Event Timeline

rampitec created this revision.Feb 12 2020, 2:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2020, 2:53 PM
arsenm added inline comments.Feb 13 2020, 4:40 PM
llvm/include/llvm/Target/Target.td
279

Needs more explanation. What does the weight mean?

rampitec marked an inline comment as done.Feb 13 2020, 4:51 PM
rampitec added inline comments.
llvm/include/llvm/Target/Target.td
279

That's what TargetRegisterClass::getRegClassWeight() will return. It doesn't have much more info though: "Get the weight in units of pressure for this register class."

https://llvm.org/doxygen/classllvm_1_1TargetRegisterInfo.html#a55dc7cf067f4fdc07a902ca0f3e3a87d

Normally tablegen will use weight equal to a number of regunits per register, well "normalized". This value is used to measure register pressure.

rampitec updated this revision to Diff 244551.Feb 13 2020, 5:00 PM
rampitec marked an inline comment as done.

Updated comment.

arsenm accepted this revision.Feb 14 2020, 3:25 PM
arsenm added inline comments.
llvm/utils/TableGen/RegisterInfoEmitter.cpp
207

Single quotes

This revision is now accepted and ready to land.Feb 14 2020, 3:25 PM
rampitec updated this revision to Diff 244784.Feb 14 2020, 3:37 PM
rampitec marked an inline comment as done.

Replaced double with singe quotes in char output.

This revision was automatically updated to reflect the committed changes.