Skip to content

Commit

Permalink
Use uint64_t for branch weights instead of uint32_t
Browse files Browse the repository at this point in the history
CallInst::updateProfWeight() creates branch_weights with i64 instead of i32.
To be more consistent everywhere and remove lots of casts from uint64_t
to uint32_t, use i64 for branch_weights.

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D88609
  • Loading branch information
aeubanks committed Oct 30, 2020
1 parent e5699b8 commit 10f2a0d
Show file tree
Hide file tree
Showing 116 changed files with 1,168 additions and 565 deletions.
36 changes: 6 additions & 30 deletions clang/lib/CodeGen/CodeGenPGO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1013,42 +1013,21 @@ void CodeGenPGO::loadRegionCounts(llvm::IndexedInstrProfReader *PGOReader,
RegionCounts = ProfRecord->Counts;
}

/// Calculate what to divide by to scale weights.
///
/// Given the maximum weight, calculate a divisor that will scale all the
/// weights to strictly less than UINT32_MAX.
static uint64_t calculateWeightScale(uint64_t MaxWeight) {
return MaxWeight < UINT32_MAX ? 1 : MaxWeight / UINT32_MAX + 1;
}

/// Scale an individual branch weight (and add 1).
///
/// Scale a 64-bit weight down to 32-bits using \c Scale.
/// Scale an individual branch weight (add 1).
///
/// According to Laplace's Rule of Succession, it is better to compute the
/// weight based on the count plus 1, so universally add 1 to the value.
///
/// \pre \c Scale was calculated by \a calculateWeightScale() with a weight no
/// greater than \c Weight.
static uint32_t scaleBranchWeight(uint64_t Weight, uint64_t Scale) {
assert(Scale && "scale by 0?");
uint64_t Scaled = Weight / Scale + 1;
assert(Scaled <= UINT32_MAX && "overflow 32-bits");
return Scaled;
}
static uint64_t scaleBranchWeight(uint64_t Weight) { return Weight + 1; }

llvm::MDNode *CodeGenFunction::createProfileWeights(uint64_t TrueCount,
uint64_t FalseCount) const {
// Check for empty weights.
if (!TrueCount && !FalseCount)
return nullptr;

// Calculate how to scale down to 32-bits.
uint64_t Scale = calculateWeightScale(std::max(TrueCount, FalseCount));

llvm::MDBuilder MDHelper(CGM.getLLVMContext());
return MDHelper.createBranchWeights(scaleBranchWeight(TrueCount, Scale),
scaleBranchWeight(FalseCount, Scale));
return MDHelper.createBranchWeights(scaleBranchWeight(TrueCount),
scaleBranchWeight(FalseCount));
}

llvm::MDNode *
Expand All @@ -1062,13 +1041,10 @@ CodeGenFunction::createProfileWeights(ArrayRef<uint64_t> Weights) const {
if (MaxWeight == 0)
return nullptr;

// Calculate how to scale down to 32-bits.
uint64_t Scale = calculateWeightScale(MaxWeight);

SmallVector<uint32_t, 16> ScaledWeights;
SmallVector<uint64_t, 16> ScaledWeights;
ScaledWeights.reserve(Weights.size());
for (uint64_t W : Weights)
ScaledWeights.push_back(scaleBranchWeight(W, Scale));
ScaledWeights.push_back(scaleBranchWeight(W));

llvm::MDBuilder MDHelper(CGM.getLLVMContext());
return MDHelper.createBranchWeights(ScaledWeights);
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGen/catch-undef-behavior.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,6 @@ void call_nonnull_variadic(int a, int *b) {
nonnull_variadic(a, b);
}

// CHECK-UBSAN: ![[WEIGHT_MD]] = !{!"branch_weights", i32 1048575, i32 1}
// CHECK-UBSAN: ![[WEIGHT_MD]] = !{!"branch_weights", i64 1048575, i64 1}

// CHECK-TRAP: attributes [[NR_NUW]] = { noreturn nounwind }
4 changes: 2 additions & 2 deletions clang/test/CodeGenCXX/attr-likelihood-if-branch-weights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,5 @@ void SwitchStmt() {
}
}

// CHECK: !7 = !{!"branch_weights", i32 [[UNLIKELY]], i32 [[LIKELY]]}
// CHECK: !8 = !{!"branch_weights", i32 [[LIKELY]], i32 [[UNLIKELY]]}
// CHECK: !7 = !{!"branch_weights", i64 [[UNLIKELY]], i64 [[LIKELY]]}
// CHECK: !8 = !{!"branch_weights", i64 [[LIKELY]], i64 [[UNLIKELY]]}
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,5 @@ void tu2(int &i) {
}
}

