[PATCH] D25536: [APFloat] Make APFloat an interface class to the internal IEEEFloat. NFC.

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 16:44:41 PDT 2016


timshen added a comment.

In https://reviews.llvm.org/D25536#568766, @hfinkel wrote:

> To be clear, you plan is to later change:
>
>   union {
>     const fltSemantics *semantics;
>     IEEEFloat IEEE;
>   };
>   
>
> to be something like:
>
>   union {
>     const fltSemantics *semantics;
>     IEEEFloat IEEE;
>     PPCDoubleDouble PPCDD;
>   };
>   
>
> and then make:
>
>   opStatus divide(const APFloat &RHS, roundingMode RM) {
>     return IEEE.divide(RHS.IEEE, RM);
>   }
>   
>
> into:
>
>   opStatus divide(const APFloat &RHS, roundingMode RM) {
>     return isPPCDoubleDouble() ? PPCDD.divide(RHS, RM) : IEEE.divide(RHS, RM);
>   }
>   
>
> or similar?


Yes, this is the plan.


https://reviews.llvm.org/D25536





More information about the llvm-commits mailing list