Skip to content

Commit

Permalink
Fix incorrect DistanceMap counting
Browse files Browse the repository at this point in the history
DistanceMap should not count debug intrinsics. This lead to incorrect behavior for debug workloads.
  • Loading branch information
Pitchiu authored and igcbot committed Jun 28, 2023
1 parent 3af2e8f commit 710e1cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IGC/Compiler/CISACodeGen/LiveVars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ See LICENSE.TXT for details.
#include "common/LLVMWarningsPop.hpp"
#include <algorithm>
#include "Probe/Assertion.h"
#include "helper.h"

using namespace llvm;
using namespace IGC;
Expand Down Expand Up @@ -411,6 +412,9 @@ void LiveVars::initDistance(Function& F)
unsigned Dist = 0;
for (auto& II : BB) {
Instruction* MI = &II;
if (isDbgIntrinsic(MI)) {
continue;
}
DistanceMap.insert(std::make_pair(MI, Dist++));
}
}
Expand Down

0 comments on commit 710e1cc

Please sign in to comment.