[PATCH] D79769: [GlobalISel] Create an opt-in unified GlobalISel + SelectionDAG pipeline.

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 11:17:05 PDT 2020


paquette added inline comments.


================
Comment at: llvm/lib/CodeGen/ResetMachineFunctionPass.cpp:78-81
+        /*        using MFP = MachineFunctionProperties::Property;
+        MF.getProperties().reset(MFP::Legalized);
+        MF.getProperties().reset(MFP::RegBankSelected);
+        MF.getProperties().reset(MFP::Selected);*/
----------------
delete commented out code?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:412-413
   // If we already selected that function, we do not need to run SDISel.
+  // FIXME: GlobalISel passes are scheduled before SelectionDAGISel, and
+  // they will set the Selected property even if they are being skipped.
   if (mf.getProperties().hasProperty(
----------------
This comment makes it sound like this doesn't work at all?

If GISel skips a function, then SelectionDAG will just not select it?


================
Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1349-1352
+  if (!MF.getTarget().getGlobalISel()) {
+    if (!F.hasFnAttribute("use-globalisel"))
+      return true;
+  }
----------------
maybe more succinct

```
if (!MF.getTarget().getGlobalISel() && !F.hasFnAttribute("use-globalisel"))
  return true;
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79769





More information about the llvm-commits mailing list