mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Add an option to disable 32 -> 16-bit Thumb2 size reduction pass for experimentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110579 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fffe6cf084
commit
e8846feaa1
@ -16,11 +16,17 @@
|
||||
#include "ARM.h"
|
||||
#include "llvm/PassManager.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
static cl::opt<bool>
|
||||
Prefer32BitThumbInstrs("prefer-32bit-thumb",
|
||||
cl::desc("Prefer 32-bit Thumb instructions"),
|
||||
cl::init(false));
|
||||
|
||||
static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
|
||||
Triple TheTriple(TT);
|
||||
switch (TheTriple.getOS()) {
|
||||
@ -31,7 +37,6 @@ static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extern "C" void LLVMInitializeARMTarget() {
|
||||
// Register the target.
|
||||
RegisterTargetMachine<ARMTargetMachine> X(TheARMTarget);
|
||||
@ -138,7 +143,7 @@ bool ARMBaseTargetMachine::addPreSched2(PassManagerBase &PM,
|
||||
|
||||
bool ARMBaseTargetMachine::addPreEmitPass(PassManagerBase &PM,
|
||||
CodeGenOpt::Level OptLevel) {
|
||||
if (Subtarget.isThumb2())
|
||||
if (!Prefer32BitThumbInstrs && Subtarget.isThumb2())
|
||||
PM.add(createThumb2SizeReductionPass());
|
||||
|
||||
PM.add(createARMConstantIslandPass());
|
||||
|
Loading…
Reference in New Issue
Block a user