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

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 01:46:23 PDT 2016


hfinkel added a comment.

In https://reviews.llvm.org/D25536#568792, @timshen wrote:

> 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.


Makes sense to me. Opinions from anyone else?


https://reviews.llvm.org/D25536





More information about the llvm-commits mailing list