[PATCH] D119644: [X86][Win64] Avoid statepoints in trailing call position

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 13:55:56 PST 2022


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm

I have some other changes I want to make, but just go ahead and land this and I'll do them as a follow-up.



================
Comment at: llvm/lib/Target/X86/X86AvoidTrailingCall.cpp:70-71
 // A real instruction is a non-meta, non-pseudo instruction.  Some pseudos
 // expand to nothing, and some expand to code. This logic conservatively assumes
 // they might expand to nothing.
 static bool isRealInstruction(MachineInstr &MI) {
----------------
This comment about being "conservative" isn't correct anymore. I'll follow-up and fix it.


================
Comment at: llvm/lib/Target/X86/X86AvoidTrailingCall.cpp:73
 static bool isRealInstruction(MachineInstr &MI) {
-  return !MI.isPseudo() && !MI.isMetaInstruction();
+  return (!MI.isPseudo() && !MI.isMetaInstruction()) || MI.isStatepoint();
 }
----------------
So, statepoints are pseudo instructions that are later lowered to calls. Does the `MI.isCall()` predicate return true for statepoints? Could we use this condition?
  return !MI.isCall() && !MI.isPseudo() && !MI.isMetaInstruction();


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119644/new/

https://reviews.llvm.org/D119644



More information about the llvm-commits mailing list