@@ -1324,15 +1324,6 @@ class IRBuilderBase {
13241324 return I;
13251325 }
13261326
1327- RoundingMode
1328- getEffectiveRounding (std::optional<RoundingMode> Rounding = std::nullopt ) {
1329- RoundingMode RM = DefaultConstrainedRounding;
1330-
1331- if (Rounding)
1332- RM = *Rounding;
1333- return RM;
1334- }
1335-
13361327 Value *getConstrainedFPRounding (std::optional<RoundingMode> Rounding) {
13371328 RoundingMode UseRounding = DefaultConstrainedRounding;
13381329
@@ -1347,14 +1338,6 @@ class IRBuilderBase {
13471338 return MetadataAsValue::get (Context, RoundingMDS);
13481339 }
13491340
1350- fp::ExceptionBehavior getEffectiveExceptionBehavior (
1351- std::optional<fp::ExceptionBehavior> Except = std::nullopt ) {
1352- fp::ExceptionBehavior EB = DefaultConstrainedExcept;
1353- if (Except)
1354- EB = *Except;
1355- return EB;
1356- }
1357-
13581341 Value *getConstrainedFPExcept (std::optional<fp::ExceptionBehavior> Except) {
13591342 std::optional<StringRef> ExceptStr = convertExceptionBehaviorToStr (
13601343 Except.value_or (DefaultConstrainedExcept));
@@ -2469,24 +2452,13 @@ class IRBuilderBase {
24692452 CallInst *CreateCall (FunctionType *FTy, Value *Callee,
24702453 ArrayRef<Value *> Args = {}, const Twine &Name = " " ,
24712454 MDNode *FPMathTag = nullptr ) {
2472- CallInst *CI = CallInst::Create (FTy, Callee, Args, DefaultOperandBundles);
2473- if (IsFPConstrained)
2474- setConstrainedFPCallAttr (CI);
2475- if (isa<FPMathOperator>(CI))
2476- setFPAttrs (CI, FPMathTag, FMF);
2477- return Insert (CI, Name);
2455+ return CreateCall (FTy, Callee, Args, DefaultOperandBundles, Name,
2456+ FPMathTag);
24782457 }
24792458
24802459 CallInst *CreateCall (FunctionType *FTy, Value *Callee, ArrayRef<Value *> Args,
24812460 ArrayRef<OperandBundleDef> OpBundles,
2482- const Twine &Name = " " , MDNode *FPMathTag = nullptr ) {
2483- CallInst *CI = CallInst::Create (FTy, Callee, Args, OpBundles);
2484- if (IsFPConstrained)
2485- setConstrainedFPCallAttr (CI);
2486- if (isa<FPMathOperator>(CI))
2487- setFPAttrs (CI, FPMathTag, FMF);
2488- return Insert (CI, Name);
2489- }
2461+ const Twine &Name = " " , MDNode *FPMathTag = nullptr );
24902462
24912463 CallInst *CreateCall (FunctionCallee Callee, ArrayRef<Value *> Args = {},
24922464 const Twine &Name = " " , MDNode *FPMathTag = nullptr ) {
@@ -2505,10 +2477,6 @@ class IRBuilderBase {
25052477 Function *Callee, ArrayRef<Value *> Args, const Twine &Name = " " ,
25062478 std::optional<RoundingMode> Rounding = std::nullopt ,
25072479 std::optional<fp::ExceptionBehavior> Except = std::nullopt );
2508- CallInst *CreateConstrainedFPCall (
2509- Intrinsic::ID ID, ArrayRef<Value *> Args, const Twine &Name = " " ,
2510- std::optional<RoundingMode> Rounding = std::nullopt ,
2511- std::optional<fp::ExceptionBehavior> Except = std::nullopt );
25122480
25132481 Value *CreateSelect (Value *C, Value *True, Value *False,
25142482 const Twine &Name = " " , Instruction *MDFrom = nullptr );
@@ -2708,17 +2676,10 @@ class IRBuilderBase {
27082676
27092677 void
27102678 createFPRoundingBundle (SmallVectorImpl<OperandBundleDef> &Bundles,
2711- std::optional<RoundingMode> Rounding = std::nullopt ) {
2712- int RM = static_cast <int32_t >(getEffectiveRounding (Rounding));
2713- Bundles.emplace_back (" fpe.round" , getInt32 (RM));
2714- }
2715-
2679+ std::optional<RoundingMode> Rounding = std::nullopt );
27162680 void createFPExceptionBundle (
27172681 SmallVectorImpl<OperandBundleDef> &Bundles,
2718- std::optional<fp::ExceptionBehavior> Except = std::nullopt ) {
2719- int EB = getEffectiveExceptionBehavior (Except);
2720- Bundles.emplace_back (" fpe.except" , getInt32 (EB));
2721- }
2682+ std::optional<fp::ExceptionBehavior> Except = std::nullopt );
27222683};
27232684
27242685// / This provides a uniform API for creating instructions and inserting
0 commit comments