Displaying 20 results from an estimated 9000 matches similar to: "[LLVMdev] Two quick questions on call graph nodes"
2010 Jun 07
0
[LLVMdev] Two quick questions on call graph nodes
Hi Xiaolong,
> First, there is a "indirect call node" dominating all other nodes
> (include "main"). My question is: what does this special node serves
> for?
what version of LLVM are you using? I don't think LLVM 2.7 uses a
"indirect call node". However it does use a "external node", which
is used when a function external to the current
2010 Jun 07
2
[LLVMdev] Two quick questions on call graph nodes
Hello Duncan,
Thanks!
> > First, there is a "indirect call node" dominating all other nodes
> > (include "main"). My question is: what does this special node serves
> > for?
>
> what version of LLVM are you using? I don't think LLVM 2.7 uses a
> "indirect call node". However it does use a "external node", which
> is
2010 Jun 07
2
[LLVMdev] Two quick questions on call graph nodes
Hello Duncan,
> >> what version of LLVM are you using? I don't think LLVM 2.7 uses a
> >> "indirect call node". However it does use a "external node", which
> >> is used when a function external to the current module is called.
> >>
> >
> > The "external node" makes sense. However, I am using LLVM 2.8. (See
>
2010 Jun 09
0
[LLVMdev] Two quick questions on call graph nodes
Hi Xiaolong, I changed the code so it now prints "external node" instead. The
external node represents all functions external to the module. So, for example,
if a function F calls a function G, but G is only declared in the module, rather
than being defined there, then the callgraph gets an edge from F to the
external node (the fact that the call was to G is discarded, only the fact
2010 Jun 07
0
[LLVMdev] Two quick questions on call graph nodes
Hi Xiaolong,
>> what version of LLVM are you using? I don't think LLVM 2.7 uses a
>> "indirect call node". However it does use a "external node", which
>> is used when a function external to the current module is called.
>>
>
> The "external node" makes sense. However, I am using LLVM 2.8. (See
> the output from "opt
2010 Jun 07
4
[LLVMdev] Another two questions on LLVM
Hi all,
Considering the limit time I have for an implementation, I better ask
for your inputs on a few questions. Any answer is to be much
appreciated.
First, how does LLVM handle the "new statement" of C++? Could any one
give me any hint?
Second, what properties does the callgraph generated by LLVM has? One
property I am interesting in is whether the callgraph is a safe
2010 Jul 26
2
[LLVMdev] How to disable simplifying function parameters in llvm-g++
Hello everybody,
It seems to me that there is one kind of default optimization
executed by llvm-g++, simplifying function parameters in certain
cases. Consider the following example:
Given an iterator (in the context of C++ STL) (i.e. a class containing
a pointer to another class):
%"struct.std::_List_const_iterator<int>" = type { %"struct.std::_List_node_base"* }
2010 Jul 26
0
[LLVMdev] How to disable simplifying function parameters in llvm-g++
Hi Xiaolong,
> The compilation substitutes "__position.0" for "__position", as shown below:
>
> define linkonce_odr void @_ZNSt4listIiSaIiEE9_M_insertESt14_List_iteratorIiERKi(%"struct.std::list<int,std::allocator<int> >"* %this, i64 %__position.0, i32* %__x) nounwind ssp { ... }
names like this only exist to make the LLVM IR more readable,
2010 Jun 09
1
[LLVMdev] Segmentation fault 'cause of accessing function arguments
Hi all,
I am experimenting to run a pass inherited from CallGraphSCCPass. In
the pass, I iterate all functions in a SCC. In each iteration, I
access all arguments of a function in the following way:
Function::arg_iterator PI = fun->arg_begin(), PE = fun->arg_end();
...
I have no trouble with building. However, I am troubled with
"segmentation fault" when I run the pass
2010 Jul 26
3
[LLVMdev] How to disable simplifying function parameters in llvm-g++
Thanks, Duncan.
> > The compilation substitutes "__position.0" for "__position", as shown below:
> >
> > define linkonce_odr void @_ZNSt4listIiSaIiEE9_M_insertESt14_List_iteratorIiERKi(%"struct.std::list<int,std::allocator<int> >"* %this, i64 %__position.0, i32* %__x) nounwind ssp { ... }
>
> names like this only exist to make
2010 Jul 26
1
[LLVMdev] How to disable simplifying function parameters in llvm-g++
Hi Duncan,
> > Note that the original parameter (of the function in concern) is of
> > type "struct.std::_List_const_iterator<int>", whereas the parameter
> > (after the compilation) is of type
> > "struct.std::_List_node_base"*. Evidently, llvm-g++ replaces the
> > original parameter with its sole field. This is understandable and the
>
2010 Jul 26
0
[LLVMdev] How to disable simplifying function parameters in llvm-g++
Hi Xiaolong,
> Note that the original parameter (of the function in concern) is of
> type "struct.std::_List_const_iterator<int>", whereas the parameter
> (after the compilation) is of type
> "struct.std::_List_node_base"*. Evidently, llvm-g++ replaces the
> original parameter with its sole field. This is understandable and the
> LLVM output indicates
2010 Jun 10
2
[LLVMdev] For clarifying the "<Result>" in Instructions
Hello Reid,
Thanks.
> Yes, it's an integral part of the Instruction. You can change it by
> providing a name when you create the instruction.
Following your hint, can I understand in this following way?
The name (denoted by "<result>") is actually a referrer to the instruction .
Consider this instruction:
%this_addr = alloca %struct.String* ;
2010 Jun 10
0
[LLVMdev] For clarifying the "<Result>" in Instructions
Yes, it's an integral part of the Instruction. You can change it by
providing a name when you create the instruction.
Reid
On Thu, Jun 10, 2010 at 8:34 AM, Xiaolong Tang <xiaolong.snake at gmail.com> wrote:
> Hi all,
>
> In the language specifications, many instructions have this form:
>
> <result> = ...
>
> So, where is "<result>" defined?
2010 Jun 18
0
[LLVMdev] Question on Load and GetElementPtr instructions
Good evening, Tang.
> What is the type of the first operand of the instruction (i.e.,
> getOperand(0))?
It might be ConstantExpr.
You may use dyn_cast<GEPOperator>(getPointerOperand()).
Also GetElementPtrInst* can be casted to GEPOperator.
...Takumi
2010/6/18 Xiaolong Tang <xiaolong.snake at gmail.com>:
>
> Hey,
>
> Considering the following instruction:
>
2010 Jun 10
2
[LLVMdev] For clarifying the "<Result>" in Instructions
Hi all,
In the language specifications, many instructions have this form:
<result> = ...
So, where is "<result>" defined? Is it an integral part of an instruction?
Consider the "getelementptr" instruction:
<result> = getelementptr <pty>* <ptrval>{, <ty> <idx>}*
How is the "<result>" represented?
Best,
2010 Jun 09
0
[LLVMdev] Segmentation fault 'cause of accessing function arguments
Hi all,
I am experimenting to run a pass inherited from CallGraphSCCPass. In
the pass, I iterate all functions in a SCC. In each iteration, I
access all arguments of a function in the following way:
Function::arg_iterator PI = fun->arg_begin(), PE = fun->arg_end();
...
I have no trouble with building. However, I am troubled with
"segmentation fault" when I run the pass
2010 Jun 18
3
[LLVMdev] Question on Load and GetElementPtr instructions
Hey,
Considering the following instruction:
%20 = load %struct.Node** getelementptr inbounds (%struct.Node*
@head, i32 0, i32 0), align 16 ; <%struct.Node*> [#uses=1]
What is the type of the first operand of the instruction (i.e.,
getOperand(0))?
I thought the operand is a "GetElementPtr" instruction, however, the
predicate "isa<Instruction>()" over
2012 May 22
0
[LLVMdev] How to get llvm bitcode executed
Guess I have found some clues. Some necessary libraries have to be
loaded while trying to generate native code or do interpretation. Then
another question emerges: Is there a way to determine the necessary
libraries in need? And where to locate these necessary libraries?
Xiaolong
> Hi All,
>
> I have a program that uses C++ STL a lot. To have the source code for
> STL functions, I
2010 Jun 07
0
[LLVMdev] Another two questions on LLVM
Xiaolong Tang wrote:
> First, how does LLVM handle the "new statement" of C++? Could any one
> give me any hint?
>
It doesn't. Handling C++'s new expression (not statement) is up to the
compiler frontend. Clang handles it by emitting a call to the
runtime-provided operator new function (which is probably implemented in
terms of malloc) followed by a constructor call,