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

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 16:19:50 PDT 2016


hfinkel added a comment.

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?


https://reviews.llvm.org/D25536





More information about the llvm-commits mailing list