[llvm] 959c9cc - [AMDGPU] Use std::optional in AMDGPUInstructionSelector.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 22:23:14 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T22:23:09-08:00
New Revision: 959c9cc7acf4d0aa433f2436e2a45b782e18022a
URL: https://github.com/llvm/llvm-project/commit/959c9cc7acf4d0aa433f2436e2a45b782e18022a
DIFF: https://github.com/llvm/llvm-project/commit/959c9cc7acf4d0aa433f2436e2a45b782e18022a.diff
LOG: [AMDGPU] Use std::optional in AMDGPUInstructionSelector.cpp (NFC)
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
index 42bb59b66967e..e65178b95b6e9 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
@@ -26,6 +26,7 @@
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
+#include <optional>
#define DEBUG_TYPE "amdgpu-isel"
@@ -4234,7 +4235,7 @@ AMDGPUInstructionSelector::selectMUBUFScratchOffen(MachineOperand &Root) const {
// Try to fold a frame index directly into the MUBUF vaddr field, and any
// offsets.
- Optional<int> FI;
+ std::optional<int> FI;
Register VAddr = Root.getReg();
if (const MachineInstr *RootDef = MRI->getVRegDef(Root.getReg())) {
Register PtrBase;
More information about the llvm-commits
mailing list