[llvm-dev] A libc in LLVM
Chris Lattner via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 27 09:29:44 PDT 2019
> On Jun 27, 2019, at 8:16 AM, Stan Shebs <stanshebs at google.com> wrote:
>
>> For example, if someone says “I can shave 1 cycle out of this important thing if I write it in asm” and you know that a suitably capable compiler engineer can achieve the same thing given enough time, how do you plan to push back?
>
> I think it's becoming uncommon to find cases like that today; the
> person who thinks they have a magic assembly hack finds that it works
> well for one microbenchmark on one architecture variant, but
> disappoints when used in real code. In fact, glibc has been throwing
> out a bunch of assembly code in recent years, as testing shows much of
> it to not to have any noticeable advantage.
>
> If the customized calling convention scheme works out, it's going to
> be a huge incentive to fix the compiler in case of performance
> lossage; it will be quite difficult to write assembly that is equally
> performant for all possible calling conventions, and if you try to
> assume a convention, then the assumption propagates up through the
> program, possibly defeating more important optimizations.
Yeah, that all matches with my intuition as well. That said, when it comes to human nature and the drive to optimize very specific things, sometimes what “makes sense” in the big picture best lost. In any case, my question isn’t very important, it can be figured out on a case by case basis over time.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190627/ab833620/attachment.html>
More information about the llvm-dev
mailing list