[PATCH] D31587: MachineScheduler/ScheduleDAG: Add support for getNode2Index

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 3 09:25:12 PDT 2017


MatzeB added a comment.

- Choose a better function name!
- Now that the function is public you should also document some facts about it like what to use as index into the vector or the range of indizes coming out of it.
- Instead of returning `const vector<int>&` better use `ArrayRef<int>` as that gives less constraints on the internal implementation.
- Is it necessary to return the array as a whole or would a simpler function suffice that takes a single `const SUnit&` and returns the index into the corresponding topological ordering?


Repository:
  rL LLVM

https://reviews.llvm.org/D31587





More information about the llvm-commits mailing list