diff options
author | Krzysztof Parzyszek <kparzysz@quicinc.com> | 2022-12-03 15:26:59 -0600 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@quicinc.com> | 2022-12-04 14:25:11 -0600 |
commit | f3b6dbfda8aa9d8215573caac8c5a47602f43fff (patch) | |
tree | d09ca06b6257c94e4cd114ae38e30f3120b3e046 /llvm/lib/IR/IntrinsicInst.cpp | |
parent | e33243c950ac40d027ad8facbf7ccf0624604a16 (diff) | |
download | llvm-f3b6dbfda8aa9d8215573caac8c5a47602f43fff.zip llvm-f3b6dbfda8aa9d8215573caac8c5a47602f43fff.tar.gz llvm-f3b6dbfda8aa9d8215573caac8c5a47602f43fff.tar.bz2 |
Instructions: convert Optional to std::optional
Diffstat (limited to 'llvm/lib/IR/IntrinsicInst.cpp')
-rw-r--r-- | llvm/lib/IR/IntrinsicInst.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/llvm/lib/IR/IntrinsicInst.cpp b/llvm/lib/IR/IntrinsicInst.cpp index bd04384..6f9cd2d 100644 --- a/llvm/lib/IR/IntrinsicInst.cpp +++ b/llvm/lib/IR/IntrinsicInst.cpp @@ -412,7 +412,8 @@ void VPIntrinsic::setVectorLengthParam(Value *NewEVL) { setArgOperand(*EVLPos, NewEVL); } -Optional<unsigned> VPIntrinsic::getMaskParamPos(Intrinsic::ID IntrinsicID) { +std::optional<unsigned> +VPIntrinsic::getMaskParamPos(Intrinsic::ID IntrinsicID) { switch (IntrinsicID) { default: return std::nullopt; @@ -424,7 +425,7 @@ Optional<unsigned> VPIntrinsic::getMaskParamPos(Intrinsic::ID IntrinsicID) { } } -Optional<unsigned> +std::optional<unsigned> VPIntrinsic::getVectorLengthParamPos(Intrinsic::ID IntrinsicID) { switch (IntrinsicID) { default: @@ -440,7 +441,8 @@ VPIntrinsic::getVectorLengthParamPos(Intrinsic::ID IntrinsicID) { /// \return the alignment of the pointer used by this load/store/gather or /// scatter. MaybeAlign VPIntrinsic::getPointerAlignment() const { - Optional<unsigned> PtrParamOpt = getMemoryPointerParamPos(getIntrinsicID()); + std::optional<unsigned> PtrParamOpt = + getMemoryPointerParamPos(getIntrinsicID()); assert(PtrParamOpt && "no pointer argument!"); return getParamAlign(PtrParamOpt.value()); } @@ -452,7 +454,8 @@ Value *VPIntrinsic::getMemoryPointerParam() const { return nullptr; } -Optional<unsigned> VPIntrinsic::getMemoryPointerParamPos(Intrinsic::ID VPID) { +std::optional<unsigned> +VPIntrinsic::getMemoryPointerParamPos(Intrinsic::ID VPID) { switch (VPID) { default: break; @@ -472,7 +475,7 @@ Value *VPIntrinsic::getMemoryDataParam() const { return getArgOperand(DataParamOpt.value()); } -Optional<unsigned> VPIntrinsic::getMemoryDataParamPos(Intrinsic::ID VPID) { +std::optional<unsigned> VPIntrinsic::getMemoryDataParamPos(Intrinsic::ID VPID) { switch (VPID) { default: break; @@ -497,7 +500,8 @@ bool VPIntrinsic::isVPIntrinsic(Intrinsic::ID ID) { } // Equivalent non-predicated opcode -Optional<unsigned> VPIntrinsic::getFunctionalOpcodeForVP(Intrinsic::ID ID) { +std::optional<unsigned> +VPIntrinsic::getFunctionalOpcodeForVP(Intrinsic::ID ID) { switch (ID) { default: break; @@ -708,7 +712,8 @@ unsigned VPReductionIntrinsic::getStartParamPos() const { return *VPReductionIntrinsic::getStartParamPos(getIntrinsicID()); } -Optional<unsigned> VPReductionIntrinsic::getVectorParamPos(Intrinsic::ID ID) { +std::optional<unsigned> +VPReductionIntrinsic::getVectorParamPos(Intrinsic::ID ID) { switch (ID) { #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID: #define VP_PROPERTY_REDUCTION(STARTPOS, VECTORPOS) return VECTORPOS; @@ -720,7 +725,8 @@ Optional<unsigned> VPReductionIntrinsic::getVectorParamPos(Intrinsic::ID ID) { return std::nullopt; } -Optional<unsigned> VPReductionIntrinsic::getStartParamPos(Intrinsic::ID ID) { +std::optional<unsigned> +VPReductionIntrinsic::getStartParamPos(Intrinsic::ID ID) { switch (ID) { #define BEGIN_REGISTER_VP_INTRINSIC(VPID, ...) case Intrinsic::VPID: #define VP_PROPERTY_REDUCTION(STARTPOS, VECTORPOS) return STARTPOS; |