[cfe-dev] [PROPOSAL] Reintroduce guards for Intel intrinsic headers

Reid Kleckner rnk at google.com
Fri Jul 31 09:26:10 PDT 2015


On Thu, Jul 30, 2015 at 2:53 PM, Robinson, Paul <
Paul_Robinson at playstation.sony.com> wrote:

> The problem that we reported in PR24125 is fundamentally that for
> intrinsics implemented as macros (rather than inline functions) the symptom
> for "you didn't set the right target" is a backend crash. For those
> intrinsics there's no function to attach the attribute to.  I was thinking
> about re-introducing the #ifdefs for those cases, so we'd be going back to
> the "undefined identifier" diagnostic from the frontend.  But I'd be
> happier with some other solution that worked more smoothly for macros.
>

The macro intrinsics are pretty gnarly. I'd love it if we could come up
with a principled solution to the general problem of always_inline
functions that need to propagate constant parameters into their bodies.

Barring a solution to the general problem, we could at least address
PR24125 by having all the macros call an artificial empty inline function
with __attribute__((target)).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150731/a6eabe1a/attachment.html>


More information about the cfe-dev mailing list