// CHECK: !6 = !{!"branch_weights", i32 2000, i32 1}
// CHECK: !10 = !{!"branch_weights", i32 1, i32 2000}
// CHECK: !6 = !{!"branch_weights", i64 2000, i64 1}
// CHECK: !10 = !{!"branch_weights", i64 1, i64 2000}
30 changes: 15 additions & 15 deletions clang/test/CodeGenCXX/attr-likelihood-switch-branch-weights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,18 @@ void TwoCasesDefaultLNU() {
}
}

// CHECK: !6 = !{!"branch_weights", i32 357913942, i32 715827883}
// CHECK: !7 = !{!"branch_weights", i32 536870912, i32 1}
// CHECK: !8 = !{!"branch_weights", i32 238609295, i32 715827883, i32 238609295}
// CHECK: !9 = !{!"branch_weights", i32 357913942, i32 1, i32 357913942}
// CHECK: !10 = !{!"branch_weights", i32 357913942, i32 715827883, i32 1}
// CHECK: !11 = !{!"branch_weights", i32 143165577, i32 143165577, i32 143165577, i32 715827883, i32 143165577}
// CHECK: !12 = !{!"branch_weights", i32 214748365, i32 214748365, i32 214748365, i32 1, i32 214748365}
// CHECK: !13 = !{!"branch_weights", i32 79536432, i32 79536432, i32 79536432, i32 79536432, i32 79536432, i32 79536432, i32 79536432, i32 715827883, i32 79536432}
// CHECK: !14 = !{!"branch_weights", i32 119304648, i32 119304648, i32 119304648, i32 119304648, i32 119304648, i32 119304648, i32 119304648, i32 1, i32 119304648}
// CHECK: !15 = !{!"branch_weights", i32 2000, i32 1}
// CHECK: !16 = !{!"branch_weights", i32 1, i32 2000}
// CHECK: !17 = !{!"branch_weights", i32 715827883, i32 357913942}
// CHECK: !18 = !{!"branch_weights", i32 1, i32 536870912}
// CHECK: !19 = !{!"branch_weights", i32 536870912, i32 536870912, i32 268435456}
// CHECK: !20 = !{!"branch_weights", i32 1, i32 715827883, i32 357913942}
// CHECK: !6 = !{!"branch_weights", i64 357913942, i64 715827883}
// CHECK: !7 = !{!"branch_weights", i64 536870912, i64 1}
// CHECK: !8 = !{!"branch_weights", i64 238609295, i64 715827883, i64 238609295}
// CHECK: !9 = !{!"branch_weights", i64 357913942, i64 1, i64 357913942}
// CHECK: !10 = !{!"branch_weights", i64 357913942, i64 715827883, i64 1}
// CHECK: !11 = !{!"branch_weights", i64 143165577, i64 143165577, i64 143165577, i64 715827883, i64 143165577}
// CHECK: !12 = !{!"branch_weights", i64 214748365, i64 214748365, i64 214748365, i64 1, i64 214748365}
// CHECK: !13 = !{!"branch_weights", i64 79536432, i64 79536432, i64 79536432, i64 79536432, i64 79536432, i64 79536432, i64 79536432, i64 715827883, i64 79536432}
// CHECK: !14 = !{!"branch_weights", i64 119304648, i64 119304648, i64 119304648, i64 119304648, i64 119304648, i64 119304648, i64 119304648, i64 1, i64 119304648}
// CHECK: !15 = !{!"branch_weights", i64 2000, i64 1}
// CHECK: !16 = !{!"branch_weights", i64 1, i64 2000}
// CHECK: !17 = !{!"branch_weights", i64 715827883, i64 357913942}
// CHECK: !18 = !{!"branch_weights", i64 1, i64 536870912}
// CHECK: !19 = !{!"branch_weights", i64 536870912, i64 536870912, i64 268435456}
// CHECK: !20 = !{!"branch_weights", i64 1, i64 715827883, i64 357913942}
4 changes: 2 additions & 2 deletions clang/test/CodeGenCXX/microsoft-abi-thread-safe-statics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ int g1() {
return i;
}

