[PATCH] D40330: Separate ExecutionDepsFix into 4 parts - enable breaking false dependencies for all reg classes.

Marina Yatsina via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 02:15:19 PST 2018


myatsina added a comment.

I've addressed the comments in this review and done the commit based on the LGTM in https://reviews.llvm.org/D40333, which is the "end version" of all these refactoring changes after more refactoring and clang-format.



================
Comment at: lib/CodeGen/ExecutionDepsFix.cpp:878
+  const SmallVectorImpl<LoopTraversal::TraversedMBBInfo>
+      &TraversedMBBInfoOrder = Traversal.traverse(mf);
+  for (auto TraversedMBB : TraversedMBBInfoOrder) {
----------------
craig.topper wrote:
> traverse is returning an object not a reference so we shouldn't be capturing by reference.
> 
> You may want to consider having the caller pass a SmallVector to traverse. That way traverse doesn't have to hardcode an explicit size for the SmallVector.
I've removed  in the commit the redundant consts and references as you suggested.
In a later commit I define a dedicated type that obscures the SmallVector size (you can see it in the https://reviews.llvm.org/D40333 review).



Repository:
  rL LLVM

https://reviews.llvm.org/D40330





More information about the llvm-commits mailing list