Commit Graph

2283 Commits

Author SHA1 Message Date
Tobias Grosser 6a44b7fdf0 Add test case forgotten in r265379.
Thanks Johannes for reminding me.

llvm-svn: 265423
2016-04-05 17:40:07 +00:00
Johannes Doerfert a49c557f70 Remove dead code and comment [NFC]
llvm-svn: 265413
2016-04-05 16:18:53 +00:00
Johannes Doerfert ed89fae6c5 [WWW] Update passes
llvm-svn: 265410
2016-04-05 16:15:44 +00:00
Johannes Doerfert 57c5f0b1c4 [FIX] Ensure SAI objects for exit PHIs
If all exiting blocks of a SCoP are error blocks and therefor not
  represented we will not generate accesses and consequently no SAI
  objects for exit PHIs. However, they are needed in the code generation
  to generate the merge PHIs between the original and optimized region.
  With this patch we enusre that the SAI objects for exit PHIs exist
  even if all exiting blocks turn out to be eror blocks.

  This fixes the crash reported in PR27207.

llvm-svn: 265393
2016-04-05 13:44:21 +00:00
Tobias Grosser 535afd808d ScopInfo: Check for possibly nested GEP in fixed-size delin
We currently only consider the first GEP when delinearizing access functions,
which makes us loose information about additional index expression offsets,
which results in our SCoP model to be incorrect. With this patch we now
compare the base pointers used to ensure we do not miss any additional offsets.
This fixes llvm.org/PR27195.

We may consider supporting nested GEP in our delinearization heuristics in
the future.

llvm-svn: 265379
2016-04-05 06:23:45 +00:00
Johannes Doerfert 1519491eaf Do not allow to complex branch conditions
Even before we build the domain the branch condition can become very
  complex, especially if we have to build the complement of a lot of
  equality constraints. With this patch we bail if the branch condition
  has a lot of basic sets and parameters.

  After this patch we now successfully compile
    External/SPEC/CINT2000/186_crafty/186_crafty
  with "-polly-process-unprofitable -polly-position=before-vectorizer".

llvm-svn: 265286
2016-04-04 07:59:41 +00:00
Johannes Doerfert 642594ae87 Exploit graph properties during domain generation
As a CFG is often structured we can simplify the steps performed during
  domain generation. When we push domain information we can utilize the
  information from a block A to build the domain of a block B, if A dominates B
  and there is no loop backede on a path from A to B. When we pull domain
  information we can use information from a block A to build the domain of a
  block B if B post-dominates A. This patch implements both ideas and thereby
  simplifies domains that were not simplified by isl. For the FINAL basic block
  in test/ScopInfo/complex-successor-structure-3.ll we used to build a universe
  set with 81 basic sets. Now it actually is represented as universe set.

  While the initial idea to utilize the graph structure depended on the
  dominator and post-dominator tree we can use the available region
  information as a coarse grained replacement. To this end we push the
  region entry domain to the region exit and pull it from the region
  entry for the region exit if applicable.

  With this patch we now successfully compile
    External/SPEC/CINT2006/400_perlbench/400_perlbench
  and
    SingleSource/Benchmarks/Adobe-C++/loop_unroll.

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

llvm-svn: 265285
2016-04-04 07:57:39 +00:00
Johannes Doerfert a07f0ac73f Factor out "adjustDomainDimensions" function [NFC]
llvm-svn: 265284
2016-04-04 07:50:40 +00:00
Johannes Doerfert d5edbd61a1 [FIX] Do not create a SCoP in the presence of infinite loops
If a loop has no exiting blocks the region covering we use during
  schedule genertion might not cover that loop properly. For now we bail
  out as we would not optimize these loops anyway.

