[llvm-commits] [llvm-gcc-4.2] r82640 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Dan Gohman
gohman at apple.com
Wed Sep 23 15:36:40 PDT 2009
On Sep 23, 2009, at 3:32 PM, Dale Johannesen wrote:
> On Sep 23, 2009, at 3:26 PMPDT, Dan Gohman wrote:
>
>> Using an intrinsic to convey "this function need not set errno" seem
>> like a very heavy-weight solution. Wouldn't it be better to make use
>> of the "readonly" or "readnone" function attributes? A "sqrt" call
>> with "readonly" can be known to not set errno.
>
> As far as errno goes, I agree that would be better, but we'd also
> like to recognize it as sqrt for the purpose of generating sqrt
> instructions on appropriate hardware. Without an intrinsic we'd
> need to do name lookup, I guess, which seems inappropriate for non-C-
> based languages.
It's all the latest fashion apparently. LLVM now recognizes "malloc"
magically, for example.
Dan
More information about the llvm-commits
mailing list