similar to: Question about a AA result and its use in Dependence Analysis

Displaying 20 results from an estimated 2000 matches similar to: "Question about a AA result and its use in Dependence Analysis"

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
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 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
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
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 Nov 18
3
Dependence Analysis bug or undefined behavior?
Hi, Does this kind of IR have "undefined behavior" under LLVM semantics or is it acceptable? (TLDR: a store of i64 at offset n, followed by a load of i32 at offset n+1.) define void @foo(i32* %A, i64 %n) { entry: %arrayidx = getelementptr inbounds i32, i32* %A, i64 %n %arrayidx_cast = bitcast i32* %arrayidx to i64* store i64 0, i64* %arrayidx_cast, align 4 %add1 = add i64 %n,
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 >>
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
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() { >>>>
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
2019 Jul 25
2
Typeless pointers and intrinsics
To avoid going too off-topic on the multidimensional gep thread, I'm asking this in a separate thread. >> I took a look earlier and didn't notice any target-independent ones that would need a separate type parameter Do you know what would happen with the llvm.ptr.annotation intrinsic? Frontends use that to annotate members of structs: struct S { [[some_annotation]] int
2020 Feb 27
2
TBAA for struct fields
[AMD Official Use Only - Internal Distribution Only] Hi, Following issue is observed with Type Based Alias Analysis(TBAA). ####################################################### struct P { float f1; float f2; float f3[3]; float f4; }; void foo(struct P* p1, struct P* p2) { p1->f2 = 1.2; p2->f1 = 3.7; } int callFoo() { struct P p; foo(&p, &(p.f2)); }
2018 Sep 02
2
possible inconsistency in PassManagerInternal.h
Hello, (fairly new around here, apologies if the question has an obvious answer) I've been studying the structure of the new PassManager in the hopes of using it soon. After watching a couple of talks (Chandler / Sergeev), I decided to start with the Concept/Model classes in PassManagerInternal.h While I could make sense of almost everything there, two details caught my attention: 1- 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:
2020 Mar 03
2
TBAA for struct fields
[AMD Public Use] Hi Oliver, I get rid of the warnings by explicitly type-casting it to struct*, and still get similar results. ####################################################### struct P { float f1; float f2; float f3[3]; float f4; }; void foo(struct P* p1, struct P* p2) { p1->f2 = 1.2; p2->f1 = 3.7; } int callFoo() { struct P p; foo(&p,
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
2015 Jan 15
3
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
On Thu, Jan 15, 2015 at 1:26 PM, Nick Lewycky <nlewycky at google.com> wrote: > On 15 January 2015 at 13:10, Daniel Berlin <dberlin at dberlin.org> wrote: > >> Yes. >> I've attached an updated patch that does the following: >> >> 1. Fixes the partialalias of globals/arguments >> 2. Enables partialalias for cases where nothing has been unified to
2015 Jan 16
3
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
I'm pretty sure I had the ordering of the passes backwards. The previous ordering is correct. Sorry for the confusion. The last alias analysis created is the first one queried. It delegates to the previous alias analysis created. At least, that is my reading of this (very confusing) code. The most frustrating aspect of this is that it means the delegation behavior of CFL shouldn't have
2015 Jan 17
3
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
Hi Danny, // Add TypeBasedAliasAnalysis before BasicAliasAnalysis so that // BasicAliasAnalysis wins if they disagree. This is intended to help // support "obvious" type-punning idioms. - if (UseCFLAA) - addPass(createCFLAliasAnalysisPass()); addPass(createTypeBasedAliasAnalysisPass()); addPass(createScopedNoAliasAAPass()); + if (UseCFLAA) +