diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2015-03-04 18:43:29 +0000 |
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2015-03-04 18:43:29 +0000 |
| commit | 46a43556db23edb514f190cc03b0ce7f68d40534 (patch) | |
| tree | 8975390ebdcdf12760bb63b35a7eb883156e87fd /llvm/test/Analysis | |
| parent | 2ae03e178392e0693872e42c947d784b3c02ea60 (diff) | |
| download | bcm5719-llvm-46a43556db23edb514f190cc03b0ce7f68d40534.tar.gz bcm5719-llvm-46a43556db23edb514f190cc03b0ce7f68d40534.zip | |
Make DataLayout Non-Optional in the Module
Summary:
DataLayout keeps the string used for its creation.
As a side effect it is no longer needed in the Module.
This is "almost" NFC, the string is no longer
canonicalized, you can't rely on two "equals" DataLayout
having the same string returned by getStringRepresentation().
Get rid of DataLayoutPass: the DataLayout is in the Module
The DataLayout is "per-module", let's enforce this by not
duplicating it more than necessary.
One more step toward non-optionality of the DataLayout in the
module.
Make DataLayout Non-Optional in the Module
Module->getDataLayout() will never returns nullptr anymore.
Reviewers: echristo
Subscribers: resistor, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D7992
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 231270
Diffstat (limited to 'llvm/test/Analysis')
10 files changed, 19 insertions, 19 deletions
diff --git a/llvm/test/Analysis/Delinearization/a.ll b/llvm/test/Analysis/Delinearization/a.ll index 956c19bc1d4..78bbfcf7de6 100644 --- a/llvm/test/Analysis/Delinearization/a.ll +++ b/llvm/test/Analysis/Delinearization/a.ll @@ -9,7 +9,7 @@ ; AddRec: {{{(28 + (4 * (-4 + (3 * %m)) * %o) + %A),+,(8 * %m * %o)}<%for.i>,+,(12 * %o)}<%for.j>,+,20}<%for.k> ; CHECK: Base offset: %A -; CHECK: ArrayDecl[UnknownSize][%m][%o] with elements of sizeof(i32) bytes. +; CHECK: ArrayDecl[UnknownSize][%m][%o] with elements of 4 bytes. ; CHECK: ArrayRef[{3,+,2}<%for.i>][{-4,+,3}<%for.j>][{7,+,5}<%for.k>] define void @foo(i64 %n, i64 %m, i64 %o, i32* nocapture %A) #0 { diff --git a/llvm/test/Analysis/Delinearization/himeno_1.ll b/llvm/test/Analysis/Delinearization/himeno_1.ll index bba7b4cb0a1..5c86f57f779 100644 --- a/llvm/test/Analysis/Delinearization/himeno_1.ll +++ b/llvm/test/Analysis/Delinearization/himeno_1.ll @@ -28,7 +28,7 @@ ; AddRec: {{{(4 + (4 * (sext i32 %a.deps to i64) * (1 + (sext i32 %a.cols to i64))) + %a.base),+,(4 * (sext i32 %a.deps to i64) * (sext i32 %a.cols to i64))}<%for.i>,+,(4 * (sext i32 %a.deps to i64))}<%for.j>,+,4}<%for.k> ; CHECK: Base offset: %a.base -; CHECK: ArrayDecl[UnknownSize][(sext i32 %a.cols to i64)][(sext i32 %a.deps to i64)] with elements of sizeof(float) bytes. +; CHECK: ArrayDecl[UnknownSize][(sext i32 %a.cols to i64)][(sext i32 %a.deps to i64)] with elements of 4 bytes. ; CHECK: ArrayRef[{1,+,1}<nuw><nsw><%for.i>][{1,+,1}<nuw><nsw><%for.j>][{1,+,1}<nuw><nsw><%for.k>] %struct.Mat = type { float*, i32, i32, i32, i32 } diff --git a/llvm/test/Analysis/Delinearization/himeno_2.ll b/llvm/test/Analysis/Delinearization/himeno_2.ll index 2cf8ebc2839..e1e75609502 100644 --- a/llvm/test/Analysis/Delinearization/himeno_2.ll +++ b/llvm/test/Analysis/Delinearization/himeno_2.ll @@ -28,7 +28,7 @@ ; AddRec: {{{(4 + (4 * (sext i32 %a.deps to i64) * (1 + (sext i32 %a.cols to i64))) + %a.base),+,(4 * (sext i32 %a.deps to i64) * (sext i32 %a.cols to i64))}<%for.i>,+,(4 * (sext i32 %a.deps to i64))}<%for.j>,+,4}<%for.k> ; CHECK: Base offset: %a.base -; CHECK: ArrayDecl[UnknownSize][(sext i32 %a.cols to i64)][(sext i32 %a.deps to i64)] with elements of sizeof(float) bytes. +; CHECK: ArrayDecl[UnknownSize][(sext i32 %a.cols to i64)][(sext i32 %a.deps to i64)] with elements of 4 bytes. ; CHECK: ArrayRef[{1,+,1}<nuw><nsw><%for.i>][{1,+,1}<nuw><nsw><%for.j>][{1,+,1}<nuw><nsw><%for.k>] %struct.Mat = type { float*, i32, i32, i32, i32 } diff --git a/llvm/test/Analysis/Delinearization/iv_times_constant_in_subscript.ll b/llvm/test/Analysis/Delinearization/iv_times_constant_in_subscript.ll index 97617b8cd98..0c893bf1137 100644 --- a/llvm/test/Analysis/Delinearization/iv_times_constant_in_subscript.ll +++ b/llvm/test/Analysis/Delinearization/iv_times_constant_in_subscript.ll @@ -8,9 +8,9 @@ ; A[2i+b][2j] = 1.0; ; } -; AddRec: {{((%m * %b * sizeof(double)) + %A),+,(2 * %m * sizeof(double))}<%for.i>,+,(2 * sizeof(double))}<%for.j> +; AddRec: {{((%m * %b * 8) + %A),+,(2 * %m * 8)}<%for.i>,+,(2 * 8)}<%for.j> ; CHECK: Base offset: %A -; CHECK: ArrayDecl[UnknownSize][%m] with elements of sizeof(double) bytes. +; CHECK: ArrayDecl[UnknownSize][%m] with elements of 8 bytes. ; CHECK: ArrayRef[{%b,+,2}<%for.i>][{0,+,2}<%for.j>] diff --git a/llvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_3d.ll b/llvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_3d.ll index 88f139f0024..317e62c8ef9 100644 --- a/llvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_3d.ll +++ b/llvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_3d.ll @@ -10,7 +10,7 @@ ; AddRec: {{{(56 + (8 * (-4 + (3 * %m)) * %o) + %A),+,(8 * %m * %o)}<%for.i>,+,(8 * %o)}<%for.j>,+,8}<%for.k> ; CHECK: Base offset: %A -; CHECK: ArrayDecl[UnknownSize][%m][%o] with elements of sizeof(double) bytes. +; CHECK: ArrayDecl[UnknownSize][%m][%o] with elements of 8 bytes. ; CHECK: ArrayRef[{3,+,1}<nw><%for.i>][{-4,+,1}<nw><%for.j>][{7,+,1}<nw><%for.k>] define void @foo(i64 %n, i64 %m, i64 %o, double* %A) { diff --git a/llvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_nts_3d.ll b/llvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_nts_3d.ll index 364e5ee964d..ada7758b21b 100644 --- a/llvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_nts_3d.ll +++ b/llvm/test/Analysis/Delinearization/multidim_ivs_and_integer_offsets_nts_3d.ll @@ -10,7 +10,7 @@ ; AddRec: {{{(56 + (8 * (-4 + (3 * %m)) * (%o + %p)) + %A),+,(8 * (%o + %p) * %m)}<%for.cond4.preheader.lr.ph.us>,+,(8 * (%o + %p))}<%for.body6.lr.ph.us.us>,+,8}<%for.body6.us.us> ; CHECK: Base offset: %A -; CHECK: ArrayDecl[UnknownSize][%m][(%o + %p)] with elements of sizeof(double) bytes. +; CHECK: ArrayDecl[UnknownSize][%m][(%o + %p)] with elements of 8 bytes. ; CHECK: ArrayRef[{3,+,1}<nw><%for.cond4.preheader.lr.ph.us>][{-4,+,1}<nw><%for.body6.lr.ph.us.us>][{7,+,1}<nw><%for.body6.us.us>] define void @foo(i64 %n, i64 %m, i64 %o, i64 %p, double* nocapture %A) nounwind uwtable { diff --git a/llvm/test/Analysis/Delinearization/multidim_ivs_and_parameteric_offsets_3d.ll b/llvm/test/Analysis/Delinearization/multidim_ivs_and_parameteric_offsets_3d.ll index 4cbac339023..9e37b76e59b 100644 --- a/llvm/test/Analysis/Delinearization/multidim_ivs_and_parameteric_offsets_3d.ll +++ b/llvm/test/Analysis/Delinearization/multidim_ivs_and_parameteric_offsets_3d.ll @@ -10,7 +10,7 @@ ; AddRec: {{{((8 * ((((%m * %p) + %q) * %o) + %r)) + %A),+,(8 * %m * %o)}<%for.i>,+,(8 * %o)}<%for.j>,+,8}<%for.k> ; CHECK: Base offset: %A -; CHECK: ArrayDecl[UnknownSize][%m][%o] with elements of sizeof(double) bytes. +; CHECK: ArrayDecl[UnknownSize][%m][%o] with elements of 8 bytes. ; CHECK: ArrayRef[{%p,+,1}<nw><%for.i>][{%q,+,1}<nw><%for.j>][{%r,+,1}<nw><%for.k>] define void @foo(i64 %n, i64 %m, i64 %o, double* %A, i64 %p, i64 %q, i64 %r) { diff --git a/llvm/test/Analysis/Delinearization/multidim_only_ivs_2d.ll b/llvm/test/Analysis/Delinearization/multidim_only_ivs_2d.ll index 9df71093279..66e2348a927 100644 --- a/llvm/test/Analysis/Delinearization/multidim_only_ivs_2d.ll +++ b/llvm/test/Analysis/Delinearization/multidim_only_ivs_2d.ll @@ -10,16 +10,16 @@ ; Inst: %val = load double, double* %arrayidx ; In Loop with Header: for.j -; AddRec: {{0,+,(%m * sizeof(double))}<%for.i>,+,sizeof(double)}<%for.j> +; AddRec: {{0,+,(%m * 8)}<%for.i>,+,8}<%for.j> ; Base offset: %A -; ArrayDecl[UnknownSize][%m] with elements of sizeof(double) bytes. +; ArrayDecl[UnknownSize][%m] with elements of 8 bytes. ; ArrayRef[{0,+,1}<nuw><nsw><%for.i>][{0,+,1}<nuw><nsw><%for.j>] ; Inst: store double %val, double* %arrayidx ; In Loop with Header: for.j ; AddRec: {{%A,+,(8 * %m)}<%for.i>,+,8}<%for.j> ; CHECK: Base offset: %A -; CHECK: ArrayDecl[UnknownSize][%m] with elements of sizeof(double) bytes. +; CHECK: ArrayDecl[UnknownSize][%m] with elements of 8 bytes. ; CHECK: ArrayRef[{0,+,1}<nuw><nsw><%for.i>][{0,+,1}<nuw><nsw><%for.j>] define void @foo(i64 %n, i64 %m, double* %A) { diff --git a/llvm/test/Analysis/Delinearization/multidim_only_ivs_3d.ll b/llvm/test/Analysis/Delinearization/multidim_only_ivs_3d.ll index 6120293bef0..8cb7ad56749 100644 --- a/llvm/test/Analysis/Delinearization/multidim_only_ivs_3d.ll +++ b/llvm/test/Analysis/Delinearization/multidim_only_ivs_3d.ll @@ -10,7 +10,7 @@ ; AddRec: {{{%A,+,(8 * %m * %o)}<%for.i>,+,(8 * %o)}<%for.j>,+,8}<%for.k> ; CHECK: Base offset: %A -; CHECK: ArrayDecl[UnknownSize][%m][%o] with elements of sizeof(double) bytes. +; CHECK: ArrayDecl[UnknownSize][%m][%o] with elements of 8 bytes. ; CHECK: ArrayRef[{0,+,1}<nuw><nsw><%for.i>][{0,+,1}<nuw><nsw><%for.j>][{0,+,1}<nuw><nsw><%for.k>] define void @foo(i64 %n, i64 %m, i64 %o, double* %A) { diff --git a/llvm/test/Analysis/ScalarEvolution/max-trip-count.ll b/llvm/test/Analysis/ScalarEvolution/max-trip-count.ll index abebea7d74c..dde44ba8257 100644 --- a/llvm/test/Analysis/ScalarEvolution/max-trip-count.ll +++ b/llvm/test/Analysis/ScalarEvolution/max-trip-count.ll @@ -2,7 +2,7 @@ ; ScalarEvolution should be able to understand the loop and eliminate the casts. -; CHECK: {%d,+,sizeof(i32)} +; CHECK: {%d,+,4} define void @foo(i32* nocapture %d, i32 %n) nounwind { entry: @@ -39,7 +39,7 @@ return: ; preds = %bb1.return_crit_edge, %entry ; count, it should say so. ; PR7845 -; CHECK: Loop %for.cond: <multiple exits> Unpredictable backedge-taken count. +; CHECK: Loop %for.cond: <multiple exits> Unpredictable backedge-taken count. ; CHECK: Loop %for.cond: max backedge-taken count is 5 @.str = private constant [4 x i8] c"%d\0A\00" ; <[4 x i8]*> [#uses=2] @@ -101,7 +101,7 @@ for.end: ; preds = %for.cond.for.end_cr ; PR19799: Indvars miscompile due to an incorrect max backedge taken count from SCEV. ; CHECK-LABEL: @pr19799 -; CHECK: Loop %for.body.i: <multiple exits> Unpredictable backedge-taken count. +; CHECK: Loop %for.body.i: <multiple exits> Unpredictable backedge-taken count. ; CHECK: Loop %for.body.i: max backedge-taken count is 1 @a = common global i32 0, align 4 @@ -127,7 +127,7 @@ bar.exit: ; preds = %for.cond.i, %for.bo ; PR18886: Indvars miscompile due to an incorrect max backedge taken count from SCEV. ; CHECK-LABEL: @pr18886 -; CHECK: Loop %for.body: <multiple exits> Unpredictable backedge-taken count. +; CHECK: Loop %for.body: <multiple exits> Unpredictable backedge-taken count. ; CHECK: Loop %for.body: max backedge-taken count is 3 @aa = global i64 0, align 8 @@ -157,8 +157,8 @@ return: ; before the check is forever skipped. ; ; CHECK-LABEL: @cannot_compute_mustexit -; CHECK: Loop %for.body.i: <multiple exits> Unpredictable backedge-taken count. -; CHECK: Loop %for.body.i: Unpredictable max backedge-taken count. +; CHECK: Loop %for.body.i: <multiple exits> Unpredictable backedge-taken count. +; CHECK: Loop %for.body.i: Unpredictable max backedge-taken count. @b = common global i32 0, align 4 define i32 @cannot_compute_mustexit() { @@ -186,7 +186,7 @@ bar.exit: ; preds = %for.cond.i, %for.bo ; MaxBECount should be the minimum of them. ; ; CHECK-LABEL: @two_mustexit -; CHECK: Loop %for.body.i: <multiple exits> Unpredictable backedge-taken count. +; CHECK: Loop %for.body.i: <multiple exits> Unpredictable backedge-taken count. ; CHECK: Loop %for.body.i: max backedge-taken count is 1 define i32 @two_mustexit() { entry: |

