[LLVMdev] "target-features" and "target-cpu" attributes

Bill Wendling isanbard at gmail.com
Wed Oct 9 13:34:42 PDT 2013


On Oct 3, 2013, at 9:34 AM, Dmitry Babokin <babokin at gmail.com> wrote:

> Bill, Ben, everyone,
> 
> Some time ago "target-features" and "target-cpu" attributes were introduced. As I understand, they are intended to support generation of "fat binaries" (binaries with functions generated for different CPUs), particularly to support LTO compilation, when different source files have different targets (say, one of files should support SSE2, another one SSE4). Please correct me if I'm wrong in this assumptions.
> 
> My attempts to utilize this feature fail (I generate LLVM IR directly, I'm not using clang) and this looks very similar to the one described by Benjamin in this mail thread: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130218/166710.html
> 
> So the question - what is the state of supporting fat binaries. Is it expected to work on x86?
> 
Hi Dmitry,

I did it not so much to support fat binaries, but to support correct code generation in LTO. The problem was that it wasn't implemented correctly. Many of the objects that rely upon those features weren't updated when those features were changed. I have a new way of doing this, but it's still in the alpha stage (I haven't yet sent the whitepaper to the group).

Support for fat binaries is done on Darwin with the `lipo' command. Otherwise, I'm not sure if this really answers your question. :-)

-bw


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131009/2fd103ac/attachment.html>


More information about the llvm-dev mailing list