[PATCH] D48230: [PredicateInfo] Order instructions in different BBs by DFSNumIn.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 19 12:08:47 PDT 2018


efriedma added inline comments.


================
Comment at: lib/Transforms/Utils/OrderedInstructions.cpp:17
 
+bool OrderedInstructions::localComesBefore(const Instruction *InstA,
+                                           const Instruction *InstB) const {
----------------
localDominates.


================
Comment at: lib/Transforms/Utils/OrderedInstructions.cpp:41
+
+bool OrderedInstructions::comesBefore(const Instruction *InstA,
+                                      const Instruction *InstB) const {
----------------
Maybe rename this dfsBefore, so it's more clear what it means by "before"?


================
Comment at: test/Transforms/Util/PredicateInfo/ordering.ll:1
+; RUN: opt -print-predicateinfo -analyze -debug < %s 2>&1 | FileCheck %s
+
----------------
Need a REQUIRES line to use -debug.

Instead of checking debug output, could we check the use-list order?  (-preserve-ll-uselistorder)


https://reviews.llvm.org/D48230





More information about the llvm-commits mailing list