Commit Graph

1344 Commits

Author SHA1 Message Date
Johannes Doerfert ecc33a1f67 Change argument "class" keyword to "const"
llvm-svn: 230666
2015-02-26 19:33:42 +00:00
Tobias Grosser 5e02c5f5b4 Update comment
Suggest-by: Johannes Doerfert
llvm-svn: 230642
2015-02-26 15:55:00 +00:00
Tobias Grosser f72bdbfbb1 Use isl_ast_expr_call to create run-time checks
isl recently introduced a new interface to create run-time checks from
constraint sets. Use this interface to simplify our run-time check generation.

llvm-svn: 230640
2015-02-26 15:21:10 +00:00
Tobias Grosser fa6cdc8a59 Update isl to 88d60cfe1 'add isl_ast_expr_call'
For Polly the two interesting changes are short_circuit && and || AST
expressions as well as the introduction of isl_ast_build_expr_from_set,
a well defined interface to compute ast expressions from constraint sets.

llvm-svn: 230636
2015-02-26 15:08:35 +00:00
Johannes Doerfert a36842f837 Allow non-affine control flow by default
With the patches r230325, r230329 and r230340 we can handle non-affine
  control flow in (loop-free) subregions. As all LLVM test-suite tests pass and
  we get ~20% more non-trivial SCoPs, we activate it now by default.

llvm-svn: 230624
2015-02-26 11:09:24 +00:00
Johannes Doerfert 1d8b9c1b1f Add the IMPACT2015 publications
It is important we add more publications with/about Polly so people
  can see that work and research is actually ongoing.

llvm-svn: 230552
2015-02-25 21:31:38 +00:00
Johannes Doerfert ae70ec88ae Add myself to the contributors of Polly
llvm-svn: 230546
2015-02-25 21:26:03 +00:00
Johannes Doerfert a8727861b5 Add non-affine subregions to the TODO list
llvm-svn: 230545
2015-02-25 21:20:57 +00:00
Tobias Grosser e395da7986 Update isl to 0980603 'isl_tab_pip.c: parallel_constraints: drop useless assignment'
This update contains:

  - Fixes of minor issues detected by clang's scan_build
  - More schedule tree infrastructure additions

This update slightly changes the output of our dependence analysis, but these
changes are purely syntactially.

llvm-svn: 230528
2015-02-25 19:34:52 +00:00
Tobias Grosser 6296d5ccfd Fix formatting
llvm-svn: 230504
2015-02-25 16:59:15 +00:00
Johannes Doerfert 275a1756ad Allow non-affine control flow -- Code Generation
This is the code generation for region statements that are created
  when non-affine control flow was present in the input. A new
  generator, similar to the block or vector generator, for regions is
  used to traverse and copy the region statement and to adjust the
  control flow inside the new region in the end.

llvm-svn: 230340
2015-02-24 16:16:32 +00:00
Johannes Doerfert 65971a8e72 Omit a default argument
llvm-svn: 230337
2015-02-24 16:02:16 +00:00
Johannes Doerfert 1ddb91d6f4 [FIX] Silence warning
llvm-svn: 230336
2015-02-24 16:00:41 +00:00
Johannes Doerfert 6cad9c4746 [FIX] Some comments
llvm-svn: 230335
2015-02-24 16:00:29 +00:00
Johannes Doerfert ff9d1980a7 Allow non-affine control flow -- SCoP Modeling
This allows us to model non-affine regions in the SCoP representation.
  SCoP statements can now describe either basic blocks or non-affine
  regions. In the latter case all accesses in the region are accumulated
  for the statement and write accesses, except in the entry, have to be
  marked as may-write.

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

llvm-svn: 230329
2015-02-24 12:00:50 +00:00
Johannes Doerfert e70449400f Add ScalarEvolution bounds to non-affine access functions
llvm-svn: 230328
2015-02-24 11:58:30 +00:00
Johannes Doerfert 667b77b3a1 [FIX] Create single exiting block
llvm-svn: 230326
2015-02-24 11:46:18 +00:00
Johannes Doerfert ba65c1672a Allow non-affine control flow -- SCoP Detection
With this patch we allow the SCoP detection to detect regions as SCoPs
  which have non-affine control flow inside. All non-affine regions are
  tracked and later accessible to the ScopInfo.

  As there is no real difference, non-affine branches as well as
  floating point branches are covered (and both called non-affine
  control flow).  However, the detection is restricted to
  overapproximate only loop free regions.

llvm-svn: 230325
2015-02-24 11:45:21 +00:00
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