Skip to content
Merged
Changes from all 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: 3 additions & 3 deletions llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1100,10 +1100,10 @@ void RecursiveSearchSplitting::pickPartition(unsigned Depth, unsigned Idx,
if (Entry.CostExcludingGraphEntryPoints > LargeClusterThreshold) {
// Check if the amount of code in common makes it worth it.
assert(SimilarDepsCost && Entry.CostExcludingGraphEntryPoints);
const double Ratio =
SimilarDepsCost / Entry.CostExcludingGraphEntryPoints;
const double Ratio = static_cast<double>(SimilarDepsCost) /
Entry.CostExcludingGraphEntryPoints;
assert(Ratio >= 0.0 && Ratio <= 1.0);
if (LargeFnOverlapForMerge > Ratio) {
if (Ratio > LargeFnOverlapForMerge) {
// For debug, just print "L", so we'll see "L3=P3" for instance, which
// will mean we reached max depth and chose P3 based on this
// heuristic.
Expand Down