Commit Graph

1326 Commits

Author SHA1 Message Date
Johannes Doerfert f9e3462b69 [FIX] 2 broken tests
llvm-svn: 230231
2015-02-23 16:34:20 +00:00
Johannes Doerfert 4f8ac3d123 Use ScalarEvolution to create tight bounds on the parameters
llvm-svn: 230230
2015-02-23 16:15:51 +00:00
Johannes Doerfert fb79a96d42 [NFC] Unify the use of Context.CurRegion
llvm-svn: 230222
2015-02-23 14:18:28 +00:00
Johannes Doerfert b4f08eb671 [REFACTOR] Replace Pass* from BlockGen by the DomTree
llvm-svn: 230220
2015-02-23 13:51:35 +00:00
Johannes Doerfert ca08c44a46 Remove leftover code
llvm-svn: 230140
2015-02-21 16:18:28 +00:00
Tobias Grosser f567e1aab7 Fix formatting
llvm-svn: 229920
2015-02-19 22:16:12 +00:00
Johannes Doerfert 3f1c285294 [REFACTOR] Simplify the SCoP detection interface a bit
llvm-svn: 229879
2015-02-19 18:11:50 +00:00
Johannes Doerfert 3a7e812c66 [NFC] Generalize getIslCompatibleName interface.
llvm-svn: 229877
2015-02-19 18:09:39 +00:00
Tobias Grosser d4f232f03c Drop left over code from FinalRead statement removal.
We removed FinalRead statements in r152319.

llvm-svn: 229867
2015-02-19 16:24:57 +00:00
Tobias Grosser c56dcd52be Add missing comments to member variables
Reported-by: Johannes Doerfert
llvm-svn: 229854
2015-02-19 14:28:36 +00:00
Tobias Grosser d1e33e7061 ScopDetection: Only detect scops that have at least one read and one write
Scops that only read seem generally uninteresting and scops that only write are
most likely initializations where there is also little to optimize.  To not
waste compile time we bail early.

Differential Revision: http://reviews.llvm.org/D7735

llvm-svn: 229820
2015-02-19 05:31:07 +00:00
Tobias Grosser 8c45037eb4 Add missing files to autoconf build
llvm-svn: 229479
2015-02-17 08:15:14 +00:00
Tobias Grosser af4535451f Update isl to 0ae2b02 "isl_seq_combine: optimize for common case"
This is just a single commit that includes a performance optimization that
should improve dependence analysis time. Our performance bots should measure
this difference.

llvm-svn: 229476
2015-02-17 07:39:25 +00:00
Tobias Grosser 1fa7b972c0 Update to isl 99d53692ba
This commit imports the latest isl version into lib/External/isl. The changes
relavant for Polly are:

  1) Schedule trees [1] have been introduced as a more structured way to
     describe schedules. Polly does not yet use them, but we may switch to them
     in the near future.
  2) Another set of coalescing changes [2] simplifies some data dependences and
     removes a couple of code generation artifacts.

     We now understand that the following sets can be merged:

     { Stmt_S1[i0, i1] -> Stmt_S2[i0 + i1] :
          i0 >= 0 and i1 <= 1023 - i0 and i1 >= 1
       Stmt_S1[i0, 0] -> Stmt_S2[i0] : i0 <= 1023 and i0 >= 1}

     into:

     { Stmt_S1[i0, i1] -> Stmt_S2[i0 + i1] : i1 <= 1023 - i0 and i1 >= 0 and
                                             i1 >= 1 - i0 and i0 >= 0 }

     Changes of this kind reduce unnecessary specialization during code
     generation.

     -  for (int c3 = 0; c3 <= 1023; c3 += 1) {
     -    if (c3 % 2 == 0) {
     -      Stmt_for_body3(c1, c3);
     -    } else
     -      Stmt_for_body3(c1, c3);
     -  }
     +  for (int c3 = 0; c3 <= 1023; c3 += 1)
     +    Stmt_for_body3(c1, c3);

[1] http://impact.gforge.inria.fr/impact2014/papers/impact2014-verdoolaege.pdf
[2] http://impact.gforge.inria.fr/impact2015/papers/impact2015-verdoolaege.pdf

