Commit Graph

1023 Commits

Author SHA1 Message Date
Yabin Hu 30d7731032 Add "Yabin Hu" to CREDITS.txt
llvm-svn: 211440
2014-06-21 18:35:33 +00:00
Johannes Doerfert 5ec80c2a85 [Refactor] Simplify memory access isWrite
llvm-svn: 211379
2014-06-20 17:06:41 +00:00
Johannes Doerfert ffa73bd44c Reduction like is now a memory access property
- Remove the statement reduction like property
+ Add the reduction like property to memory accesses

llvm-svn: 211372
2014-06-20 16:58:12 +00:00
Johannes Doerfert f1906138b4 Model statement wise reduction dependences
+ Collect reduction dependences
+ Introduced TYPE_RED in Dependences.h which can be used to obtain the
  reduction dependences
+ Used TYPE_RED to prevent parallelization while we do not have a privatizing
  code generation
+ Relax the dependences for non-parallel code generation
+ Add privatization dependences to ensure correctness
+ 12 Test cases to check for reduction and privatization dependences

llvm-svn: 211369
2014-06-20 16:37:11 +00:00
Tobias Grosser 868832b3fd Update for ScopStmt iterator name change in LLVM r210927
Contributed-by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 211280
2014-06-19 16:45:04 +00:00
Johannes Doerfert aeed39774d Fix build
See r210927 and r210847

llvm-svn: 211278
2014-06-19 16:19:32 +00:00
Johannes Doerfert da80386700 Missing reduction detection test cases
llvm-svn: 211235
2014-06-18 23:08:14 +00:00
Johannes Doerfert 0ee1f21478 Subject: [PATCH-v5] Detect and mark reduction like statements
+ Flag to indicate reduction like statements
+ Command line option to (dis)allow multiplicative reduction opcodes
+ Two simple positive test cases, one fp test case w and w/o fast math
+ One "negative" test case (only reduction like but no reduction)

llvm-svn: 211114
2014-06-17 17:31:36 +00:00
Johannes Doerfert f675289d87 [Refactor] C++11 Memory access iterators in SCoP stmts
+ Added const iterator version
+ Changed name to begin/end to allow range loops
+ Changed call sites to range loops
+ Changed typename to (const_)iterator

llvm-svn: 210927
2014-06-13 18:01:45 +00:00
Johannes Doerfert fdd9f2b23d [Refactor] Simplify dependency map dump
llvm-svn: 210926
2014-06-13 18:00:22 +00:00
Rafael Espindola 316952a483 Fix the polly build.
llvm-svn: 210847
2014-06-12 22:37:15 +00:00
Rafael Espindola 8730ee7375 Try to fix the polly build.
llvm-svn: 210811
2014-06-12 19:22:17 +00:00
Andreas Simbuerger 06904d8554 Do not use namespace polly inside a header.
In general this fixes ambiguity that can arise from using
a different namespace that declares the same symbols as
we do.

One example inside llvm would be:
  createIndVarSimplifyPass(..);

Which can be found in:
  llvm/Transforms/Scalar.h
and
  polly/LinkAllPasses.h

llvm-svn: 210755
2014-06-12 07:26:25 +00:00
Andreas Simbuerger 24af0c8220 Fix typo
llvm-svn: 210754
2014-06-12 07:26:02 +00:00
Andreas Simbuerger 83ed861ea2 Check for an empty error log.
Fixes #19976.

The error log does not contain an error, in case we reject a candidate
without generating a diagnostic message by using invalid<>(...). This is
the case for the top-level region of a function.

The patch comes without a test-case because adding a useful one requires
additional code just for triggering it. Before the patch it would only trigger,
if we try to print the CFG with Scop error annotations.

