[llvm-commits] [dragonegg] r171641 - /dragonegg/trunk/src/Backend.cpp
Duncan Sands
baldrick at free.fr
Sat Jan 5 15:30:40 PST 2013
Author: baldrick
Date: Sat Jan 5 17:30:40 2013
New Revision: 171641
URL: http://llvm.org/viewvc/llvm-project?rev=171641&view=rev
Log:
After Chandler's latest changes, having TTI seems to have become obligatory
(otherwise you can get a crash in SelectionDAG.cpp:3392, in the second of the
following two lines:
const TargetTransformInfo *TTI = DAG.getTargetTransformInfo();
if (TTI->getIntImmCost(Val, VT.getTypeForEVT(*DAG.getContext())) < 2)
).
Modified:
dragonegg/trunk/src/Backend.cpp
Modified: dragonegg/trunk/src/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=171641&r1=171640&r2=171641&view=diff
==============================================================================
--- dragonegg/trunk/src/Backend.cpp (original)
+++ dragonegg/trunk/src/Backend.cpp Sat Jan 5 17:30:40 2013
@@ -44,6 +44,7 @@
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Target/TargetLibraryInfo.h"
+#include "llvm/TargetTransformInfo.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
@@ -683,6 +684,8 @@
PerModulePasses = new PassManager();
PerModulePasses->add(new DataLayout(TheModule));
+ PerModulePasses->add(createNoTTIPass(TheTarget->getScalarTargetTransformInfo(),
+ TheTarget->getVectorTargetTransformInfo()));
bool NeedAlwaysInliner = false;
llvm::Pass *InliningPass = 0;
@@ -735,6 +738,8 @@
FunctionPassManager *PM = CodeGenPasses =
new FunctionPassManager(TheModule);
PM->add(new DataLayout(*TheTarget->getDataLayout()));
+ PM->add(createNoTTIPass(TheTarget->getScalarTargetTransformInfo(),
+ TheTarget->getVectorTargetTransformInfo()));
// Request that addPassesToEmitFile run the Verifier after running
// passes which modify the IR.
More information about the llvm-commits
mailing list