Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Mapping between LLVM bitcode and C source"
2009 Jan 29
0
[LLVMdev] Mapping between LLVM bitcode and C source
Same question here!
On Jan 14, 5:14 pm, "Prakash Prabhu" <prakash.pra... at gmail.com> wrote:
> Hi,
>
> Is there a way, from within an opt pass, to find the correspondence
> between an LLVM IR object and Csourcecode(basicallylinenumber
> info similar to the one used with gcc + gdb to help debugging ),
> assuming either a llvm-gcc front end ?
>
> Sorry if
2008 Sep 16
2
[LLVMdev] DOTGraphTraits and GraphWriter
Hi Dan,
Thanks for the reply. I got the labels for each outgoing edge (at the
source node's 'structure' field) working. Is there a way to find out
the outgoing edge number from EdgeIter. (Basically the Node in my
graph has a a bunch of outgoing edges, so that I can just index into
that collection within the node to get the appropriate edges'
attributes).
regards,
Prakash
On Tue,
2008 Sep 22
0
[LLVMdev] DOTGraphTraits and GraphWriter
Hi Prakash,
I don't know of an easy way to do this, other than to use random-access
iterators so you can compute the distance between the edge and the
beginning of the list of edges.
Dan
On Sep 16, 2008, at 2:58 PM, Prakash Prabhu wrote:
> Hi Dan,
>
> Thanks for the reply. I got the labels for each outgoing edge (at the
> source node's 'structure' field) working. Is
2008 Nov 04
4
[LLVMdev] Debugging lli using bugpoint
Hi Evan,
Thanks for the pointers. We found a simple test case that causes the problem
(thanks to Tom in my group):
#include<stdio.h>
#include<stdlib.h>
void test();
void (*funcPtr)();
int main(int argc, char **argv) {
funcPtr = test;
test();
}
void test() {
if(funcPtr == test) {
printf("OK!\n");
} else {
fprintf(stderr, "Bad!\n");
exit(1);
2008 Nov 11
0
[LLVMdev] Debugging lli using bugpoint
I've filed PR3043 for this.
Evan
On Nov 3, 2008, at 4:00 PM, Prakash Prabhu wrote:
> Hi Evan,
>
> Thanks for the pointers. We found a simple test case that causes the
> problem (thanks to Tom in my group):
>
> #include<stdio.h>
> #include<stdlib.h>
>
> void test();
> void (*funcPtr)();
>
> int main(int argc, char **argv) {
> funcPtr =
2008 Nov 02
2
[LLVMdev] Debugging lli using bugpoint
Hi Eli,
Thanks for the reply. I tried with -Xlinker="-ldl ". However it does not
seem to make a difference. It seems that when bugpoint is run with
--run-jit, the linker args are not passed to gcc (from
tools/bugpoint/ExecutionDriver.cpp) :
if (InterpreterSel == RunLLC || InterpreterSel == RunCBE ||
InterpreterSel == CBE_bug || InterpreterSel == LLC_Safe)
RetVal =
2008 Nov 03
0
[LLVMdev] Debugging lli using bugpoint
Hi Prakash,
Unfortunately it looks like you need to do quite a bit of
investigation into this. However, I hope I can provide some useful tips.
1. In general, lli and llc generate exact the same code except lli
default to static codegen while llc defaults to dynamic-no-pic
codegen. So try passing -relocation-model=dynamic-no-pic to lli. If
this works, that means there are issues with
2009 Jan 21
1
[LLVMdev] poolallocation error
Dear Prakash,
I believe I've fixed the problem you were having with ds-aa. Please
update your poolalloc tree, recompile, and let me know if it works.
-- John T.
Criswell, John T wrote:
> [snip]
>
> ________________________________________
> From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] On Behalf Of Prakash Prabhu [prakash.prabhu at gmail.com]
> Sent:
2009 Jan 19
0
[LLVMdev] poolallocation error
Dear Prakash,
Yes, DSA is still in active use, although nobody else uses the -ds-aa pass as far as I know.
I tried the below sample (although ds-aa should be in libLLVMDataStructure.so and not libpoolalloc.so), and I get the same error. I've seen similar problems with other passes in our work here. My guess is that -ds-aa is requiring two passes that claim to invalidate each other; this
2008 Oct 28
0
[LLVMdev] Debugging lli using bugpoint
On Tue, Oct 28, 2008 at 12:17 PM, Prakash Prabhu
<prakash.prabhu at gmail.com> wrote:
> Generating reference output from raw program: <cbe><gcc>
> Error running tool:
[snip]
> /tmp/cc08IpX8.o: In function `SyLoadModule':
> bugpoint-test-program.bc.cbe.c:(.text+0x25705): undefined reference to
> `dlopen'
[snip]
This is saying that compilation with CBE is
2008 Sep 16
0
[LLVMdev] DOTGraphTraits and GraphWriter
Hello Prakash,
The SelectionDAG viewers (llc -view-isel-dags etc.) support
both multiple edges between the same pair of nodes, and labels
at least for each incoming edge. See
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp for code you
might use as an example, though it is a bit tricky.
Dan
On Sep 15, 2008, at 3:15 PM, Prakash Prabhu wrote:
> Hi all,
>
> I have two questions related
2008 Sep 15
2
[LLVMdev] DOTGraphTraits and GraphWriter
Hi all,
I have two questions related to .dot graph output. Basically, I have a
graph representing a program dependence graph like structure with
(a) multiple edges between the same pair of nodes
(b) each edge having a special (different) text/label
I implemented a template-specialized version of DotGraphTraits for the
my graph structure which given a node, uses a map_iterator (similar to
the one
2008 Sep 24
2
[LLVMdev] Memory Altering/Accessing Instructions
Hi all,
Would it be correct to say that the only instructions in LLVM IR that
modify/access memory potentially are the following:
(1) LoadInst : Ref
(2) StoreInst : Mod
(3) VAArgInst : Ref (?)
(4) AllocaInst : Mod
(5) MallocInst : Mod
(6) FreeInst : Mod
(7) CallInst : Mod/Ref ?
Also, my earlier impression was that the GEP instruction only computes
the effective address and does not
2008 Aug 27
2
[LLVMdev] IntervalPartition and Intervals per function
Hi Chris,
Thanks for the reply. I am actually interested in using the Intervals
Analysis mainly to be able to do Region based analysis. In fact, I
found that the way Intervals are defined mirror exactly the definition
of a Region in the second edition of the Dragon Book (Section 9.7 on
Region-Based Analysis), so it will be great if the Intervals related
code still lives on in LLVM :).
I found
2008 Sep 24
0
[LLVMdev] Memory Altering/Accessing Instructions
Prakash Prabhu wrote:
> Hi all,
>
> Would it be correct to say that the only instructions in LLVM IR that
> modify/access memory potentially are the following:
>
I believe that every instruction has a
mayWriteToMemory()/mayReadToMemory() method that you can use to
determine this information. See
http://llvm.org/doxygen/classllvm_1_1Instruction.html (the LLVM doxygen
info on
2008 Oct 28
2
[LLVMdev] Debugging lli using bugpoint
Hi,
I have a program that runs when statically compiled using llc and gcc but
crashes with a segmentation fault when run with lli. I am trying to debug it
with bugpoint and the initial part of bugpoint seems to be suggesting that I
am somehow missing the linking with the libraries having dlsym/dlopen
although I am passing it to lli :
*$ bugpoint -run-jit
2009 Jan 16
1
[LLVMdev] poolallocation error
Hi all,
I too am getting this error for x86_64 when I am trying to use the
Data Structure Analysis ...I svn upped both the llvm main branch and
the poolalloc today in the morning and recompiled everything from
scratch :
$ opt -load /home/pprabhu/llvm/llvm-install-x86-64/lib/libpoolalloc.so
-ds-aa < o.bc
opt: /home/pprabhu/llvm/llvm/lib/VMCore/PassManager.cpp:1418: virtual
void
2008 Apr 26
2
[LLVMdev] Getting the trip count of a loop
Hi,
I am trying to add a new loop pass in which I making a call to get the trip
count of the loop using
Value *TripCountValue = L->getTripCount()
However I am always getting NULL for TripCountValue (confirmed through gdb).
I am running this pass after the canonicalization of induction variables:
opt --debug-pass=Structure -stats -indvars -loop-rotate -my-loop-pass <
main.bc >
2008 Aug 05
2
[LLVMdev] Anderson's analysis, getresult instruction on x86_64
Thanks for the replies, Daniel and Matthijs. I added some code to generate
the copy constraint, which I think (in the present form) is wrong (or at
best not field sensitive):
+void Andersens::visitGetResultInst(GetResultInst &GR) {
+ if (isa<PointerType>(GR.getType()))
+ {
+ // P1 = getresult P2 --> <Copy/P1/P2>
+
2008 Aug 27
2
[LLVMdev] IntervalPartition and Intervals per function
Hi,
I wrote a Function pass that requires the IntervalPartition pass in
order to obtain the set of intervals for every function:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<IntervalPartition>();
}
and get a handle to it in the runOnFunction method of my CustomPass:
bool CustomPass::runOnFunction(Function& F)
{
IntervalPartition& iPart =