[PATCH] D144933: [instcombine] Simplify separate_storage hints.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 01:00:56 PST 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2485
+    // avoid having to do so repeatedly there.
+    if (EnableSeparateStorageAnalysis) {
+      for (unsigned Idx = 0; Idx < II->getNumOperandBundles(); Idx++) {
----------------
This should be done unconditionally, independently of the BasicAA flag.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2494
+            if (Hint != UnderlyingObject) {
+              const_cast<Use &>(U).set(UnderlyingObject);
+              if (Instruction *HintI = dyn_cast<Instruction>(Hint)) {
----------------
Use `replaceUse()` instead, drop code below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144933



More information about the llvm-commits mailing list