[llvm] r218492 - Add the first backend support for on demand subtarget creation

Daniel Sanders Daniel.Sanders at imgtec.com
Wed Oct 1 07:16:19 PDT 2014


> -----Original Message-----
> From: Eric Christopher [mailto:echristo at gmail.com]
> Sent: 30 September 2014 17:49
> To: Daniel Sanders
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm] r218492 - Add the first backend support for on demand
> subtarget creation
> 
> On Tue, Sep 30, 2014 at 2:32 AM, Daniel Sanders
> <Daniel.Sanders at imgtec.com> wrote:
> > Hi Eric,
> >
> >>  if (hasMips16Attr)
> >>    FS += FS.empty() ? "+mips16" : ",+mips16";
> >>  else if (hasNoMips16Attr)
> >>    FS += FS.empty() ? "-mips16" : ",-mips16";
> >
> > It looks like targets are going to end up using this kind of code a lot. Would
> > it make sense to switch the StringRef for a vector-like object at some
> point?
> 
> Possibly? For mips16 it's particularly annoying (it should never have
> been a bare attribute), but only if I want to keep backwards
> compatibility with existing IR. Everything else has a tendency to put
> stuff in the feature string. I'll get the clang patch committed today
> emitting the cpu and feature string for every function so you can see
> what it looks like.
> 
> -eric

In that case, it sounds like it's fairly unique to us. I guess it makes more sense for us to migrate the attribute towards the more conventional implementation. If I understand the IR backwards compatibility promises correctly, we should be able to completely remove the attribute by LLVM 3.7.




More information about the llvm-commits mailing list