hfinkel added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field ty
yaxunl added a comment.
In https://reviews.llvm.org/D31167#725705, @mehdi_amini wrote:
> I believe considering the goal of moving to using per-instruction FMF and
> kills the global backend option, this leads to a bitcode upgrade issue:
> OpenCL (or other) bitcode that were generated bitcode do
mehdi_amini added a comment.
I believe considering the goal of moving to using per-instruction FMF and kills
the global backend option, this leads to a bitcode upgrade issue: OpenCL (or
other) bitcode that were generated bitcode don't have the right FMF and will be
upgraded conservatively.
Perf
anemet added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field typ
hfinkel added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field ty
anemet added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field typ
hfinkel added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field ty
yaxunl added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field typ
hfinkel added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field ty
yaxunl added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field typ
anemet added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field typ
yaxunl added inline comments.
Comment at: cfe/trunk/lib/Frontend/CompilerInvocation.cpp:1638
Opts.LaxVectorConversions = 0;
-Opts.DefaultFPContract = 1;
+Opts.setDefaultFPContractMode(LangOptions::FPC_On);
Opts.NativeHalfType = 1;
hfinkel wrote:
hfinkel added inline comments.
Comment at: cfe/trunk/lib/Frontend/CompilerInvocation.cpp:1638
Opts.LaxVectorConversions = 0;
-Opts.DefaultFPContract = 1;
+Opts.setDefaultFPContractMode(LangOptions::FPC_On);
Opts.NativeHalfType = 1;
yaxunl wrote:
yaxunl added inline comments.
Comment at: cfe/trunk/lib/Frontend/CompilerInvocation.cpp:1638
Opts.LaxVectorConversions = 0;
-Opts.DefaultFPContract = 1;
+Opts.setDefaultFPContractMode(LangOptions::FPC_On);
Opts.NativeHalfType = 1;
hfinkel wrote:
yaxunl added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field typ
hfinkel added inline comments.
Comment at: cfe/trunk/lib/Frontend/CompilerInvocation.cpp:1638
Opts.LaxVectorConversions = 0;
-Opts.DefaultFPContract = 1;
+Opts.setDefaultFPContractMode(LangOptions::FPC_On);
Opts.NativeHalfType = 1;
Looks like th
anemet added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field typ
yaxunl added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.def:220
+/// \brief FP_CONTRACT mode (on/off/fast).
+ENUM_LANGOPT(DefaultFPContractMode, FPContractModeKind, 2, FPC_Off, "FP
contraction type")
LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field typ
rnk added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.h:217
/// Adjust BinaryOperator::FPFeatures to match the bit-field size of this.
- unsigned fp_contract : 1;
+ LangOptions::FPContractModeKind fp_contract : 2;
};
anemet wrote:
anemet added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.h:217
/// Adjust BinaryOperator::FPFeatures to match the bit-field size of this.
- unsigned fp_contract : 1;
+ LangOptions::FPContractModeKind fp_contract : 2;
};
rnk wrote:
rnk added inline comments.
Comment at: cfe/trunk/include/clang/Basic/LangOptions.h:217
/// Adjust BinaryOperator::FPFeatures to match the bit-field size of this.
- unsigned fp_contract : 1;
+ LangOptions::FPContractModeKind fp_contract : 2;
};
Please do not
This revision was automatically updated to reflect the committed changes.
Closed by commit rL299027: Use FPContractModeKind universally (authored by
anemet).
Changed prior to commit:
https://reviews.llvm.org/D31167?vs=92423&id=93406#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31167
F
aaron.ballman added inline comments.
Comment at: include/clang/Basic/LangOptions.h:92
+ enum FPContractModeKind {
+FPC_Off,// Form fused FP ops only where result will not be
affected.
+FPC_On, // Form fused FP ops according to FP_CONTRACT rules.
anemet added inline comments.
Comment at: include/clang/Basic/LangOptions.h:92
+ enum FPContractModeKind {
+FPC_Off,// Form fused FP ops only where result will not be
affected.
+FPC_On, // Form fused FP ops according to FP_CONTRACT rules.
---
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
Aside from a minor comment nit, LGTM
Comment at: include/clang/Basic/LangOptions.h:92
+ enum FPContractModeKind {
+FPC_Off,// Form fused FP ops onl
anemet created this revision.
FPContractModeKind is the codegen option flag which is already ternary (off,
on, fast). This makes it universally the type for the contractable info
across the front-end:
- In FPOptions (i.e. in the Sema + in the expression nodes).
- In LangOpts::DefaultFPContractMo
26 matches
Mail list logo