I'm not really following this bit about changing the language without
changing the standard document, or what builtins have to do with the
C++ standard - could you explain this in more/different words,
perhaps?
In general, builtins are a compiler implementation detail (nothing to
do with the C++ standard) and adding them is a tradeoff like adding
new instructions to LLVM IR (though builtins are lower cost than
instructions, generally - they're easier to add and remove/aren't such
a fundamental part of the IR): Does the new builtin or instruction
pull its weight: Adding new features to the IR in either case comes at
a cost of implementation complexity (now optimization passes need to
know about these new features) and if the semantics can be expressed
reasonably cleanly with existing IR features, that's preferable (or if
the IR feature can be generalized in some way to maximize the value
(make it more usable for a variety of problems people are having
trouble solving without it) while minimizing the cost (if it
generalizes well to something that is easy/reasonable for IR consumers
to handle/matches concepts they're already modeling/etc))
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
------------------------------------------------------------------From:David Blaikie <dbla...@gmail.com>Send Time:2021年4月24日(星期六) 02:51To:chuanqi.xcq <yede...@linux.alibaba.com>Subject:Re: [llvm-dev] What's the principle to add builtins in clang?
Ah, I think LLVM builtins aren't available to C++ source code by
default - we wrap them in C intrinsics when that's desirable, for
instance.
------------------------------------------------------------------From:David Blaikie <dbla...@gmail.com>
Send Time:2021年4月26日(星期一) 23:36
To:chuanqi.xcq <yede...@linux.alibaba.com>Subject:Re: [llvm-dev] What's the principle to add builtins in clang?
On Sun, Apr 25, 2021 at 10:06 PM chuanqi.xcq
Ah, sure - your initial email example/code snippets looked like LLVM
intrinsics to me (the @ and the . in names, etc). (& I might've
muddled up the intrinsics/builtins terminology)
- Dave
------------------------------------------------------------------From:David Blaikie <dbla...@gmail.com>
Send Time:2021年4月27日(星期二) 10:05
To:chuanqi.xcq <yede...@linux.alibaba.com>Subject:Re: [llvm-dev] What's the principle to add builtins in clang?