[PATCH] D42381: [DA] Correct size parameter from dependency analysis to AA

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 21 05:49:34 PDT 2018


dmgreen updated this revision to Diff 139279.
dmgreen added reviewers: sebpop, hfinkel, dberlin, fhahn, grosser.
dmgreen added a comment.

Rebase and simplify test.

It's possible that the size here should be the size of the thing that AObj points to, as opposed to unknown. I've added a number of reviewers who may know what they are talking about.


https://reviews.llvm.org/D42381

Files:
  lib/Analysis/DependenceAnalysis.cpp
  test/Analysis/DependenceAnalysis/AASize.ll


Index: test/Analysis/DependenceAnalysis/AASize.ll
===================================================================
--- /dev/null
+++ test/Analysis/DependenceAnalysis/AASize.ll
@@ -0,0 +1,19 @@
+; RUN: opt < %s -analyze -basicaa -da | FileCheck %s
+
+; CHECK-LABEL: test
+; CHECK: da analyze - none!
+; CHECK: da analyze - confused!
+; CHECK: da analyze - none!
+; CHECK: da analyze - none!
+; CHECK: da analyze - confused!
+; CHECK: da analyze - none!
+
+ at a = global i16 5, align 2
+ at b = global i16* @a, align 4
+define void @test2() {
+entry:
+  %0 = load i16*, i16** @b, align 4
+  %1 = load i16, i16* %0, align 2
+  store i16 1, i16* @a, align 2
+  ret void
+}
Index: lib/Analysis/DependenceAnalysis.cpp
===================================================================
--- lib/Analysis/DependenceAnalysis.cpp
+++ lib/Analysis/DependenceAnalysis.cpp
@@ -626,8 +626,7 @@
                                           const Value *B) {
   const Value *AObj = GetUnderlyingObject(A, DL);
   const Value *BObj = GetUnderlyingObject(B, DL);
-  return AA->alias(AObj, DL.getTypeStoreSize(AObj->getType()),
-                   BObj, DL.getTypeStoreSize(BObj->getType()));
+  return AA->alias(AObj, BObj);
 }
 
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42381.139279.patch
Type: text/x-patch
Size: 1210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180321/bc228af2/attachment.bin>


More information about the llvm-commits mailing list