llvm-svn: 265280
2016-04-03 23:09:06 +00:00
Tobias Grosser 151ae32dba Revert "[FIX] Do not create a SCoP in the presence of infinite loops"
This reverts commit r265260, as it caused the following 'make check-polly'
failures:

    Polly :: ScopDetect/index_from_unpredictable_loop.ll
    Polly :: ScopInfo/multiple_exiting_blocks.ll
    Polly :: ScopInfo/multiple_exiting_blocks_two_loop.ll
    Polly :: ScopInfo/schedule-const-post-dominator-walk-2.ll
    Polly :: ScopInfo/schedule-const-post-dominator-walk.ll
    Polly :: ScopInfo/switch-5.ll

llvm-svn: 265272
2016-04-03 19:36:52 +00:00
Johannes Doerfert 2075b5d2a1 [FIX] Do not create two SAI objects for exit PHIs
If an exit PHI is written and also read in the SCoP we should not create two
  SAI objects but only one. As the read is only modeled to ensure OpenMP code
  generation knows about it we can simply use the EXIT_PHI MemoryKind for both
  accesses.

llvm-svn: 265261
2016-04-03 11:16:00 +00:00
Johannes Doerfert 7dcceb82e9 [FIX] Do not create a SCoP in the presence of infinite loops
If a loop has no exiting blocks the region covering we use during
  schedule genertion might not cover that loop properly. For now we bail
  out as we would not optimize these loops anyway.

llvm-svn: 265260
2016-04-03 11:12:39 +00:00
Johannes Doerfert 6ba927148d [FIX] Adjust the insert point for non-affine region PHIs
If a non-affine region PHI is generated we should not move the insert
  point prior to the synthezised value in the same block as we might
  split that block at the insert point later on. Only if the incoming
  value should be placed in a different block we should change the
  insertion point.

llvm-svn: 265132
2016-04-01 11:25:47 +00:00
Tobias Grosser db6db505c9 ScoPDetection: Obtain a known free diagnostic ID
... instead of hardcoding something that has been free at some point. This fixes
a crash triggered by r265084, where the diagnostic IDs have been shifted in a
way that resulted our hardcode ID to not be assigned any implementation.  Our ID
was likely already wrong earlier on, but this time we really crashed nicely.

llvm-svn: 265114
2016-04-01 07:15:19 +00:00
Paul Robinson a7e5210eec Update copyright year to 2016.
llvm-svn: 264955
2016-03-30 22:41:38 +00:00
Tobias Grosser 6deba4ea03 Revert 264782 and 264789
These caused LNT failures due to new assertions when running with
-polly-position=before-vectorizer -polly-process-unprofitable for:

FAIL: clamscan.compile_time
FAIL: cjpeg.compile_time
FAIL: consumer-jpeg.compile_time
FAIL: shapes.compile_time
FAIL: clamscan.execution_time
FAIL: cjpeg.execution_time
FAIL: consumer-jpeg.execution_time
FAIL: shapes.execution_time

The failures have been introduced by r264782, but r264789 had to be reverted
as it depended on the earlier patch.

llvm-svn: 264885
2016-03-30 18:18:31 +00:00
Johannes Doerfert a144fb148b Exploit graph properties during domain generation
As a CFG is often structured we can simplify the steps performed
  during domain generation. When we push domain information we can
  utilize the information from a block A to build the domain of a
  block B, if A dominates B. When we pull domain information we can
  use information from a block A to build the domain of a block B
  if B post-dominates A. This patch implements both ideas and thereby
  simplifies domains that were not simplified by isl. For the FINAL
  basic block in
    test/ScopInfo/complex-successor-structure-3.ll .
  we used to build a universe set with 81 basic sets. Now it actually is
  represented as universe set.

  While the initial idea to utilize the graph structure depended on the
  dominator and post-dominator tree we can use the available region
  information as a coarse grained replacement. To this end we push the
  region entry domain to the region exit and pull it from the region
  entry for the region exit.

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

