IRBuilder: convert Optional to std::optional

This commit is contained in:
Krzysztof Parzyszek 2022-12-03 13:11:42 -06:00
parent 73a6cd23a4
commit df852f48c8
3 changed files with 48 additions and 43 deletions

View File

@ -815,7 +815,7 @@ public:
CallInst *CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes, CallInst *CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes,
FunctionCallee ActualCallee, FunctionCallee ActualCallee,
ArrayRef<Value *> CallArgs, ArrayRef<Value *> CallArgs,
Optional<ArrayRef<Value *>> DeoptArgs, std::optional<ArrayRef<Value *>> DeoptArgs,
ArrayRef<Value *> GCArgs, ArrayRef<Value *> GCArgs,
const Twine &Name = ""); const Twine &Name = "");
@ -824,8 +824,8 @@ public:
CallInst *CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes, CallInst *CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes,
FunctionCallee ActualCallee, uint32_t Flags, FunctionCallee ActualCallee, uint32_t Flags,
ArrayRef<Value *> CallArgs, ArrayRef<Value *> CallArgs,
Optional<ArrayRef<Use>> TransitionArgs, std::optional<ArrayRef<Use>> TransitionArgs,
Optional<ArrayRef<Use>> DeoptArgs, std::optional<ArrayRef<Use>> DeoptArgs,
ArrayRef<Value *> GCArgs, ArrayRef<Value *> GCArgs,
const Twine &Name = ""); const Twine &Name = "");
@ -835,7 +835,7 @@ public:
CallInst *CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes, CallInst *CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes,
FunctionCallee ActualCallee, FunctionCallee ActualCallee,
ArrayRef<Use> CallArgs, ArrayRef<Use> CallArgs,
Optional<ArrayRef<Value *>> DeoptArgs, std::optional<ArrayRef<Value *>> DeoptArgs,
ArrayRef<Value *> GCArgs, ArrayRef<Value *> GCArgs,
const Twine &Name = ""); const Twine &Name = "");
@ -845,7 +845,7 @@ public:
CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes, CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes,
FunctionCallee ActualInvokee, BasicBlock *NormalDest, FunctionCallee ActualInvokee, BasicBlock *NormalDest,
BasicBlock *UnwindDest, ArrayRef<Value *> InvokeArgs, BasicBlock *UnwindDest, ArrayRef<Value *> InvokeArgs,
Optional<ArrayRef<Value *>> DeoptArgs, std::optional<ArrayRef<Value *>> DeoptArgs,
ArrayRef<Value *> GCArgs, const Twine &Name = ""); ArrayRef<Value *> GCArgs, const Twine &Name = "");
/// Create an invoke to the experimental.gc.statepoint intrinsic to /// Create an invoke to the experimental.gc.statepoint intrinsic to
@ -853,8 +853,8 @@ public:
InvokeInst *CreateGCStatepointInvoke( InvokeInst *CreateGCStatepointInvoke(
uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee, uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee,
BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags, BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags,
ArrayRef<Value *> InvokeArgs, Optional<ArrayRef<Use>> TransitionArgs, ArrayRef<Value *> InvokeArgs, std::optional<ArrayRef<Use>> TransitionArgs,
Optional<ArrayRef<Use>> DeoptArgs, ArrayRef<Value *> GCArgs, std::optional<ArrayRef<Use>> DeoptArgs, ArrayRef<Value *> GCArgs,
const Twine &Name = ""); const Twine &Name = "");
// Convenience function for the common case when CallArgs are filled in using // Convenience function for the common case when CallArgs are filled in using
@ -864,7 +864,7 @@ public:
CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes, CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes,
FunctionCallee ActualInvokee, BasicBlock *NormalDest, FunctionCallee ActualInvokee, BasicBlock *NormalDest,
BasicBlock *UnwindDest, ArrayRef<Use> InvokeArgs, BasicBlock *UnwindDest, ArrayRef<Use> InvokeArgs,
Optional<ArrayRef<Value *>> DeoptArgs, std::optional<ArrayRef<Value *>> DeoptArgs,
ArrayRef<Value *> GCArgs, const Twine &Name = ""); ArrayRef<Value *> GCArgs, const Twine &Name = "");
/// Create a call to the experimental.gc.result intrinsic to extract /// Create a call to the experimental.gc.result intrinsic to extract
@ -1195,7 +1195,7 @@ private:
return I; return I;
} }
Value *getConstrainedFPRounding(Optional<RoundingMode> Rounding) { Value *getConstrainedFPRounding(std::optional<RoundingMode> Rounding) {
RoundingMode UseRounding = DefaultConstrainedRounding; RoundingMode UseRounding = DefaultConstrainedRounding;
if (Rounding) if (Rounding)
@ -1209,7 +1209,7 @@ private:
return MetadataAsValue::get(Context, RoundingMDS); return MetadataAsValue::get(Context, RoundingMDS);
} }
Value *getConstrainedFPExcept(Optional<fp::ExceptionBehavior> Except) { Value *getConstrainedFPExcept(std::optional<fp::ExceptionBehavior> Except) {
fp::ExceptionBehavior UseExcept = DefaultConstrainedExcept; fp::ExceptionBehavior UseExcept = DefaultConstrainedExcept;
if (Except) if (Except)
@ -1608,8 +1608,8 @@ public:
CallInst *CreateConstrainedFPBinOp( CallInst *CreateConstrainedFPBinOp(
Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource = nullptr, Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource = nullptr,
const Twine &Name = "", MDNode *FPMathTag = nullptr, const Twine &Name = "", MDNode *FPMathTag = nullptr,
Optional<RoundingMode> Rounding = std::nullopt, std::optional<RoundingMode> Rounding = std::nullopt,
Optional<fp::ExceptionBehavior> Except = std::nullopt); std::optional<fp::ExceptionBehavior> Except = std::nullopt);
Value *CreateNeg(Value *V, const Twine &Name = "", bool HasNUW = false, Value *CreateNeg(Value *V, const Twine &Name = "", bool HasNUW = false,
bool HasNSW = false) { bool HasNSW = false) {
@ -2090,8 +2090,8 @@ public:
Intrinsic::ID ID, Value *V, Type *DestTy, Intrinsic::ID ID, Value *V, Type *DestTy,
Instruction *FMFSource = nullptr, const Twine &Name = "", Instruction *FMFSource = nullptr, const Twine &Name = "",
MDNode *FPMathTag = nullptr, MDNode *FPMathTag = nullptr,
Optional<RoundingMode> Rounding = std::nullopt, std::optional<RoundingMode> Rounding = std::nullopt,
Optional<fp::ExceptionBehavior> Except = std::nullopt); std::optional<fp::ExceptionBehavior> Except = std::nullopt);
// Provided to resolve 'CreateIntCast(Ptr, Ptr, "...")', giving a // Provided to resolve 'CreateIntCast(Ptr, Ptr, "...")', giving a
// compile time error, instead of converting the string to bool for the // compile time error, instead of converting the string to bool for the
@ -2249,10 +2249,10 @@ private:
bool IsSignaling); bool IsSignaling);
public: public:
CallInst * CallInst *CreateConstrainedFPCmp(
CreateConstrainedFPCmp(Intrinsic::ID ID, CmpInst::Predicate P, Value *L, Intrinsic::ID ID, CmpInst::Predicate P, Value *L, Value *R,
Value *R, const Twine &Name = "", const Twine &Name = "",
Optional<fp::ExceptionBehavior> Except = std::nullopt); std::optional<fp::ExceptionBehavior> Except = std::nullopt);
//===--------------------------------------------------------------------===// //===--------------------------------------------------------------------===//
// Instruction creation methods: Other Instructions // Instruction creation methods: Other Instructions
@ -2311,8 +2311,8 @@ public:
CallInst *CreateConstrainedFPCall( CallInst *CreateConstrainedFPCall(
Function *Callee, ArrayRef<Value *> Args, const Twine &Name = "", Function *Callee, ArrayRef<Value *> Args, const Twine &Name = "",
Optional<RoundingMode> Rounding = std::nullopt, std::optional<RoundingMode> Rounding = std::nullopt,
Optional<fp::ExceptionBehavior> Except = std::nullopt); std::optional<fp::ExceptionBehavior> Except = std::nullopt);
Value *CreateSelect(Value *C, Value *True, Value *False, Value *CreateSelect(Value *C, Value *True, Value *False,
const Twine &Name = "", Instruction *MDFrom = nullptr); const Twine &Name = "", Instruction *MDFrom = nullptr);

