mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-29 07:31:30 +00:00
Reorganize FastMathFlags to be a wrapper around unsigned, and streamline some interfaces.
llvm-svn: 169712
This commit is contained in:
1 parent
2adb13c100
commit
65f1435a6f
8 files changed
+82
-81
No files matched your search
@@ -2047,16 +2047,16 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
|
||||
cast<BinaryOperator>(I)->setIsExact(true);
|
||||
} else if (isa<FPMathOperator>(I)) {
|
||||
FastMathFlags FMF;
|
||||
FMF.UnsafeAlgebra =
|
||||
0 != (Record[OpNum] & FPMathOperator::UnsafeAlgebra);
|
||||
FMF.NoNaNs =
|
||||
0 != (Record[OpNum] & FPMathOperator::NoNaNs);
|
||||
FMF.NoInfs =
|
||||
0 != (Record[OpNum] & FPMathOperator::NoInfs);
|
||||
FMF.NoSignedZeros =
|
||||
0 != (Record[OpNum] & FPMathOperator::NoSignedZeros);
|
||||
FMF.AllowReciprocal =
|
||||
0 != (Record[OpNum] & FPMathOperator::AllowReciprocal);
|
||||
if (0 != (Record[OpNum] & FastMathFlags::UnsafeAlgebra))
|
||||
FMF.setUnsafeAlgebra();
|
||||
if (0 != (Record[OpNum] & FastMathFlags::NoNaNs))
|
||||
FMF.setNoNaNs();
|
||||
if (0 != (Record[OpNum] & FastMathFlags::NoInfs))
|
||||
FMF.setNoInfs();
|
||||
if (0 != (Record[OpNum] & FastMathFlags::NoSignedZeros))
|
||||
FMF.setNoSignedZeros();
|
||||
if (0 != (Record[OpNum] & FastMathFlags::AllowReciprocal))
|
||||
FMF.setAllowReciprocal();
|
||||
if (FMF.any())
|
||||
I->setFastMathFlags(FMF);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user