aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachinePipeliner.cpp
diff options
context:
space:
mode:
authorDavid Penry <david.penry@arm.com>2022-06-30 11:03:50 -0700
committerDavid Penry <david.penry@arm.com>2022-08-22 12:10:13 -0700
commitced705c4407fa18329f8a6a50ce96a8f34a86820 (patch)
tree48df310ef7159ac6b0952ed139e725cb0f9dc609 /llvm/lib/CodeGen/MachinePipeliner.cpp
parentf82c55fa082711f520a7359393b483956b69bf08 (diff)
downloadllvm-ced705c4407fa18329f8a6a50ce96a8f34a86820.zip
llvm-ced705c4407fa18329f8a6a50ce96a8f34a86820.tar.gz
llvm-ced705c4407fa18329f8a6a50ce96a8f34a86820.tar.bz2
[ModuloSchedule] Add interface call to accept/reject SMS schedules
This interface allows a target to reject a proposed SMS schedule. For Hexagon/PowerPC, all schedules are accepted, leaving behavior unchanged. For ARM, schedules which exceed register pressure limits are rejected. Also, two RegisterPressureTracker methods now need to be public so that register pressure can be computed by more callers. Reapplication of D128941/(reversion:D132037) with small fix. Differential Revision: https://reviews.llvm.org/D132170
Diffstat (limited to 'llvm/lib/CodeGen/MachinePipeliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachinePipeliner.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp
index 52501ca..e561e0a 100644
--- a/llvm/lib/CodeGen/MachinePipeliner.cpp
+++ b/llvm/lib/CodeGen/MachinePipeliner.cpp
@@ -2099,6 +2099,12 @@ bool SwingSchedulerDAG::schedulePipeline(SMSchedule &Schedule) {
<< ")\n");
if (scheduleFound) {
+ scheduleFound = LoopPipelinerInfo->shouldUseSchedule(*this, Schedule);
+ if (!scheduleFound)
+ dbgs() << "Target rejected schedule\n";
+ }
+
+ if (scheduleFound) {
Schedule.finalizeSchedule(this);
Pass.ORE->emit([&]() {
return MachineOptimizationRemarkAnalysis(