llvm-svn: 229423
2015-02-16 19:33:40 +00:00
Tobias Grosser c3fe35df4c Fix formatting
llvm-svn: 229360
2015-02-16 06:40:23 +00:00
David Blaikie c4d7bc3fcc Update Polly for the removal of LLVM_DELETED_FUNCTION now that '= delete' works on all supported compilers (MSVC2012 compat has been dropped)
llvm-svn: 229344
2015-02-15 23:40:18 +00:00
Tobias Grosser 64a399a8c7 www: update installation instructions to not include gmp/isl
llvm-svn: 229305
2015-02-15 11:19:24 +00:00
Tobias Grosser 3588b74955 Remove isl/cloog build scripts
isl is not distributed as part of Polly.

llvm-svn: 229304
2015-02-15 11:19:20 +00:00
Tobias Grosser 503a6c1570 www: Add code coverage and scan-build results again
Sylvestre Ledru (re)enabled them after the import of isl into polly
significantly simplified the build.

llvm-svn: 229303
2015-02-15 10:41:06 +00:00
Johannes Doerfert 48d75034de Add getSize() to the SCoP class.
llvm-svn: 229254
2015-02-14 12:13:17 +00:00
Johannes Doerfert 6f7921f2be Do not try to optimize empty SCoPs.
llvm-svn: 229253
2015-02-14 12:02:24 +00:00
Johannes Doerfert b6755bbd5f Overaproximate divisions in for the alias checks.
Alias checks might become costly if there are divisions that complicate the
  description of the accessed locations. By overaproximating them we get fairly
  accurate results without the huge compile time cost.

llvm-svn: 229252
2015-02-14 12:00:06 +00:00
Chandler Carruth d01918fa13 [PM] Convert Polly over to directly use the legacy pass manager
namespace and header rather than the top-level header and using
declarations. These helpers impede modular builds and are going away.
Migrating away from them will also be necessary to start mixing in any
usage of the new pass manager.

