[PATCH] D32245: Add an IR expansion pass for the experimental reductions

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 15:38:48 PDT 2017


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

LGTM, with a nit.



================
Comment at: lib/CodeGen/ExpandReductions.cpp:137
+  bool runOnFunction(Function &F) override {
+    auto *TTIP = getAnalysisIfAvailable<TargetTransformInfoWrapperPass>();
+    const TargetTransformInfo *TTI = TTIP ? &TTIP->getTTI(F) : nullptr;
----------------
I don't believe you should ever be in the situation you don't have a TTI here. So it should be safe to just do:

```
const auto *TTI = getAnalysis<TargetTransformInfoWrapperPass>().getTTI(F);
```



Repository:
  rL LLVM

https://reviews.llvm.org/D32245





More information about the llvm-commits mailing list