Hi Violeta,<div><br></div><div>Sorry, I haven't had time to look since I'm in the process of an international move right now. </div><div><br></div><div>1. Yes; we also used the external tests though.</div><div><br></div><div>2. This is a much larger question; I'll look into it and get back to you ASAP.</div><div><br></div><div>Jessica<br><br>On Wednesday, October 19, 2016, Violeta Vukobrat <<a href="mailto:violeta.vukobrat@rt-rk.com">violeta.vukobrat@rt-rk.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jessica,<br>
<br>
<br>
Did you have time to take a look at these questions maybe?<br>
<br>
Thank you,<br>
<br>
<br>
Violeta<br>
<br>
<br>
On 04.10.2016. 18:20, Violeta Vukobrat wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Jessica,<br>
<br>
Thank you for your quick reply.<br>
<br>
I have a few more questions.<br>
<br>
1. In the results section of your original post, I suppose that by 'llvm test suite' you meant the SingleSource, MultiSource tests. Is that correct?<br>
<br>
2. I am trying to run these tests with the -mno-red-zone option, however I am running into issues, and I hope that you can help me.<br>
<br>
2.1. The first problem is that I get a segfault when trying to e.g. create an .o file. Example of building a test from the test-suite:<br>
<br>
clang++ -I<path-to-results-dir>/MultiS<wbr>ource/Benchmarks/Prolangs-C++/<wbr>simul -I<path-to-test-suite>/MultiSo<wbr>urce/Benchmarks/Prolangs-C++/<wbr>simul -I<path-to-test-suite>/include -I../../../../include -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -DNDEBUG -DSMALL_PROBLEM_SIZE -O3 -mno-red-zone -mllvm -enable-machine-outliner -m64 -fomit-frame-pointer -c <path-to-test-suite>/MultiSour<wbr>ce/Benchmarks/Prolangs-C++/<wbr>simul/simulate.cpp -o simulate.o<br>
<br>
The problem occurs in AsmPrinter::EmitFunctionBody()<wbr>, during running 'X86 Assembly / Object Emitter' pass on an outlined function.<br>
I haven't found what causes it, but the problematic bit seems to be the value of MI in EmitFunctionBody() in lib/CodeGen/AsmPrinter/AsmPrin<wbr>ter.cpp around line 854:<br>
....<br>
<br>
// Print a label for the basic block.<br>
EmitBasicBlockStart(MBB);<br>
for (auto &MI : MBB) { <---- line 854<br>
<br>
// Print the assembly for the instruction.<br>
if (!MI.isPosition() && !MI.isImplicitDef() && !MI.isKill() &&<br>
!MI.isDebugValue()) {<br>
....<br>
<br>
I haven't debugged this any further, so I don't really know what is the cause of the problem here.<br>
What makes it strange is that this segfault doesn't occur always (but does majority of the times), and also, it doesn't always happen for the same outlined function.<br>
I was wondering if you have come across a similar issue?<br>
<br>
<br>
2.2. When I try to build a simple example with '-mno-red-zone' and '-enable-machine-outliner' options, I get an 'undefined reference' to an outlined function, e.g. "undefined reference to `l_OUTLINED_FUNCTION0'". The .s file shows that the call that gets inserted is a call to `l_OUTLINED_FUNCTION0', and the outlined function has the label with a different prefix - `.LOUTLINED_FUNCTION0'.<br>
Did you have the same problem?<br>
<br>
Note: I have cloned your repository from <a href="https://github.com/ornata/llvm.git" target="_blank">https://github.com/ornata/llvm<wbr>.git</a> and for clang, I used commit aa5fc8f0161578a00cb5e61a19cb6c<wbr>6429ff85e3.<br>
<br>
<br>
I hope that you can help me resolve these issues, or tell me if I am doing something wrong here. :)<br>
<br>
Violeta<br>
<br>
<br>
On 29.09.2016. 09:38, Jessica Paquette wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Violeta,<br>
<br>
I compiled with<br>
<br>
clang -Oz and<br>
clang -Oz -mno-red-zone for comparisons against Oz<br>
<br>
and<br>
<br>
clang -O0 and<br>
clang -O0 -mno-red-zone for comparisons against a default clang.<br>
<br>
I unfortunately don’t have the clang commit I worked with on my home laptop, and don’t have access to the computer I was using at Apple, so I can’t help you there.<br>
<br>
<br>
Jessica<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sep 28, 2016, at 11:22 AM, Violeta Vukobrat <<a>violeta.vukobrat@rt-rk.com</a>> wrote:<br>
<br>
Hi Jessica,<br>
<br>
<br>
I am looking into trying out your patch and reproducing results that you got for code size reduction. Could you tell me what compiler options you used? Also, which clang commit did you work with?<br>
<br>
<br>
Violeta<br>
<br>
-- <br>
Violeta Vukobrat<br>
Software Engineer<br>
RT-RK Computer Based Systems LLC<br>
<a href="http://www.rt-rk.com" target="_blank">www.rt-rk.com</a><br>
</blockquote></blockquote>
<br>
</blockquote>
<br>
-- <br>
Violeta Vukobrat<br>
Software Engineer<br>
RT-RK Computer Based Systems LLC<br>
<a href="http://www.rt-rk.com" target="_blank">www.rt-rk.com</a><br>
<br>
</blockquote></div>