[PATCH] D30626: MachineScheduler/ScheduleDAG: Add support for GetSubGraph

Axel Davy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 09:49:13 PDT 2017


axeldavy added inline comments.


================
Comment at: include/llvm/CodeGen/ScheduleDAG.h:723
+    /// StartSU, else it is true.
+    std::vector<int> GetSubGraph(const SUnit &StartSU, const SUnit &TargetSU,
+                                 bool &Success);
----------------
vpykhtin wrote:
> Isn't it enough to return empty vector on failure, without error flag?
Empty vector currently means that TargetSU is a direct successor for StartSU.

If we don't have error flag and say that a failure return empty vector,
we have to check if TargetSU is in StartSU's Succs.

I think it's better having directly an error flag.


Repository:
  rL LLVM

https://reviews.llvm.org/D30626





More information about the llvm-commits mailing list