[PATCH] D86262: [LoopIdiomRecognizePass] Options to disable part or the entire Loop Idiom Recognize Pass

Daniil Fukalov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 01:00:06 PDT 2020


dfukalov added a comment.

In D86262#2227676 <https://reviews.llvm.org/D86262#2227676>, @lebedev.ri wrote:

> Why is this the correct course of action?
> For example, if the IR already had memcpy/memset, the DA will also be pessimized, 
> so it really seems like a workaround, not a fix.
> Why not just enhance DA?

I agree with that, it seems to be better to improve DA. Is it feasible?



================
Comment at: llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp:111-114
+  None,   /* Proceed with loop idiom recognize pass */
+  All,    /* Disabled loop idiom recognize pass*/
+  Memcpy, /* Proceed, but do not convert loop to memcpy*/
+  Memset  /* Proceed, but do not convert loop to memset*/
----------------
Please prefer single-line comments in such cases.


================
Comment at: llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp:243
   bool runOnLoop(Loop *L, LPPassManager &LPM) override {
+    if (DisableLIRP.getValue() == DisableKind::All)
+      return false;
----------------
You can omit .getValue() here and below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86262



More information about the llvm-commits mailing list