[PATCH] D140451: [BOLT][NFC] Use std::optional in ReachingDefOrUse
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 20 18:31:43 PST 2022
Amir created this revision.
Amir added a reviewer: bolt.
Herald added a reviewer: rafauler.
Herald added subscribers: treapster, ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D140451
Files:
bolt/include/bolt/Passes/ReachingDefOrUse.h
Index: bolt/include/bolt/Passes/ReachingDefOrUse.h
===================================================================
--- bolt/include/bolt/Passes/ReachingDefOrUse.h
+++ bolt/include/bolt/Passes/ReachingDefOrUse.h
@@ -11,7 +11,6 @@
#include "bolt/Passes/DataflowAnalysis.h"
#include "bolt/Passes/RegAnalysis.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Timer.h"
@@ -34,7 +33,7 @@
public:
ReachingDefOrUse(const RegAnalysis &RA, BinaryFunction &BF,
- Optional<MCPhysReg> TrackingReg = std::nullopt,
+ std::optional<MCPhysReg> TrackingReg = std::nullopt,
MCPlusBuilder::AllocatorIdTy AllocId = 0)
: InstrsDataflowAnalysis<ReachingDefOrUse<Def>, !Def>(BF, AllocId),
RA(RA), TrackingReg(TrackingReg) {}
@@ -65,7 +64,7 @@
/// If set, limit the dataflow to only track instructions affecting this
/// register. Otherwise the analysis can be too permissive.
- Optional<MCPhysReg> TrackingReg;
+ std::optional<MCPhysReg> TrackingReg;
void preflight() {
// Populate our universe of tracked expressions with all instructions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140451.484444.patch
Type: text/x-patch
Size: 1207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221221/4499b613/attachment.bin>
More information about the llvm-commits
mailing list