Displaying 20 results from an estimated 8000 matches similar to: "[LLVMdev] get size of a GlobalVariable"
2015 Feb 27
2
[LLVMdev] Walking thru CallGraph bottom up
Hi Simon,
> From: Simone Atzeni <simone.at at gmail.com>
> To: John Criswell <jtcriswel at gmail.com>
> Cc: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] Walking thru CallGraph bottom up
> Message-ID: <318EBA41-2040-4EFE-B330-5813C817C2A2 at gmail.com>
> Content-Type: text/plain; charset="windows-1252"
>
> I think I got it and the example is
2015 Feb 27
0
[LLVMdev] Walking thru CallGraph bottom up
Dear Simon,
Kevin is correct; as far as I can tell, there is no method of getting
the functions calling a given function. Instead, you have to start at
the main() function and search for the function using a depth-first or
breadth-first search.
What may make sense is to build a new data structure that has nodes that
point from callees to callers once and then use that for your queries.
2015 Feb 25
2
[LLVMdev] Walking thru CallGraph bottom up
Thanks John.
I guess I will use a ModulePass, so when I am implementing the “runOnModule” function,
do I have to loop through all the functions, for each functions all the BasicBlocks and for each BasicBlock all the instructions
or given the Module I have to call the CallGraph directly?
Is there an example out there? I can’t find anything.
Thanks.
Simone
> On Feb 24, 2015, at 13:29, John
2015 Feb 25
0
[LLVMdev] Walking thru CallGraph bottom up
On 2/25/15 10:51 AM, Simone Atzeni wrote:
> Thanks John.
>
> I guess I will use a ModulePass, so when I am implementing the “runOnModule” function,
> do I have to loop through all the functions, for each functions all the BasicBlocks and for each BasicBlock all the instructions
If you know the Instruction, you can get it's basic block using
Instruction::getParent(), and then get
2015 Jul 22
2
[LLVMdev] (no subject)
Hello,
I have tried a lot fix this error but am not able to can you please
find me a solution am trying to compile the SAFECode in Cygwin Environment
to work for windows.
used make -j4 command to make the files in cygwin i have got this error
make[5]: Leaving directory
'/home/uidr7475/Work/LLVM_OBJ/projects/safecode/tools/clang/include'
/usr/bin/cp: cannot stat
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
2013 Jan 08
4
[LLVMdev] get ref to parent instruction
Hi all,
How can I get a reference to an instruction if I have a reference to
an operand? For example, let suppose I have a reference to the
ConstantExpr "getelementptr inbounds" in the following instruction:
%4 = getelementptr i32* getelementptr inbounds ([8 x i32]*
@__mem_grid_MOD_nnyp, i32 0, i32 0), i32 %3
then, how can I get a reference to the GetElementPtrInst object?
The
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 =
2012 Dec 29
2
[LLVMdev] GetElementPtrConstantExpr question
Hi all,
I just come across an IR instruction like this:
%0 = getelementptr i32* getelementptr inbounds ([42 x i32]* @aaa,
i32 0, i32 0), i32 %2
What does the part "i32* getelementptr inbounds ([42 x i32]* @aaa, i32
0, i32 0)" mean? As far as I could understand this is a
GetElementPtrConstantExpr, isn't it?
My question is: how can I instantiate a class that represents that
2011 Nov 21
1
[LLVMdev] ModulePass and Strings
Hi everybody,
I am writing an LLVM pass and I want to iterate over the whole module
(including global variables), that's why I use ModulePass instead of
FunctionPass. But I don't know how to do it. Using Module::iterator seams
to iterate only over functions. But I need to iterate over all the
Instructions in the module. How should I do such an iteration?
Also, I would like to find all the
2013 Apr 18
3
[LLVMdev] inserting a function into a module
I'm looking for an example of how to insert a new function into a module.
I have a module pass that needs to create some new functions.
Tia.
Reed
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>
2011 Jan 23
1
[LLVMdev] Pointers in Load and Store
John,
I have looked at the real code (instead of the obsolete one) and it
appears to be easy to find if an operand is a getelementptr
instruction.
if (ConstantExpr * CE = dyn_cast<ConstantExpr>(I.getOperand(0)))
{ Out<< "*** operand 0 is a constant Expr******";
if (CE->getOpcode() == Instruction::GetElementPtr)
{ Out<< "*** operand 0 is
2011 Jan 22
2
[LLVMdev] Pointers in Load and Store
John,
I have looked at the SAFECode and thought following sould work
if (isa<Constant>(I.getOperand(0)))
{ Out << "*** operand 0 is a constant ******";
if (Instruction *operandI = dyn_cast<Instruction>(I.getOperand(0)))
{ Out << "********operand is an instruction ****";
if (GetElementPtrInst *gepI =
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
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
2013 Jan 09
1
[LLVMdev] get ref to parent instruction
Hi Oscar:
In instructions like the one I showed can I expect that Value::use_begin
and Value::use_end will return only the getelementptr or there is a chance
I will get other users of that constant?
Thanks a lot,
Eduardo
On Jan 8, 2013 9:39 PM, "Óscar Fuentes" <ofv at wanadoo.es> wrote:
> Eduardo <erocha.ssa at gmail.com> writes:
>
> > How can I get a reference