search for: globalvariables

Displaying 20 results from an estimated 652 matches for "globalvariables".

Did you mean: globalvariable
2008 May 23
1
[LLVMdev] DebugInfoBuilder?
Evan Cheng wrote: > I don't think so. Contribution welcome! :-) LLVM debugging support > isn't anywhere near where it needs to be. > Well, here's a rough sketch of what I was thinking of: class DebugInfoBuilder { public: /// Constructor DebugInfoBuilder(); /// Return the type defined by llvm.dbg.anchor.type StructType * GetAnchorType() const; ///
2020 Oct 01
3
Creating a global variable for a struct array
>The type you pass to GlobalVariable's constructor for that variable should be "[10 x %struct.dlist]" because that's what you want storage for. Then the GlobalVariable itself will be a Constant of type "[10 x %struct.dlist]*". Yes, I verified that this is the case. I enabled assertions and the error seems to occur while creating GlobalVariable for both struct dhash
2008 May 21
2
[LLVMdev] DebugInfoBuilder?
Are there any utility classes, similar to IRBuilder, for creating source level debugging info? -- Talin
2008 May 21
0
[LLVMdev] DebugInfoBuilder?
I don't think so. Contribution welcome! :-) LLVM debugging support isn't anywhere near where it needs to be. Evan On May 20, 2008, at 9:53 PM, Talin wrote: > Are there any utility classes, similar to IRBuilder, for creating > source > level debugging info? > > -- Talin > > _______________________________________________ > LLVM Developers mailing list >
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,
2020 Oct 01
2
Creating a global variable for a struct array
Thank you very much. The code to initialize h1 to non-zero values was what I was looking for. It's almost working except for a type mismatch wrt dlist* llist field of h1. dlist static_lst[10] = { {1, 5, NULL}, ... }; dhash h1[10] = {{"myfile.txt", static_lst}, ... }; Along the lines of the code you had sent, I created a GlobalVariable* llist of type [10 x %struct.dlist]* for the
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 --------------
2011 Jan 22
1
Truly Global Variables
Hello everybody, I have a problem that is bothering me for quite a while now and I don't know the answer... I want to create global variables (out of a function) which I can access from all other functions... But somehow that does not work too well. Attached some code for an example: function_called <- function (){ result = globalvariable*globalvariable print(result) }
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<
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 Jun 23
1
globalVariables()
Dear r-devel list members, By placing a call to the new (with R 2.15.1) globalVariables() in the development version of the Rcmdr package, I've succeeded in reducing the "notes" produced by R CMD check from dozens to two. But I still get the following notes, even though '.commander.done' is in the call to globalVariables(): ------------- snip ------------ * che...
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 =
2010 May 11
2
[LLVMdev] How to create Global Variables using LLVM API?
I am new to LLVM API. and I am experimenting with it. I want to create Global Variables in a module. I am able to create local variables using IRBuilder class. I tried using GlobalVariable class to create global variables. but it doesn't work. my code looks like this: Module* mod = new Module("test", getGlobalContext()); Constant* c = mod->getOrInsertFunction("main",
2006 Apr 14
3
[LLVMdev] A newbie question about the class hierarchy
Hi, I apologize if it is a rather stupid question, I am a newbie to LLVM. I notice a inconsistency between the current llvm1.6 doc and its source code. The doc states that the superclasses of GlobalVariable are GlobalValue, User, Value, however in the source code GlobalVariable has Constant as its super. I am just curious that why "variable" should be a subclass of "constant"?
2011 May 18
2
[LLVMdev] access array problem
于 2011/5/18 14:29, Duncan Sands 写道: > Hi Tan Guangming, > >> I want to access an array in my instrumentation code. For example: >> >> GlobalVariable: >> int *counter; //counter the number of load/store operations in run-time >> int *counterArray; //record the load/store addresses > strictly speaking these are not arrays, they are pointers. Also, you have
2016 Aug 04
4
help please: how to sort the contents of a "SymbolTableListTraits<GlobalVariable>"?
Dear sir, Thanks for your reply. I apologize for taking a few days to reply. > Crashed how? Please see the below. > Have you turned on ASan? Not yet, but thanks for the suggestion. I guess I will try to rebuild my modified Clang+LLVM with addr. san. and see what happens. > I recommend attaching a minimal reproduction... Well, since I`m hacking on LLVM itself, this is not
2016 Sep 03
3
GlobalVariable to image base
For x86-win32 we got __ImageBase, Is there any *simple* way to create a GlobalVariable pointing to the image base on all platforms? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160903/74cb585c/attachment-0001.html>
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 emitting the LLVM IR and since they are both pointers the code is essentially the same. When I implemented the code for stack-based...
2010 May 11
0
[LLVMdev] How to create Global Variables using LLVM API?
subramanyam wrote: > > I am new to LLVM API. and I am experimenting with it. > I want to create Global Variables in a module. > I am able to create local variables using IRBuilder class. I tried using > GlobalVariable class to create global variables. > but it doesn't work. my code looks like this: > > Module* mod = new Module("test", getGlobalContext()); >
2019 Feb 22
1
Create the GlobalVariable which have extern in one header file
I have changed it to ExternalLinkage. Now, in LLVM IR, it looks like that: @DATA_TABLE = external global [0 x i8*], section "data_section", align 16 #0 @DATA_TABLE.1 = global [10 x i8*] [i8* inttoptr (i64 53415718 to i8*), i8* bitcast (void (%class.Hello*)* @_ZN5Hello5ptofnEv to i8*),...], section "data_section", align 16 #0 In my uses: %arrayidx = getelementptr inbounds [0 x