Displaying 20 results from an estimated 652 matches for "globalvari".
Did you mean:
globalvar
2008 May 23
1
[LLVMdev] DebugInfoBuilder?
...StructType * GetAnchorType() const;
/// Set the reference to the module where we will insert debugging
information.
/// Also defines the debug info types for the module and creates the
initial anchors.
void SetModule(Module * m);
/// Emit a compile unit descriptor.
GlobalVariable * CreateCompileUnitDescriptor(
unsigned langId,
const sys::Path & srcPath,
const std::string & producer);
/// Emit a subprogram descriptor.
GlobalVariable * CreateSubProgramDescriptor(
GlobalVariable * compileUnit, /// Compile unit in which...
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 s...
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(...
2020 Oct 01
2
Creating a global variable for a struct array
...alize 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 field dlist* llist in h1. But this results in an LLVM ERROR: Type mismatch in constant table!.
How do I fix this error ?
Thanks,
Chaitra
________________________________
From: Tim Northover <t.p.northover at gmail.com>
Sent: Wednesday, Septe...
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 --------------
An HTML attachment was...
2011 Jan 22
1
Truly Global Variables
...at 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)
}
function_calls <- function(){
assign("globalvariable",10,pos=-1,envir=as.environment(pos))
function_called()
}
function_calls()
I would have assumed that I will get "100" printed on my screen, but
instead it said: "Fehler in f...
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< NodeTy, Traits
>::sort(Compare comp)"
[<http://llvm.org/docs/doxygen/html/classllvm_1_1iplist.html#a81afd2c47bb276c...
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 confused in general with how LLVM manages memory and
I could not find anything in the documentation section -- from what I
have seen in t...
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 ------------...
2012 Aug 18
1
[LLVMdev] GlobalVariable initializer using from beyond the grave
...obal 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 = dyn_cast<GlobalVariable>(gi);
if (global_var->use_empty())
{
log->Printf("Did remove %s",
PrintValue(global_var).c_str());
global_var->eraseFromParent();...
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",
IntegerType::get(getGlobalContext(), 32), NULL);
Function* main = cast<Function>...
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"?
Regards,
Nai
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
> written them in some kind of C-style idiom. What are the declarat...
2016 Aug 04
4
help please: how to sort the contents of a "SymbolTableListTraits<GlobalVariable>"?
...n. 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 100% trivial. I will explain.
The first hurdle I had to overcome was the fact that the "GlobalVariable" class had an
explicitly-deleted copy ctor and no move ctor. I dealt with this by writing a copy ctor; I`ll
paste that in below.
A perhaps-important point is that I don`t know _why_ the "GlobalVariable" class had an
explicitly-deleted copy ctor and no move ctor. As an exper...
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-b...
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());
> Constant* c = mod->getOrInsertFunction("main",
> IntegerType::get(getGlobalContext(), 32), NULL);
> Function...
2019 Feb 22
1
Create the GlobalVariable which have extern in one header file
...@_ZN5Hello5ptofnEv to i8*),...], section "data_section", align 16 #0
In my uses:
%arrayidx = getelementptr inbounds [0 x i8*], [0 x i8*]* @DATA_TABLE, i64 0, i64 %3
Why it is creating another global variable instead of linking? Is that because of array size mismatch?
Here is my code:
GlobalVariable *old = M.getGlobalVariable("DATA_TABLE");
old->setAlignment(16);
old->setSection("data_section");
old->addAttribute(llvm::Attribute::OptimizeNone);
old->setDSOLocal(false);
GlobalVariable *gNew = new GlobalVariable(
M, blockItems->getType(), false, GlobalValu...