similar to: GlobalVariable to image base

Displaying 20 results from an estimated 6000 matches similar to: "GlobalVariable to image base"

2010 Jul 07
1
[LLVMdev] Alloca and GlobalVariable
I just added support for arrays to the front-end for a trading-specific DSL that I'm implementing using LLVM and ran into a minor bump. Internally, I have been treating variables the same whether they end up being GlobalVariables or stack variables allocated with Alloca. I store the Value* I get from CreateAlloca or the Value* I get when I create a new GlobalVariable into my symbol table when
2019 Feb 22
2
Create the GlobalVariable which have extern in one header file
Hi Good day. I am facing issue with creating a GlobalVariable. I already have an extern for that global in a header file to use it in the following way extern const void* DATA_TABLE[]; And with a LLVM PASS, I am trying to create this array with the same name and with initializer. So, I have following: GlobalVariable *gvar_data = new GlobalVariable( M, blockItems->getType(), true,
2018 Mar 21
1
How to read String value of GlobalVariable?
Hi I have IR Code like ... @path = private constant [6xi8] c"abcde\00" ... --- Code from Pass --- GlobalVariable * GVPath = .... // contains @path I want to convert "abcde" to StringRef. Can you help me with GlobalVariable API? GlobalVariable::getInitializer() --> Constant* // How to get exact value äbcde from here? ~mahesh -------------- next part --------------
2004 Nov 11
1
[LLVMdev] Leaking GlobalVariable from lowerInvoke pass
Although most of the leaks I detected in LLVM were from singleton objects, there also seem to be some real leaks. One such leak (which is creating problems for me when I try to get rid of the constant singletons) seems to be a GlobalVariable created on line 145 of Transforms/Scalar/lowerInvoke.cpp -- any suggestions how I can make sure this GlobalVariable gets deleted? Actually I'm a bit
2012 Aug 18
1
[LLVMdev] GlobalVariable initializer using from beyond the grave
For LLDB I'm writing a dumb module pass that removes all global variables, by running the following code: bool erased = true; while (erased) { erased = false; for (Module::global_iterator gi = llvm_module.global_begin(), ge = llvm_module.global_end(); gi != ge; ++gi) { GlobalVariable *global_var =
2013 Aug 05
2
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Hello, I want to add a global variable of arrayType in my MachineFunctionPass. However, I only get const Module from MachineFunction.getMMI().getModule(). I can't add any global variable to a const Module. Another way is to add a global variable in doInitialization in my MachineFunctionPass, but I can't determine the size of my arrayType for global variable in doInitialization. Is there
2013 Jan 07
1
[LLVMdev] Question on using GlobalVariable as function pointer
Hi everyone, I am trying to have an call instruction that calls global variable The first thing I do is gv = new llvm::GlobalVariable( *(tb->getModule()), fty, false,GlobalValue::InternalLinkage,0, "",0,0,0); fty : i32 ({ i32, [32 x i32] }*) I get stuck here, the fifth argument is the
2012 Nov 18
1
[LLVMdev] get size of a GlobalVariable
Hi, How can I get the size of a global variable if I have a reference to the corresponding llvm::GlobalVariable object? What if this variable is an array or struct, how can I get the size of the whole variable? Thanks in advance, Eduardo
2013 Jan 20
1
[LLVMdev] Get the value of a GlobalVariable
Hi, I am executing a C program using JIT. When the program exits, the control comes back to my program which initiates the JIT. Now, I want to read the value(not the LLVM nomenclature) of a global variable (not the LLVM nomenclature). I am able to get the global variable, using the following command: GlobalVariable *my_global = Mod->getNamedGlobal("MY_GLOBAL"); I want to know the
2014 Feb 08
2
[LLVMdev] Why doesn't GlobalVariable::copyAttributesFrom copy the thread local mode?
GlobalVariable::copyAttributesFrom sets the target thread local mode to either general dynamic or not thread local rather than copying the thread local mode from the source. Is that intentional or an oversight? Thanks, Keno -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140208/2686fdfa/attachment.html>
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
2018 Nov 27
2
GlobalVariable::eraseFromParent
I am confused by GlobalVariable::eraseFromParent's declaration: /// This method unlinks 'this' from the containing module and deletes it. void eraseFromParent(); In Globals.cpp the unlinking is done and SymbolTableListTraits cleans up the symbol table but I don't see anything that actually deletes the object. Is the comment misleading or am I missing something?
2013 Oct 30
3
[LLVMdev] [Propose] Add address-taken bit to GlobalVariable for disambiguation purpose
Hi, Hal: Thank you for your feedback, see following inline comment Thanks On 10/29/13 5:02 PM, Hal Finkel wrote: > ----- Original Message ----- >> Hi, There: >> >> I'd like to add bit, called "addr_not_taken", to GlobalVariable in >> order to >> indicate if a GlobalVariable doesn't has its address taken or not. >> >> 1.The
2013 Aug 05
0
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Antony, What are you trying to accomplish in this case? I did something very similar in the AMDIL backend, but it was not the cleanest solution and you are correct it has to be do at doInitialization stage and not at runOnMachineFunction. Micah > -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Antony Yu > Sent:
2016 Jul 27
2
help please: how to sort the contents of a "SymbolTableListTraits<GlobalVariable>"?
Dear all, In the process of trying to add optimization for better layout of global variables, I have run up against a roadblock: I don`t seem to be able to sort the contents of a "SymbolTableListTraits<GlobalVariable>" -- or even swap two elements in that list -- without causing LLVM to crash. I have tried writing a comparator class and then using "llvm::iplist<
2013 Aug 05
3
[LLVMdev] Can I add GlobalVariable in MachineFunctionPass ?
Micah, As you expected, I am trying to create local memory but in the NVPTX backend. It's really not convenient that I can't create local memory in runOnMachineFunction. Hmm.... Since I should do it at doInitialization stage, I also need to do some tricks in global variable and AsmPrinter to resize it. Did you use the similar way? Antony 2013/8/5 Micah Villmow <micah.villmow at
2018 Dec 05
2
DebugInfo: Global variable expression management
Hi Folks, Looking into some other issues, I came across a couple of oddities with regard to debug info for global variables (PR39900 <https://bugs.llvm.org/show_bug.cgi?id=39900> and PR39899 <https://bugs.llvm.org/show_bug.cgi?id=39899>). But a broader question I was wondering if it was anyone's radar (it's not something I'll be pushing on myself in the near future, but
2013 Oct 30
0
[LLVMdev] [Propose] Add address-taken bit to GlobalVariable for disambiguation purpose
----- Original Message ----- > Hi, There: > > I'd like to add bit, called "addr_not_taken", to GlobalVariable in > order to > indicate if a GlobalVariable doesn't has its address taken or not. > > 1.The motivation > =============== > The motivation can be explained by the following example. In this > example, > variable x does not have
2011 Mar 08
2
[LLVMdev] TargetData::getPreferredAlignment(const GlobalVariable *GV) is strange ...
Hello everybody, I am somewhat confused by the following method within the LLVM, especially the lines "confusion starts" -> "confusion ends" are hard to follow. Maybe the idea is that if there are such big data structures one does not waste much memory anyway if they are aligned to a 16-byte boundary. However, my assembler complains here because it only supports 1-, 2-,
2013 Oct 30
0
[LLVMdev] [Propose] Add address-taken bit to GlobalVariable for disambiguation purpose
----- Original Message ----- > Hi, Hal: > > Thank you for your feedback, see following inline comment > > Thanks > > On 10/29/13 5:02 PM, Hal Finkel wrote: > > ----- Original Message ----- > >> Hi, There: > >> > >> I'd like to add bit, called "addr_not_taken", to > >> GlobalVariable in > >> order to