[PATCH] D29011: [IR] Add Freeze instruction

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 13 00:11:52 PDT 2019


lebedev.ri marked an inline comment as done.
lebedev.ri added a comment.

In D29011#1707396 <https://reviews.llvm.org/D29011#1707396>, @aqjune wrote:

> In D29011#1707278 <https://reviews.llvm.org/D29011#1707278>, @lebedev.ri wrote:
>
> > Should you add `llvm::Freeze` here by inheriting from `UnaryOperator` to make `isa<Freeze>(Op)` possible?
>
>
> Couldn't you kindly point which place is good to update?


Right after where the `llvm::UnaryOperator` is defined in `llvm/include/llvm/IR/InstrTypes.h` i think.
See `OverflowingBinaryOperator` for an example.



================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:671
   void visitFNeg(const User &I) { visitUnary(I, ISD::FNEG); }
+  void visitFreeze(const User &I);
 
----------------
aqjune wrote:
> jdoerfert wrote:
> > The lady of the lake says this should be:
> >   `void visitFreeze(const User &I) { visitUnary(I, ISD::FREEZE); }`
> > If you have reason not to do it this way, also replace `visitUnrary` with `visitFNeg`, though I'd prefer not to.
> ISD::FREEZE will be added in the next patch - https://reviews.llvm.org/D29014 .
> Do you want to move the definition of ISD::FREEZE to this patch? @lebedev.ri 
Oh good point, let's leave as is.


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

https://reviews.llvm.org/D29011





More information about the llvm-commits mailing list