================
@@ -246,7 +246,17 @@ def RemoveDeadValues : Pass<"remove-dead-values"> {
do = square_and_double_of_y(5)
print(do)
```
+
+ Note: If `canonicalize` is set to "false", this pass does not remove any
+ block arguments / op results from ops that implement the
+ RegionBranchOpInterface. Instead, it just sets dead operands to
+ "ub.poison".
----------------
rengolin wrote:
> There is no fixed-point iteration / greedy pattern rewrite with
> `canonicalize=false`
By fixed point I meant "running the same pass over and over" until fixed point.
This is only relevant if the pass isn't one-shot with all replacements (which I
think you mean it is), so ignore that part.
> By "checks" I mean mainly the liveness analysis, which is computed at the
> beginning of every pass invocation.
Exactly, that's what I meant. So, if you do `-rdv=false`, then other passes,
then `-rdv=true`, you'll run the whole liveness analysis again, just to realize
all values have already been replaced by poison.
I was thinking of the case where you run `-rdv` and not all patterns can be
recognized (ex. needs inlining or DCE or hoisting) and then you run again,
which recognizes the missing patterns, marks them all as poison, and then
canonicalize. But in this case, I guess running twice with canonicalization
would perform the same action (first canon would not remove) anyway, and the
second liveness analysis is still required, so no extra work is done.
If I just proved my comment irrelevant, feel free to close this conversation.
:smile:
https://github.com/llvm/llvm-project/pull/173505
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits