[llvm] bfaf0e7 - [AMDGPU] Modernize Status and BlockData (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 16 13:03:09 PDT 2023
Author: Kazu Hirata
Date: 2023-04-16T13:03:02-07:00
New Revision: bfaf0e78582ee4f1a2a1df0b3d52ce19a57b8c76
URL: https://github.com/llvm/llvm-project/commit/bfaf0e78582ee4f1a2a1df0b3d52ce19a57b8c76
DIFF: https://github.com/llvm/llvm-project/commit/bfaf0e78582ee4f1a2a1df0b3d52ce19a57b8c76.diff
LOG: [AMDGPU] Modernize Status and BlockData (NFC)
Identified with modernize-use-default-member-init.
Added:
Modified:
llvm/lib/Target/AMDGPU/SIModeRegister.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIModeRegister.cpp b/llvm/lib/Target/AMDGPU/SIModeRegister.cpp
index f0b925d1d5cb0..be395d53c34e9 100644
--- a/llvm/lib/Target/AMDGPU/SIModeRegister.cpp
+++ b/llvm/lib/Target/AMDGPU/SIModeRegister.cpp
@@ -29,10 +29,10 @@ using namespace llvm;
struct Status {
// Mask is a bitmask where a '1' indicates the corresponding Mode bit has a
// known value
- unsigned Mask;
- unsigned Mode;
+ unsigned Mask = 0;
+ unsigned Mode = 0;
- Status() : Mask(0), Mode(0){};
+ Status() = default;
Status(unsigned NewMask, unsigned NewMode) : Mask(NewMask), Mode(NewMode) {
Mode &= Mask;
@@ -96,13 +96,13 @@ class BlockData {
// In Phase 1 we record the first instruction that has a mode requirement,
// which is used in Phase 3 if we need to insert a mode change.
- MachineInstr *FirstInsertionPoint;
+ MachineInstr *FirstInsertionPoint = nullptr;
// A flag to indicate whether an Exit value has been set (we can't tell by
// examining the Exit value itself as all values may be valid results).
- bool ExitSet;
+ bool ExitSet = false;
- BlockData() : FirstInsertionPoint(nullptr), ExitSet(false){};
+ BlockData() = default;
};
namespace {
More information about the llvm-commits
mailing list