[LLVMdev] questions about ARM EABI attributes

Renato Golin renato.golin at linaro.org
Fri Dec 19 02:44:49 PST 2014


On 19 December 2014 at 01:37, Akira Hatanaka <ahatanak at gmail.com> wrote:
> Suppose there are two functions in a module which have different sets of
> function attributes. One function has attributes for "-ffast-math" (foo1)
> and the other (foo0) has attributes for "-fno-fast-math". In that case,
> which set of eabi attributes should ARMAsmPrinter::emitAttributes emit?
> ARMAsmPrinter::emitAttributes is called once at the start of a file (not
> once per every function), so I assume it has to merge those attributes which
> have different values or reject the IR if it discovers incompatibilities.

Hi Akira,

Build attributes were not created to describe everything inside the
file, but to help you identify what support you need (or don't want)
in order to link with the most appropriate libraries, if you have more
than one.

In this case, I'd say the best course of action would be to set the
attribute to the least restrictive one, which in this case is to
accept fast-math.

cheers,
--renato



More information about the llvm-dev mailing list