From: Amir Ayupov Date: Sun, 11 Dec 2022 20:43:26 +0000 (-0800) Subject: [BOLT][NFC] Use std::optional in ShrinkWrapping X-Git-Tag: upstream/17.0.6~24285 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1628daf6e744abd8d81f544bf9d53da81021b800;p=platform%2Fupstream%2Fllvm.git [BOLT][NFC] Use std::optional in ShrinkWrapping --- diff --git a/bolt/include/bolt/Passes/ShrinkWrapping.h b/bolt/include/bolt/Passes/ShrinkWrapping.h index 4c7e3df..cccbc51 100644 --- a/bolt/include/bolt/Passes/ShrinkWrapping.h +++ b/bolt/include/bolt/Passes/ShrinkWrapping.h @@ -27,8 +27,8 @@ class CalleeSavedAnalysis { DataflowInfoManager &Info; MCPlusBuilder::AllocatorIdTy AllocatorId; - Optional SaveTagIndex; - Optional RestoreTagIndex; + std::optional SaveTagIndex; + std::optional RestoreTagIndex; /// Compute all stores of callee-saved regs. Those are the ones that stores a /// register whose definition is not local. @@ -140,9 +140,9 @@ class StackLayoutModifier { bool IsInitialized{false}; - Optional TodoTagIndex; - Optional SlotTagIndex; - Optional OffsetCFIRegTagIndex; + std::optional TodoTagIndex; + std::optional SlotTagIndex; + std::optional OffsetCFIRegTagIndex; public: // Keep a worklist of operations to perform on the function to perform @@ -315,7 +315,7 @@ class ShrinkWrapping { static std::atomic InstrDynamicCount; static std::atomic StoreDynamicCount; - Optional AnnotationIndex; + std::optional AnnotationIndex; /// Allow our custom worklist-sensitive analysis /// PredictiveStackPointerTracking to access WorklistItem