[PATCH] D149146: [TailDuplicator] Don't constrain register classes due to debug instructions
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 19:24:00 PDT 2023
arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/CodeGen/TailDuplicator.cpp:434
+ // rather than constraining the register class further.
+ if (!NewMI.isDebugInstr())
+ ConstrRC = MRI->constrainRegClass(VI->second.Reg, OrigRC);
----------------
uabelho wrote:
> foad wrote:
> > Just a cosmetic thing, I'd prefer you swap the "if" and "else" cases so you don't have an "else" after an already negated condition.
> Sure, done!
ConstRC = isDebug ? MappedRC : MRI->constrain()?
Could you also just initialize ConstRC with MappedRC above?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149146/new/
https://reviews.llvm.org/D149146
More information about the llvm-commits
mailing list