[llvm-commits] [llvm] r168646 - in /llvm/trunk: include/llvm/Bitcode/LLVMBitCodes.h lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Writer/BitcodeWriter.cpp

Michael Ilseman milseman at apple.com
Sun Dec 9 12:28:17 PST 2012


On Dec 7, 2012, at 11:42 AM, Michael Ilseman <milseman at apple.com> wrote:

> 
> On Dec 7, 2012, at 10:02 AM, Owen Anderson <resistor at mac.com> wrote:
> 
>> 
>> On Nov 26, 2012, at 4:43 PM, Michael Ilseman <milseman at apple.com> wrote:
>> 
>>> +  /// Flags for serializing FPMathOperator's
>>> +  /// SubclassOptionalData contents.
>>> +  enum FastMathFlags {
>>> +    FMF_UNSAFE_ALGEBRA   = 0,
>>> +    FMF_NO_NANS          = 1,
>>> +    FMF_NO_INFS          = 2,
>>> +    FMF_NO_SIGNED_ZEROS  = 3,
>>> +    FMF_ALLOW_RECIPROCAL = 4
>>> +  };
>> 
>> Is there a reason this enum isn't the same as your other fast math flag enums?  If there is a reason it needs to differ (because of encoding constraints?), please give it a name that doesn't clash.
>> 
> 
> I'm also not too happy with the redundancy. I'm going to try to look at whether I can share one representation of the data, and if not then I'll document the reasons.
> 

r169710.

I was being stupid and just blindly following the pattern from NSW/NUW.  I didn't notice that all the uses of the LLVMBitcode.h's enums had to have access to FPMathOperator anyways to interpret the flags.

I'm also going to change the FastMathFlags struct to the wrapper-around-unsigned pattern, using FPMathOperator's enum values.


>> --Owen
> 
> _______________________________________________
> 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