Skip to content

Commit c7a2004

Browse files
authored
[NFC][SYCL] Fix -Wreorder warning about order of initialization (#3660)
Inside LoopAttributes::LoopAttributes(bool IsParallel) in CGLoopInfo.cpp file, SYCLIntelFPGAVariantCount is initialized after SYCLSpeculatedIterationsNIterations. /// Value for count variant (min/max/avg) and count metadata. llvm::SmallVector<std::pair<const char *, unsigned int>, 2> SYCLIntelFPGAVariantCount; This patch removes the initialization from the ctor init list to avoid a -Wreorder warning since SYCLIntelFPGAVariantCount is defined as SmallVector which default constructs just fine here.
1 parent 66919a2 commit c7a2004

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

clang/lib/CodeGen/CGLoopInfo.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -627,11 +627,10 @@ LoopAttributes::LoopAttributes(bool IsParallel)
627627
SYCLLoopCoalesceNLevels(0), SYCLLoopPipeliningDisable(false),
628628
SYCLMaxInterleavingEnable(false), SYCLMaxInterleavingNInvocations(0),
629629
SYCLSpeculatedIterationsEnable(false),
630-
SYCLSpeculatedIterationsNIterations(0), SYCLIntelFPGAVariantCount(false),
631-
UnrollCount(0), UnrollAndJamCount(0),
632-
DistributeEnable(LoopAttributes::Unspecified), PipelineDisabled(false),
633-
PipelineInitiationInterval(0), SYCLNofusionEnable(false),
634-
MustProgress(false) {}
630+
SYCLSpeculatedIterationsNIterations(0), UnrollCount(0),
631+
UnrollAndJamCount(0), DistributeEnable(LoopAttributes::Unspecified),
632+
PipelineDisabled(false), PipelineInitiationInterval(0),
633+
SYCLNofusionEnable(false), MustProgress(false) {}
635634

636635
void LoopAttributes::clear() {
637636
IsParallel = false;

0 commit comments

Comments
 (0)