[PATCH] D16912: Improve the C API echo test tool to emit basic block is the right order.
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 9 11:59:26 PST 2016
joker.eph added inline comments.
================
Comment at: tools/llvm-c-test/echo.cpp:348
@@ +347,3 @@
+ fprintf(stderr, "Basic block is not a basic block...\n");
+ exit(-1);
+ }
----------------
`report_fatal_error(..)` ?
================
Comment at: tools/llvm-c-test/echo.cpp:354
@@ -325,2 +353,3 @@
+ fprintf(stderr, "Basic block name do not match: %s and %s\n", Name, VName);
exit(-1);
}
----------------
(same)
================
Comment at: tools/llvm-c-test/echo.cpp:368
@@ +367,3 @@
+ LLVMMoveBasicBlockAfter(BB, DeclareBB(Prev));
+ }
+
----------------
This is not clear to me that `CloneBB ` will enforce ordering in the absolute: if "Prev" hasn't been encountered yet it may be seen later and will be moved.
On the opposite if you're relying here on the order in which CloneBB is called, what is the ordering actually doing?
http://reviews.llvm.org/D16912
More information about the llvm-commits
mailing list