<br><br><div class="gmail_quote">On 7 November 2012 15:29, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">

<br>
That way the output should be exactly the same as the output dragonegg would<br>
normally run the LLVM optimizers on, e.g. GCC constant folding and other such<br>
optimizations which get turned on at -O2 will still have happened (dragonegg<br>
turns off almost all GCC optimizations by default, but turning everything off<br>
isn't practical).<br>
<br>
Running the output through "opt -O2" should then do the same optimizations as<br>
dragonegg would have done.  I say "should" because in my experience this isn't<br>
always true, though it is supposed to be true.<br></blockquote><div> </div><div>Ok.</div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">


<br>
Next comes the codegen stage, which you can emulate using llc (or clang like<br>
you do below, but llc is more direct).  It isn't that easy finding out exactly<br>
what flags dragonegg passes to llc, so this might be a bit painful.<br></blockquote><div> </div><div>Yes. This is probably what I need now. Code Generation options used by dragonegg vs clang (or llc as I referred to in last email).</div>

<div> </div><div>Thanks for all the suggestions.</div><div> </div><div> </div><div>- Anitha </div></div>