[PATCH] D77135: Provide operand indices to adjustSchedDependency
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 07:44:46 PDT 2020
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 {}
----------------
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77135/new/
https://reviews.llvm.org/D77135
More information about the llvm-commits
mailing list