Commit Graph

566 Commits

Author SHA1 Message Date
Sebastian Pop facd36e5c7 make IslAstInfo::printScop compatible with CloogInfo::printScop
llvm-svn: 168714
2012-11-27 18:50:41 +00:00
Sebastian Pop f2379e0848 do not require cloog from configure
llvm-svn: 168628
2012-11-26 23:03:41 +00:00
Sebastian Pop 7cf3104b7c fix typo
Caught while compiling polly without cloog:

../tools/polly/lib/RegisterPasses.cpp:77: error: use of enum 'CodegenChoice' without previous declaration

llvm-svn: 168624
2012-11-26 22:16:19 +00:00
Sebastian Pop 98b3544705 remove dependence on CLOOG_FOUND for PollyVectorizerChoice
When polly was configured with cmake without cloog, compilation stopped with:

../tools/polly/lib/CodeGen/BlockGenerators.cpp:662: error: 'PollyVectorizerChoice' was not declared in this scope
../tools/polly/lib/CodeGen/BlockGenerators.cpp:662: error: 'VECTORIZER_FIRST_NEED_GROUPED_UNROLL' was not declared in this scope

llvm-svn: 168623
2012-11-26 22:16:17 +00:00
Sebastian Pop 05c1f00cae remove dead code
llvm-svn: 168621
2012-11-26 22:07:30 +00:00
Sebastian Pop b35ae612ea remove unused flag
llvm-svn: 168620
2012-11-26 22:07:27 +00:00
Tobias Grosser c1b6cec0e7 Make polly -Wdocumentation clean
llvm-svn: 168311
2012-11-19 12:26:25 +00:00
Sebastian Pop bea5a36b01 utils: use rmdir instead of rm to remove empty dirs
as suggested by Sven Verdoolaege <skimo-polly@kotnet.org>

llvm-svn: 168279
2012-11-18 04:34:31 +00:00
Sebastian Pop 328bd58b55 utils: remove the isl directory after cloning cloog
This fixes my previous commit, thanks to "Dmitry N. Mikushin"
<maemarcus@gmail.com>

llvm-svn: 168252
2012-11-17 04:57:41 +00:00
Sebastian Pop 0dace3939d utils: remove existing cloog and isl dirs before git cloning
Patch adapted from "Dmitry N. Mikushin" <maemarcus@gmail.com>.

llvm-svn: 168250
2012-11-17 03:43:48 +00:00
Sebastian Pop 654b7754bc autoconf: isl depends on gmp include files
When libgmp header files are not installed in the default /usr/include location,
configure used to fail to find the gmp headers when testing for isl/ast.h.  This
patch adds the gmp include path to the compiler flags before testing for ISL.

llvm-svn: 168090
2012-11-15 21:20:22 +00:00
Tobias Grosser 3344f733fd test: LLVM supports now vectors of arbitrary pointers
This allows Polly to vectorize more code. Fix the relevant test cases.

llvm-svn: 167923
2012-11-14 08:25:52 +00:00
Tobias Grosser 38ea9cd721 Tests: Pipe test files into 'opt'
Use 'opt < %s' instead of just 'opt %s' to ensure that no temporary files are
created.

llvm-svn: 167372
2012-11-04 16:56:20 +00:00
Tobias Grosser dcebf1e9da Tests: remove ModuleID lines
llvm-svn: 167284
2012-11-02 06:09:20 +00:00
Tobias Grosser 41b20a62c9 Tests: move content of .c files in .ll
llvm-svn: 167283
2012-11-02 06:08:39 +00:00
Tobias Grosser 3eb851f370 Remove runtime tests from polly test suite
Similar to LLVM we now follow the policy of only having LLVM-IR level tests in
the Polly test suite. Testing for miscompilation of larger programs should be
done with the llvm test suite.

llvm-svn: 167255
2012-11-01 21:44:59 +00:00
Tobias Grosser 81a1c75035 Dependences: Add support to calculate memory based dependences
Instead of calculating exact value (flow) dependences, it is also possible to
calculate memory based dependences. Sometimes memory based dependences are a lot
easier to calculate. To evaluate the benefits, we add an option to calculate
memory based dependences (use -polly-value-dependences=false).

llvm-svn: 167251
2012-11-01 21:28:32 +00:00
Tobias Grosser 531891e980 ScopDetection: Print line numbers of detected scops
If the flags '-polly-report -g' are given, we print file name and line numbers
for the beginning and end of all detected scops.

  linear-algebra/kernels/gemm/gemm.c:23: Scop start
  linear-algebra/kernels/gemm/gemm.c:42: Scop end
  linear-algebra/kernels/gemm/gemm.c:77: Scop start
  linear-algebra/kernels/gemm/gemm.c:82: Scop end

