Forgot to reply all to include the list. deep ---------- Forwarded message ---------- From: Sandeep Patel <deeppatel1987 at gmail.com> Date: 2010/11/17 Subject: Re: [LLVMdev] Build Attributes Proposal To: Rafael EspĂndola <rafael.espindola at gmail.com> 2010/11/17 Rafael EspĂndola <rafael.espindola at gmail.com>:>> Another use for build attributes would be as a means to record the >> build flags selected for each translation unit so that LTO could know >> how to optimize/tune the result. This use seems more important to >> solve than the ARM attributes under discussion here. > > If needed, these attributes should be per function, no? How do you > handle "ld -r" ?I suppose per-function is best. I'd argue that the ARM attributes are all per-function as well. My favorite example is __attribute__((pcs("aapcs-vfp"))) as a function attribute to select the calling convention. Maybe these attributes could referenced like metadata so they can be merged if identical? deep
On Wed, Nov 17, 2010 at 11:33 PM, Renato Golin <rengolin at systemcall.org> wrote:> On 17 November 2010 23:13, Sandeep Patel <deeppatel1987 at gmail.com> wrote: >> I suppose per-function is best. I'd argue that the ARM attributes are >> all per-function as well. My favorite example is >> __attribute__((pcs("aapcs-vfp"))) as a function attribute to select >> the calling convention. >> >> Maybe these attributes could referenced like metadata so they can be >> merged if identical? > > LLVM IR already represents that as aapcs_vfpcc function attribute.Yes. The ARM attributes want to know what the CC is for the entire translation unit, which because of this very function attribute is not possible to accurately specify. If we treat them all as function attributes, then we have the same merge problem on the function level that the linker normally solves. deep