[llvm-commits] [llvm] r55781 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
Dale Johannesen
dalej at apple.com
Mon Sep 22 10:39:07 PDT 2008
On Sep 21, 2008, at 12:42 PMPDT, Chris Lattner wrote:
>
> On Sep 4, 2008, at 11:30 AM, Dale Johannesen wrote:
>
>> Author: johannes
>> Date: Thu Sep 4 13:30:46 2008
>> New Revision: 55781
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=55781&view=rev
>> Log:
>> Add intrinsic forms of pow and exp2. The non-intrinsic
>> forms remain to handle older IR files, but will go away soon.
>
> You want to remove handling of "powf" and only handle
> "llvm.pow.f32"? Why?
>
> -Chris
Because I don't think the BE should be sensitive to the source language.
>> That said, I think it is useful to distinguish between
>> SimplifyLibcalls (SLC) and the rest of the compiler.
>
> Yes, SLC is specific to code that is using the standard C library.
> If you were writing a compiler for some language which had 'sin'
> mean something unusual, you'd just not run it.
I don't think this makes sense. What about languages that have some
of the standard C functions but not all of them? This code should be
language-independent, with any semantic information (such as errno
usage) encoded in the intrinisic; then the BE can apply semantics
appropriately. (This, rarely enough, is a case where gcc got the
design right.)
More information about the llvm-commits
mailing list