similar to: Alias analysis only throwing mayAlias for something that seems should be identifiable as mustAlias

Displaying 20 results from an estimated 900 matches similar to: "Alias analysis only throwing mayAlias for something that seems should be identifiable as mustAlias"

2020 Jul 10
2
Understand alias-analysis results
Hi! On 7/10/2020 07:17, Shuai Wang wrote: > Hello! > > Thank you very much! Yes, that makes a lot of sense to me. However, just > want to point out two things that are still unclear: > > 1. The output contains a alias set of only one element, for instance: > "must alias, Mod       Pointers: (i32* %y, LocationSize::precise(4))" > > This one really confused
2020 Jul 09
2
Understand alias-analysis results
Hi again! Replying in chronological order: > On Thu, Jul 9, 2020 at 6:51 PM Shuai Wang <wangshuai901 at gmail.com > <mailto:wangshuai901 at gmail.com>> wrote: > > Hey Matt, > > That's awesome. Thank you very much for all the information and > clarification! Just a few follow up questions. Could you kindly shed > some lights on it? Thank
2008 Jul 10
3
[LLVMdev] (GEP) Index validity
Hi Evan, > I don't think this is right. According to llvm documentation: > > The index types specified for the 'getelementptr' instruction depend on the > pointer type that is being indexed into. Pointer and array types can use a > 32-bit or 64-bit integer type but the value will always be sign extended to > 64-bits. Structure and packed structure types require
2020 Jul 09
2
Understand alias-analysis results
Hey Matt, That's awesome. Thank you very much for all the information and clarification! Just a few follow up questions. Could you kindly shed some lights on it? Thank you! 1. I tried to tweak the code in the following way: - Clang [-> LLVM-IR]: https://llvm.godbolt.org/z/n9rGrs - [LLVM-IR ->] opt: https://llvm.godbolt.org/z/Uc6h5Y And i note that the outputs are: Alias sets for
2007 Aug 17
1
[LLVMdev] Inserting trace information during opt transformations
Hi all, In several of the transformations I'm working on I need to embed the logical equivalent of puts/printf/etc. calls inline with code. I am having some difficulties getting the transformation code right. As I understand it, I should be creating a ConstantArray based on the string (in this case I'm taking an instruction, 'disassembling' it to an ostringstream then turning
2019 Jun 05
2
Question about a AA result and its use in Dependence Analysis
Oh. So it wasn't just the memory location size that was incorrect on those aliasing checks. I took a look at the tests and it appears that the alias call also catches some cases of restrict/noalias attributes, along with the tbaa info. My first idea of constructing an alias call with no Ptr's but valid tbaa info won't catch that at least. I will create a bug report and try and see if
2019 Jun 03
2
Question about a AA result and its use in Dependence Analysis
Alias analysis is figuring out the relationship between two pointer expressions, at some location in the program. At a given point in the program, do two expressions always refer to the same location? At a given point in the program, do two expressions never refer to the same location? AliasAnalysis::alias() doesn't explicitly take a "point" in the program because we don't
2018 Nov 29
2
AliasAnalysis does not look though a memcpy
Hi, I'm trying to get AA results for two pointers, but it seems that AA cannot look though a memcpy. For example: define dso_local spir_func void @fun() { entry: ; Store an address of `var' %var = alloca i32, align 4 store i32 42, i32* %var, align 4 %var.addr = alloca i32*, align 8 store i32* %var, i32** %var.addr, align 8 ; Memcpy
2018 Dec 05
2
AliasAnalysis does not look though a memcpy
On 12/5/18 9:51 AM, Andrew Savonichev via llvm-dev wrote: >> Hi, >> >> I'm trying to get AA results for two pointers, but it seems that AA >> cannot look though a memcpy. For example: >> >> define dso_local spir_func void @fun() { >> entry: >> ; Store an address of `var' >> %var = alloca i32, align 4 >>
2018 Dec 05
2
AliasAnalysis does not look though a memcpy
On 12/5/18 2:14 PM, Andrew Savonichev wrote: >> On 12/5/18 9:51 AM, Andrew Savonichev via llvm-dev wrote: >>>> Hi, >>>> >>>> I'm trying to get AA results for two pointers, but it seems that AA >>>> cannot look though a memcpy. For example: >>>> >>>> define dso_local spir_func void @fun() { >>>>
2019 Jun 01
2
Question about a AA result and its use in Dependence Analysis
Hi Johannes, I followed your advice and got the same result: NoAlias and No dependence. Would you say AA is faulty for saying NoAlias or DA is faulty for saying no dependence? Or both? (revised example below) Thanks! define float @f() { entry: %g = alloca float, align 4 %h = alloca float, align 4 br label %for.body for.cond.cleanup: ; preds = %for.body
2013 Mar 01
0
[LLVMdev] llvm get annotations
Hi Sebastian, Thanks for the response. I already did this : I cast the entire annotated expression to Value*. Then, in order to avoid ugly things like getAsString(), I check if V->getValueID() == Value::ConstantArrayVal in order to cast it to ConstantArray. Because it contains only array[0], I cast array0>getOperand(0) to ConstantStruct. Therefore, from ConstantStruct you can get all the
2019 Jul 22
2
Run llvm pass from standalone project
Hi all, I am trying to use LLVM's AliasAnalysis pass, but from a standalone tool that uses llvm libraries. The following is the code snippet I am currently using. PassBuilder PB; auto mod_manager = ModuleAnalysisManager { }; PB.registerModuleAnalyses(mod_manager); AAResults& AAR = mod_manager.getResult<AAManager>(*M); But the code fails at .getResult with the following error:
2019 Jun 03
2
Question about a AA result and its use in Dependence Analysis
It seems the same bug is there if we do pointer swapping with selects. Do you agree? (see example below) define void @f() { entry: %a1 = alloca float, align 4 %a2 = alloca float, align 4 br label %loop end: ret void loop: %phi = phi i32 [ 0, %entry ], [ 1, %loop ] %select_cond = icmp eq i32 %phi, 0 %ptr1 = select i1 %select_cond, float* %a1, float* %a2 %ptr2 = select i1
2019 May 31
2
Question about a AA result and its use in Dependence Analysis
Hello llvm-dev, I would appreciate your feedback on the following problem. We're trying to determine whether this is a bug in LLVM or not. In the IR snippet below, we have two pointers (p and q) which initially point to two completely non-overlapping locations. Then, on every iteration of a loop, we swap the pointers and load from the first, followed by a store to the second. 1) AA says the
2013 Mar 01
1
[LLVMdev] llvm get annotations
Hi, I solved it. From the ConstantStruct you can call getOperand() multiple times, so "mine" as deep as you can. On Fri, Mar 1, 2013 at 1:41 PM, Alexandru Ionut Diaconescu < alexandruionutdiaconescu at gmail.com> wrote: > > Hi Sebastian, > > Thanks for the response. > > I already did this : > > I cast the entire annotated expression to Value*. Then, in
2020 Jul 09
2
Understand alias-analysis results
Hello, I am performing alias analysis toward the following simple code: struct MyStruct { int * f1; int * f2; }; void NOALIAS(void* p, void* q){ } int main() { struct MyStruct s[2]; int a,b; s[0].f1 = &a; s[1].f1 = &b; NOALIAS(s[a].f1, s[b].f2); return 0; } When I use the following command to generate .bc code and conduct alias analysis: clang -c -emit-llvm t.c -O2 opt -basicaa
2016 Dec 17
2
How to ask MustAlias queries from DSA results
Hello, everyone! I'm writing an automatic memory leak fixing tool recently. For my task, I'm using the DSA (Data Structure Analysis) for alias analysis. In my task, when I detect a memory leak, I need to find a pointer (in C) 'must-alias' with the corresponding resource. In DSA, I think if two Value* point to the same DSNode, they 'may-alias'. If two Value* point to
2016 Dec 19
0
How to ask MustAlias queries from DSA results
Dear John, > When you say "must be allocated," you mean it must have been allocated via a call to a heap allocator (e.g., malloc(), calloc(), etc), correct? Yes, I mean heap allocators. In fact, I'm implementing the idea of the ICSE 2015 paper Safe Memory-Leak Fixing for C Programs. > Also, are you performing intra-procedural or inter-procedural data-flow analysis?
2016 Dec 17
0
How to ask MustAlias queries from DSA results
On 12/16/16 9:53 PM, 杨至轩(Zhixuan Yang) via llvm-dev wrote: > Hello, everyone! > > I'm writing an automatic memory leak fixing tool recently. For my > task, I'm using the DSA (Data Structure Analysis) for alias analysis. > In my task, when I detect a memory leak, I need to find a pointer (in > C) 'must-alias' with the corresponding resource. If I understand