Commit Graph

1012 Commits

Author SHA1 Message Date
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
Tobias Grosser f56af204b9 Add delinearization testcase for ivs that do not follow the loop order
This is a test case that is currently failing, but that should start working
with an upcoming version of our delinearization pass.

llvm-svn: 207678
2014-04-30 17:49:22 +00:00
Benjamin Kramer ff69b3c260 Add missing include.
llvm-svn: 207618
2014-04-30 07:26:28 +00:00
Tobias Grosser 36e997ff80 www: Reference phone call notes
llvm-svn: 207006
2014-04-23 18:09:24 +00:00
Tobias Grosser 34c8787200 Fix formatting
llvm-svn: 206903
2014-04-22 16:39:41 +00:00
Tobias Grosser 841009a2cc We missed two files in the last commit.
Contributed-by:  Johannes Doerfert <doerfert@cs.uni-saarland.de>
llvm-svn: 206901
2014-04-22 15:57:30 +00:00
Tobias Grosser 0d11dbabc4 Fixed missing cloog test with automake/configure build setup
Contributed-by:  Johannes Doerfert <doerfert@cs.uni-saarland.de>
llvm-svn: 206900
2014-04-22 15:30:43 +00:00
Tobias Grosser 9818bc837a IslCodeGeneration: Document the IslExprBuilder
llvm-svn: 206898
2014-04-22 14:26:51 +00:00
Chandler Carruth 95fef9446c [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, Polly edition.

If you want to know more details about this, you can see the recent
commits to Debug.h in LLVM. This is just the Polly segment of a cleanup
I'm doing globally for this macro.

llvm-svn: 206852
2014-04-22 03:30:19 +00:00
Tobias Grosser 954939842f Really fix the load case.
Commit r206510 falsely advertised to fix the load cases, even though it only
fixed the store case. This commit adds the same fix for the load case including
the missing test coverage.

llvm-svn: 206577
2014-04-18 09:46:35 +00:00
Tobias Grosser 50fd7010d8 Ensure a scalar pointer when issuing a vector load
Even tough we may want to generate a vector load, the address from which to load
still is a scalar. Make sure even if previous address computations may have been
vectorized, that the addresses are also available as scalars.

This fixes http://llvm.org/PR19469

Reported-by:  Jeremy Huddleston Sequoia <jeremyhu@apple.com>
llvm-svn: 206510
2014-04-17 23:13:49 +00:00
Tobias Grosser 6e4dea2bb7 Link to notes of our last phone call
llvm-svn: 206488
2014-04-17 19:59:38 +00:00