Skip to content

Commit

Permalink
[AIE] add option to separate prepipeliner and prescheduler skip
Browse files Browse the repository at this point in the history
  • Loading branch information
Martien de Jong authored and martien-de-jong committed Nov 7, 2024
1 parent ddf19aa commit 1b74ec6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion llvm/lib/Target/AIE/AIEMachineScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ static cl::opt<bool> UseLoopHeuristics(
"aie-loop-sched-heuristics", cl::init(true),
cl::desc("Use special picking heuristics when scheduling a loop region"));

static cl::opt<bool> PreSchedFollowsSkipPipeliner(
"aie-presched-follows-skip-pipeliner", cl::init(true),
cl::desc("Don't run the prescheduler if the pipeliner is skipped"));

namespace {
// A sentinel value to represent an unknown SUnit.
const constexpr unsigned UnknownSUNum = ~0;
Expand Down Expand Up @@ -860,7 +864,8 @@ MachineBasicBlock *AIEPreRASchedStrategy::nextBlock() {
// The prescheduler also clutters the view of the postpipeliner, so we skip
// such blocks here.
auto Skip = [](MachineBasicBlock *Block) {
return Block && AIELoopUtils::isSingleMBBLoop(Block) &&
return PreSchedFollowsSkipPipeliner && Block &&
AIELoopUtils::isSingleMBBLoop(Block) &&
AIELoopUtils::getPipelinerDisabled(*Block);
};

Expand Down

0 comments on commit 1b74ec6

Please sign in to comment.