llvm-svn: 229091
2015-02-13 09:51:50 +00:00
Tobias Grosser cf33c93bd4 Link LLVM libraries into libLLVMPolly if BUILD_SHARED_LIBS=ON is set
Without this change we get linker errors such as:

  undefined reference to `llvm::dbgs()'

We only conditionally link in these libraries, as in BUILD_SHARED_LIBS=OFF mode,
linking in these libraries causes such functions (and especially global options)
to be defined twice. The "solution" I choose is most likely not ideal, but seems
to work. If any cmake specialist can suggest a better approach, this would be
appreciated.

We also drop a .c file that is not needed as it caused linker errors as well.

llvm-svn: 228914
2015-02-12 08:27:19 +00:00
Johannes Doerfert 57ef179695 [FIX] Remove XFAIL again
llvm-svn: 228868
2015-02-11 19:28:39 +00:00
Johannes Doerfert c47edb51c6 [FIX] Correctly handle scalar dependences of branch instructions
llvm-svn: 228866
2015-02-11 19:12:19 +00:00
Johannes Doerfert d594aeb248 [FIX] Fix test case that was affected by the early exit patch
llvm-svn: 228865
2015-02-11 19:11:57 +00:00
Tobias Grosser a906ee754d Drop an assert and XFAIL two test cases
This gets the buildbot green to avoid further emails. Johannes will fix this
later in the evening.

llvm-svn: 228862
2015-02-11 18:46:33 +00:00
Johannes Doerfert 05c25c2679 Update TODO list.
llvm-svn: 228858
2015-02-11 18:18:19 +00:00
Johannes Doerfert 7ceb040213 Add early exits for SCoPs we did not optimize
This allows us to skip ast and code generation if we did not optimize
  a SCoP and will not generate parallel or alias annotations. The
  initial heuristic to exit is simple but allows improvements later on.

  All failing test cases have been modified to disable early exit, thus
  to keep their coverage.

  Differential Revision: http://reviews.llvm.org/D7254

llvm-svn: 228851
2015-02-11 17:25:09 +00:00
Johannes Doerfert 1f87f485b1 Model scalar writes with uses outside the SCoP
These write are important as they will force the scheduling and code
  generation of an otherwise trivial statement and also impose an order of
  execution needed to guarantee the correct final value for a scalar in a loop.

  Added test case modeled after ClamAV/clamscan.

llvm-svn: 228847
2015-02-11 17:02:52 +00:00
Johannes Doerfert b9d18887d7 Allow signed devision in access functions
llvm-svn: 228833
2015-02-11 14:54:50 +00:00
Johannes Doerfert 97235c691a [FIX] Special case for branch users of scalar values
llvm-svn: 228832
2015-02-11 14:52:52 +00:00
Tobias Grosser bc8a5e2290 isl is now distributed with polly
llvm-svn: 228575
2015-02-09 13:52:21 +00:00
Johannes Doerfert 1ef52333c5 [Refactor] Use the LoopInfo object already present
llvm-svn: 228540
2015-02-08 20:50:42 +00:00
Johannes Doerfert be9c91173f [Refactor] Use only one BlockGenerator for a SCoP
This change has two main purposes:
    1) We do not use a static interface to hide an object we create and
       destroy for every basic block we copy.
    2) We allow the BlockGenerator to store information between calls to
       the copyBB method. This will ease scalar/phi code generation
       later on.

  While a lot of method signatures were changed this should not cause
  any real behaviour change.

  Differential Revision: http://reviews.llvm.org/D7467

llvm-svn: 228443
2015-02-06 21:39:31 +00:00
Johannes Doerfert 4a60b173a7 Do not run independent blocks when we model all scalar dependences
llvm-svn: 228441
2015-02-06 21:26:45 +00:00
Johannes Doerfert 76e37fe005 [Fix] Broken test case
llvm-svn: 228439
2015-02-06 21:20:14 +00:00
Johannes Doerfert 0ff23ec544 Model PHI nodes without demoting them
This allows us to model PHI nodes in the polyhedral description
  without demoting them. The modeling however will result in the
  same accesses as the demotion would have introduced.

Differential Revision: http://reviews.llvm.org/D7415

llvm-svn: 228433
2015-02-06 20:13:15 +00:00
Tobias Grosser f85d0e217f Build the isl files as PIC
Otherwise we get linker errors.

llvm-svn: 228204
2015-02-04 21:56:28 +00:00
Tobias Grosser 52a25237d8 Import isl(+imath) as an external library into Polly
With this patch Polly is always GPL-free (no dependency on GMP any more). As a
result, building and distributing Polly will be easier. Furthermore, there is no
need to tightly coordinate isl and Polly releases anymore.

We import isl b3e0fa7a05d as well as imath 4d707e5ef2. These are the git
versions Polly currently was tested with when using utils/checkout_isl.sh. The
imported libraries are both MIT-style licensed.

We build isl and imath with -fvisibility=hidden to avoid clashes in case other
projects (such as gcc) use conflicting versions of isl. The use of imath can
temporarily reduce compile-time performance of Polly. We will work on
performance tuning in tree.

Patches to isl should be contributed first to the main isl repository and can
then later be reimported to Polly.

This patch is also a prerequisite for the upcoming isl C++ interface.

llvm-svn: 228193
2015-02-04 20:55:43 +00:00
Tobias Grosser eb29c68df2 Add test case for r227805
llvm-svn: 227970
2015-02-03 15:11:02 +00:00
Johannes Doerfert a57746b871 [NFC] Fix typo
llvm-svn: 227955
2015-02-03 08:55:01 +00:00
Johannes Doerfert 4f33706b53 [NFC] Remove some unnecessary local objects
llvm-svn: 227844
2015-02-02 19:41:30 +00:00
Johannes Doerfert 535ee97853 [FIX] Updated test case (fixed names -> regular expressions)
llvm-svn: 227807
2015-02-02 16:13:36 +00:00
Johannes Doerfert 0837c2da74 [FIX] Partially fix the pointer negation crash
llvm-svn: 227805
2015-02-02 15:25:09 +00:00
Johannes Doerfert 8cd22d4947 [FIX] Check non-deterministic isl output
llvm-svn: 227802
2015-02-02 14:07:02 +00:00
Johannes Doerfert 9282076ece [NFC] Drop the "scattering" tuple name
llvm-svn: 227801
2015-02-02 13:45:54 +00:00
Tobias Grosser c897af3ffc Correct a typo in a comment
llvm-svn: 227569
2015-01-30 12:33:43 +00:00
Johannes Doerfert 3a3799e43a [FIX] Activated a pointer test and removed obsolete comment
llvm-svn: 227524
2015-01-30 00:36:13 +00:00