summaryrefslogtreecommitdiff
path: root/lib/VMCore
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-10-18 23:22:48 +0000
committerNadav Rotem <nrotem@apple.com>2012-10-18 23:22:48 +0000
commitcbd9a19b5d6ff93efa82c467508ede78b8af3bac (patch)
tree6e0e27c23dc4e189b0e959be3135b60c05b08759 /lib/VMCore
parentebd3f27c7e2c6c3a1b76786da0d0205a5fdb1ef5 (diff)
downloadllvm-cbd9a19b5d6ff93efa82c467508ede78b8af3bac.tar.gz
llvm-cbd9a19b5d6ff93efa82c467508ede78b8af3bac.tar.bz2
llvm-cbd9a19b5d6ff93efa82c467508ede78b8af3bac.tar.xz
Reapply the TargerTransformInfo changes, minus the changes to LSR and Lowerinvoke.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/CMakeLists.txt1
-rw-r--r--lib/VMCore/TargetTransformInfo.cpp27
2 files changed, 28 insertions, 0 deletions
diff --git a/lib/VMCore/CMakeLists.txt b/lib/VMCore/CMakeLists.txt
index 6c30967974..ba807fcacc 100644
--- a/lib/VMCore/CMakeLists.txt
+++ b/lib/VMCore/CMakeLists.txt
@@ -33,6 +33,7 @@ add_llvm_library(LLVMCore
PrintModulePass.cpp
Type.cpp
TypeFinder.cpp
+ TargetTransformInfo.cpp
Use.cpp
User.cpp
Value.cpp
diff --git a/lib/VMCore/TargetTransformInfo.cpp b/lib/VMCore/TargetTransformInfo.cpp
new file mode 100644
index 0000000000..3af0222a21
--- /dev/null
+++ b/lib/VMCore/TargetTransformInfo.cpp
@@ -0,0 +1,27 @@
+//===- llvm/VMCore/TargetTransformInfo.cpp ----------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/TargetTransformInfo.h"
+#include "llvm/Support/ErrorHandling.h"
+
+using namespace llvm;
+
+/// Default ctor.
+///
+/// @note This has to exist, because this is a pass, but it should never be
+/// used.
+TargetTransformInfo::TargetTransformInfo() : ImmutablePass(ID) {
+ report_fatal_error("Bad TargetTransformInfo ctor used. "
+ "Tool did not specify a TargetTransformInfo to use?");
+}
+
+INITIALIZE_PASS(TargetTransformInfo, "TargetTransformInfo",
+ "Target Transform Info", false, true)
+char TargetTransformInfo::ID = 0;
+