Skip to content

Commit 20fc1e4

Browse files
committed
Apply feedback: nullptr MCExpr, remove superfluous memset
1 parent 8d3a7d1 commit 20fc1e4

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCKernelDescriptor.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ class MCContext;
2424
namespace AMDGPU {
2525

2626
struct MCKernelDescriptor {
27-
const MCExpr *group_segment_fixed_size;
28-
const MCExpr *private_segment_fixed_size;
29-
const MCExpr *kernarg_size;
30-
const MCExpr *compute_pgm_rsrc3;
31-
const MCExpr *compute_pgm_rsrc1;
32-
const MCExpr *compute_pgm_rsrc2;
33-
const MCExpr *kernel_code_properties;
34-
const MCExpr *kernarg_preload;
27+
const MCExpr *group_segment_fixed_size = nullptr;
28+
const MCExpr *private_segment_fixed_size = nullptr;
29+
const MCExpr *kernarg_size = nullptr;
30+
const MCExpr *compute_pgm_rsrc3 = nullptr;
31+
const MCExpr *compute_pgm_rsrc1 = nullptr;
32+
const MCExpr *compute_pgm_rsrc2 = nullptr;
33+
const MCExpr *kernel_code_properties = nullptr;
34+
const MCExpr *kernarg_preload = nullptr;
3535

3636
static void bits_set(const MCExpr *&Dst, const MCExpr *Value, uint32_t Shift,
3737
uint32_t Mask, MCContext &Ctx);

llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,6 @@ MCKernelDescriptor getDefaultAmdhsaKernelDescriptor(const MCSubtargetInfo *STI,
12221222
IsaVersion Version = getIsaVersion(STI->getCPU());
12231223

12241224
MCKernelDescriptor KD;
1225-
memset(&KD, 0, sizeof(KD));
12261225
const MCExpr *ZeroMCExpr = MCConstantExpr::create(0, Ctx);
12271226
const MCExpr *OneMCExpr = MCConstantExpr::create(1, Ctx);
12281227

0 commit comments

Comments
 (0)