summaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-01-23 11:09:33 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-01-23 11:09:33 +0000
commit3fd58f91dd318518f7daa4ba64c0aaf31799d89b (patch)
tree74eecbae571601ec6a626a53374b1eddc7b164a5 /lib/ExecutionEngine
parent3fba7d16b41dfbefe3b1be6bc0ab94c017728f79 (diff)
downloadFreeBSD-src-3fd58f91dd318518f7daa4ba64c0aaf31799d89b.zip
FreeBSD-src-3fd58f91dd318518f7daa4ba64c0aaf31799d89b.tar.gz
Update LLVM to r94309.
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/Interpreter/Makefile2
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp10
-rw-r--r--lib/ExecutionEngine/JIT/Makefile2
-rw-r--r--lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp20
-rw-r--r--lib/ExecutionEngine/Makefile1
5 files changed, 22 insertions, 13 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Makefile b/lib/ExecutionEngine/Interpreter/Makefile
index 5f937c3..4df38ea 100644
--- a/lib/ExecutionEngine/Interpreter/Makefile
+++ b/lib/ExecutionEngine/Interpreter/Makefile
@@ -6,7 +6,9 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
+
LEVEL = ../../..
LIBRARYNAME = LLVMInterpreter
+CXXFLAGS = -fno-rtti
include $(LEVEL)/Makefile.common
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 0f604ac..4dc119d 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -20,6 +20,7 @@
#include "llvm/Constants.h"
#include "llvm/Module.h"
#include "llvm/DerivedTypes.h"
+#include "llvm/Analysis/DebugInfo.h"
#include "llvm/CodeGen/JITCodeEmitter.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineConstantPool.h"
@@ -368,12 +369,12 @@ namespace {
// the stub is unused.
DenseMap<void *, SmallPtrSet<const Function*, 1> > StubFnRefs;
- DebugLocTuple PrevDLT;
+ DILocation PrevDLT;
public:
JITEmitter(JIT &jit, JITMemoryManager *JMM, TargetMachine &TM)
: SizeEstimate(0), Resolver(jit, *this), MMI(0), CurFn(0),
- EmittedFunctions(this) {
+ EmittedFunctions(this), PrevDLT(NULL) {
MemMgr = JMM ? JMM : JITMemoryManager::CreateDefaultMemManager();
if (jit.getJITInfo().needsGOT()) {
MemMgr->AllocateGOT();
@@ -806,10 +807,11 @@ void JITEmitter::AddStubToCurrentFunction(void *StubAddr) {
void JITEmitter::processDebugLoc(DebugLoc DL, bool BeforePrintingInsn) {
if (!DL.isUnknown()) {
- DebugLocTuple CurDLT = EmissionDetails.MF->getDebugLocTuple(DL);
+ DILocation CurDLT = EmissionDetails.MF->getDILocation(DL);
if (BeforePrintingInsn) {
- if (CurDLT.Scope != 0 && PrevDLT != CurDLT) {
+ if (CurDLT.getScope().getNode() != 0
+ && PrevDLT.getNode() != CurDLT.getNode()) {
JITEvent_EmittedFunctionDetails::LineStart NextLine;
NextLine.Address = getCurrentPCValue();
NextLine.Loc = DL;
diff --git a/lib/ExecutionEngine/JIT/Makefile b/lib/ExecutionEngine/JIT/Makefile
index e2c9c61..1c93c06 100644
--- a/lib/ExecutionEngine/JIT/Makefile
+++ b/lib/ExecutionEngine/JIT/Makefile
@@ -6,8 +6,10 @@
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
+
LEVEL = ../../..
LIBRARYNAME = LLVMJIT
+CXXFLAGS = -fno-rtti
# Get the $(ARCH) setting
include $(LEVEL)/Makefile.config
diff --git a/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp b/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
index d01c4b2..2baf979 100644
--- a/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
+++ b/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
@@ -18,10 +18,12 @@
#define DEBUG_TYPE "oprofile-jit-event-listener"
#include "llvm/Function.h"
+#include "llvm/Metadata.h"
#include "llvm/Analysis/DebugInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/ExecutionEngine/JITEventListener.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/ValueHandle.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/System/Errno.h"
#include "llvm/Config/config.h"
@@ -70,15 +72,15 @@ OProfileJITEventListener::~OProfileJITEventListener() {
class FilenameCache {
// Holds the filename of each Scope, so that we can pass a null-terminated
- // string into oprofile.
- DenseMap<MDNode*, std::string> Filenames;
+ // string into oprofile. Use an AssertingVH rather than a ValueMap because we
+ // shouldn't be modifying any MDNodes while this map is alive.
+ DenseMap<AssertingVH<MDNode>, std::string> Filenames;
public:
- const char *getFilename(MDNode *Scope) {
- std::string &Filename = Filenames[Scope];
+ const char *getFilename(DIScope Scope) {
+ std::string &Filename = Filenames[Scope.getNode()];
if (Filename.empty()) {
- DIScope S(Scope);
- Filename = S.getFilename();
+ Filename = Scope.getFilename();
}
return Filename.c_str();
}
@@ -89,9 +91,9 @@ static debug_line_info LineStartToOProfileFormat(
uintptr_t Address, DebugLoc Loc) {
debug_line_info Result;
Result.vma = Address;
- const DebugLocTuple &tuple = MF.getDebugLocTuple(Loc);
- Result.lineno = tuple.Line;
- Result.filename = Filenames.getFilename(tuple.Scope);
+ DILocation DILoc = MF.getDILocation(Loc);
+ Result.lineno = DILoc.getLineNumber();
+ Result.filename = Filenames.getFilename(DILoc.getScope());
DEBUG(dbgs() << "Mapping " << reinterpret_cast<void*>(Result.vma) << " to "
<< Result.filename << ":" << Result.lineno << "\n");
return Result;
diff --git a/lib/ExecutionEngine/Makefile b/lib/ExecutionEngine/Makefile
index e0e050e..2387b0e 100644
--- a/lib/ExecutionEngine/Makefile
+++ b/lib/ExecutionEngine/Makefile
@@ -9,5 +9,6 @@
LEVEL = ../..
LIBRARYNAME = LLVMExecutionEngine
PARALLEL_DIRS = Interpreter JIT
+CXXFLAGS = -fno-rtti
include $(LEVEL)/Makefile.common
OpenPOWER on IntegriCloud