llvm-svn: 264789
2016-03-29 21:31:05 +00:00
Johannes Doerfert e11e08bd1f Factor out "adjustDomainDimensions" function [NFC]
llvm-svn: 264782
2016-03-29 20:41:24 +00:00
Johannes Doerfert 29cb067000 Factor out "getFirstNonBoxedLoopFor" function [NFC]
llvm-svn: 264781
2016-03-29 20:32:43 +00:00
Johannes Doerfert 5fb9b21c24 Bail as early as possible
Instead of waiting for the domain construction to finish we will now
  bail as early as possible in case a complexity problem is encountered.
  This might save compile time but more importantly it makes the "abort"
  explicit. While we can always check if we invalidated the assumed
  context we can simply propagate the result of the construction back.
  This also removes the HasComplexCFG flag that was used for the very
  same reason.

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

llvm-svn: 264775
2016-03-29 20:02:05 +00:00
Michael Kruse 88a2256a34 Revert "[ScopInfo] Fix domains after loops."
This reverts commit r264118. The approach is still under discussion.

llvm-svn: 264705
2016-03-29 07:50:52 +00:00
Tobias Grosser 77e2128580 docs: Fix section header committed in r264575
Ensure the length of the header underline matches the length of the header.
This prevents SPHINX from erroring on this file and consequently not updating
the documentation.

Also, make this its own point not belonging to the 'increased applicability'
section.

llvm-svn: 264592
2016-03-28 17:00:14 +00:00
Hongbin Zheng 52ae58259d Add fine-grain dependences analysis to release notes.
Differential Revision: http://reviews.llvm.org/D17905

llvm-svn: 264575
2016-03-28 12:41:49 +00:00
Johannes Doerfert 6462d8c1d9 Generalize the domain complexity restrictions
This patch applies the restrictions on the number of domain conjuncts
  also to the domain parts of piecewise affine expressions we generate.
  To this end the wording is change slightly. It was needed to support
  complex additions featuring zext-instructions but it also fixes PR27045.

  lnt profitable runs reports only little changes that might be noise:
  Compile Time:
    Polybench/[...]/2mm                     +4.34%
    SingleSource/[...]/stepanov_container   -2.43%
  Execution Time:
    External/[...]/186_crafty               -2.32%
    External/[...]/188_ammp                 -1.89%
    External/[...]/473_astar                -1.87%

llvm-svn: 264514
2016-03-26 16:17:00 +00:00
Tobias Grosser 7dcae2e14a Add files forgotten in r264452
llvm-svn: 264460
2016-03-25 20:32:51 +00:00
Tobias Grosser 37034db826 Update to isl-0.16.1-145-g243bf7c
Just an import to keep track with the latest version of isl. We are not looking
for specific features.

llvm-svn: 264452
2016-03-25 19:38:18 +00:00
Tobias Grosser e34aa7f482 Add title above the release notes
llvm-svn: 264448
2016-03-25 19:23:54 +00:00
Tobias Grosser 7a1e66b98a docs: Show two levels of content in index:
llvm-svn: 264447
2016-03-25 19:23:52 +00:00
Tobias Grosser 054ca24be7 docs: Describe Polly in the LLVM pass pipeline
llvm-svn: 264446
2016-03-25 19:23:44 +00:00
Tobias Grosser ddca355fe3 docs: Clearify that our release note describe the upcoming release of Polly
llvm-svn: 264406
2016-03-25 14:22:53 +00:00
Tobias Grosser 99807e4058 www: Directly link to our new SPHINX documentation
llvm-svn: 264405
2016-03-25 14:19:34 +00:00
Tobias Grosser 563c57b2e7 docs: Add links to the old documentation
llvm-svn: 264404
2016-03-25 14:18:42 +00:00
Tobias Grosser e16b8df605 Center picture
llvm-svn: 264402
2016-03-25 14:09:40 +00:00
Tobias Grosser 063ca0fc50 docs: Add architecture diagram
llvm-svn: 264400
2016-03-25 13:44:30 +00:00
Tobias Grosser 938d9cc03e www: Reference doxygen documentation directly from the menu
llvm-svn: 264399
2016-03-25 13:09:36 +00:00
Tobias Grosser 779576406f www; Drop memory access documentation
This is an old google summer of code project that has been replaced completely
by our new AST generator.

