[PATCH] D59039: [DAGCombine] Allow GatherAllAliases to pass through inline asm calls and glued nodes.

Nirav Dave via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 12:01:00 PDT 2019


niravd marked an inline comment as done.
niravd added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:19466
+      if (!IsLoad)
+        IsSafe = IsSafe && (EIInt & (InlineAsm::Extra_MayLoad));
+      if (IsSafe && hasGluedInputChain(C.getNode())) {
----------------
efriedma wrote:
> In terms of the actual checks here, is this sufficient to catch any inline asm that accesses memory?  Do you need to check for Extra_HasSideEffects?  Do you need to check for "indirect" operands separately?  (I think it's possible to write an indirect register operand in IR, although I'm not sure clang ever generates them...)
SelectionDAGBuilder updates the inlineasm's ExtraInfo based on the asm parameter constraints so checking extra info should be should be sufficient.

Also, a check for HasExtraSideEffects is probably needed. I've updated the patch as such.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59039





More information about the llvm-commits mailing list