mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[BasicAA] Enable -basic-aa-recphi by default
This option was added a while back, to help improve AA around pointer phi loops. It looks for phi(gep(phi, const), x) loops, checking if x can then prove more precise aliasing info. Differential Revision: https://reviews.llvm.org/D82998
This commit is contained in:
parent
4093dc1658
commit
9fdafb1a2b
@ -66,7 +66,7 @@ using namespace llvm;
|
||||
|
||||
/// Enable analysis of recursive PHI nodes.
|
||||
static cl::opt<bool> EnableRecPhiAnalysis("basic-aa-recphi", cl::Hidden,
|
||||
cl::init(false));
|
||||
cl::init(true));
|
||||
|
||||
/// By default, even on 32-bit architectures we use 64-bit integers for
|
||||
/// calculations. This will allow us to more-aggressively decompose indexing
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -basic-aa -basic-aa-recphi=1 -gvn -S | FileCheck %s
|
||||
; RUN: opt < %s -basic-aa -gvn -S | FileCheck %s
|
||||
;
|
||||
; Check that section->word_ofs doesn't get reloaded in every iteration of the
|
||||
; for loop.
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -basic-aa -aa-eval -print-all-alias-modref-info -basic-aa-recphi -disable-output 2>&1 | FileCheck %s
|
||||
; RUN: opt < %s -basic-aa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
|
||||
|
||||
; CHECK-LABEL: Function: simple: 5 pointers, 0 call sites
|
||||
; CHECK: NoAlias: float* %src1, float* %src2
|
||||
|
@ -83,21 +83,22 @@ declare void @use.i1(i1)
|
||||
define void @reuse_cast_2(i32 %x, i32* %ptr.1.start) {
|
||||
; CHECK-LABEL: @reuse_cast_2(
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: [[PTR_1_START1:%.*]] = bitcast i32* [[PTR_1_START:%.*]] to i8*
|
||||
; CHECK-NEXT: [[STACK:%.*]] = alloca [2 x i32], align 4
|
||||
; CHECK-NEXT: [[CAST_TO_REUSE:%.*]] = bitcast [2 x i32]* [[STACK]] to i8*
|
||||
; CHECK-NEXT: [[C_0:%.*]] = icmp sgt i32 [[X:%.*]], 0
|
||||
; CHECK-NEXT: [[TMP0:%.*]] = bitcast [2 x i32]* [[STACK]] to i8*
|
||||
; CHECK-NEXT: [[PTR_2_START:%.*]] = getelementptr inbounds [2 x i32], [2 x i32]* [[STACK]], i64 0, i64 0
|
||||
; CHECK-NEXT: call void @use.i8(i8* [[CAST_TO_REUSE]])
|
||||
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[CAST_TO_REUSE]], i8* align 4 [[PTR_1_START1]], i64 8, i1 false)
|
||||
; CHECK-NEXT: br label [[LOOP:%.*]]
|
||||
; CHECK: loop:
|
||||
; CHECK-NEXT: [[IV:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[LOOP]] ]
|
||||
; CHECK-NEXT: [[PTR_1:%.*]] = phi i32* [ [[PTR_1_START:%.*]], [[ENTRY]] ], [ [[PTR_1_NEXT:%.*]], [[LOOP]] ]
|
||||
; CHECK-NEXT: [[PTR_1:%.*]] = phi i32* [ [[PTR_1_START]], [[ENTRY]] ], [ [[PTR_1_NEXT:%.*]], [[LOOP]] ]
|
||||
; CHECK-NEXT: [[PTR_2:%.*]] = phi i32* [ [[PTR_2_START]], [[ENTRY]] ], [ [[PTR_2_NEXT:%.*]], [[LOOP]] ]
|
||||
; CHECK-NEXT: [[PTR_1_NEXT]] = getelementptr inbounds i32, i32* [[PTR_1]], i64 1
|
||||
; CHECK-NEXT: [[LV:%.*]] = load i32, i32* [[PTR_1]], align 4
|
||||
; CHECK-NEXT: [[PTR_2_NEXT]] = getelementptr inbounds i32, i32* [[PTR_2]], i64 1
|
||||
; CHECK-NEXT: store i32 [[LV]], i32* [[PTR_2]], align 4
|
||||
; CHECK-NEXT: [[IV_NEXT]] = add nuw nsw i32 [[IV]], 1
|
||||
; CHECK-NEXT: [[C_1:%.*]] = icmp eq i32 [[IV]], 0
|
||||
; CHECK-NEXT: br i1 [[C_1]], label [[LOOP]], label [[EXIT:%.*]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user