llvm-svn: 167235
2012-11-01 16:45:20 +00:00
Tobias Grosser 5d01691d76 Revert multiple adress space changes in Polly
llvm-svn: 167234
2012-11-01 16:45:18 +00:00
Tobias Grosser ebe8c8cea2 Codegen: Selectively copy in array addresses for OpenMP code
The detection of values that need to be copied in to the generated OpenMP
subfunction also detects the array base addresses needed in the SCoP. Hence, it
is not necessary to unconditionally copy all the base addresses to the generated
function.

Test cases are modified to reflect this change. Arrays which are global
variables do not occur in the struct passed to the subfunction anymore. A test
case for base address copy-in is added in copy_in_array.{c,ll}.

Committed with slight modifications

Contributed by:  Armin Groesslinger <armin.groesslinger@uni-passau.de>

llvm-svn: 167215
2012-11-01 05:34:55 +00:00
Tobias Grosser 177982c478 CodeGen: Add scop-parameters to the OpenMP context
In addition to the arrays and clast variables a SCoP statement may also refer to
values defined before the SCoP or to function arguments. Detect these values and
add them to the set of values passed to the function generated for OpenMP
parallel execution of a clast.

Committed with additional test cases and some refactoring.

Contributed by:  Armin Groesslinger  <armin.groesslinger@uni-passau.de>

llvm-svn: 167214
2012-11-01 05:34:48 +00:00
Tobias Grosser a17f666f99 Codegen: Copy and restore the ValueMap and ClastVars explicitly
When generating OpenMP or GPGPU code the original ValueMap and ClastVars must be
kept. We already recovered the original ClastVars by reverting the changes, but
we did not keep the content of the ValueMap. This patch keeps now an explicit
copy of both maps and restores them after generating OpenMP or GPGPU code.

This is an adapted version of a patch contributed by:
Armin Groesslinger  <armin.groesslinger@uni-passau.de>

llvm-svn: 167213
2012-11-01 05:34:35 +00:00
Chandler Carruth f6562ed2d3 Another speculative commit to try to fix Polly's build. This is more delta than
I like to make w/o being able to build, but I don't have the dependencies to
build and test polly. I'll revert if the build bots don't like it.

llvm-svn: 166670
2012-10-25 08:43:18 +00:00
Chandler Carruth acdc5e812d Another fix for a build-bot reported API mismatch.
llvm-svn: 166668
2012-10-25 07:42:03 +00:00
Chandler Carruth 2435330ead Try to revive the Polly builders after this LLVM API change.
llvm-svn: 166666
2012-10-25 07:25:56 +00:00
Tobias Grosser 0c55514a43 autoconf/cmake: Always require isl code generation.
This change ensures that isl is only detected if it includes code generation
support. This allows us to remove a lot of conditional compilation and also
avoids missing test cases in case the feature is not available.

llvm-svn: 166403
2012-10-21 21:48:21 +00:00
Tobias Grosser 6c8e696618 cmake: Use suffix for shared modules instead of the one for shared libraries
On Linux there is no difference between shared modules and shared libaries, both
are '.so' files. However, on darwin only shared modules are '.so' files. Shared
libraries have the '.dynlib' suffix.

Fix test cases on darwin by expecting a shared module suffix for Polly instead
of a shared library suffix.

This fixes PR14135

Reported by:  Jack Howarth  <howarth@bromo.med.uc.edu>

llvm-svn: 166402
2012-10-21 21:08:29 +00:00
Tobias Grosser 56ac181189 RegisterPasses: Remove unreachable default case in switch
llvm-svn: 166397
2012-10-21 18:31:27 +00:00
Tobias Grosser ce32148bf4 www: Correct command line that loads polly into dragonegg
Reported by:  Jack Howarth  <howarth@bromo.med.uc.edu>

llvm-svn: 166396
2012-10-21 17:33:00 +00:00
Tobias Grosser bc822eb25f Introduce a separate file for CMake macros
Contributed by:  Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>

llvm-svn: 166394
2012-10-21 15:51:49 +00:00
Tobias Grosser 28781423b2 isl scheduler: Do not fail when returning an empty band list
The bug was within isl. To fix it, we simply update the isl version that
is used by Polly. We still have some changes within Polly to be able to
write a proper test case.

