aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-12-13 09:06:36 +0000
committerFangrui Song <i@maskray.me>2022-12-13 09:06:36 +0000
commit67819a72c6ba39267effe8edfc1befddc3f3f2f9 (patch)
tree9a95db915f8eded88767ac3e9c31c8db045ab505 /llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
parent48e6ff9ad3eb1971de6d7ba12e31754781aff675 (diff)
downloadllvm-67819a72c6ba39267effe8edfc1befddc3f3f2f9.zip
llvm-67819a72c6ba39267effe8edfc1befddc3f3f2f9.tar.gz
llvm-67819a72c6ba39267effe8edfc1befddc3f3f2f9.tar.bz2
[CodeGen] llvm::Optional => std::optional
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
index 214a16f..18c1875 100644
--- a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
@@ -263,7 +263,7 @@ private:
int32_t NewOffset) const;
Register computeBase(MachineInstr &MI, const MemAddress &Addr) const;
MachineOperand createRegOrImm(int32_t Val, MachineInstr &MI) const;
- Optional<int32_t> extractConstOffset(const MachineOperand &Op) const;
+ std::optional<int32_t> extractConstOffset(const MachineOperand &Op) const;
void processBaseWithConstOffset(const MachineOperand &Base, MemAddress &Addr) const;
/// Promotes constant offset to the immediate by adjusting the base. It
/// tries to use a base from the nearby instructions that allows it to have
@@ -1983,7 +1983,7 @@ void SILoadStoreOptimizer::updateBaseAndOffset(MachineInstr &MI,
TII->getNamedOperand(MI, AMDGPU::OpName::offset)->setImm(NewOffset);
}
-Optional<int32_t>
+std::optional<int32_t>
SILoadStoreOptimizer::extractConstOffset(const MachineOperand &Op) const {
if (Op.isImm())
return Op.getImm();