[LLVMdev] [RFC] Stripping unusable intrinsics

Chandler Carruth chandlerc at google.com
Mon Dec 22 11:58:12 PST 2014


On Mon, Dec 22, 2014 at 11:22 AM, Reid Kleckner <rnk at google.com> wrote:

> On Sat, Dec 20, 2014 at 10:18 AM, Alex Rosenberg <alexr at leftfield.org>
> wrote:
>
>> This seems to indicate that the idea is a workable solution to your use
>> case.
>>
>> We've still got some bikesheds to get through. (And I don't consider
>> myself a good reviewer for Clang in this, so we need to identify who is.)
>>
>
> The patch looks pretty reasonable. You should send it to Aaron Ballman,
> too. He's been doing all the Clang attribute machinery refactoring to make
> them easy.
>
> As background to this extension idea, let me say that I prefer the notion
>> that developers, particularly perf-aware developers like gamedevs, will
>> want to handle PGO via markup. The idea is for them to turn PGO
>> measurements into consciously-chosen markup, since a given test run may not
>> be fully expressive. (e.g. They may not play the whole game through each
>> time.)
>>
>> So the idea is to have the enum be marked with a weight instead of just
>> "impossible." The impossible value would be perhaps -inf. I'd suggest that
>> weights could be either float 0 to 1 or 0 to 100, whichever works best with
>> the PGO infrastructure.
>>
>
> Personally, I don't think we need to conflate impossible and improbable.
> They seem different enough to warrant a second attribute. A separate
> "enum_probability" attribute is interesting, though.
>

I think they are radically different, and we shouldn't really discuss them
the same way.

The "impossible" *cannot* be produced through profiles for example. We're
talking about an attribute that will cause the code to *miscompile* if a
particular value ever appears.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141222/7103dcba/attachment.html>


More information about the llvm-dev mailing list