Hello all,
I'm trying to get ghdl hg813 to work with llvm 3.6.
There are two problems compiling the compiler:
- replaceOperandWith now takes a Metadata * instead of Value *
- LinkInJIT no longer exists (and was a nop already in 3.5)
I applied the attached patch, which allowed me to build the compiler
binary. However, when trying to compile the standard library, the
compiler crashes.
ghdl1-llvm -g --std=87 --bootstrap --work=std -c -o textio.o
../../src/std/textio.v87
Program received signal SIGSEGV, Segmentation fault.
0x0000000000f86605 in llvm::MDLocation::eraseFromStoreImpl() ()
(gdb) bt
#0 0x0000000000f86605 in llvm::MDLocation::eraseFromStoreImpl() ()
#1 0x0000000000f8e7a4 in
llvm::UniquableMDNode::handleChangedOperand(void*, llvm::Metadata*) ()
#2 0x000000000047046a in ortho_llvm.finish_record_type (elements=...,
res=0x166b970)
at src/ortho/llvm/ortho_llvm.adb:441
#3 0x000000000050751a in trans.rtis.rti_initialize ()
at src/vhdl/translate/trans-rtis.adb:387
#4 0x00000000005618b9 in translation.initialize ()
at src/vhdl/translate/translation.adb:686
#5 0x00000000005baeae in ortho_front.parse (filename=...)
at src/vhdl/translate/ortho_front.adb:268
#6 0x000000000047bff0 in ortho_code_main ()
at src/ortho/llvm/ortho_code_main.adb:280
Does anyone have an idea what's wrong here?
Thomas
--- ./src/ortho/llvm/llvm-cbindings.cpp.xx 2015-06-06 22:14:15.303908540 +0200
+++ ./src/ortho/llvm/llvm-cbindings.cpp 2015-06-06 22:14:47.670826004 +0200
@@ -50,7 +50,7 @@
void
LLVMMDNodeReplaceOperandWith_extra (LLVMValueRef N, unsigned i, LLVMValueRef V) {
MDNode *MD = cast<MDNode>(unwrap(N));
- MD->replaceOperandWith (i, unwrap(V));
+ MD->replaceOperandWith (i, ValueAsMetadata::get(unwrap(V)));
}
void *LLVMGetPointerToFunction(LLVMExecutionEngineRef EE, LLVMValueRef Func)
--- ./src/ortho/llvm/ortho_code_main.adb.xx 2015-06-06 22:28:25.603010956 +0200
+++ ./src/ortho/llvm/ortho_code_main.adb 2015-06-06 22:28:58.081931596 +0200
@@ -209,8 +209,6 @@
InitializeNativeTarget;
InitializeNativeAsmPrinter;
- LinkInJIT;
-
Module := ModuleCreateWithName (Module_Name'Address);
if Output = null and then Exec_Func /= null then
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss