This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Use [MC]Register in RegAllocPBQP & RegisterCoalescer
ClosedPublic

Authored by gjain on Oct 22 2020, 9:39 PM.

Diff Detail

Event Timeline

gjain created this revision.Oct 22 2020, 9:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 22 2020, 9:39 PM
gjain requested review of this revision.Oct 22 2020, 9:39 PM
mtrofin accepted this revision.Oct 23 2020, 8:14 AM

lgtm, some nits.

llvm/include/llvm/CodeGen/RegAllocPBQP.h
261

Nit: can drop the init here, because Register has a ctor.

llvm/include/llvm/MC/MCRegister.h
24

Remove new line here (unrelated change?)

This revision is now accepted and ready to land.Oct 23 2020, 8:14 AM
gjain updated this revision to Diff 300325.Oct 23 2020, 9:25 AM

Address comments

gjain marked 2 inline comments as done.Oct 23 2020, 9:31 AM
gjain added inline comments.
llvm/include/llvm/MC/MCRegister.h
24

I had to add hash_value for the hash_value function at llvm/include/llvm/CodeGen/RegAllocPBQP.h:124

mtrofin accepted this revision.Oct 26 2020, 2:12 PM
mtrofin added inline comments.Oct 26 2020, 2:17 PM
llvm/lib/CodeGen/RegisterCoalescer.cpp
1522

MCRegUnitIterator takes MCRegisters, so either Reg.asMCReg(), or NewMIImplDefs is MCRegister values (if the latter is correct)

gjain updated this revision to Diff 300792.Oct 26 2020, 2:28 PM
gjain marked 2 inline comments as done.

Address comments

llvm/lib/CodeGen/RegisterCoalescer.cpp
1522

Thanks NewMIImplDefs should be MCRegister values. Fixed now.

This revision was landed with ongoing or failed builds.Oct 26 2020, 5:14 PM
This revision was automatically updated to reflect the committed changes.