<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Dec 20, 2014 at 10:18 AM, Alex Rosenberg <span dir="ltr"><<a href="mailto:alexr@leftfield.org" target="_blank">alexr@leftfield.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>This seems to indicate that the idea is a workable solution to your use case.</div><div><br></div><div>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.)</div></div></blockquote><div><br></div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>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.)</div><div><br></div><div>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.</div></div></blockquote><div><br></div><div>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.</div></div></div></div>