@@ -1344,15 +1344,6 @@ class IRBuilderBase {
13441344 return I;
13451345 }
13461346
1347- RoundingMode
1348- getEffectiveRounding (std::optional<RoundingMode> Rounding = std::nullopt ) {
1349- RoundingMode RM = DefaultConstrainedRounding;
1350-
1351- if (Rounding)
1352- RM = *Rounding;
1353- return RM;
1354- }
1355-
13561347 Value *getConstrainedFPRounding (std::optional<RoundingMode> Rounding) {
13571348 RoundingMode UseRounding = DefaultConstrainedRounding;
13581349
@@ -1367,14 +1358,6 @@ class IRBuilderBase {
13671358 return MetadataAsValue::get (Context, RoundingMDS);
13681359 }
13691360
1370- fp::ExceptionBehavior getEffectiveExceptionBehavior (
1371- std::optional<fp::ExceptionBehavior> Except = std::nullopt ) {
1372- fp::ExceptionBehavior EB = DefaultConstrainedExcept;
1373- if (Except)
1374- EB = *Except;
1375- return EB;
1376- }
1377-
13781361 Value *getConstrainedFPExcept (std::optional<fp::ExceptionBehavior> Except) {
13791362 std::optional<StringRef> ExceptStr = convertExceptionBehaviorToStr (
13801363 Except.value_or (DefaultConstrainedExcept));
@@ -2479,24 +2462,13 @@ class IRBuilderBase {
24792462 CallInst *CreateCall (FunctionType *FTy, Value *Callee,
24802463 ArrayRef<Value *> Args = {}, const Twine &Name = " " ,
24812464 MDNode *FPMathTag = nullptr ) {
2482- CallInst *CI = CallInst::Create (FTy, Callee, Args, DefaultOperandBundles);
2483- if (IsFPConstrained)
2484- setConstrainedFPCallAttr (CI);
2485- if (isa<FPMathOperator>(CI))
2486- setFPAttrs (CI, FPMathTag, FMF);
2487- return Insert (CI, Name);
2465+ return CreateCall (FTy, Callee, Args, DefaultOperandBundles, Name,
2466+ FPMathTag);
24882467 }
24892468
24902469 CallInst *CreateCall (FunctionType *FTy, Value *Callee, ArrayRef<Value *> Args,
24912470 ArrayRef<OperandBundleDef> OpBundles,
2492- const Twine &Name = " " , MDNode *FPMathTag = nullptr ) {
2493- CallInst *CI = CallInst::Create (FTy, Callee, Args, OpBundles);
2494- if (IsFPConstrained)
2495- setConstrainedFPCallAttr (CI);
2496- if (isa<FPMathOperator>(CI))
2497- setFPAttrs (CI, FPMathTag, FMF);
2498- return Insert (CI, Name);
2499- }
2471+ const Twine &Name = " " , MDNode *FPMathTag = nullptr );
25002472
25012473 CallInst *CreateCall (FunctionCallee Callee, ArrayRef<Value *> Args = {},
25022474 const Twine &Name = " " , MDNode *FPMathTag = nullptr ) {
@@ -2515,10 +2487,6 @@ class IRBuilderBase {
25152487 Function *Callee, ArrayRef<Value *> Args, const Twine &Name = " " ,
25162488 std::optional<RoundingMode> Rounding = std::nullopt ,
25172489 std::optional<fp::ExceptionBehavior> Except = std::nullopt );
2518- CallInst *CreateConstrainedFPCall (
2519- Intrinsic::ID ID, ArrayRef<Value *> Args, const Twine &Name = " " ,
2520- std::optional<RoundingMode> Rounding = std::nullopt ,
2521- std::optional<fp::ExceptionBehavior> Except = std::nullopt );
25222490
25232491 Value *CreateSelect (Value *C, Value *True, Value *False,
25242492 const Twine &Name = " " , Instruction *MDFrom = nullptr );
@@ -2725,17 +2693,10 @@ class IRBuilderBase {
27252693
27262694 void
27272695 createFPRoundingBundle (SmallVectorImpl<OperandBundleDef> &Bundles,
2728- std::optional<RoundingMode> Rounding = std::nullopt ) {
2729- int RM = static_cast <int32_t >(getEffectiveRounding (Rounding));
2730- Bundles.emplace_back (" fpe.round" , getInt32 (RM));
2731- }
2732-
2696+ std::optional<RoundingMode> Rounding = std::nullopt );
27332697 void createFPExceptionBundle (
27342698 SmallVectorImpl<OperandBundleDef> &Bundles,
2735- std::optional<fp::ExceptionBehavior> Except = std::nullopt ) {
2736- int EB = getEffectiveExceptionBehavior (Except);
2737- Bundles.emplace_back (" fpe.except" , getInt32 (EB));
2738- }
2699+ std::optional<fp::ExceptionBehavior> Except = std::nullopt );
27392700};
27402701
27412702// / This provides a uniform API for creating instructions and inserting
0 commit comments