search for: emitglobalvariable

Displaying 20 results from an estimated 23 matches for "emitglobalvariable".

2012 Sep 08
3
[LLVMdev] Create target with alternate syntax for globals?
...om llvm's optimization passes. I essentially made a copy of the mips backend, and then started changing the output to match the intermediate language of the compiler. Most of the output can be overriden, but I haven't figured out how to change the way globals are emitted. The AsmPrinter::EmitGlobalVariable function in the llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp file is not virtual; if I try to override it, I get a "multiple definitions" error. To emit the global, it just calls the OutputStreamer.EmitCommonSymbol method. Again, this has become a problem because I don't want the defa...
2012 Sep 09
0
[LLVMdev] Create target with alternate syntax for globals?
.... > > I essentially made a copy of the mips backend, and then started changing the > output to match the intermediate language of the compiler. Most of the > output can be overriden, but I haven't figured out how to change the way > globals are emitted. > > The AsmPrinter::EmitGlobalVariable function in the > llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp file is not virtual; if I try to > override it, I get a "multiple definitions" error. To emit the global, it > just calls the OutputStreamer.EmitCommonSymbol method. Again, this has > become a problem because I don...
2012 May 07
2
[LLVMdev] Address space information dropped
...= {2341, 4681, 7022, 9362, 11703, 1403,16384, 18725, 21065, 23406, 25746, 28087, 30427}; I need to put its initializer in another memory because it has a different address space and I wanted to pass this information through a target-depend asm directive. At the moment, I've overridden EmitGlobalVariable() from AsmPrinter because I didn't see any other spot to put this special directive. Ivan Le 07/05/2012 14:35, Joerg Sonnenberger a écrit : > On Mon, May 07, 2012 at 02:15:16PM +0200, Ivan Llopard wrote: >> I would like to emit target-dependent asm directives depending on the >&...
2012 May 07
2
[LLVMdev] Address space information dropped
...t;> 18725, 21065, 23406, 25746, 28087, 30427}; >> >> I need to put its initializer in another memory because it has a >> different address space and I wanted to pass this information >> through a target-depend asm directive. >> At the moment, I've overridden EmitGlobalVariable() from AsmPrinter >> because I didn't see any other spot to put this special directive. > Have you thought about always tagging such global variables with > __attribute__((section("fancyaddresspace"))) as well? That seems to be > the sanest way I can think of. Yes, but...
2010 Jul 19
2
[LLVMdev] VMkit AOT build problem: llc crushed on glibj compilation to native(.s) file
...0000000bf07e4 llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 356 6 llc 0x00000000008f353d 7 llc 0x00000000008f3614 8 llc 0x00000000008f85e2 9 llc 0x00000000008f894e 10 llc 0x00000000008fa586 llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*) + 550 11 llc 0x00000000008f412f llvm::AsmPrinter::doFinalization(llvm::Module&) + 63 12 llc 0x0000000000ba0369 llvm::FPPassManager::doFinalization(llvm::Module&) + 57 13 llc 0x0000000000ba691f llvm::FPPassManager::runOnModule(...
2009 Nov 13
1
[LLVMdev] dodgy use of c_str()
>From llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp: void DebugInfo::EmitGlobalVariable(GlobalVariable *GV, tree decl) { // Gather location information. expanded_location Loc = expand_location(DECL_SOURCE_LOCATION(decl)); DIType TyD = getOrCreateType(TREE_TYPE(decl)); const char *DispName = GV->getNameStr().c_str(); Isn't this use of c_str() dodgy, because the temporar...
2012 May 07
0
[LLVMdev] Address space information dropped
...2, 11703, 1403,16384, > 18725, 21065, 23406, 25746, 28087, 30427}; > > I need to put its initializer in another memory because it has a > different address space and I wanted to pass this information > through a target-depend asm directive. > At the moment, I've overridden EmitGlobalVariable() from AsmPrinter > because I didn't see any other spot to put this special directive. Have you thought about always tagging such global variables with __attribute__((section("fancyaddresspace"))) as well? That seems to be the sanest way I can think of. Joerg
2010 Aug 02
0
[LLVMdev] VMkit AOT build problem: llc crushed on glibj compilation to native(.s) file
...e_internal(char const*, char const*, unsigned > int) + 356 > 6  llc             0x00000000008f353d > 7  llc             0x00000000008f3614 > 8  llc             0x00000000008f85e2 > 9  llc             0x00000000008f894e > 10 llc             0x00000000008fa586 > llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*) + > 550 > 11 llc             0x00000000008f412f > llvm::AsmPrinter::doFinalization(llvm::Module&) + 63 > 12 llc             0x0000000000ba0369 > llvm::FPPassManager::doFinalization(llvm::Module&) + 57 > 13 llc             0x0000000000ba691f &gt...
2012 May 08
0
[LLVMdev] Address space information dropped
...65, 23406, 25746, 28087, 30427}; > >> > >>I need to put its initializer in another memory because it has a > >>different address space and I wanted to pass this information > >>through a target-depend asm directive. > >>At the moment, I've overridden EmitGlobalVariable() from AsmPrinter > >>because I didn't see any other spot to put this special directive. > >Have you thought about always tagging such global variables with > >__attribute__((section("fancyaddresspace"))) as well? That seems to be > >the sanest way I can thi...
2010 Aug 03
2
[LLVMdev] VMkit AOT build problem: llc crushed on glibj compilation to native(.s) file
..., unsigned > > int) + 356 > > 6 llc 0x00000000008f353d > > 7 llc 0x00000000008f3614 > > 8 llc 0x00000000008f85e2 > > 9 llc 0x00000000008f894e > > 10 llc 0x00000000008fa586 > > llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*) + > > 550 > > 11 llc 0x00000000008f412f > > llvm::AsmPrinter::doFinalization(llvm::Module&) + 63 > > 12 llc 0x0000000000ba0369 > > llvm::FPPassManager::doFinalization(llvm::Module&) + 57 > > 13 llc...
2011 May 07
0
[LLVMdev] Question about linking llvm-mc when porting a new backend
...from: __ZN4llvm21GuaranteedTailCallOptE$non_lazy_ptr in libLLVMCodeGen.a(Analysis.cpp.o) "llvm::TargetLoweringObjectFile::SectionForGlobal(llvm::GlobalValue const*, llvm::SectionKind, llvm::Mangler*, llvm::TargetMachine const&) const", referenced from: llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*)in libLLVMAsmPrinter.a(AsmPrinter.cpp.o) llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*)in libLLVMAsmPrinter.a(AsmPrinter.cpp.o) llvm::TargetLoweringObjectFile::SectionForGlobal(llvm::GlobalValue const*, llvm::Mangler*, llvm::TargetMachine c...
2012 May 07
0
[LLVMdev] Address space information dropped
On Mon, May 07, 2012 at 02:15:16PM +0200, Ivan Llopard wrote: > I would like to emit target-dependent asm directives depending on the > address space of constant initializers. Is there another method to > implement this feature ? I'm not sure I understand what your problem is. Can you provide an example of what you see and what you expect, please? Joerg
2012 Jun 03
0
[LLVMdev] [question] IR<-->native program state mode switch how / where is it done
...T and vice versa? all i can tell currently is that it happens in ExecutionEngine somewhere using these methods, but i cant find their wrapper, the one that would use these and say "now map everything and switch state" and somehow pass that mapping to the JIT and backwards. emitGlobals(), EmitGlobalVariable(), llvm::JIT::getOrEmitGlobalVariable() llvm::ExecutionEngineState::getGlobalAddressMap(), llvm::ExecutionEngineState::getGlobalAddressReverseMap() I hope I'm not misguided by an incorrect understanding of the JIT architecture, in any case any links to documentation, Doxygen tree, etc are abso...
2009 Oct 06
0
[LLVMdev] 2.6/trunk Execution Engine question
...vm::ExecutionEngine::StoreValueToMemory (this=0x97596f8, Val=@0xbfe685a8, Ptr=0x0, Ty=0x970e5f4) at ExecutionEngine.cpp:809 #3 0x88542a8 in llvm::ExecutionEngine::InitializeMemory (this=0x97596f8, Init=0x9732d70, Addr=0x0) at ExecutionEngine.cpp:931 #4 0x0885471c in llvm::ExecutionEngine::EmitGlobalVariable (this=0x97596f8, GV=0x981d7a4) at ExecutionEngine.cpp:1062 #5 0x08855169 in llvm::ExecutionEngine::getPointerToGlobal (this=0x97596f8, GV=0x981d7a4) at ExecutionEngine.cpp:481
2012 May 07
4
[LLVMdev] Address space information dropped
Hi all, Tuning my TargetAsmPrinter implementation in the back-end side, I discovered that the address space number is not passed down while emitting global variables with constant initializers. The information is dropped at AsmPrinter::EmitGlobalConstant() function call which defaults it to zero. I would like to emit target-dependent asm directives depending on the address space of constant
2010 Aug 04
0
[LLVMdev] VMkit AOT build problem: llc crushed on glibj compilation to native(.s) file
...) + 356 >> > 6  llc             0x00000000008f353d >> > 7  llc             0x00000000008f3614 >> > 8  llc             0x00000000008f85e2 >> > 9  llc             0x00000000008f894e >> > 10 llc             0x00000000008fa586 >> > llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*) + >> > 550 >> > 11 llc             0x00000000008f412f >> > llvm::AsmPrinter::doFinalization(llvm::Module&) + 63 >> > 12 llc             0x0000000000ba0369 >> > llvm::FPPassManager::doFinalization(llvm::Module&) + 57 &...
2009 Oct 06
4
[LLVMdev] 2.6/trunk Execution Engine question
> 6. When ExecutionEngine::create was called with parameter > "GVsWithCode" set to its default value of true, I got a segfault when > trying to get a pointer to one of my globals.  JIT::getMemoryForGV was > returning NULL in that case.  Explicitly passing false for > "GVsWithCode" cleared it up. That's no good. Could you send me a stack trace and explain
2011 May 06
0
[LLVMdev] Question about linking llvm-mc when porting a new backend
...from: __ZN4llvm21GuaranteedTailCallOptE$non_lazy_ptr in libLLVMCodeGen.a(Analysis.cpp.o) "llvm::TargetLoweringObjectFile::SectionForGlobal(llvm::GlobalValue const*, llvm::SectionKind, llvm::Mangler*, llvm::TargetMachine const&) const", referenced from: llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*)in libLLVMAsmPrinter.a(AsmPrinter.cpp.o) llvm::AsmPrinter::EmitGlobalVariable(llvm::GlobalVariable const*)in libLLVMAsmPrinter.a(AsmPrinter.cpp.o) llvm::TargetLoweringObjectFile::SectionForGlobal(llvm::GlobalValue const*, llvm::Mangler*, llvm::TargetMachine c...
2014 Sep 02
2
[LLVMdev] Problem linking and JITing code through C++-API
...onEngine::getConstantValue(llvm::Constant const*) () #12 0x00000000009e265f in llvm::ExecutionEngine::InitializeMemory(llvm::Constant const*, void*) () #13 0x00000000009e27e3 in llvm::ExecutionEngine::InitializeMemory(llvm::Constant const*, void*) () #14 0x00000000009e3628 in llvm::ExecutionEngine::EmitGlobalVariable(llvm::GlobalVariable const*) () #15 0x00000000006fd559 in llvm::JIT::getOrEmitGlobalVariable(llvm::GlobalVariable const*) () #16 0x000000000070b8cd in (anonymous namespace)::JITEmitter::getPointerToGlobal(llvm::GlobalValue*, void*, bool) [clone .isra.439] () #17 0x000000000070c505 in (anonymous nam...
2014 Sep 08
2
[LLVMdev] Problem linking and JITing code through C++-API
...m::Constant const*) () > #12 0x00000000009e265f in > llvm::ExecutionEngine::InitializeMemory(llvm::Constant const*, void*) () > #13 0x00000000009e27e3 in > llvm::ExecutionEngine::InitializeMemory(llvm::Constant const*, void*) () > #14 0x00000000009e3628 in > llvm::ExecutionEngine::EmitGlobalVariable(llvm::GlobalVariable const*) () > #15 0x00000000006fd559 in > llvm::JIT::getOrEmitGlobalVariable(llvm::GlobalVariable const*) () > #16 0x000000000070b8cd in (anonymous > namespace)::JITEmitter::getPointerToGlobal(llvm::GlobalValue*, void*, bool) > [clone .isra.439] () > #17 0x0000...