FWIW, attached is a similar patch that adds a -falways-use-llvm-vaarg flag to Clang. Applies against mainline. (As discussed, va_arg isn't really supported well so this probably doesn't work well on anything other than simple code, YMMV, etc) ~Will On Thu, May 12, 2011 at 12:29 PM, Arushi Aggarwal <arushi987 at gmail.com> wrote:> Have these changes made it to mainline? Is there a way to get a patch for the > backend, which does the actual lowering? > > Thanks, > Arushi > > On Sun, Feb 20, 2011 at 1:54 PM, David Meyer <pdox at google.com> wrote: >> Sergey, >> Here's a patch on llvm-gcc which adds a flag "-fuse-llvm-va-arg". >> (Note that this patch won't ever be part of llvm-gcc upstream. It will most >> likely be deprecated by later changes.) >> - pdox >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Add-option-to-force-emitting-va_arg-instruction.patch Type: application/octet-stream Size: 6152 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110817/87fe2b20/attachment.obj>
On Aug 17, 2011, at 11:53 AM, Will Dietz wrote:> FWIW, attached is a similar patch that adds a -falways-use-llvm-vaarg > flag to Clang. > > Applies against mainline. > > (As discussed, va_arg isn't really supported well so this probably > doesn't work well on anything other than simple code, YMMV, etc) > > ~Will > > On Thu, May 12, 2011 at 12:29 PM, Arushi Aggarwal <arushi987 at gmail.com> wrote: >> Have these changes made it to mainline? Is there a way to get a patch for the >> backend, which does the actual lowering? >> >> Thanks, >> Arushi >> >> On Sun, Feb 20, 2011 at 1:54 PM, David Meyer <pdox at google.com> wrote: >>> Sergey, >>> Here's a patch on llvm-gcc which adds a flag "-fuse-llvm-va-arg". >>> (Note that this patch won't ever be part of llvm-gcc upstream. It will most >>> likely be deprecated by later changes.) >>> - pdox >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>>> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > <0001-Add-option-to-force-emitting-va_arg-instruction.patch>_______________________________________________So, what's the point of this one? -eric
To get clang to emit va_arg instructions for va_arg() calls, as opposed to manually lowering it in the frontend, same as the llvm-gcc patch sent earlier does. ~Will On Wed, Aug 17, 2011 at 2:41 PM, Eric Christopher <echristo at apple.com> wrote:> > On Aug 17, 2011, at 11:53 AM, Will Dietz wrote: > >> FWIW, attached is a similar patch that adds a -falways-use-llvm-vaarg >> flag to Clang. >> >> Applies against mainline. >> >> (As discussed, va_arg isn't really supported well so this probably >> doesn't work well on anything other than simple code, YMMV, etc) >> >> ~Will >> >> On Thu, May 12, 2011 at 12:29 PM, Arushi Aggarwal <arushi987 at gmail.com> wrote: >>> Have these changes made it to mainline? Is there a way to get a patch for the >>> backend, which does the actual lowering? >>> >>> Thanks, >>> Arushi >>> >>> On Sun, Feb 20, 2011 at 1:54 PM, David Meyer <pdox at google.com> wrote: >>>> Sergey, >>>> Here's a patch on llvm-gcc which adds a flag "-fuse-llvm-va-arg". >>>> (Note that this patch won't ever be part of llvm-gcc upstream. It will most >>>> likely be deprecated by later changes.) >>>> - pdox >>>> >>>> _______________________________________________ >>>> LLVM Developers mailing list >>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>>>> >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >>> >> <0001-Add-option-to-force-emitting-va_arg-instruction.patch>_______________________________________________ > > So, what's the point of this one? > > -eric > >