mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Added option -align-loops=<true/false> to disable loop aligner pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47736 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9b80bd8ea2
commit
d703ed6aed
@ -37,6 +37,9 @@ static cl::opt<bool>
|
|||||||
EnableSinking("enable-sinking", cl::init(false), cl::Hidden,
|
EnableSinking("enable-sinking", cl::init(false), cl::Hidden,
|
||||||
cl::desc("Perform sinking on machine code"));
|
cl::desc("Perform sinking on machine code"));
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
|
AlignLoops("align-loops", cl::init(true), cl::Hidden,
|
||||||
|
cl::desc("Align loop headers"));
|
||||||
|
static cl::opt<bool>
|
||||||
PerformLICM("machine-licm",
|
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"));
|
||||||
@ -132,6 +135,9 @@ LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
|
|||||||
if (addPreEmitPass(PM, Fast) && PrintMachineCode)
|
if (addPreEmitPass(PM, Fast) && PrintMachineCode)
|
||||||
PM.add(createMachineFunctionPrinterPass(cerr));
|
PM.add(createMachineFunctionPrinterPass(cerr));
|
||||||
|
|
||||||
|
if (AlignLoops)
|
||||||
|
PM.add(createLoopAlignerPass());
|
||||||
|
|
||||||
switch (FileType) {
|
switch (FileType) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "llvm/CodeGen/Passes.h"
|
#include "llvm/CodeGen/Passes.h"
|
||||||
#include "llvm/Target/TargetLowering.h"
|
#include "llvm/Target/TargetLowering.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Compiler.h"
|
#include "llvm/Support/Compiler.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
@ -164,13 +164,6 @@ bool X86TargetMachine::addPostRegAlloc(FunctionPassManager &PM, bool Fast) {
|
|||||||
return true; // -print-machineinstr should print after this.
|
return true; // -print-machineinstr should print after this.
|
||||||
}
|
}
|
||||||
|
|
||||||
bool X86TargetMachine::addPreEmitPass(FunctionPassManager &PM, bool Fast) {
|
|
||||||
if (Fast) return false;
|
|
||||||
|
|
||||||
PM.add(createLoopAlignerPass());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool X86TargetMachine::addAssemblyEmitter(FunctionPassManager &PM, bool Fast,
|
bool X86TargetMachine::addAssemblyEmitter(FunctionPassManager &PM, bool Fast,
|
||||||
std::ostream &Out) {
|
std::ostream &Out) {
|
||||||
PM.add(createX86CodePrinterPass(Out, *this));
|
PM.add(createX86CodePrinterPass(Out, *this));
|
||||||
|
@ -63,7 +63,6 @@ public:
|
|||||||
// Set up the pass pipeline.
|
// Set up the pass pipeline.
|
||||||
virtual bool addInstSelector(FunctionPassManager &PM, bool Fast);
|
virtual bool addInstSelector(FunctionPassManager &PM, bool Fast);
|
||||||
virtual bool addPostRegAlloc(FunctionPassManager &PM, bool Fast);
|
virtual bool addPostRegAlloc(FunctionPassManager &PM, bool Fast);
|
||||||
virtual bool addPreEmitPass(FunctionPassManager &PM, bool Fast);
|
|
||||||
virtual bool addAssemblyEmitter(FunctionPassManager &PM, bool Fast,
|
virtual bool addAssemblyEmitter(FunctionPassManager &PM, bool Fast,
|
||||||
std::ostream &Out);
|
std::ostream &Out);
|
||||||
virtual bool addCodeEmitter(FunctionPassManager &PM, bool Fast,
|
virtual bool addCodeEmitter(FunctionPassManager &PM, bool Fast,
|
||||||
|
Loading…
Reference in New Issue
Block a user