[PATCH] D65593: [Attributor] Deduction based on path exploration

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 01:18:44 PST 2020


uenoku marked 2 inline comments as done.
uenoku added inline comments.


================
Comment at: llvm/include/llvm/Analysis/MustExecute.h:473
+        Instructions.push_back(*EIt);
+  }
+
----------------
jdoerfert wrote:
> My first impression is that we might want to shift the burden of collecting instructions to the user and just do the iterating here. The benefit is that we could use the return of `Pred` to indicate that we want to stop. I think we want to have a way to stop the search of the context if we don't expect to find better results anymore.
Addressed.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1050-1051
+
+        SetVector<const Use *> UsesInChild = Uses;
+        followUsesInContext(A, Explorer, &BB->front(), UsesInChild, ChildState);
+
----------------
baziotis wrote:
> This `UsesInChild` I think is not used anywhere. Probably put there since something has to be passed to the function. Can we do something to avoid inserting to it and deleting in every loop? (If I haven't missed something)
Yes, that's right.


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

https://reviews.llvm.org/D65593





More information about the llvm-commits mailing list