Skip to content

Commit

Permalink
Fixes compilation problem on GCC 14
Browse files Browse the repository at this point in the history
GCC detected dangerous pattern which required refactor in order to compile.
  • Loading branch information
bokrzesi authored and igcbot committed Aug 8, 2024
1 parent bd533e0 commit 03a6d27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion IGC/Compiler/Optimizer/MCSOptimization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ void MCSOptimization::visitCallInst(llvm::CallInst& I)
for (auto BB : useBlocks)
{
std::vector<LdmsInstrinsic*> ldmsInstsToMove;
std::vector<LdmsInstrinsic*> ldmsInstsToClub;
for (auto inst = BB->begin(); inst != BB->end(); inst++)
{
if (LdmsInstrinsic * ldmsIntr = dyn_cast<LdmsInstrinsic>(inst))
Expand All @@ -203,7 +204,7 @@ void MCSOptimization::visitCallInst(llvm::CallInst& I)

while (!allInstsWillBeMoved)
{
std::vector<LdmsInstrinsic*> ldmsInstsToClub;
ldmsInstsToClub.clear();
//Threshold is more than # of insts that are to be moved. So move all.
if (instClubThreshold >= static_cast<int>(ldmsInstsToMove.size()))
{
Expand Down

0 comments on commit 03a6d27

Please sign in to comment.