View File

@ -32,6 +32,7 @@
#include "llvm/Support/Casting.h" #include "llvm/Support/Casting.h"
#include <cassert> #include <cassert>
#include <cstdint> #include <cstdint>
#include <optional>
#include <vector> #include <vector>
using namespace llvm; using namespace llvm;
@ -768,8 +769,8 @@ getStatepointArgs(IRBuilderBase &B, uint64_t ID, uint32_t NumPatchBytes,
template<typename T1, typename T2, typename T3> template<typename T1, typename T2, typename T3>
static std::vector<OperandBundleDef> static std::vector<OperandBundleDef>
getStatepointBundles(Optional<ArrayRef<T1>> TransitionArgs, getStatepointBundles(std::optional<ArrayRef<T1>> TransitionArgs,
Optional<ArrayRef<T2>> DeoptArgs, std::optional<ArrayRef<T2>> DeoptArgs,
ArrayRef<T3> GCArgs) { ArrayRef<T3> GCArgs) {
std::vector<OperandBundleDef> Rval; std::vector<OperandBundleDef> Rval;
if (DeoptArgs) { if (DeoptArgs) {
@ -794,8 +795,9 @@ template <typename T0, typename T1, typename T2, typename T3>
static CallInst *CreateGCStatepointCallCommon( static CallInst *CreateGCStatepointCallCommon(
IRBuilderBase *Builder, uint64_t ID, uint32_t NumPatchBytes, IRBuilderBase *Builder, uint64_t ID, uint32_t NumPatchBytes,
FunctionCallee ActualCallee, uint32_t Flags, ArrayRef<T0> CallArgs, FunctionCallee ActualCallee, uint32_t Flags, ArrayRef<T0> CallArgs,
Optional<ArrayRef<T1>> TransitionArgs, Optional<ArrayRef<T2>> DeoptArgs, std::optional<ArrayRef<T1>> TransitionArgs,
ArrayRef<T3> GCArgs, const Twine &Name) { std::optional<ArrayRef<T2>> DeoptArgs, ArrayRef<T3> GCArgs,
const Twine &Name) {
Module *M = Builder->GetInsertBlock()->getParent()->getParent(); Module *M = Builder->GetInsertBlock()->getParent()->getParent();
// Fill in the one generic type'd argument (the function is also vararg) // Fill in the one generic type'd argument (the function is also vararg)
Function *FnStatepoint = Function *FnStatepoint =
@ -816,7 +818,7 @@ static CallInst *CreateGCStatepointCallCommon(
CallInst *IRBuilderBase::CreateGCStatepointCall( CallInst *IRBuilderBase::CreateGCStatepointCall(
uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee, uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee,
ArrayRef<Value *> CallArgs, Optional<ArrayRef<Value *>> DeoptArgs, ArrayRef<Value *> CallArgs, std::optional<ArrayRef<Value *>> DeoptArgs,
ArrayRef<Value *> GCArgs, const Twine &Name) { ArrayRef<Value *> GCArgs, const Twine &Name) {
return CreateGCStatepointCallCommon<Value *, Value *, Value *, Value *>( return CreateGCStatepointCallCommon<Value *, Value *, Value *, Value *>(
this, ID, NumPatchBytes, ActualCallee, uint32_t(StatepointFlags::None), this, ID, NumPatchBytes, ActualCallee, uint32_t(StatepointFlags::None),
@ -826,8 +828,9 @@ CallInst *IRBuilderBase::CreateGCStatepointCall(
CallInst *IRBuilderBase::CreateGCStatepointCall( CallInst *IRBuilderBase::CreateGCStatepointCall(
uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee, uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee,
uint32_t Flags, ArrayRef<Value *> CallArgs, uint32_t Flags, ArrayRef<Value *> CallArgs,
Optional<ArrayRef<Use>> TransitionArgs, Optional<ArrayRef<Use>> DeoptArgs, std::optional<ArrayRef<Use>> TransitionArgs,
ArrayRef<Value *> GCArgs, const Twine &Name) { std::optional<ArrayRef<Use>> DeoptArgs, ArrayRef<Value *> GCArgs,
const Twine &Name) {
return CreateGCStatepointCallCommon<Value *, Use, Use, Value *>( return CreateGCStatepointCallCommon<Value *, Use, Use, Value *>(
this, ID, NumPatchBytes, ActualCallee, Flags, CallArgs, TransitionArgs, this, ID, NumPatchBytes, ActualCallee, Flags, CallArgs, TransitionArgs,
DeoptArgs, GCArgs, Name); DeoptArgs, GCArgs, Name);
@ -835,7 +838,7 @@ CallInst *IRBuilderBase::CreateGCStatepointCall(
CallInst *IRBuilderBase::CreateGCStatepointCall( CallInst *IRBuilderBase::CreateGCStatepointCall(
uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee, uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualCallee,
ArrayRef<Use> CallArgs, Optional<ArrayRef<Value *>> DeoptArgs, ArrayRef<Use> CallArgs, std::optional<ArrayRef<Value *>> DeoptArgs,
ArrayRef<Value *> GCArgs, const Twine &Name) { ArrayRef<Value *> GCArgs, const Twine &Name) {
return CreateGCStatepointCallCommon<Use, Value *, Value *, Value *>( return CreateGCStatepointCallCommon<Use, Value *, Value *, Value *>(
this, ID, NumPatchBytes, ActualCallee, uint32_t(StatepointFlags::None), this, ID, NumPatchBytes, ActualCallee, uint32_t(StatepointFlags::None),
@ -847,8 +850,9 @@ static InvokeInst *CreateGCStatepointInvokeCommon(
IRBuilderBase *Builder, uint64_t ID, uint32_t NumPatchBytes, IRBuilderBase *Builder, uint64_t ID, uint32_t NumPatchBytes,
FunctionCallee ActualInvokee, BasicBlock *NormalDest, FunctionCallee ActualInvokee, BasicBlock *NormalDest,
BasicBlock *UnwindDest, uint32_t Flags, ArrayRef<T0> InvokeArgs, BasicBlock *UnwindDest, uint32_t Flags, ArrayRef<T0> InvokeArgs,
Optional<ArrayRef<T1>> TransitionArgs, Optional<ArrayRef<T2>> DeoptArgs, std::optional<ArrayRef<T1>> TransitionArgs,
ArrayRef<T3> GCArgs, const Twine &Name) { std::optional<ArrayRef<T2>> DeoptArgs, ArrayRef<T3> GCArgs,
const Twine &Name) {
Module *M = Builder->GetInsertBlock()->getParent()->getParent(); Module *M = Builder->GetInsertBlock()->getParent()->getParent();
// Fill in the one generic type'd argument (the function is also vararg) // Fill in the one generic type'd argument (the function is also vararg)
Function *FnStatepoint = Function *FnStatepoint =
@ -871,7 +875,7 @@ static InvokeInst *CreateGCStatepointInvokeCommon(
InvokeInst *IRBuilderBase::CreateGCStatepointInvoke( InvokeInst *IRBuilderBase::CreateGCStatepointInvoke(
uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee, uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee,
BasicBlock *NormalDest, BasicBlock *UnwindDest, BasicBlock *NormalDest, BasicBlock *UnwindDest,
ArrayRef<Value *> InvokeArgs, Optional<ArrayRef<Value *>> DeoptArgs, ArrayRef<Value *> InvokeArgs, std::optional<ArrayRef<Value *>> DeoptArgs,
ArrayRef<Value *> GCArgs, const Twine &Name) { ArrayRef<Value *> GCArgs, const Twine &Name) {
return CreateGCStatepointInvokeCommon<Value *, Value *, Value *, Value *>( return CreateGCStatepointInvokeCommon<Value *, Value *, Value *, Value *>(
this, ID, NumPatchBytes, ActualInvokee, NormalDest, UnwindDest, this, ID, NumPatchBytes, ActualInvokee, NormalDest, UnwindDest,
@ -882,8 +886,8 @@ InvokeInst *IRBuilderBase::CreateGCStatepointInvoke(
InvokeInst *IRBuilderBase::CreateGCStatepointInvoke( InvokeInst *IRBuilderBase::CreateGCStatepointInvoke(
uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee, uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee,
BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags, BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags,
ArrayRef<Value *> InvokeArgs, Optional<ArrayRef<Use>> TransitionArgs, ArrayRef<Value *> InvokeArgs, std::optional<ArrayRef<Use>> TransitionArgs,
Optional<ArrayRef<Use>> DeoptArgs, ArrayRef<Value *> GCArgs, std::optional<ArrayRef<Use>> DeoptArgs, ArrayRef<Value *> GCArgs,
const Twine &Name) { const Twine &Name) {
return CreateGCStatepointInvokeCommon<Value *, Use, Use, Value *>( return CreateGCStatepointInvokeCommon<Value *, Use, Use, Value *>(
this, ID, NumPatchBytes, ActualInvokee, NormalDest, UnwindDest, Flags, this, ID, NumPatchBytes, ActualInvokee, NormalDest, UnwindDest, Flags,
@ -893,7 +897,7 @@ InvokeInst *IRBuilderBase::CreateGCStatepointInvoke(
InvokeInst *IRBuilderBase::CreateGCStatepointInvoke( InvokeInst *IRBuilderBase::CreateGCStatepointInvoke(
uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee, uint64_t ID, uint32_t NumPatchBytes, FunctionCallee ActualInvokee,
BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef<Use> InvokeArgs, BasicBlock *NormalDest, BasicBlock *UnwindDest, ArrayRef<Use> InvokeArgs,
Optional<ArrayRef<Value *>> DeoptArgs, ArrayRef<Value *> GCArgs, std::optional<ArrayRef<Value *>> DeoptArgs, ArrayRef<Value *> GCArgs,
const Twine &Name) { const Twine &Name) {
return CreateGCStatepointInvokeCommon<Use, Value *, Value *, Value *>( return CreateGCStatepointInvokeCommon<Use, Value *, Value *, Value *>(
this, ID, NumPatchBytes, ActualInvokee, NormalDest, UnwindDest, this, ID, NumPatchBytes, ActualInvokee, NormalDest, UnwindDest,
@ -999,8 +1003,8 @@ CallInst *IRBuilderBase::CreateIntrinsic(Type *RetTy, Intrinsic::ID ID,
CallInst *IRBuilderBase::CreateConstrainedFPBinOp( CallInst *IRBuilderBase::CreateConstrainedFPBinOp(
Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource, Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource,
const Twine &Name, MDNode *FPMathTag, const Twine &Name, MDNode *FPMathTag,
Optional<RoundingMode> Rounding, std::optional<RoundingMode> Rounding,
Optional<fp::ExceptionBehavior> Except) { std::optional<fp::ExceptionBehavior> Except) {
Value *RoundingV = getConstrainedFPRounding(Rounding); Value *RoundingV = getConstrainedFPRounding(Rounding);
Value *ExceptV = getConstrainedFPExcept(Except); Value *ExceptV = getConstrainedFPExcept(Except);
@ -1033,8 +1037,8 @@ Value *IRBuilderBase::CreateNAryOp(unsigned Opc, ArrayRef<Value *> Ops,
CallInst *IRBuilderBase::CreateConstrainedFPCast( CallInst *IRBuilderBase::CreateConstrainedFPCast(
Intrinsic::ID ID, Value *V, Type *DestTy, Intrinsic::ID ID, Value *V, Type *DestTy,
Instruction *FMFSource, const Twine &Name, MDNode *FPMathTag, Instruction *FMFSource, const Twine &Name, MDNode *FPMathTag,
Optional<RoundingMode> Rounding, std::optional<RoundingMode> Rounding,
Optional<fp::ExceptionBehavior> Except) { std::optional<fp::ExceptionBehavior> Except) {
Value *ExceptV = getConstrainedFPExcept(Except); Value *ExceptV = getConstrainedFPExcept(Except);
FastMathFlags UseFMF = FMF; FastMathFlags UseFMF = FMF;
@ -1084,7 +1088,7 @@ Value *IRBuilderBase::CreateFCmpHelper(
CallInst *IRBuilderBase::CreateConstrainedFPCmp( CallInst *IRBuilderBase::CreateConstrainedFPCmp(
Intrinsic::ID ID, CmpInst::Predicate P, Value *L, Value *R, Intrinsic::ID ID, CmpInst::Predicate P, Value *L, Value *R,
const Twine &Name, Optional<fp::ExceptionBehavior> Except) { const Twine &Name, std::optional<fp::ExceptionBehavior> Except) {
Value *PredicateV = getConstrainedFPPredicate(P); Value *PredicateV = getConstrainedFPPredicate(P);
Value *ExceptV = getConstrainedFPExcept(Except); Value *ExceptV = getConstrainedFPExcept(Except);
@ -1096,8 +1100,8 @@ CallInst *IRBuilderBase::CreateConstrainedFPCmp(
CallInst *IRBuilderBase::CreateConstrainedFPCall( CallInst *IRBuilderBase::CreateConstrainedFPCall(
Function *Callee, ArrayRef<Value *> Args, const Twine &Name, Function *Callee, ArrayRef<Value *> Args, const Twine &Name,
Optional<RoundingMode> Rounding, std::optional<RoundingMode> Rounding,
Optional<fp::ExceptionBehavior> Except) { std::optional<fp::ExceptionBehavior> Except) {
llvm::SmallVector<Value *, 6> UseArgs; llvm::SmallVector<Value *, 6> UseArgs;
append_range(UseArgs, Args); append_range(UseArgs, Args);

View File

@ -71,6 +71,7 @@
#include <cstddef> #include <cstddef>
#include <cstdint> #include <cstdint>
#include <iterator> #include <iterator>
#include <optional>
#include <set> #include <set>
#include <string> #include <string>
#include <utility> #include <utility>
@ -1626,10 +1627,10 @@ makeStatepointExplicitImpl(CallBase *Call, /* to replace */
uint32_t Flags = uint32_t(StatepointFlags::None); uint32_t Flags = uint32_t(StatepointFlags::None);
SmallVector<Value *, 8> CallArgs(Call->args()); SmallVector<Value *, 8> CallArgs(Call->args());
Optional<ArrayRef<Use>> DeoptArgs; std::optional<ArrayRef<Use>> DeoptArgs;
if (auto Bundle = Call->getOperandBundle(LLVMContext::OB_deopt)) if (auto Bundle = Call->getOperandBundle(LLVMContext::OB_deopt))
DeoptArgs = Bundle->Inputs; DeoptArgs = Bundle->Inputs;
Optional<ArrayRef<Use>> TransitionArgs; std::optional<ArrayRef<Use>> TransitionArgs;
if (auto Bundle = Call->getOperandBundle(LLVMContext::OB_gc_transition)) { if (auto Bundle = Call->getOperandBundle(LLVMContext::OB_gc_transition)) {
TransitionArgs = Bundle->Inputs; TransitionArgs = Bundle->Inputs;
// TODO: This flag no longer serves a purpose and can be removed later // TODO: This flag no longer serves a purpose and can be removed later