search for: getglobals

Displaying 20 results from an estimated 43 matches for "getglobals".

Did you mean: getglobal
2011 Mar 18
2
[LLVMdev] Text or Data symbol
I am again calling for help from LLVM developers ;) For my DSP backend, at the lowering stage and also at the AsmPrinter stage, I need to know if a GlobalAddress is a code or a data address. So I tried at the lowering stage to use: GlobalAddressSDNode *GSDN = cast<GlobalAddressSDNode>(Op); const GlobalValue *GV = GSDN->getGlobal(); GV->hasSection() and GV->getSection() But the
2011 Mar 21
0
[LLVMdev] Text or Data symbol
I reply to myself... I didn't go in the right direction in my previous email. There is an easy way to tell if a GlobalValue corresponds to data or code: const GlobalValue *GV; if(Function::classof(GV)) ... // process the global value as a function else ... // process the global value as data Damien On Fri, Mar 18, 2011 at 3:16 PM, Damien Vincent <damien.llvm at
2011 Mar 21
1
[LLVMdev] Text or Data symbol
On 3/21/11 2:00 PM, Damien Vincent wrote: > I reply to myself... I didn't go in the right direction in my previous > email. > > There is an easy way to tell if a GlobalValue corresponds to data or code: > const GlobalValue *GV; > if(Function::classof(GV)) > ... // process the global value as a function > else > ... // process the global value as data > >
2017 Jun 04
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
Emitting calls to these functions (written in an .ll file linked in) works fine, and does the right thing. %Any = type { i8*, i32 } define dllexport void @setGlobal(%Any* %ptr, %Any %value) { store %Any %value, %Any* %ptr ret void } define dllexport %Any @getGlobal(%Any* %ptr) { %val = load %Any, %Any* %ptr ret %Any %val } Trying to replace the setGlobal call with what should be
2008 Jan 03
2
[LLVMdev] Tailcall optimization in jit stopped working
tailcall optimization stop working in jit (lli) in revision 45527. i guess this is because the jit is tailjmping to the wrong function address. the following change would reenable tailcallopt in jit. But i am pretty sure that this is not the correct fix (since i don't really understand what is going on :). maybe evan can comment on this? regards arnold Index:
2002 Nov 25
3
[LLVMdev] globals in DS graph
...Snode for g in alloc_func is different from that of > > free_func and NEITHER of them had GlobalNode bit set in their types. Only > > the malloc bit and the incomplete bit have been set. I am completely > > clueless how to figure out if it is a global node or not. I used > > getGlobals and found that the returned map had size 0. > > There may be a few different things going on here. First of all, the > "globals" graph is only partially implemented currently. Right now, nodes > eligable to be moved to the globals graph are properly removed from the > in...
2009 Jun 10
3
[LLVMdev] Why does the x86-64 JIT emit stubs for external calls?
In X86CodeGen.cpp, the following code appears in the handler used for CALL64pcrel32 instructions: // Assume undefined functions may be outside the Small codespace. bool NeedStub = (Is64BitMode && (TM.getCodeModel() == CodeModel::Large || TM.getSubtarget<X86Subtarget>().isTargetDarwin())) || Opcode == X86::TAILJMPd;
2009 Apr 28
1
[LLVMdev] AddressSpace of a GlobalAddress
Every GlobalAddress has a GlobalValue, Every GlobalValue is a PointerType, Every PointerType has an AddressSpace. So is it ok to add a method getAddressSpace in GlobalAddressSDNode class itself? Currently we have to do GSDN->getGlobal()->getType()->getAddressSpace(). - Sanjiv
2013 Apr 29
2
[LLVMdev] IR from Callee Dag Node
Is there a way to find the IR that corresponds to a callee DAG node? In other words to get the function definition, attributes, etc.? Tia. Reed
2013 Apr 29
0
[LLVMdev] IR from Callee Dag Node
On 04/28/2013 09:49 PM, reed kotler wrote: > Is there a way to find the IR that corresponds to a callee DAG node? > > In other words to get the function definition, attributes, etc.? > > Tia. > > Reed It looks like you can do this by: 1) getParent will return the Module that some global value is in 2) in Module, getFunction will return the function
2015 Jul 01
2
[LLVMdev] Obtaining a GlobalVariable from an MDNode
I’m trying to debug SAFECode source code files, and I need to find a way to obtain a GlobalVariable from its appropriate MDNode. How can I do this? I’ve been looking over the doxygen and I can’t seem to find a way to do this. Thanks, Peter Finn
2002 Dec 06
1
[LLVMdev] WRT: function pointers + DSG
...What do I pass into the DSG in order to access the globals vector of functions that a function pointer may be calling. The code: CallInst *calli = dynamic_cast<CallInst*>(*i); std::vector<GlobalValue*> funcVect = theGraph.getNodeForValue(calli->getCalledFunction()).getNode()->getGlobals(); Doesn't appear to work... getCalledFunction() returns 0 Dave On Fri, 6 Dec 2002, Vikram Adve wrote: > P.S. I have also updated the CSIL tree. Just check out > TarjanSCCIterator.h. > > --Vikram > http://www.cs.uiuc.edu/~vadve > > > > From: David Crowe <dc...
2006 Nov 15
2
[LLVMdev] LowerCALL (TargetLowering)
Hi, I am trying to write a LowerCALL() function for my (custom) target ISA. All I need to do is map a CALL instruction directly onto an SDNode that takes an equal number of arguments (very much alike intrinsics, except that these are custom to my target.) I do not need to implement any call sequences, stack frames etc. I get the following assertion failure: llc: LegalizeDAG.cpp:834:
2002 Nov 24
4
[LLVMdev] globals in DS graph
...; free_func(); } I noticed that the DSnode for g in alloc_func is different from that of free_func and NEITHER of them had GlobalNode bit set in their types. Only the malloc bit and the incomplete bit have been set. I am completely clueless how to figure out if it is a global node or not. I used getGlobals and found that the returned map had size 0. How can I get the "common" global node of g?
2002 Nov 25
0
[LLVMdev] globals in DS graph
...ructure.cpp and recompiled the llvm. But still I have the same scenario. I don't get the same DSnode for global. I tried several methods; but none of them were successful. I used the getNodeForValue and again I found that the global value had different nodes in different functions. However, the getGlobals worked well for function call. Thanks, Ganesh On Mon, 25 Nov 2002, Vikram Adve wrote: > Ganesh, > > I modified DataStructure.cpp so that global nodes are no longer > removed from any graphs. Only that file has changed. > > Chris, if you get a chance to do this, it would be nice...
2009 Jun 11
0
[LLVMdev] Why does the x86-64 JIT emit stubs for external calls?
On Jun 10, 2009, at 12:17 PM, Jeffrey Yasskin wrote: > In X86CodeGen.cpp, the following code appears in the handler used for > CALL64pcrel32 instructions: > > // Assume undefined functions may be outside the Small > codespace. > bool NeedStub = > (Is64BitMode && > (TM.getCodeModel() == CodeModel::Large || >
2007 Jun 29
0
[LLVMdev] How to call native functions from bytecode run in JIT?
Hi Jan, If I recall correctly, in Linux you get the message: PPCJITInfo.cpp:382: failed assertion `ResultPtr >= -(1 << 23) && ResultPtr < (1 << 23) && "Relocation out of range!"' Right? But on OS X you don't have this messsage? Here's a temporary fix until I find time to investigate on this: In function PPCISelLowering::LowerCALL,
2008 Feb 15
1
[LLVMdev] LLVM2.2 x64 JIT trouble on VStudio build
Hey Evan, At the point of the instructions you suggested I step through, X86ISelLowering has this state: - this 0x00000000005fe728 {VarArgsFrameIndex=-842150451 RegSaveFrameIndex=-842150451 VarArgsGPOffset=3452816845 ...} llvm::X86TargetLowering * const + llvm::TargetLowering {TM={...} TD=0x00000000008edac0
2004 Jun 17
2
[LLVMdev] MachineOperand: GlobalAddress vs. ExternalSymbol
Hi, here I am again with "why is this so" kind of a question. Among different types of MachineOperand there are MO_ExternalSymbol and MO_GlobalAddress. For MO_GlobalAddress, we can get usefull information from the getGlobal() method, which returns GlobalValue*. Wouldn'it it be better is MO_GlobalAddress be called MO_GlobalValue, for consistency? Second, MO_ExternalSymbol is used
2009 Apr 20
0
[LLVMdev] A few questions from a newbie
On 20/04/2009, at 07.35, Peter Bacon wrote: > Hello, I am learning to write a new backend for LLVM and have a few > simple questions. Hi Peter, I am a newbie too, but I have recently dealt with the same issues. > 1) What are the differences between 'constant' and 'targetconstant', > 'globaladdress' and 'targetglobaladdress'? It is not clear from