Reported-by: Sameer Sahasrabuddhe <Sameer.Sahasrabuddhe@amd.com>
llvm-svn: 166021
2012-10-16 07:29:19 +00:00
Tobias Grosser c967d8e6e9 isl-codegen: Support '<' and '>'
Previously isl always generated '<=' or '>='. However, in many cases '<' or '>'
leads to simpler code. This commit updates isl and adds the relevant code
generation support to Polly.

llvm-svn: 166020
2012-10-16 07:29:13 +00:00
Tobias Grosser ff639688e3 www: Clarify that GMP is LGPL licensed
llvm-svn: 165789
2012-10-12 07:44:38 +00:00
Sameer Sahasrabuddhe 1646a6ec44 Trivial change to the README, mainly to test commit access.
llvm-svn: 165481
2012-10-09 04:59:42 +00:00
Micah Villmow 7a3d8209c3 Move TargetData to DataLayout to fix build breakage caused by LLVM r16540
llvm-svn: 165408
2012-10-08 17:26:19 +00:00
Tobias Grosser 660b58ddab Rename TargetData -> DataLayout
Contributed by: Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>

llvm-svn: 165387
2012-10-08 08:56:52 +00:00
Tobias Grosser 6a2617b874 ScopLib: Support negated access functions.
Scoplib only supports access functions, but not the more generic
access relations. This commit now also supports access functions
that where not directly expresses as A[sub] with sub = i + 5b,
but with A[sub] with -sub = -i + (-5b).

Test case to come.

Contributed by: Dustin Feld <d3.feld@gmail.com>

llvm-svn: 165379
2012-10-07 17:43:23 +00:00
Tobias Grosser f6e6980280 Update the 'News' section on the Polly page
llvm-svn: 165378
2012-10-07 17:43:18 +00:00
Tobias Grosser 8a5bc6edca Add a new isl based code generation
This pass implements a new code generator that uses the code generation
algorithm included in isl.

For the moment the new code generation is limited to sequential code.

llvm-svn: 165037
2012-10-02 19:50:43 +00:00
Tobias Grosser 0934e70e6e Add an ast pretty printer pass based on the isl code generator
llvm-svn: 165036
2012-10-02 19:50:38 +00:00
Tobias Grosser 50fce4f8de Update isl to get the new code generation
llvm-svn: 165035
2012-10-02 19:50:30 +00:00
Tobias Grosser c845fef391 Detect the isl code generation feature correctly
llvm-svn: 165034
2012-10-02 19:50:22 +00:00
Tobias Grosser 29ebecb11a Bailout if libpluto finds no schedule
Older versions of libpluto crashed, if no schedule was found. Recent
versions return NULL. We detect this and keep the original schedule.

llvm-svn: 164376
2012-09-21 16:24:13 +00:00
Tobias Grosser 6a2da6b9c8 Add test cases for multi-dimensional variable lengths arrays
At the moment we can handle such arrays only by conservatively assuming that
each access to such an array may touch any element in the array. It would be
great if we could improve Polly/LLVM at some point, such that we can
recover the multi-dimensionality of the accesses.

llvm-svn: 163619
2012-09-11 14:03:19 +00:00
Tobias Grosser ed29566c4e ScopInfo: Align parameters when using -polly-allow-nonaffine
This ensures that the isl sets/maps we operate on have the same parameter
dimensions. Operations on objects with different parameter dimensions are not
allow and trigger assertions.

llvm-svn: 163618
2012-09-11 13:50:21 +00:00
Tobias Grosser eeb776a41f SCEVValidator: Add debug output that gives the reason for invalid expressions
llvm-svn: 163472
2012-09-08 14:00:37 +00:00
Tobias Grosser 6eaafb7288 Remove dead code
This code has been replaced by the SCEVValidator a while ago.

llvm-svn: 163471
2012-09-08 14:00:32 +00:00
Tobias Grosser 0b5a1959f4 ScopGraphPrinter: Escape error message
Otherwise a '"' in the error message, yields an invalid .dot file.

llvm-svn: 163466
2012-09-08 08:31:55 +00:00
Tobias Grosser ad41c4ce20 Add dependency to intrinsics_gen
The IndVarSimplify pass in Polly uses the intrinsics header. We need to ensure
that the header is generated, before we use it. This patch fixes the problem
for the cmake build (it did not show up in the autoconf one).

Contributed by:   Sameer Sahasrabuddhe  <sameer.sahasrabuddhe@amd.com>

llvm-svn: 163130
2012-09-04 08:19:12 +00:00
Tobias Grosser 657dad67d6 Update isl to a newer version
This fixes some undefined behavior in isl.

Reported by:  Sameer Sahasrabuddhe  <sameer.sahasrabuddhe@amd.com>

llvm-svn: 163108
2012-09-03 07:42:40 +00:00