From 2f2bbe4ced79a0aa924e4c940c04a0ecad3bf471 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Mon, 18 May 2015 15:36:57 +0000 Subject: [PATCH] [LoopAccesses] Rearrange printed lines in -analyze "Store to invariant address..." is moved as the last line. This is not the prime result of the analysis. Plus it simplifies some of the tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237573 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/LoopAccessAnalysis.cpp | 8 ++++---- test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll | 1 - test/Transforms/LoopDistribute/basic.ll | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Analysis/LoopAccessAnalysis.cpp b/lib/Analysis/LoopAccessAnalysis.cpp index 86f7c2e9757..580491ff536 100644 --- a/lib/Analysis/LoopAccessAnalysis.cpp +++ b/lib/Analysis/LoopAccessAnalysis.cpp @@ -1330,10 +1330,6 @@ void LoopAccessInfo::print(raw_ostream &OS, unsigned Depth) const { OS.indent(Depth) << "Memory dependences are safe\n"; } - OS.indent(Depth) << "Store to invariant address was " - << (StoreToLoopInvariantAddress ? "" : "not ") - << "found in loop.\n"; - if (Report) OS.indent(Depth) << "Report: " << Report->str() << "\n"; @@ -1349,6 +1345,10 @@ void LoopAccessInfo::print(raw_ostream &OS, unsigned Depth) const { // List the pair of accesses need run-time checks to prove independence. PtrRtCheck.print(OS, Depth); OS << "\n"; + + OS.indent(Depth) << "Store to invariant address was " + << (StoreToLoopInvariantAddress ? "" : "not ") + << "found in loop.\n"; } const LoopAccessInfo & diff --git a/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll b/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll index 57c6412278b..d0bed68188d 100644 --- a/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll +++ b/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll @@ -37,7 +37,6 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.10.0" ; CHECK: for_j.body: -; CHECK-NEXT: Store to invariant address was not found in loop ; CHECK-NEXT: Report: unsafe dependent memory operations in loop ; CHECK-NEXT: Interesting Dependences: ; CHECK-NEXT: Backward: diff --git a/test/Transforms/LoopDistribute/basic.ll b/test/Transforms/LoopDistribute/basic.ll index 1331e09db90..f19fa8bb1b1 100644 --- a/test/Transforms/LoopDistribute/basic.ll +++ b/test/Transforms/LoopDistribute/basic.ll @@ -44,7 +44,6 @@ entry: ; ANALYSIS: for.body: ; ANALYSIS-NEXT: Memory dependences are safe{{$}} ; ANALYSIS: for.body.ldist1: -; ANALYSIS-NEXT: Store to invariant address was not found in loop ; ANALYSIS-NEXT: Report: unsafe dependent memory operations in loop -- 2.34.1