[PATCH] D76078: [AArch64][SVE] Add a pass for SVE intrinsic optimisations

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 12 13:01:30 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetMachine.cpp:441
+  // Expand any SVE vector library calls that we can't code generate directly.
+  bool ExpandToOptimize = (TM->getOptLevel() != CodeGenOpt::None);
+  if (EnableSVEIntrinsicOpts && TM->getOptLevel() == CodeGenOpt::Aggressive)
----------------
unused bool?


================
Comment at: llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp:56
+
+  static bool processPhiNode(Instruction *I);
+
----------------
`processPhiNode(IntrinsicInst *I)`?


================
Comment at: llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp:109
+
+  auto *PN = dyn_cast<PHINode>(X->getOperand(0));
+  if (!PN)
----------------
Please use getArgOperand() to get the arguments of calls.


================
Comment at: llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp:234
+  DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
+  bool Changed = false;
+
----------------
You might want to check whether the module actually declares any of the SVE intrinsics before you iterate over the whole function.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76078





More information about the cfe-commits mailing list