<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 4/17/12 9:16 PM, David Lazar wrote:
<blockquote
cite="mid:CAFpwa7UEwrghynXdEHnGFnZNBDVxrydmO2KoboLTuh=MUbOnvg@mail.gmail.com"
type="cite">
<pre wrap="">This patch is a minor change which adds a flag to generate LLVM's
va_arg instruction instead of target-specific instructions for
handling variadic arguments. The flag is called -fuse-llvm-variadics,
but feel free to pick a better name :-). By default, this flag is
disabled, which preserves the existing behavior.
This functionality is useful for Clang users who want to do program
analysis in LLVM in a platform-independent way. Currently, there is no
way to disable the platform-specific instructions. We needed this
functionality for our research and we are aware of other groups who
want this as well.</pre>
</blockquote>
<br>
I'd like to add that this functionality would be useful for projects
like DSA (a points-to analysis) and SAFECode (a memory safety
tool). Currently, these tools have platform-specific code in them
so that they understand the format of the varargs objects generated
by the C/C++ front-ends. This prevents them from handling varargs
functions in a platform-independent way.<br>
<br>
For example, DSA has code to understand the x86 and x86_64 varargs
structures, but it is very conservative for all other platforms.
DSA could be more aggressive and platform-independent if it could
just analyze varargs intrinsics like the ones that LLVM had
originally.<br>
<br>
-- John T.<br>
<br>
<blockquote
cite="mid:CAFpwa7UEwrghynXdEHnGFnZNBDVxrydmO2KoboLTuh=MUbOnvg@mail.gmail.com"
type="cite">
<pre wrap="">
Thanks,
David
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>