Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Error in Hello World Pass"
2009 Sep 10
3
[LLVMdev] Finding call points to a function
Hi,
I am writing an LLVM Pass and I would like to know how would I do the
following:
1. I have a function foo, and I need to get all the call points calling this
function in each Function of the Module. The only way I can think of is to
iterate over the BasicBlocks of each Function, look for all the Call
Instructions and check if the called function is foo. I was wondering if
there is any other
2010 Aug 12
1
[LLVMdev] Compile error for the Hello pass example
Hello all,
I'm trying the Hello pass example in the "Writing an LLVM Pass" webpage (
http://llvm.org/docs/WritingAnLLVMPass.html#basiccode ). I followed the
instructions to compile (with gcc-4.2) the Hello.cpp, but I got the compile
errors:
Hello.cpp:20: error: expected identifier before string constant
Hello.cpp:20: error: expected ',' or '...' before string
2009 Sep 10
0
[LLVMdev] Finding call points to a function
Rakesh Komuravelli wrote:
> Hi,
>
> I am writing an LLVM Pass and I would like to know how would I do the
> following:
>
> 1. I have a function foo, and I need to get all the call points calling
> this function in each Function of the Module. The only way I can think
> of is to iterate over the BasicBlocks of each Function, look for all the
> Call Instructions and
2009 Jul 17
2
[LLVMdev] LLVM Hello Pass load error when using opt -load Hello.so
While learning to write LLVM passes and following the precise
instructions under http://llvm.org/docs/WritingAnLLVMPass.html,
<http://llvm.org/docs/WritingAnLLVMPass.html>
I got this error when loading the hello pass to run the test program:
opt -load ./Release/lib/Hello.so -hello < test/test.bc > /dev/null
Error opening './Release/lib/Hello.so': ./Release/lib/Hello.so:
2009 Feb 27
3
[LLVMdev] warning from -instcombine
Hi,
I noticed this code in lib/Transforms/Scalar/InstructionCombining.cpp:
cerr << "WARNING: While resolving call to function '"
<< Callee->getName() << "' arguments were dropped!\n";
If you're using LLVM as a static compiler, this warning is a bit
incongruous, because it's not formatted in the same way as warnings
from
2008 Apr 16
2
[LLVMdev] Problems in removing a cloned instruction.
Hi all,
I am trying to write a pass where i am creating a clone of a
function (the only difference being, the new function returns void ,
instead of any value).
I am creating a new Function Type with a void return type (rest being
the same as original function), and using this i am creating a new
function body. Then, i clone the body of the old function into new
function, but when ever i
2006 Mar 19
1
[LLVMdev] Idioms for retrieving global symbols and inheritance
Hello,
I have a couple of doubts, as listed below:
1. To list all the global variables in the module, I am iterating
using type_iterator and for each Type I get, I am using value_iterator
to iterate over Values . In the second iteration I am getting
unexpected results. For each type obtained from type_iterator->second,
value_iterator->first produces the same list as what
2002 Dec 06
3
[LLVMdev] Tarjan+function_ptrs == trouble ? (fwd)
Test Cases:
(attached)
Iteration code:
(...)
typedef TarjanSCC_iterator<CallGraph*> MyTarjan;
CallGraph& callGraph = getAnalysis<CallGraph>();
MyTarjan iter = tarj_begin(&callGraph);
MyTarjan end = tarj_end(&callGraph);
while(iter!=end)
iter++;
(...)
if you take the time to print out the function each non-looping node iter
traverses, it never reaches main...
2009 Jul 19
0
[LLVMdev] LLVM Hello Pass load error when using opt -load Hello.so
Hey Chuck,
I'm afraid I can't reproduce your error but...a problem you may run
into later is that opt will complain with
opt: llvm/lib/VMCore/Pass.cpp:149:
void<unnamed>::PassRegistrar::RegisterPass(const llvm::PassInfo&):
Assertion `Inserted && "Pass registered multiple times!"' failed.
Aborted
I "fixed" this by replacing the LLVMLIBS line in
2004 Nov 18
3
[LLVMdev] A few beginner level questions..
1. If we run a few passes in a sequence ..is the bytecode file
transformed after each pass in sequence i.e
if we have
a) opt -pass1 -pass2 -pass3 < in.bc > out.bc
b)opt -pass1 -pass2 < in.bc > tmp.bc
opt -pass3 < tmp.bc > out.bc
are the above two equivalent ?
what I basically want is to run my pass on an optimised bytecode , so
should i optimize it and get a new bytecode
2008 Apr 16
0
[LLVMdev] Problems in removing a cloned instruction.
Hi,
I'm gonna try to give some feedback, but I have only been working with LLVM
for a few days, so don't take what I'm saying without verifying :-)
> BasicBlock *ProgSlicer::CloneBasicBlock(const BasicBlock *BB,
> DenseMap<const Value*, Value*> &ValueMap,
> const char *NameSuffix, Function *F) {
>
> BasicBlock
2005 Oct 16
2
[LLVMdev] Help on LLVM Instrumentation
Hi ,
I am using LLVM for my Post Graduate course project on Optimization. I am trying to do some insrtumentation to the bytecode.I 've been going through your Instrumentation code for the past few days in /llvm/lib/Transforms/Instrumentation folder and finally found two ways of instrumentation :
1) injecting LLVM bytecode instructions
2) calling an external C function.
I am trying both and
2009 Feb 27
0
[LLVMdev] warning from -instcombine
On Feb 27, 2009, at 1:47 AM, Jay Foad wrote:
> Hi,
>
> I noticed this code in lib/Transforms/Scalar/InstructionCombining.cpp:
>
> cerr << "WARNING: While resolving call to function '"
> << Callee->getName() << "' arguments were dropped!\n";
>
> If you're using LLVM as a static compiler, this warning is a
2006 May 31
0
[LLVMdev] Adding an object to llc (analysis pass)
On Wed, 31 May 2006, Silken Tiger wrote:
>> that requires a BasicBlockPass, it will fail the same was as when a
>> ModulePass requires a FunctionPass.
> void MParSchedule::getAnalysisUsage(AnalysisUsage &AU) const {
> AU.setPreservesAll();
> }
>
> MParSchedule requires nothing and changes nothing. So hopefully the above code
> represents this fact?
Right
2009 Jun 29
7
[LLVMdev] Profiling in LLVM Patch
Hi all,
as proposed in
http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/020396.html
I implemented the algorithm presented in [Ball94]. It only instruments
the minimal number of edges necessary for edge profiling.
The main changes introduced by this patch are:
*) a interface compatible rewrite of ProfileInfo
*) a cleanup of ProfileInfoLoader
(some functionality in ProfileInfoLoader
2004 Nov 18
0
[LLVMdev] A few beginner level questions..
On Wed, 2004-11-17 at 23:19, Abhijit Ray wrote:
> 1. If we run a few passes in a sequence ..is the bytecode file
> transformed after each pass in sequence i.e
>
> if we have
> a) opt -pass1 -pass2 -pass3 < in.bc > out.bc
> b)opt -pass1 -pass2 < in.bc > tmp.bc
> opt -pass3 < tmp.bc > out.bc
>
> are the above two equivalent ?
Yes, they're
2016 Jan 19
2
Why getFunction() of CallGraphNode return NULL function?
Hi all,
I want to find all the called functions in each function, thus I iterate
the calledFunctions of each CallGraphNode in CallGraph as follow:
for (CallGraph::iterator it = CG->begin(); it != CG->end(); ++it) {
CallGraphNode* node = it->second;
for (CallGraphNode::iterator it2 = node->begin(); it2 != node->end();
++it2) {
Function* calledFunc =
2002 Dec 06
1
[LLVMdev] Tarjan+function_ptrs == trouble ?
Thanks,
I've been through the documentation, and if I visit main, i think
everything will turn out correctly... Printing out the Call graph reveals
that main is calling this external node i think you are making reference
to. Could this be the problem?
Dave
On Fri, 6 Dec 2002, Chris Lattner wrote:
> > if you take the time to print out the function each non-looping node iter
>
2006 May 31
2
[LLVMdev] Adding an object to llc (analysis pass)
Hi
Am Dienstag, 30. Mai 2006 19:21 schrieb Chris Lattner:
> On Tue, 30 May 2006, Silken Tiger wrote:
> > Everthing now compiles fine, but when running llc with invoking my own
> > backend derived from the cbackend i get the following error:
> > namespace llvm {
> > class MParSchedule : public BasicBlockPass {
> > public:
> >
> >
2009 Oct 05
0
[LLVMdev] [Fwd: Re: problem with multiple LLVM passes]
Rakesh Komuravelli wrote:
> Hi John,
>
> I am having the exact same problem. Let me answer the four questions
> that you have asked..
>
> 1) Are both passes included in the same dynamic library? If not, are
> you loading their respective libraries with multiple -load options?
>
> Yes. I load both the libraries with two -load options. I see both the
> passes listed