// CHECK-DAG: ![[unlikely_threadlocal]] = !{!"branch_weights", i32 1, i32 1023}
// CHECK-DAG: ![[unlikely_staticlocal]] = !{!"branch_weights", i32 1, i32 1048575}
// CHECK-DAG: ![[unlikely_threadlocal]] = !{!"branch_weights", i64 1, i64 1023}
// CHECK-DAG: ![[unlikely_staticlocal]] = !{!"branch_weights", i64 1, i64 1048575}
4 changes: 2 additions & 2 deletions clang/test/CodeGenCXX/profile-remap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ namespace Foo {
//
// FIXME: Laplace's rule of succession is applied to sample profiles...
// CHECK-SAMPLES-DAG: [[FUNC_ENTRY]] = !{!"function_entry_count", i64 1}
// CHECK-SAMPLES-DAG: [[BR_WEIGHTS]] = !{!"branch_weights", i32 11, i32 91}
// CHECK-SAMPLES-DAG: [[BR_WEIGHTS]] = !{!"branch_weights", i64 11, i64 91}
//
// ... but not to instruction profiles.
// CHECK-INSTR-DAG: [[FUNC_ENTRY]] = !{!"function_entry_count", i64 100}
// CHECK-INSTR-DAG: [[BR_WEIGHTS]] = !{!"branch_weights", i32 10, i32 90}
// CHECK-INSTR-DAG: [[BR_WEIGHTS]] = !{!"branch_weights", i64 10, i64 90}
4 changes: 2 additions & 2 deletions clang/test/CodeGenCXX/static-initializer-branch-weights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,5 @@ void use_b() {
// CHECK: icmp eq i8 {{.*}}, 0
// CHECK: br i1 {{.*}}, !prof ![[WEIGHTS_THREAD_LOCAL]]

// CHECK-DAG: ![[WEIGHTS_THREAD_LOCAL]] = !{!"branch_weights", i32 1, i32 1023}
// CHECK-DAG: ![[WEIGHTS_LOCAL]] = !{!"branch_weights", i32 1, i32 1048575}
// CHECK-DAG: ![[WEIGHTS_THREAD_LOCAL]] = !{!"branch_weights", i64 1, i64 1023}
// CHECK-DAG: ![[WEIGHTS_LOCAL]] = !{!"branch_weights", i64 1, i64 1048575}
10 changes: 5 additions & 5 deletions clang/test/Profile/c-captured.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ void debug_captured() {
if (x) {} // This is DC2. Checked above.
}

// PGOUSE-DAG: ![[DC1]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[DC2]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[CS1]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[C11]] = !{!"branch_weights", i32 11, i32 2}
// PGOUSE-DAG: ![[C12]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[DC1]] = !{!"branch_weights", i64 2, i64 1}
// PGOUSE-DAG: ![[DC2]] = !{!"branch_weights", i64 2, i64 1}
// PGOUSE-DAG: ![[CS1]] = !{!"branch_weights", i64 2, i64 1}
// PGOUSE-DAG: ![[C11]] = !{!"branch_weights", i64 11, i64 2}
// PGOUSE-DAG: ![[C12]] = !{!"branch_weights", i64 2, i64 1}

int main(int argc, const char *argv[]) {
debug_captured();
Expand Down
49 changes: 0 additions & 49 deletions clang/test/Profile/c-counter-overflows.c

This file was deleted.

152 changes: 76 additions & 76 deletions clang/test/Profile/c-general.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,82 +470,82 @@ static void static_func() {
}
}

// PGOUSE-DAG: ![[SL1]] = !{!"branch_weights", i32 101, i32 2}
// PGOUSE-DAG: ![[SL2]] = !{!"branch_weights", i32 101, i32 2}
// PGOUSE-DAG: ![[SL3]] = !{!"branch_weights", i32 76, i32 2}

// PGOUSE-DAG: ![[EE1]] = !{!"branch_weights", i32 1, i32 2}
// PGOUSE-DAG: ![[EE2]] = !{!"branch_weights", i32 52, i32 1}
// PGOUSE-DAG: ![[EE3]] = !{!"branch_weights", i32 2, i32 51}
// PGOUSE-DAG: ![[EE4]] = !{!"branch_weights", i32 26, i32 26}
// PGOUSE-DAG: ![[EE5]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[EE6]] = !{!"branch_weights", i32 2, i32 26}
// PGOUSE-DAG: ![[EE7]] = !{!"branch_weights", i32 26, i32 1}

// PGOUSE-DAG: ![[IF1]] = !{!"branch_weights", i32 101, i32 2}
// PGOUSE-DAG: ![[IF2]] = !{!"branch_weights", i32 51, i32 51}
// PGOUSE-DAG: ![[IF3]] = !{!"branch_weights", i32 51, i32 1}
// PGOUSE-DAG: ![[IF4]] = !{!"branch_weights", i32 34, i32 18}
// PGOUSE-DAG: ![[IF5]] = !{!"branch_weights", i32 34, i32 1}
// PGOUSE-DAG: ![[IF6]] = !{!"branch_weights", i32 17, i32 2}
// PGOUSE-DAG: ![[IF7]] = !{!"branch_weights", i32 100, i32 2}
// PGOUSE-DAG: ![[IF8]] = !{!"branch_weights", i32 100, i32 2}

// PGOUSE-DAG: ![[JM1]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[JM2]] = !{!"branch_weights", i32 1, i32 2}
// PGOUSE-DAG: ![[JM3]] = !{!"branch_weights", i32 1, i32 2}
// PGOUSE-DAG: ![[JM4]] = !{!"branch_weights", i32 1, i32 2}
// PGOUSE-DAG: ![[JM5]] = !{!"branch_weights", i32 3, i32 2}
// PGOUSE-DAG: ![[JM6]] = !{!"branch_weights", i32 1, i32 2}
// PGOUSE-DAG: ![[JM7]] = !{!"branch_weights", i32 1, i32 2, i32 2, i32 2}
// PGOUSE-DAG: ![[JM8]] = !{!"branch_weights", i32 11, i32 2}
// PGOUSE-DAG: ![[JM9]] = !{!"branch_weights", i32 10, i32 2}

// PGOUSE-DAG: ![[SW1]] = !{!"branch_weights", i32 16, i32 1}
// PGOUSE-DAG: ![[SW2]] = !{!"branch_weights", i32 6, i32 2, i32 3, i32 4, i32 5}
// PGOUSE-DAG: ![[SW3]] = !{!"branch_weights", i32 1, i32 2}
// PGOUSE-DAG: ![[SW4]] = !{!"branch_weights", i32 3, i32 2}
// PGOUSE-DAG: ![[SW5]] = !{!"branch_weights", i32 4, i32 1}
// PGOUSE-DAG: ![[SW6]] = !{!"branch_weights", i32 5, i32 1}
// PGOUSE-DAG: ![[SW7]] = !{!"branch_weights", i32 1, i32 2, i32 2, i32 2, i32 2}
// PGOUSE-DAG: ![[SW8]] = !{!"branch_weights", i32 5, i32 1}
// PGOUSE-DAG: ![[SW9]] = !{!"branch_weights", i32 2, i32 5}

// PGOUSE-DAG: ![[BS1]] = !{!"branch_weights", i32 33, i32 2}
// PGOUSE-DAG: ![[BS2]] = !{!"branch_weights", i32 29, i32 2, i32 2, i32 2, i32 2, i32 1}
// PGOUSE-DAG: ![[BS3]] = !{!"branch_weights", i32 1, i32 2}
// PGOUSE-DAG: ![[BS4]] = !{!"branch_weights", i32 2, i32 2}
// PGOUSE-DAG: ![[BS5]] = !{!"branch_weights", i32 12, i32 1}
// PGOUSE-DAG: ![[BS6]] = !{!"branch_weights", i32 12, i32 3}
// PGOUSE-DAG: ![[BS7]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[BS8]] = !{!"branch_weights", i32 16, i32 1}
// PGOUSE-DAG: ![[BS9]] = !{!"branch_weights", i32 16, i32 14}
// PGOUSE-DAG: ![[BS10]] = !{!"branch_weights", i32 2, i32 1}
// PGOUSE-DAG: ![[BS11]] = !{!"branch_weights", i32 3, i32 1}

// PGOUSE-DAG: ![[BO1]] = !{!"branch_weights", i32 101, i32 2}
// PGOUSE-DAG: ![[BO2]] = !{!"branch_weights", i32 67, i32 35}
// PGOUSE-DAG: ![[BO3]] = !{!"branch_weights", i32 67, i32 35}
// PGOUSE-DAG: ![[BO4]] = !{!"branch_weights", i32 67, i32 35}
// PGOUSE-DAG: ![[BO5]] = !{!"branch_weights", i32 18, i32 18}
// PGOUSE-DAG: ![[BO6]] = !{!"branch_weights", i32 51, i32 51}
// PGOUSE-DAG: ![[BO7]] = !{!"branch_weights", i32 34, i32 18}
// PGOUSE-DAG: ![[BL1]] = !{!"branch_weights", i32 52, i32 1}
// PGOUSE-DAG: ![[BL2]] = !{!"branch_weights", i32 51, i32 2}
// PGOUSE-DAG: ![[BL3]] = !{!"branch_weights", i32 26, i32 27}
// PGOUSE-DAG: ![[BL4]] = !{!"branch_weights", i32 51, i32 2}
// PGOUSE-DAG: ![[BL5]] = !{!"branch_weights", i32 52, i32 1}
// PGOUSE-DAG: ![[BL6]] = !{!"branch_weights", i32 51, i32 2}
// PGOUSE-DAG: ![[BL7]] = !{!"branch_weights", i32 26, i32 27}
// PGOUSE-DAG: ![[BL8]] = !{!"branch_weights", i32 51, i32 2}
// PGOUSE-DAG: ![[CO1]] = !{!"branch_weights", i32 1, i32 2}
// PGOUSE-DAG: ![[CO2]] = !{!"branch_weights", i32 2, i32 1}

// PGOUSE-DAG: ![[DF1]] = !{!"branch_weights", i32 11, i32 2}
// PGOUSE-DAG: ![[DF2]] = !{!"branch_weights", i32 3, i32 3}
// PGOUSE-DAG: ![[DF3]] = !{!"branch_weights", i32 9, i32 5}

// PGOUSE-DAG: ![[ST1]] = !{!"branch_weights", i32 11, i32 2}
// PGOUSE-DAG: ![[SL1]] = !{!"branch_weights", i64 101, i64 2}
// PGOUSE-DAG: ![[SL2]] = !{!"branch_weights", i64 101, i64 2}
// PGOUSE-DAG: ![[SL3]] = !{!"branch_weights", i64 76, i64 2}

// PGOUSE-DAG: ![[EE1]] = !{!"branch_weights", i64 1, i64 2}
// PGOUSE-DAG: ![[EE2]] = !{!"branch_weights", i64 52, i64 1}
// PGOUSE-DAG: ![[EE3]] = !{!"branch_weights", i64 2, i64 51}
// PGOUSE-DAG: ![[EE4]] = !{!"branch_weights", i64 26, i64 26}
// PGOUSE-DAG: ![[EE5]] = !{!"branch_weights", i64 2, i64 1}
// PGOUSE-DAG: ![[EE6]] = !{!"branch_weights", i64 2, i64 26}
// PGOUSE-DAG: ![[EE7]] = !{!"branch_weights", i64 26, i64 1}

// PGOUSE-DAG: ![[IF1]] = !{!"branch_weights", i64 101, i64 2}
// PGOUSE-DAG: ![[IF2]] = !{!"branch_weights", i64 51, i64 51}
// PGOUSE-DAG: ![[IF3]] = !{!"branch_weights", i64 51, i64 1}
// PGOUSE-DAG: ![[IF4]] = !{!"branch_weights", i64 34, i64 18}
// PGOUSE-DAG: ![[IF5]] = !{!"branch_weights", i64 34, i64 1}
// PGOUSE-DAG: ![[IF6]] = !{!"branch_weights", i64 17, i64 2}
// PGOUSE-DAG: ![[IF7]] = !{!"branch_weights", i64 100, i64 2}
// PGOUSE-DAG: ![[IF8]] = !{!"branch_weights", i64 100, i64 2}

// PGOUSE-DAG: ![[JM1]] = !{!"branch_weights", i64 2, i64 1}
// PGOUSE-DAG: ![[JM2]] = !{!"branch_weights", i64 1, i64 2}
// PGOUSE-DAG: ![[JM3]] = !{!"branch_weights", i64 1, i64 2}
// PGOUSE-DAG: ![[JM4]] = !{!"branch_weights", i64 1, i64 2}
// PGOUSE-DAG: ![[JM5]] = !{!"branch_weights", i64 3, i64 2}
// PGOUSE-DAG: ![[JM6]] = !{!"branch_weights", i64 1, i64 2}
// PGOUSE-DAG: ![[JM7]] = !{!"branch_weights", i64 1, i64 2, i64 2, i64 2}
// PGOUSE-DAG: ![[JM8]] = !{!"branch_weights", i64 11, i64 2}
// PGOUSE-DAG: ![[JM9]] = !{!"branch_weights", i64 10, i64 2}

// PGOUSE-DAG: ![[SW1]] = !{!"branch_weights", i64 16, i64 1}
// PGOUSE-DAG: ![[SW2]] = !{!"branch_weights", i64 6, i64 2, i64 3, i64 4, i64 5}
// PGOUSE-DAG: ![[SW3]] = !{!"branch_weights", i64 1, i64 2}
// PGOUSE-DAG: ![[SW4]] = !{!"branch_weights", i64 3, i64 2}
// PGOUSE-DAG: ![[SW5]] = !{!"branch_weights", i64 4, i64 1}
// PGOUSE-DAG: ![[SW6]] = !{!"branch_weights", i64 5, i64 1}
// PGOUSE-DAG: ![[SW7]] = !{!"branch_weights", i64 1, i64 2, i64 2, i64 2, i64 2}
// PGOUSE-DAG: ![[SW8]] = !{!"branch_weights", i64 5, i64 1}
// PGOUSE-DAG: ![[SW9]] = !{!"branch_weights", i64 2, i64 5}

// PGOUSE-DAG: ![[BS1]] = !{!"branch_weights", i64 33, i64 2}
// PGOUSE-DAG: ![[BS2]] = !{!"branch_weights", i64 29, i64 2, i64 2, i64 2, i64 2, i64 1}
// PGOUSE-DAG: ![[BS3]] = !{!"branch_weights", i64 1, i64 2}
// PGOUSE-DAG: ![[BS4]] = !{!"branch_weights", i64 2, i64 2}
// PGOUSE-DAG: ![[BS5]] = !{!"branch_weights", i64 12, i64 1}
// PGOUSE-DAG: ![[BS6]] = !{!"branch_weights", i64 12, i64 3}
// PGOUSE-DAG: ![[BS7]] = !{!"branch_weights", i64 2, i64 1}
// PGOUSE-DAG: ![[BS8]] = !{!"branch_weights", i64 16, i64 1}
// PGOUSE-DAG: ![[BS9]] = !{!"branch_weights", i64 16, i64 14}
// PGOUSE-DAG: ![[BS10]] = !{!"branch_weights", i64 2, i64 1}
// PGOUSE-DAG: ![[BS11]] = !{!"branch_weights", i64 3, i64 1}

// PGOUSE-DAG: ![[BO1]] = !{!"branch_weights", i64 101, i64 2}
// PGOUSE-DAG: ![[BO2]] = !{!"branch_weights", i64 67, i64 35}
// PGOUSE-DAG: ![[BO3]] = !{!"branch_weights", i64 67, i64 35}
// PGOUSE-DAG: ![[BO4]] = !{!"branch_weights", i64 67, i64 35}
// PGOUSE-DAG: ![[BO5]] = !{!"branch_weights", i64 18, i64 18}
// PGOUSE-DAG: ![[BO6]] = !{!"branch_weights", i64 51, i64 51}
// PGOUSE-DAG: ![[BO7]] = !{!"branch_weights", i64 34, i64 18}
// PGOUSE-DAG: ![[BL1]] = !{!"branch_weights", i64 52, i64 1}
// PGOUSE-DAG: ![[BL2]] = !{!"branch_weights", i64 51, i64 2}
// PGOUSE-DAG: ![[BL3]] = !{!"branch_weights", i64 26, i64 27}
// PGOUSE-DAG: ![[BL4]] = !{!"branch_weights", i64 51, i64 2}
// PGOUSE-DAG: ![[BL5]] = !{!"branch_weights", i64 52, i64 1}
// PGOUSE-DAG: ![[BL6]] = !{!"branch_weights", i64 51, i64 2}
// PGOUSE-DAG: ![[BL7]] = !{!"branch_weights", i64 26, i64 27}
// PGOUSE-DAG: ![[BL8]] = !{!"branch_weights", i64 51, i64 2}
// PGOUSE-DAG: ![[CO1]] = !{!"branch_weights", i64 1, i64 2}
// PGOUSE-DAG: ![[CO2]] = !{!"branch_weights", i64 2, i64 1}

// PGOUSE-DAG: ![[DF1]] = !{!"branch_weights", i64 11, i64 2}
// PGOUSE-DAG: ![[DF2]] = !{!"branch_weights", i64 3, i64 3}
// PGOUSE-DAG: ![[DF3]] = !{!"branch_weights", i64 9, i64 5}

// PGOUSE-DAG: ![[ST1]] = !{!"branch_weights", i64 11, i64 2}

int main(int argc, const char *argv[]) {
simple_loops();
Expand Down
Loading

0 comments on commit 10f2a0d

Please sign in to comment.