[PATCH] D62631: [LoopIdiom] Basic OptimizationRemarkEmitter handling

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 14:55:39 PDT 2019


thegameg added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:980
+                  .str();
+  });
+
----------------
Can we make the function name an argument of the remark? Something like (haven't tried to see if it actually works):

```
ORE.emit([&]() {
    return OptimizationRemark(DEBUG_TYPE, "ProcessLoopStridedStore",
                              NewCall->getDebugLoc(), Preheader)
           << "Transformed loop-strided store into a call to "
            << ore::NV(NewCall->getCalledFunction()) << "() function";
  });
```

And I guess the same applies to the other remark.

This way, the diagnostic will still show up in the same way but the serialized version will have the function (with its debug loc if available) as a separate argument.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62631





More information about the llvm-commits mailing list