similar to: [LLVMdev] Static analysis across across translation units

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Static analysis across across translation units"

2012 Dec 06
0
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
On Thu, Dec 6, 2012 at 12:33 AM, Karthik Bhat <karthikthecool at gmail.com> wrote: > Hi David, > > I think it might not be exactly PR13303 which might be causing the > corruption of struct when accessed through GDB. > This seems to be an ABI problem in clang. > The problem seems to be that when we have pass by value of struct > (having indirect arguments) stack is not
2012 Dec 05
1
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
Hi Relph, I'm trying to print the value of 'a' while executing a.s = --depth; I have used break line number instead of break function so that the initial prologue part gets executed. The problem seems to be happening when parameters are pushed into stack and we call a function recursively. For example in the code when we have a int s; inside the struct instead of short s; gdb is able
2012 Dec 06
2
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
Hi David, I think it might not be exactly PR13303 which might be causing the corruption of struct when accessed through GDB. This seems to be an ABI problem in clang. The problem seems to be that when we have pass by value of struct (having indirect arguments) stack is not aligned properly. I tried realigning the stack for indirect arguments in(TargetInfo.cpp) - ABIArgInfo
2012 Dec 04
0
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
Karthik, At what point within recurse() are you asking gdb to display the value of argument a? What I'm wondering about is if the debug information gdb is using to get at a might not be correct at the particular point you are checking a, particularly if that is before the prolog has completed execution. The way debug information for arguments pushed on the stack is represented in
2012 Dec 04
0
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
This seems to be another case of PR13303 - since GDB can't figure out where to break for this function based on the debug info (you'll notice when you "break recurse" that it's not breaking on a line or source file, just an address) it's breaking at the very start, before the prologue I'm about to commit a fix to this. On Tue, Dec 4, 2012 at 5:34 AM, Karthik Bhat
2012 Dec 04
4
[LLVMdev] Value of structure passed byval to a recurse function not initialized when accessed through GDB
Hi All, I was debugging a clang binary when i found this problem. The following code is complied with clang. typedef struct s { short s; } SVAL; void recurse (SVAL a, int depth) { a.s = --depth; if (depth == 0) return; else recurse(a,depth); } int main () { SVAL s; s.s = 5; recurse (s, 5); return 0; } When i try to access value of a.s in function recurse through gdb(i.e
2012 Nov 29
1
[LLVMdev] clang modifying clobbered register in case of inline assembly resulting in data corruption
Hi All, I'm looking into this simple inline assembly code. Were we copy contents on data to eax,ebx,ecx and edx and later copy them back from the registers to data. Test Case - #include <stdio.h> int data[] = { 0x14131211, 0x24232221, 0x34333231, 0x44434241, }; int main (int argc, char **argv) { asm ("mov 0(%0), %%eax\n\t" "mov 4(%0), %%ebx\n\t"
2015 Jan 30
1
[LLVMdev] Question on Loop Normalization in LLVM
Hi All, I was going through http://en.wikipedia.org/wiki/Normalized_loop and some other documents on Normalized Loops. LLVM currently doesn't seem to normalize the loop as mentioned in the link (i.e. to start with 0 and have a unit step). I wrote a pass to convert a loop into normalized form as in the link (i.e. to have start value of 0 and step of 1 whenever possible) but I'm not sure
2012 Oct 03
0
[LLVMdev] Inter-procedural program flow analysis
Okay thanks for the info. The term program termination was probably a poor choice of words. I'm really just trying to build an inter-procedural BasicBlock graph, and then look for postdominance as Scott suggested. I'll go about making my own since it doesn't sound like there is one out there already. Thanks, -Stephen On Tue, Oct 2, 2012 at 5:06 PM, Scott Moore <sdmoore at
2018 Feb 22
0
[GSOC-2018]: Clang Static Analyzer- Create a checker for dangling string pointers in C++
Hello llvm-dev I am Sunil Mayya studying Masters in Electrical and computer engineering at TU Kaiserslautern Germany. I am having few C++ programming experience with the industry and use clang static analyzer for my project. I am interested in the project "Create a checker for dangling string pointers in C+" I have C++11 and C++14 knowledge. I have started browsing through the source
2014 Apr 24
2
[LLVMdev] How to get debug dump of candidate pairs selected in BBVectorizer?
Hi All, I'm trying to understand BB Vectorizer and gone through http://llvm.org/devmtg/2012-04-12/Slides/Hal_Finkel.pdf Wanted to know how to use bb-vectorize-debug-candidate-selection and bb-vectorize-debug-pair-selection command arguments. I tried the command with debug build clang - clang -O2 test.c -mllvm -vectorize \ -mllvm -debug-only=bb-vectorize \ -mllvm
2012 Jan 03
0
[LLVMdev] Comparison of Alias Analysis in LLVM
On Jan 3, 2012, at 1:53 PM, Jianzhou Zhao wrote: > I see. I asked the question because LLVM provides several alias > analysis, and I was wondering how to decide which one should be used > for compiling most programs. > > I think the basicaa is the default one, but by looking into its code, > it is not inter-procedural or context-sensitive (I am not 100% sure), > so does not
2012 Jan 03
2
[LLVMdev] Comparison of Alias Analysis in LLVM
On Tue, Jan 3, 2012 at 3:54 PM, Chris Lattner <clattner at apple.com> wrote: > > On Jan 2, 2012, at 9:42 PM, Jianzhou Zhao wrote: > >> Hi, >> >> Chapter 4 in http://llvm.org/pubs/2005-05-04-LattnerPHDThesis.html >> compares the precision of alias analysis in LLVM at that time. Does >> the latest LLVM still follow the similar results? I was also
2012 Oct 03
2
[LLVMdev] Inter-procedural program flow analysis
I think you're looking for an inter-procedural post dominator analysis. I don't think there is one in LLVM already, but it should be relatively straightforward. This gives a sound approximation (i.e. no false positives) of something sort-of equivalent to the halting problem: if the program terminates, then block Y was executed. Cheers, Scott On Tue, Oct 2, 2012 at 7:43 PM, Jim Grosbach
2012 Nov 16
1
[LLVMdev] Failure while calling a function in GDB session
Hi All, I compiled the following code on my linux PC using clang with PIE option- struct struct4 {char a; char b; char c; char d; }; struct struct4 foo4 = {'a','2','c','4'}; struct struct4 fun4() { return foo4; } int main() { fun4(); return 0; } > clang -g -fPIE structs.c In GDB session when i call p/c fun4() i get something like below- (gdb) p/c
2012 Oct 02
0
[LLVMdev] Inter-procedural program flow analysis
Isn't this effectively the halting problem? Consider the case where block Y is the exit block of main() and block X is the entry block of main(). Jim On Oct 2, 2012, at 4:29 PM, Stephen Schiffli <sschiffli at gmail.com> wrote: > Is there any inter-procedural analysis that could tell me if some BasicBlock Y is guaranteed to execute based on my knowledge that BasicBlock X will
2012 Oct 02
2
[LLVMdev] Inter-procedural program flow analysis
Is there any inter-procedural analysis that could tell me if some BasicBlock Y is guaranteed to execute based on my knowledge that BasicBlock X will execute? For example: extern int x; void foo() { } int main() { if (x) { foo(); } else { foo(); } } I want to be told that the entry block of foo is guaranteed to be
2012 Feb 14
1
[LLVMdev] Static slicer and other useful stuff
On 02/14/2012 07:26 AM, Evan Cheng wrote: > Hi js, > > On Feb 13, 2012, at 8:49 AM, Jiri Slaby <jirislaby at gmail.com> wrote: > >> Hello, >> >> we, at the Masaryk University, have developed an interprocedural static >> slicer with other useful stuff. This includes Andersen's points-to >> analysis, accurate call-graph, modifies relations.
2012 Jan 04
2
[LLVMdev] Comparison of Alias Analysis in LLVM
On Tue, Jan 3, 2012 at 4:55 PM, Chris Lattner <clattner at apple.com> wrote: > On Jan 3, 2012, at 1:53 PM, Jianzhou Zhao wrote: >> I see. I asked the question because LLVM provides several alias >> analysis, and I was wondering how to decide which one should be used >> for compiling most programs. >> >> I think the basicaa is the default one, but by looking
2013 May 20
0
[LLVMdev] Question about DSA analysis
On 5/19/13 11:46 AM, Jing Zhou wrote: > Greeting. > > I am working on one DSA related project. Got several questions about > LLVM's DSA analysis: > > 1. I looked through the llvm doc, it seems "-ds-aa" option is the one > I should use. > (http://llvm.org/docs/AliasAnalysis.html#the-ds-aa-pass). however > based on the poolalloc's svn history, this