Add an option, defaulting to off, to disable the sse domain crossing opts.

llvm-svn: 102941
This commit is contained in:
Eric Christopher 2010-05-03 19:54:02 +00:00
parent 3f324d569b
commit 937a5b75f9
1 changed files with 8 additions and 1 deletions

View File

@ -20,8 +20,14 @@
#include "llvm/Support/FormattedStream.h" #include "llvm/Support/FormattedStream.h"
#include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetRegistry.h" #include "llvm/Target/TargetRegistry.h"
#include "llvm/Support/CommandLine.h"
using namespace llvm; using namespace llvm;
static cl::opt<bool> DisableSSEDomain("disable-sse-domain",
cl::init(false), cl::Hidden,
cl::desc("Disable SSE Domain Fixing"));
static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) { static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
Triple TheTriple(TT); Triple TheTriple(TT);
switch (TheTriple.getOS()) { switch (TheTriple.getOS()) {
@ -172,7 +178,8 @@ bool X86TargetMachine::addPostRegAlloc(PassManagerBase &PM,
bool X86TargetMachine::addPreEmitPass(PassManagerBase &PM, bool X86TargetMachine::addPreEmitPass(PassManagerBase &PM,
CodeGenOpt::Level OptLevel) { CodeGenOpt::Level OptLevel) {
if (OptLevel != CodeGenOpt::None && Subtarget.hasSSE2()) { if (OptLevel != CodeGenOpt::None && Subtarget.hasSSE2() &&
!DisableSSEDomain) {
PM.add(createSSEDomainFixPass()); PM.add(createSSEDomainFixPass());
return true; return true;
} }