[PATCH] D88494: Add "SkipDead" parameter to TargetInstrInfo::DefinesPredicate

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 04:10:16 PDT 2020


SjoerdMeijer added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetInstrInfo.h:1402
   /// as the definition predicate(s) by reference.
-  virtual bool DefinesPredicate(MachineInstr &MI,
-                                std::vector<MachineOperand> &Pred) const {
+  /// SkipDead should be set to false at any point that dead
+  /// predicate instructions should be considered as being defined.
----------------
A post-commit nit while I am catching up with this.
I found Eli's explanation very useful:

> 1. The instruction doesn't define a predicate
> 2. The instruction defines a predicate, but the predicate is dead, and predicating it will make the definition go away.
> 3. The instruction defines a predicate, and it will continue to define a predicate after predication.

I think would be useful to add this to the comments, plus what SkipDead effects.
Don't think that would need a review.






Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88494



More information about the llvm-commits mailing list