mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
don't create the post-ra scheduler unless it is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45972 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -41,6 +41,12 @@ PerformLICM("machine-licm",
|
|||||||
cl::init(false), cl::Hidden,
|
cl::init(false), cl::Hidden,
|
||||||
cl::desc("Perform loop-invariant code motion on machine code"));
|
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
|
FileModel::Model
|
||||||
LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
|
LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
|
||||||
std::ostream &Out,
|
std::ostream &Out,
|
||||||
@ -103,7 +109,7 @@ LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
|
|||||||
PM.add(createPrologEpilogCodeInserter());
|
PM.add(createPrologEpilogCodeInserter());
|
||||||
|
|
||||||
// Second pass scheduler.
|
// Second pass scheduler.
|
||||||
if (!Fast)
|
if (!Fast && !DisablePostRAScheduler)
|
||||||
PM.add(createPostRAScheduler());
|
PM.add(createPostRAScheduler());
|
||||||
|
|
||||||
// Branch folding must be run after regalloc and prolog/epilog insertion.
|
// Branch folding must be run after regalloc and prolog/epilog insertion.
|
||||||
|
@ -21,23 +21,11 @@
|
|||||||
#define DEBUG_TYPE "post-RA-sched"
|
#define DEBUG_TYPE "post-RA-sched"
|
||||||
#include "llvm/CodeGen/Passes.h"
|
#include "llvm/CodeGen/Passes.h"
|
||||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||||
|
#include "llvm/Support/Compiler.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
//#include "llvm/ADT/Statistic.h"
|
|
||||||
//#include <climits>
|
|
||||||
//#include <queue>
|
|
||||||
#include "llvm/Support/CommandLine.h"
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
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 {
|
class VISIBILITY_HIDDEN SchedulePostRATDList : public MachineFunctionPass {
|
||||||
public:
|
public:
|
||||||
static char ID;
|
static char ID;
|
||||||
@ -56,9 +44,6 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SchedulePostRATDList::runOnMachineFunction(MachineFunction &Fn) {
|
bool SchedulePostRATDList::runOnMachineFunction(MachineFunction &Fn) {
|
||||||
if (NoPostRAScheduling)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
DOUT << "SchedulePostRATDList\n";
|
DOUT << "SchedulePostRATDList\n";
|
||||||
MF = &Fn;
|
MF = &Fn;
|
||||||
TM = &MF->getTarget();
|
TM = &MF->getTarget();
|
||||||
|
Reference in New Issue
Block a user