From ba662b351c937958f586dac232394bd8393f3998 Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Thu, 10 Sep 2015 18:20:45 +0000 Subject: [PATCH] [SPARC] Switch to the Machine Scheduler. The (mostly-deprecated) SelectionDAG-based ILPListDAGScheduler scheduler was making poor scheduling decisions, causing high register pressure and extraneous register spills. Switching to the newer machine scheduler generates better code -- even without there being a machine model defined for SPARC yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247315 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/SparcSubtarget.cpp | 4 ++++ lib/Target/Sparc/SparcSubtarget.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Target/Sparc/SparcSubtarget.cpp b/lib/Target/Sparc/SparcSubtarget.cpp index 6bf8d413062..d701594d27a 100644 --- a/lib/Target/Sparc/SparcSubtarget.cpp +++ b/lib/Target/Sparc/SparcSubtarget.cpp @@ -81,3 +81,7 @@ int SparcSubtarget::getAdjustedFrameSize(int frameSize) const { } return frameSize; } + +bool SparcSubtarget::enableMachineScheduler() const { + return true; +} diff --git a/lib/Target/Sparc/SparcSubtarget.h b/lib/Target/Sparc/SparcSubtarget.h index 9d21911d88f..e2fd2f04528 100644 --- a/lib/Target/Sparc/SparcSubtarget.h +++ b/lib/Target/Sparc/SparcSubtarget.h @@ -60,6 +60,8 @@ public: return &TSInfo; } + bool enableMachineScheduler() const override; + bool isV9() const { return IsV9; } bool isVIS() const { return IsVIS; } bool isVIS2() const { return IsVIS2; } @@ -85,7 +87,6 @@ public: /// returns adjusted framesize which includes space for register window /// spills and arguments. int getAdjustedFrameSize(int stackSize) const; - }; } // end namespace llvm -- 2.34.1