projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a FIXME about the format and add a test.
[oota-llvm.git]
/
tools
/
llc
/
llc.cpp
diff --git
a/tools/llc/llc.cpp
b/tools/llc/llc.cpp
index 68876ea22a2b9780f3af1912330b43ebd26e8e31..bcabafc4675ca7645266303a396770b49ea5c90c 100644
(file)
--- a/
tools/llc/llc.cpp
+++ b/
tools/llc/llc.cpp
@@
-13,6
+13,7
@@
//
//===----------------------------------------------------------------------===//
//
//===----------------------------------------------------------------------===//
+
#include "llvm/IR/LLVMContext.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Assembly/PrintModulePass.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Assembly/PrintModulePass.h"
@@
-21,6
+22,7
@@
#include "llvm/CodeGen/LinkAllCodegenComponents.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Module.h"
#include "llvm/CodeGen/LinkAllCodegenComponents.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Module.h"
+#include "llvm/IRReader/IRReader.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Pass.h"
#include "llvm/PassManager.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Pass.h"
#include "llvm/PassManager.h"
@@
-28,17
+30,16
@@
#include "llvm/Support/Debug.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FormattedStream.h"
#include "llvm/Support/Host.h"
-#include "llvm/Support/IRReader.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/PluginLoader.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/PluginLoader.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
+#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/Target/TargetLibraryInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/Target/TargetLibraryInfo.h"
#include "llvm/Target/TargetMachine.h"
-#include "llvm/TargetTransformInfo.h"
#include <memory>
using namespace llvm;
#include <memory>
using namespace llvm;
@@
-200,7
+201,7
@@
int main(int argc, char **argv) {
static int compileModule(char **argv, LLVMContext &Context) {
// Load the module to be compiled...
SMDiagnostic Err;
static int compileModule(char **argv, LLVMContext &Context) {
// Load the module to be compiled...
SMDiagnostic Err;
-
std::auto_p
tr<Module> M;
+
OwningP
tr<Module> M;
Module *mod = 0;
Triple TheTriple;
Module *mod = 0;
Triple TheTriple;
@@
-281,7
+282,7
@@
static int compileModule(char **argv, LLVMContext &Context) {
Options.UseInitArray = UseInitArray;
Options.SSPBufferSize = SSPBufferSize;
Options.UseInitArray = UseInitArray;
Options.SSPBufferSize = SSPBufferSize;
-
std::auto_p
tr<TargetMachine>
+
OwningP
tr<TargetMachine>
target(TheTarget->createTargetMachine(TheTriple.getTriple(),
MCPU, FeaturesStr, Options,
RelocModel, CMModel, OLvl));
target(TheTarget->createTargetMachine(TheTriple.getTriple(),
MCPU, FeaturesStr, Options,
RelocModel, CMModel, OLvl));
@@
-320,10
+321,8
@@
static int compileModule(char **argv, LLVMContext &Context) {
TLI->disableAllFunctions();
PM.add(TLI);
TLI->disableAllFunctions();
PM.add(TLI);
- if (target.get()) {
- PM.add(createNoTTIPass(target->getScalarTargetTransformInfo(),
- target->getVectorTargetTransformInfo()));
- }
+ // Add intenal analysis passes from the target machine.
+ Target.addAnalysisPasses(PM);
// Add the target data from the target machine, if it exists, or the module.
if (const DataLayout *TD = Target.getDataLayout())
// Add the target data from the target machine, if it exists, or the module.
if (const DataLayout *TD = Target.getDataLayout())