[LLVMdev] [cfe-dev] [Proposal] function attribute to reduce emission of vzeroupper instructions

Gao, Yunzhong yunzhong_gao at playstation.sony.com
Fri Dec 20 18:42:50 PST 2013


Hi Rafael and Reid,

To clarify,

With a target-specific attribute, the LLVM IR representation will be something like this:
  declare i32 @foo() "x86_avx"="true"

With a target-specific metadata, the IR will be something like this:
   declare i32 @foo() !1
   ...
   !1 = metadata !{metadata !"x86_avx"}

If a backend does not understand this attribute or this metadata, it will have no effect on code generation.

If this is what you mean, then I believe either approach will work for me.

Do you have any opinion on the clang part of the proposal?

I plan to take the next two weeks off from work, so I probably will respond to emails only
sporadically. I hope you have a happy holiday there too,

- Gao.

_______________________________________
From: Rafael EspĂ­ndola [rafael.espindola at gmail.com]
Sent: Thursday, December 19, 2013 12:55 PM
To: Reid Kleckner
Cc: Gao, Yunzhong; cfe-dev at cs.uiuc.edu Developers (cfe-dev at cs.uiuc.edu); LLVM Developers Mailing List (llvmdev at cs.uiuc.edu)
Subject: Re: [cfe-dev] [LLVMdev] [Proposal] function attribute to reduce emission of vzeroupper instructions

> Maybe a target-specific attribute instead?  It would still apply to all CCs,
> but would never be dropped.

That would work too, yes. I proposed metadata because it looks like it
can be dropped, but that is not a big issue. I would be OK with an
attribute too if that is more convenient or we want to make sure it is
kept.

Cheers,
Rafael








More information about the llvm-dev mailing list