[PATCH] D105344: [DAGCombiner] Fold SETCC(FREEZE(x), y) to SETCC(x, y) if used by BRCOND

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 3 10:24:19 PDT 2021


aqjune added a comment.

In D105344#2856825 <https://reviews.llvm.org/D105344#2856825>, @aqjune wrote:

> In D105344#2855925 <https://reviews.llvm.org/D105344#2855925>, @nikic wrote:
>
>> Might it make sense to consider this as a fold on freeze, which walks a chain of one-use instructions down to a brcond? That would make it easier to generalize for looking through other instructions.
>
> Yep, it makes sense; will do that.

Well, I wanted to write a generalized worklist algorithm that traverses one-use operands from BRCOND and folds freeze if possible, but it seems SDNode is an immutable data structure?
I couldn't find setOperand()-like function from SDNode.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105344



More information about the llvm-commits mailing list