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

Markus Böck via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 14:13:11 PST 2022


zero9178 marked an inline comment as done.
zero9178 added inline comments.


================
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();
 }
----------------
rnk wrote:
> 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();
It does so using that property would probably be a good idea and be more generic! I am assuming you mean 
`MI.isCall() || (!MI.isPseudo() && !MI.isMetaInstruction())` though, so that the code below would find the first real or call instruction


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

https://reviews.llvm.org/D119644



More information about the llvm-commits mailing list