[PATCH] D81647: MIR Statepoint refactoring. Part 3: Spill GC Ptr regs.
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 00:38:25 PDT 2020
skatkov added a comment.
Please fix the bug Philip mentioned and I think we are ready to land it.
================
Comment at: llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp:130
+
+ // Skip deopt args
+ while (NumDeoptArgs--)
----------------
In InstrEmitter I see getStatepointGCArgStartIdx which does exactly the same what you need.
It also contains:
// FIXME: need a better place for this. Put it in StackMaps?
Can you do it in a separate patch (w/o review) and just re-use this utility function here?
================
Comment at: llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp:386
+ if (It != MBB->succ_end())
+ EHPad = *It;
+ }
----------------
This overall algorithm is very sensitive to alone EHPad.
Looking into machine verifier, I see that in some cases we can have more than one landing pad.
if (LandingPadSuccs.size() > 1 &&
!(AsmInfo &&
AsmInfo->getExceptionHandlingType() == ExceptionHandling::SjLj &&
BB && isa<SwitchInst>(BB->getTerminator())) &&
!isScopedEHPersonality(classifyEHPersonality(F.getPersonalityFn())))
report("MBB has more than one landing pad successor", MBB);
I would suggest to assert that here we have only one landing pad.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81647/new/
https://reviews.llvm.org/D81647
More information about the llvm-commits
mailing list