From 1f3e6af7d07387be93e07b785de57cbcfc335c9c Mon Sep 17 00:00:00 2001 From: James Y Knight Date: Thu, 10 Sep 2015 21:49:06 +0000 Subject: [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. (Actually committing the test changes too, this time, unlike r247315) llvm-svn: 247343 --- llvm/lib/Target/Sparc/SparcSubtarget.cpp | 4 ++++ llvm/lib/Target/Sparc/SparcSubtarget.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Target') diff --git a/llvm/lib/Target/Sparc/SparcSubtarget.cpp b/llvm/lib/Target/Sparc/SparcSubtarget.cpp index 6bf8d413062..d701594d27a 100644 --- a/llvm/lib/Target/Sparc/SparcSubtarget.cpp +++ b/llvm/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/llvm/lib/Target/Sparc/SparcSubtarget.h b/llvm/lib/Target/Sparc/SparcSubtarget.h index 9d21911d88f..e2fd2f04528 100644 --- a/llvm/lib/Target/Sparc/SparcSubtarget.h +++ b/llvm/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 -- cgit v1.2.3