<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 27, 2014 at 7:56 PM, Zvonimir Rakamaric <span dir="ltr"><<a href="mailto:zvonimir@cs.utah.edu" target="_blank">zvonimir@cs.utah.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, yes, we should probably take a step back...<br>
<br>
What SMACK currently does not like is type coercion when for example<br>
{i32,i32} is packed into i64 before a function call, and so on. And<br>
the reason is that this often requires byte-level reasoning that is<br>
not supported in SMACK, and on top of that supporting it would almost<br>
certainly add a performance overhead.<br></blockquote><div><br></div><div>Sometimes this is desirable because it more closely models in LLVM IR what is actually happening on x86_64.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

So what I learned after poking around clang source is that enabling<br>
DefaultTargetCodeGenInfo solves this problem since it disables most of<br>
such coercions. After learning that, I ventured into figuring out how<br>
to select DefaultTargetCodeGenInfo from command line, and it appears<br>
that is not possible. Is that right?<br>
<br>
Now, I got to UnknownArch by tracking the source code back from where<br>
DefaultTargetCodeGenInfo gets selected. If I remember correctly, clang<br>
will select DefaultTargetCodeGenInfo if UnknownArch is selected in the<br>
Triple. So then I started asking how to select UnknownArch...<br></blockquote><div><br></div><div>This all makes sense.  :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

One final question: why does DefaultTargetCodeGenInfo even exist if it<br>
cannot be selected?</blockquote><div><br></div><div>DefaultTargetCodeGenInfo is essentially an abstract base class for other ABIs.</div><div><br></div><div>I think you should do something like what PNaCl does and add a new virtual ISA like "smack64" or "le64" that has a known data layout, endianness, etc, and always uses 'byval' when passing structs by value.</div>
</div></div></div>