[PATCH] D76639: Change X86RetpolineThunks from a MachineFunctionPass to a ModulePass

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 23 13:38:46 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/X86/X86RetpolineThunks.cpp:164
+                                             const TargetInstrInfo *TII,
+                                             StringRef Name, unsigned Reg,
+                                             bool Is64Bit) {
----------------
s/unsigned/Register


================
Comment at: llvm/lib/Target/X86/X86RetpolineThunks.cpp:213-215
+  // Set MF properties. We never use vregs or phis...
   MF.getProperties().set(MachineFunctionProperties::Property::NoVRegs);
+  MF.getProperties().set(MachineFunctionProperties::Property::NoPHIs);
----------------
This isn't the right way to do this, and the stated reasoning doesn't make sense. The pass should override getRequiredProperties/getSetProperties/getClearedProperties. This isn't a regalloc pass that actually triggers these conditions


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

https://reviews.llvm.org/D76639





More information about the llvm-commits mailing list