[PATCH] D140045: [X86] Move RDFLAGS/WRFLAGS expansion until after RA
Bill Wendling via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 10:14:01 PST 2022
void added a comment.
In D140045#3996240 <https://reviews.llvm.org/D140045#3996240>, @efriedma wrote:
> You should be able to teach frame lowering to compute the correct offsets by fixing X86InstrInfo::getSPAdjust(). Maybe that's better than trying to avoid the use of frame indexes between the push and pop?
That's the correct general fix for this issue. Though I still maintain that this is a good addition. Having reloads occurring in the middle of these two instructions isn't really beneficial.
================
Comment at: llvm/lib/Target/X86/X86InstrInfo.td:1389
-let mayLoad = 1, mayStore = 1, usesCustomInserter = 1,
+let isPseudo = 1, mayLoad = 1, mayStore = 1, usesCustomInserter = 1,
SchedRW = [WriteRMW], Defs = [ESP] in {
----------------
craig.topper wrote:
> pengfei wrote:
> > pengfei wrote:
> > > craig.topper wrote:
> > > > pengfei wrote:
> > > > > Seems not needed.
> > > > I think it's need to make expandPostRAPseudo get called.
> > > It just checks `isPseudo` https://github.com/llvm/llvm-project/blob/main/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp#L199-L203
> > I mean `usesCustomInserter = 1` is not needed since the code is removed from EmitInstrWithCustomInserter.
> Agreed. usesCustomInserter can be removed
Ah! Okay.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140045/new/
https://reviews.llvm.org/D140045
More information about the llvm-commits
mailing list