[llvm-commits] [llvm] r45972 - in /llvm/trunk/lib/CodeGen: LLVMTargetMachine.cpp PostRASchedulerList.cpp
Chris Lattner
sabre at nondot.org
Mon Jan 14 11:00:07 PST 2008
Author: lattner
Date: Mon Jan 14 13:00:06 2008
New Revision: 45972
URL: http://llvm.org/viewvc/llvm-project?rev=45972&view=rev
Log:
don't create the post-ra scheduler unless it is enabled.
Modified:
llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=45972&r1=45971&r2=45972&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Mon Jan 14 13:00:06 2008
@@ -41,6 +41,12 @@
cl::init(false), cl::Hidden,
cl::desc("Perform loop-invariant code motion on machine code"));
+// When this works it will be on by default.
+static cl::opt<bool>
+DisablePostRAScheduler("disable-post-RA-scheduler",
+ cl::desc("Disable scheduling after register allocation"),
+ cl::init(true));
+
FileModel::Model
LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
std::ostream &Out,
@@ -103,7 +109,7 @@
PM.add(createPrologEpilogCodeInserter());
// Second pass scheduler.
- if (!Fast)
+ if (!Fast && !DisablePostRAScheduler)
PM.add(createPostRAScheduler());
// Branch folding must be run after regalloc and prolog/epilog insertion.
Modified: llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=45972&r1=45971&r2=45972&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp (original)
+++ llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp Mon Jan 14 13:00:06 2008
@@ -21,23 +21,11 @@
#define DEBUG_TYPE "post-RA-sched"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
+#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
-//#include "llvm/ADT/Statistic.h"
-//#include <climits>
-//#include <queue>
-#include "llvm/Support/CommandLine.h"
using namespace llvm;
namespace {
- bool NoPostRAScheduling;
-
- // When this works it will be on by default.
- cl::opt<bool, true>
- DisablePostRAScheduler("disable-post-RA-scheduler",
- cl::desc("Disable scheduling after register allocation"),
- cl::location(NoPostRAScheduling),
- cl::init(true));
-
class VISIBILITY_HIDDEN SchedulePostRATDList : public MachineFunctionPass {
public:
static char ID;
@@ -56,9 +44,6 @@
}
bool SchedulePostRATDList::runOnMachineFunction(MachineFunction &Fn) {
- if (NoPostRAScheduling)
- return true;
-
DOUT << "SchedulePostRATDList\n";
MF = &Fn;
TM = &MF->getTarget();
More information about the llvm-commits
mailing list