[llvm-dev] [RFC] Intrinsic naming convention (words with dots)
Eric Christopher via llvm-dev
llvm-dev at lists.llvm.org
Tue Dec 1 09:03:05 PST 2015
SGTM.
Thanks!
-eric
On Tue, Dec 1, 2015, 2:26 AM Hal Finkel via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi everyone,
>
> 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:
>
> 1. No separator (e.g. @llvm.readcyclecounter)
> 2. Using '.' as a separator (e.g. @llvm.sadd.with.overflow)
> 3. Using '_' as a separator (e.g. @llvm.read_register)
>
> 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?
>
> 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):
>
> No separators (except for the initial namespace prefix):
>
> @llvm.gcroot
> @llvm.gcread
> @llvm.gcwrite
>
> @llvm.experimental.stackmap
> @llvm.experimental.patchpoint
>
> @llvm.experimental.gc.statepoint
>
> @llvm.returnaddress
> @llvm.frameaddress
>
> @llvm.localescape
> @llvm.localrecover
>
> @llvm.stacksave
> @llvm.stackrestore
>
> @llvm.pcmarker
> @llvm.readcyclecounter
>
> @llvm.bitreverse
>
> @llvm.eh.begincatch
> @llvm.eh.endcatch
>
> @llvm.eh.padparam
>
> @llvm.stackprotector
> @llvm.stackprotectorcheck
> @llvm.objectsize
>
> @llvm.donothing
>
> Words with dots:
>
> @llvm.sadd.with.overflow
> @llvm.uadd.with.overflow
> @llvm.ssub.with.overflow
> @llvm.usub.with.overflow
> @llvm.smul.with.overflow
> @llvm.umul.with.overflow
>
> @llvm.convert.to.fp16
> @llvm.convert.from.fp16
>
> @llvm.eh.typeid.for
>
> @llvm.init.trampoline
> @llvm.adjust.trampoline
>
> @llvm.masked.load
> @llvm.masked.store
>
> @llvm.masked.gather
> @llvm.masked.scatter
>
> @llvm.lifetime.start
> @llvm.lifetime.end
>
> @llvm.invariant.start
> @llvm.invariant.end
> @llvm.invariant.group.barrier
>
> @llvm.var.annotation
> @llvm.ptr.annotation
>
> @llvm.bitset.test
>
> Words with underscores (except for the initial namespace prefix):
>
> @llvm.read_register
> @llvm.write_register
>
> @llvm.clear_cache
>
> @llvm.instrprof_increment
> @llvm.instrprof_value_profile
>
> Thanks again,
> Hal
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151201/60ad2dfc/attachment.html>
More information about the llvm-dev
mailing list