llvm-svn: 210753
2014-06-12 07:25:08 +00:00
Andreas Simbuerger fbd643c9e1 Move getDebugLocation to ScopDetectionDiagnostic
llvm-svn: 210752
2014-06-12 07:23:04 +00:00
Tobias Grosser 8d614d0335 www: Fix grammar.
Reported-by: Jules Gagnon-Marchand <jules_gagnonm@hotmail.com>
llvm-svn: 210576
2014-06-10 20:18:16 +00:00
Tobias Grosser f4fcbf4097 Test delinearization of 2D diagonal matrix
llvm-svn: 210538
2014-06-10 14:48:17 +00:00
Tobias Grosser be7eaddc69 Adjust another test case to not access out of bounds
llvm-svn: 210208
2014-06-04 19:41:47 +00:00
Tobias Grosser 5416a0395f Adjust multidim test cases to not access out-of-bound memory
We do this currently only for test cases where we have integer offsets that
clearly access array dimensions out-of-bound.

-;   for (long i = 0; i < n; i++)
-;     for (long j = 0; j < m; j++)
-;       for (long k = 0; k < o; k++)
+;   for (long i = 0; i < n - 3; i++)
+;     for (long j = 4; j < m; j++)
+;       for (long k = 0; k < o - 7; k++)
 ;         A[i+3][j-4][k+7] = 1.0;

This will be helpful if we later want to simplify the access functions under the
assumption that they do not access memory out of bounds.

llvm-svn: 210179
2014-06-04 11:47:54 +00:00
Tobias Grosser d285161675 www: Polly can be built without any GPLed software
Thanks to Sebastian Pop and David Peixotto.

llvm-svn: 210176
2014-06-04 09:26:39 +00:00
Tobias Grosser 91f5b26268 Use range-based for loops
llvm-svn: 210170
2014-06-04 08:06:40 +00:00
Tobias Grosser d79029ab62 Fix formatting
llvm-svn: 210124
2014-06-03 20:20:41 +00:00
Sebastian Pop 422e33f363 record delinearization result and reuse it in polyhedral translation
Without this patch, the testcase would fail on the delinearization of the second
array:

; void foo(long n, long m, long o, double A[n][m][o]) {
;   for (long i = 0; i < n; i++)
;     for (long j = 0; j < m; j++)
;       for (long k = 0; k < o; k++) {
;         A[i+3][j-4][k+7] = 1.0;
;         A[i][0][k] = 2.0;
;       }
; }

; CHECK: [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[3 + i0, -4 + i1, 7 + i2] };
; CHECK: [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[i0, 0, i2] };

Here is the output of FileCheck on the testcase without this patch:

; CHECK: [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[i0, 0, i2] };
         ^
<stdin>:26:2: note: possible intended match here
 [n, m, o] -> { Stmt_for_body6[i0, i1, i2] -> MemRef_A[o0] };
 ^

It is possible to find a good delinearization for A[i][0][k] only in the context
of the delinearization of both array accesses.

There are two ways to delinearize together all array subscripts touching the
same base address: either duplicate the code from scop detection to first gather
all array references and then run the delinearization; or as implemented in this
patch, use the same delinearization info that we computed during scop detection.

llvm-svn: 210117
2014-06-03 18:16:31 +00:00
Daniel Jasper 66f6f804e5 Remove superfluous semicolon confusing clang-format.
llvm-svn: 210016
2014-06-02 11:29:58 +00:00
Johannes Doerfert c3958b214c Added option for n-dimensional rectangular tiling
+ CL-option --polly-tile-sizes=<int,...,int>
  The i'th value is used as a tile size for dimension i, if
  there is no i'th value, the value of --polly-default-tile-size is
  used

+ CL-option --polly-default-tile-size=int
  Used if no tile size is given for a dimension i

+ 3 Simple testcases

llvm-svn: 209753
2014-05-28 17:21:02 +00:00
Johannes Doerfert 34558184a0 Reorder cmake include folders (polly source first)
llvm-svn: 209750
2014-05-28 16:54:42 +00:00
Tobias Grosser 704e4dee0f Fix formatting
llvm-svn: 209710
2014-05-28 04:34:58 +00:00
Sebastian Pop e0d9f5a41a delinearize does not return a remainder
llvm-svn: 209696
2014-05-27 22:42:11 +00:00
Sebastian Pop bc9009a20a pass element size to delinearization
Instead of relying on the delinearization to infer the size of an element,
compute the element size from the base address type. This is a much more precise
way of computing the element size than before, as we would have mixed together
the size of an element with the strides of the innermost dimension.

