[PATCH] D77135: Provide operand indices to adjustSchedDependency

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 03:11:48 PDT 2020


frasercrmck marked an inline comment as done.
frasercrmck added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/TargetSubtargetInfo.h:229-230
   // dependency.
-  virtual void adjustSchedDependency(SUnit *def, SUnit *use, SDep &dep) const {}
+  virtual void adjustSchedDependency(SUnit *Def, int DefOpIdx, SUnit *Use,
+                                     int UseOpIdx, SDep &Dep) const {}
 
----------------
frasercrmck wrote:
> foad wrote:
> > Why `int`? `unsigned` would be more usual.
> Good question. I went with `int` because there's already the idom that `-1` means operand not found. I suspect there could be cases where an operand isn't known, possibly for a non-data dependency. In that case we could still allow the passing of `-1`.
> 
> If we go with this idea, I'd suggest we update the documentation to make that clearer.
I've updated the documentation to describe how DefOpIdx and UseOpIdx may be used.


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

https://reviews.llvm.org/D77135





More information about the llvm-commits mailing list