[PATCH] D34862: [CGP] Relax a bit restriction for optimizeMemoryInst to extend scope

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 20:54:00 PDT 2017


skatkov added inline comments.


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4361
+    }
+    if (!Count) {
+      DEBUG(dbgs() << "CGP: Found      local addrmode: " << AddrMode << "\n");
----------------
efriedma wrote:
> This is still essentially quadratic: optimizeMemoryInst itself is called in a loop which iterates over the basic block.
Do you see a better way to detect that all instructions in AddrModeInsts is defined earlier than MemoryInst or you just propose to drop this improvement due to its complexity?


https://reviews.llvm.org/D34862





More information about the llvm-commits mailing list