Displaying 3 results from an estimated 3 matches for "canconstantfoldcallto".
2016 Jun 07
3
llvm intrinsics/libc/libm question
I'm trying to figure out exactly how the intrinsics/libc/libm work in llvm.
For example, this code return user defined function:
float acos(float x, float y)
{
return x+y;
}
float a;
void foo(float b, float c)
{
a = acos(b, c);
}
But this code returns llvm.intrinsic:
float acos(float, float);
float a;
void foo(float b, float c)
{
a = acos(b, c);
}
float acos(float x, float y)
{
2010 Nov 17
0
[LLVMdev] constand folding of functions
Hi!
1) Is it possible that you add round and trunc to
llvm::canConstantFoldCallTo
(and the code that actually does the folding)? If I'm not mistaken
they are defined in the C99 standard-
2) Is it possible to pull this out of llvm and make it somehow
user-definable?
For example I also want the float functions (e.g. sinf, cosf) to be folded
or any custom function
-Jochen
2016 Jun 07
3
llvm intrinsics/libc/libm question
...t prototypes
>
> - teach TLI::getLibFunc to check function availability using the
> custom name instead of always checking the standard name. Again, this
> is (arguably) hiding bugs, where we recognize the standard name even
> though it's not what the target uses
>
> - fix canConstantFoldCallTo to pass it TLI or maybe remove it entirely
> (it's always used before ConstantFoldCall, which does check TLI)
>
> - tell TLI that 'acos' is available with name 'XXX_acos' for your target
>
> -Ahmed
>
> > Thanks,
> >
> > Ryan
> >
> >...