Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions llvm/include/llvm/Transforms/Instrumentation/CFGMST.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@ template <class Edge, class BBInfo> class CFGMST {
LLVM_DEBUG(dbgs() << " Edge: from fake node to " << Entry->getName()
<< " w = " << EntryWeight << "\n");

// Special handling for single BB functions.
if (succ_empty(Entry)) {
addEdge(Entry, nullptr, EntryWeight);
return;
}

static const uint32_t CriticalEdgeMultiplier = 1000;

for (BasicBlock &BB : F) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# IR level Instrumentation Flag
:ir
foo
# Func Hash:
742261418966908927
# Num Counters:
1
# Counter Values:
1
13 changes: 13 additions & 0 deletions llvm/test/Transforms/PGOProfile/unreachable-block.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
; RUN: llvm-profdata merge %S/Inputs/unreachable-block.proftext -o %t.profdata
; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s

declare ptr @bar()

; CHECK: define ptr @foo
define ptr @foo() {
entry:
ret ptr null

2:
ret ptr null
}