Displaying 4 results from an estimated 4 matches for "optimizeexpress".
2010 Mar 03
2
[LLVMdev] folding x * 0 = 0
> You should check out the -enable-finite-only-fp-math and -enable-unsafe-fp-math options.
Good hint, but
llvm::UnsafeFPMath = true;
llvm::FiniteOnlyFPMathOption = true;
at the beginning of my code does not help.
I found llvm::Reassociate::OptimizeExpression in
llvm\lib\Transforms\Scalar\Reassociate.cpp
which looks like it does X * 0 = 0 for int, but it does not get called
for int,
but it works for int.
-Jochen
2010 Mar 03
2
[LLVMdev] folding x * 0 = 0
> Is x*0 => 0 true if isnan(x)?
>
then where do I have to add it if I want to make it a non-standard
modification
of my local llvm version?
would it make sense to add a subset of float to llvm or a kind of modifier
(e.g. valid float to indicate that it is always valid and not nan) to
allow more aggressive optimization?
just like e.g. inbounds for load
-Jochen
2010 Mar 03
0
[LLVMdev] folding x * 0 = 0
On Mar 3, 2010, at 9:32 AM, Jochen Wilhelmy wrote:
>
>> Is x*0 => 0 true if isnan(x)?
>>
> then where do I have to add it if I want to make it a non-standard
> modification
> of my local llvm version?
> would it make sense to add a subset of float to llvm or a kind of modifier
> (e.g. valid float to indicate that it is always valid and not nan) to
> allow
2010 Mar 03
0
[LLVMdev] folding x * 0 = 0
...>> You should check out the -enable-finite-only-fp-math and -enable-unsafe-fp-math options.
>
> Good hint, but
>
> llvm::UnsafeFPMath = true;
> llvm::FiniteOnlyFPMathOption = true;
>
> at the beginning of my code does not help.
> I found llvm::Reassociate::OptimizeExpression in
> llvm\lib\Transforms\Scalar\Reassociate.cpp
> which looks like it does X * 0 = 0 for int, but it does not get called
> for int,
> but it works for int.
These flags only affect the code generator. If you want to add this optimization to your copy of llvm, you can do so by addin...