<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Aug 11, 2016, at 6:00 PM, Hongbin Zheng <<a href="mailto:etherzhhb@gmail.com" class="">etherzhhb@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi <span style="font-size:12.8px" class="">Matthias,</span><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class="">Thanks a lot for the explanation. </span></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Aug 11, 2016 at 11:45 AM, Matthias Braun <span dir="ltr" class=""><<a href="mailto:mbraun@apple.com" target="_blank" class="">mbraun@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes the test-suite can be run without lnt (you can always just look at the LNT logfiles to see what commands it is running and run those yourself).<br class="">
<br class="">
Currently I would recommend using the cmake/lit version of the test-suite. You typically do something like:<br class="">
<br class="">
mkdir build && cd build<br class="">
cmake -GNinja -DCMAKE_C_COMPILER=/path/to/<wbr class="">my/clang -DTEST_SUITE_ARCH_FLAGS="-arch arm64" /path/to/test-suite<br class="">
ninja      # to build the benchmarks<br class="">
llvm-lit   # to run the benchmarks<br class="">
<br class="">
You should check "ccmake"/"cmake -LA" to learn about the available options as well as llvm-lit. You can either use llvm-lit from an llvm build or use the pypy packaged version (pip install lit). The cmake/lit version has no support to run custom backends through llc at the moment, you need to have a clang version that accepts -arch XXX for your target.<br class=""></blockquote><div class="">Sorry I didn't explain well. Here I want to use testsuite to test a customized compilation flow like:</div><div class=""><br class=""></div><div class="">clang -> opt-> <some other optimization tool> -> llc.</div><div class=""><br class=""></div><div class="">Is this possible by changing some of the makefile of llvm testsuite? </div></div></div></div></div></blockquote><div>It's probably possible by using one of the existing TEST.* files or writing your own. Unfortunately this system can get complicated and is not documented much. I don't really know how it works.</div><div><br class=""></div><div>An alternative to this could be that you write your own little python/shell script that acts like a compiler on the outside but internally translates to clang, opt, llc commands you want. You could point CMAKE_C_COMPILER to that script.</div><div><br class=""></div><div>- Matthias</div></div><br class=""></body></html>