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
5 changes: 3 additions & 2 deletions llvm/include/llvm/CodeGen/VLIWMachineScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ class ConvergingVLIWScheduler : public MachineSchedStrategy {
// a slightly different heuristic for small and large functions. For small
// functions, it's important to use the height/depth of the instruction.
// For large functions, prioritizing by height or depth increases spills.
CriticalPathLength = DAG->getBBSize() / SchedModel->getIssueWidth();
if (DAG->getBBSize() < 50)
const auto BBSize = DAG->getBBSize();
CriticalPathLength = BBSize / SchedModel->getIssueWidth();
if (BBSize < 50)
// We divide by two as a cheap and simple heuristic to reduce the
// critcal path length, which increases the priority of using the graph
// height/depth in the scheduler's cost computation.
Expand Down