llvm-svn: 264398
2016-03-25 13:04:19 +00:00
Tobias Grosser 25a99e98c4 cmake: Ensure tools/* is still formatted
This got accidentally dropped in r264283.

Also, drop the wwwfiles from the removal list. This is not needed any more as
we now explicitly list the directories that should be formatted.

llvm-svn: 264397
2016-03-25 12:16:17 +00:00
Tobias Grosser b339594f5d CodegenCleanup: Drop -load-combine pass
This pass is not enabled in the default tool chain and currently can run into an
infinite loop, due to other parts of LLVM generating incorrect IR
(http://llvm.org/PR27065) -- which is not executed and consequently does not
seem to disturb other passes.  As this pass is not really needed, we can just
drop it to get our build clean.

This fixes the timeout issues in MultiSource/Benchmarks/MiBench/consumer-jpeg
and MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/cjpeg for
-polly-position=before-vectorizer -polly-process-unprofitable.. Unfortunately,
we are still left with a miscompile in cjpeg.

llvm-svn: 264396
2016-03-25 12:11:06 +00:00
Johannes Doerfert 6af7700ddf [CMAKE] Try to find the correct globbing expression
llvm-svn: 264286
2016-03-24 14:31:49 +00:00
Johannes Doerfert 733ea34f38 [FIX] Handle accesses to "null" in MemIntrinsics
This fixes PR27035. While we now exclude MemIntrinsics from the
  polyhedral model if they would access "null" we could exploit this
  even more, e.g., remove all parameter combinations that would lead to
  the execution of this statement from the context.

llvm-svn: 264284
2016-03-24 13:50:04 +00:00
Johannes Doerfert 8ff253bfbf Restrict clang-format to lib/ [NFC]
llvm-svn: 264283
2016-03-24 13:49:39 +00:00
Johannes Doerfert 549768c01a [FIX] Verify the alias group before returning it
Similar to r262612 we need to check not only the pointer SCEV and the
type of an alias group but also the actual access instruction. The
reason is again the same: The pointer SCEV is not flow sensitive but the
access function is. In r262612 we avoided consolidating alias groups
even though the pointer SCEV and the type were the same but the access
function was not. Here it is simpler as we can simply check all members
of an alias group against the given access instruction.

llvm-svn: 264274
2016-03-24 13:22:16 +00:00
Johannes Doerfert 9ea44aee64 [DOCS] Exclude python and shell scripts
llvm-svn: 264273
2016-03-24 13:21:12 +00:00
Johannes Doerfert 47197fe3f3 Add namespace for struct [NFC]
This will clean up the doxygen documentation.

llvm-svn: 264272
2016-03-24 13:20:52 +00:00
Johannes Doerfert 01b723ba43 Remove obsolete CMD option [NFC]
llvm-svn: 264270
2016-03-24 13:19:51 +00:00
Johannes Doerfert 2b470e8e61 Remove obsolete code
Since r261226 we should not see this situation any more, if so it is probably
  a bug that would only be hidden.

llvm-svn: 264269
2016-03-24 13:19:16 +00:00
Johannes Doerfert 13d5d5b184 Remove weird comment [NFC]
llvm-svn: 264268
2016-03-24 13:16:49 +00:00
Tobias Grosser 25e8ebe29d Drop explicit -polly-delinearize parameter
Delinearization is now enabled by default and does not need to explicitly need
to be enabled in our tests.

llvm-svn: 264154
2016-03-23 13:21:02 +00:00
Tobias Grosser 6895d9587e www: Drop one more </div>
llvm-svn: 264144
2016-03-23 09:27:41 +00:00
Tobias Grosser 00c85c6f2f www: Drop polyhedral news reference.
The feed2html service used has been unavailable a couple of times and always
causes the polly website to fail to load correctly.

llvm-svn: 264143
2016-03-23 09:26:39 +00:00