[llvm] r200738 - RegAllocGreedy.cpp: Use more simple value as Hysteresis, to suppress -mfpmath-dependent behavior.

Eric Christopher echristo at gmail.com
Wed Feb 5 11:23:28 PST 2014


Floating point is... unstable between architectures at best. This is a
slightly better number for most implementations. Ideally we'd get rid
of it all, but that's more work.

-eric

On Tue, Feb 4, 2014 at 9:05 AM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
> Why was the old value causing problems? It is probably a good idea to
> document it in a comment.
>
> On 4 February 2014 01:29, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
>> Author: chapuni
>> Date: Tue Feb  4 00:29:38 2014
>> New Revision: 200738
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=200738&view=rev
>> Log:
>> RegAllocGreedy.cpp: Use more simple value as Hysteresis, to suppress -mfpmath-dependent behavior.
>>
>> Modified:
>>     llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp?rev=200738&r1=200737&r2=200738&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/RegAllocGreedy.cpp Tue Feb  4 00:29:38 2014
>> @@ -311,7 +311,7 @@ const char *const RAGreedy::StageName[]
>>
>>  // Hysteresis to use when comparing floats.
>>  // This helps stabilize decisions based on float comparisons.
>> -const float Hysteresis = 0.98f;
>> +const float Hysteresis = (2007 / 2048.0f); // 0.97998046875
>>
>>
>>  FunctionPass* llvm::createGreedyRegisterAllocator() {
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list