<p dir="ltr">SGTM.</p>
<p dir="ltr">Thanks!</p>
<p dir="ltr">-eric</p>
<br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 1, 2015, 2:26 AM Hal Finkel via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
We seem to have allowed our documented target-independent intrinsics to acquire a somewhat-haphazard naming system, and I think we should standardize on one convention. All of the intrinsics have 'llvm.' as a prefix, and some also have some additional prefix 'llvm.dbg.', 'llvm.eh.', 'llvm.experimental.', etc., but after that we lose consistency. When there is just a single word (or acronym) everything is fine, but the way we join multiple words (or acronyms) falls into three categories:<br>
<br>
1. No separator (e.g. @llvm.readcyclecounter)<br>
2. Using '.' as a separator (e.g. @llvm.sadd.with.overflow)<br>
3. Using '_' as a separator (e.g. @llvm.read_register)<br>
<br>
I propose that we standardize on (2) -- words with dots -- as it seems to have a plurality of more-recent intrinsics (and I think it is easy to read, as is (3)). Thoughts?<br>
<br>
Although this is somewhat subjective, here's our current set of intrinsics with multiple words (or acronyms) by these categories. I'm excluding here externally-defined terms (e.g. llvm.va_start):<br>
<br>
No separators (except for the initial namespace prefix):<br>
<br>
@llvm.gcroot<br>
@llvm.gcread<br>
@llvm.gcwrite<br>
<br>
@llvm.experimental.stackmap<br>
@llvm.experimental.patchpoint<br>
<br>
@llvm.experimental.gc.statepoint<br>
<br>
@llvm.returnaddress<br>
@llvm.frameaddress<br>
<br>
@llvm.localescape<br>
@llvm.localrecover<br>
<br>
@llvm.stacksave<br>
@llvm.stackrestore<br>
<br>
@llvm.pcmarker<br>
@llvm.readcyclecounter<br>
<br>
@llvm.bitreverse<br>
<br>
@llvm.eh.begincatch<br>
@llvm.eh.endcatch<br>
<br>
@llvm.eh.padparam<br>
<br>
@llvm.stackprotector<br>
@llvm.stackprotectorcheck<br>
@llvm.objectsize<br>
<br>
@llvm.donothing<br>
<br>
Words with dots:<br>
<br>
@llvm.sadd.with.overflow<br>
@llvm.uadd.with.overflow<br>
@llvm.ssub.with.overflow<br>
@llvm.usub.with.overflow<br>
@llvm.smul.with.overflow<br>
@llvm.umul.with.overflow<br>
<br>
@llvm.convert.to.fp16<br>
@llvm.convert.from.fp16<br>
<br>
@llvm.eh.typeid.for<br>
<br>
@llvm.init.trampoline<br>
@llvm.adjust.trampoline<br>
<br>
@llvm.masked.load<br>
@llvm.masked.store<br>
<br>
@llvm.masked.gather<br>
@llvm.masked.scatter<br>
<br>
@llvm.lifetime.start<br>
@llvm.lifetime.end<br>
<br>
@llvm.invariant.start<br>
@llvm.invariant.end<br>
@llvm.invariant.group.barrier<br>
<br>
@llvm.var.annotation<br>
@llvm.ptr.annotation<br>
<br>
@llvm.bitset.test<br>
<br>
Words with underscores (except for the initial namespace prefix):<br>
<br>
@llvm.read_register<br>
@llvm.write_register<br>
<br>
@llvm.clear_cache<br>
<br>
@llvm.instrprof_increment<br>
@llvm.instrprof_value_profile<br>
<br>
Thanks again,<br>
Hal<br>
<br>
--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>