llvm-svn: 209695
2014-05-27 22:42:09 +00:00
Andreas Simbuerger 7cd0df41bf ScopDetectionDiagnostic: Update Makefile
llvm-svn: 209584
2014-05-24 18:51:14 +00:00
Andreas Simbuerger f6ee78cfb7 Expose diagnostic info to users
llvm-svn: 209575
2014-05-24 09:25:14 +00:00
Andreas Simbuerger 0447240ee9 ScopDetection: Support keep-going
Support a 'keep-going' mode for the ScopDetection. In this mode, we just keep
on detecting, even if we encounter an error.

This is useful for diagnosing SCoP candidates. Sometimes you want all the
errors. Invalid SCoPs will still be refused in the end, we just refuse to
abort on the first error.

llvm-svn: 209574
2014-05-24 09:25:10 +00:00
Andreas Simbuerger 8a00c9bb0f Substitue LastError & InvalidRegions with RejectLogs
Use the new ScopDetectionDiagnostics to implement
the same functionality.

llvm-svn: 209573
2014-05-24 09:25:06 +00:00
Andreas Simbuerger 4870e091ec Store all RejectReasons that occurred in a log.
This stores all RejectReasons created for one region
in a RejectLog inside the DetectionContext. For now
this only keeps track of the last error.

A separate patch will enable the tracking of all errors.
This patch itself does no harm (yet).

llvm-svn: 209572
2014-05-24 09:25:01 +00:00
Andreas Simbuerger 320af405d6 Split implementation from ScopDetectionDiagnostic.h
We don't want the Statistic variables in every module that
includes the diagnostics.

llvm-svn: 209571
2014-05-24 09:24:53 +00:00
Saleem Abdulrasool e653622b98 polly: update for LLVM API change
SVN r209103 removed the OwningPtr variant of the MemoryBuffer APIs.  Switch to
the equivalent std::unique_ptr versions.  This should clear up the build bots.

llvm-svn: 209104
2014-05-19 03:55:49 +00:00
Tobias Grosser 5f860fdfe9 Do not run GPGPU test cases without nvptx target
Tag the GPGPU codegen test cases as unsupported if the nvptx target is not
included in the current llvm build.

Contributed-by:  Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 208779
2014-05-14 14:18:14 +00:00
Sebastian Pop b57c0990bc fix clang format
llvm-svn: 208626
2014-05-12 20:24:26 +00:00
Sebastian Pop c5c1055e3f do not build llc and lli for polly test
llvm-svn: 208619
2014-05-12 19:43:20 +00:00
Sebastian Pop e8863b8f00 correct the delinearization failing case
collect terms from affine and non affine memory accesses

llvm-svn: 208616
2014-05-12 19:02:02 +00:00
Sebastian Pop 46e1ecdecc delinearize together all accesses to the same array
llvm-svn: 208457
2014-05-09 22:45:15 +00:00
Tobias Grosser a0e051e004 Adapt to DomTree changes in r199104
This fixes the compilation of our GPGPU code generation experiment in Polly.

Contributed-by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 208287
2014-05-08 08:34:23 +00:00
Sebastian Pop fcf68758b8 unxfail passing testcase
llvm-svn: 208233
2014-05-07 18:01:32 +00:00
Tobias Grosser 5e54810d37 Remove superflous semicolon
llvm-svn: 208208
2014-05-07 13:49:14 +00:00
Tobias Grosser 5196245888 Remove unnecessary struct in return type
llvm-svn: 208191
2014-05-07 11:23:35 +00:00
Tobias Grosser a3ab27e9fa Catch all functions containing a certain string
llvm-svn: 208190
2014-05-07 11:23:32 +00:00
Tobias Grosser a2125140ae Replace llvm::IRBuilder with PollyIRBuilder
Contributed-by:  Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 208182
2014-05-07 10:06:42 +00:00
Tobias Grosser ba1724da2f Remove unnecessary explicit typing in std::make_pair
Contributed-by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 208181
2014-05-07 10:06:33 +00:00
Tobias Grosser cfee96a444 Add the missing 'LoopToScev' parameter
Contributed-by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 208180
2014-05-07 10:06:23 +00:00