[llvm-commits] [llvm] r110579 - /llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
Evan Cheng
evan.cheng at apple.com
Mon Aug 9 10:16:10 PDT 2010
Author: evancheng
Date: Mon Aug 9 12:16:10 2010
New Revision: 110579
URL: http://llvm.org/viewvc/llvm-project?rev=110579&view=rev
Log:
Add an option to disable 32 -> 16-bit Thumb2 size reduction pass for experimentation.
Modified:
llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp?rev=110579&r1=110578&r2=110579&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Mon Aug 9 12:16:10 2010
@@ -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 @@
}
}
-
extern "C" void LLVMInitializeARMTarget() {
// Register the target.
RegisterTargetMachine<ARMTargetMachine> X(TheARMTarget);
@@ -138,7 +143,7 @@
bool ARMBaseTargetMachine::addPreEmitPass(PassManagerBase &PM,
CodeGenOpt::Level OptLevel) {
- if (Subtarget.isThumb2())
+ if (!Prefer32BitThumbInstrs && Subtarget.isThumb2())
PM.add(createThumb2SizeReductionPass());
PM.add(createARMConstantIslandPass());
More information about the llvm-commits
mailing list