[PATCH] D80643: [CodeMoverUtils] Move OrderedInstructions to CodeMoverUtils

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 13:28:17 PDT 2020


nikic added a comment.

In D80643#2074009 <https://reviews.llvm.org/D80643#2074009>, @RithikSharma wrote:

> Moving OrderedInstructions functions to CodeMoverUtils.cpp and making them static doesn't allow the unittest to pass! The unittest requires the call of "dominates" and the only way to fulfill is to define "dominates" into CodeMoverUtils.h which is not the preferred step!


Not sure I follow. As far as I know, `OrderedInstructions::dominates()` is same as `DominatorTree::dominates()` at this point, so you can just use the DominatorTree method. I'm also not sure what the added `DominanceTest` is force. It doesn't seem related to CodeMoverUtils and only tests dominance queries, for which we already have dedicated domtree construction tests.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80643





More information about the llvm-commits mailing list