Commit Graph

881 Commits

Author SHA1 Message Date
Tobias Grosser 26338283d8 Switch isl back to isl 0.12.1
The newer isl version broke backward compatibility. For some reason, I did not
find this in my own tests.

llvm-svn: 199586
2014-01-19 11:53:18 +00:00
Tobias Grosser b8cd4a8341 CodeGeneration: Replace reference to isl_int with explicit mpz call.
This removes the last isl_int dependency in the default build. There are
still some in OpenScop and Scoplib. For those isl-0.12.2 still needs to be used.

llvm-svn: 199585
2014-01-19 11:31:23 +00:00
Tobias Grosser e956194ce7 Update to the latest cloog and isl versions
This brings in isl_val support from cloog and, most importantly the following
isl commit:

commit d962967ab42323ea5ca0398956fbff6a98c782fa
Author: Sven Verdoolaege <skimo@kotnet.org>
Date:   Wed Dec 18 12:05:32 2013 +0100

    allow the user to impose a bound on the number of low-level operations

    This should allow the user to deterministically limit the effort spent on a
    computation.

llvm-svn: 199582
2014-01-19 11:03:27 +00:00
Sylvestre Ledru 660712570a llvm/IR/Writer.h has been removed in llvm commit r198836 and seems useless in polly
llvm-svn: 199360
2014-01-16 07:10:09 +00:00
Tobias Grosser 42aff30dbc Adapt to DomTree changes in r199104
llvm-svn: 199157
2014-01-13 22:29:56 +00:00
Chandler Carruth e87c6a81d6 [cleanup] Update Polly for moved header in LLVM r199082.
llvm-svn: 199088
2014-01-13 09:56:11 +00:00
Tobias Grosser f240b487a3 Remove IR/Writer.h
This should fix the buildbots.

llvm-svn: 198859
2014-01-09 10:42:15 +00:00
Chandler Carruth e243b03a8c Update #include paths for r198688 in LLVM that moved headers in the Assembly
directory to their proper homes.

llvm-svn: 198691
2014-01-07 12:59:58 +00:00
Tobias Grosser 20b9966e5f www: Fix typo II
llvm-svn: 198596
2014-01-06 09:53:00 +00:00
Tobias Grosser 2cc9463abe www: Fix typo
llvm-svn: 198595
2014-01-06 09:52:42 +00:00
Tobias Grosser d4521051bf www: Add link to newly released islplot library
llvm-svn: 198594
2014-01-06 09:51:38 +00:00
Tobias Grosser 63c6b45a5a Temporarily reformat Polly to silence buildbots
We may revert this depending on how the current discussion on llvm-commits
ends.

llvm-svn: 198581
2014-01-06 01:37:13 +00:00
Tobias Grosser ca7887d729 Another formatting fix
llvm-svn: 198386
2014-01-03 00:56:20 +00:00
Tobias Grosser 765a70abab Fix formatting issues
llvm-svn: 198384
2014-01-03 00:44:43 +00:00
Tobias Grosser a9376ff571 Introduce -polly-canonicalize pass
This ModulePass schedules the set of Polly canonicalization passes. It is a
debugging tool that can be used to preoptimize .ll files for Polly processing.

llvm-svn: 198376
2014-01-02 23:39:18 +00:00
Tobias Grosser e61b86c9cd RegisterPasses: Do not claim we schedule canonicalization passes at -O0
Also the code makes the impression this was happening, shouldEnablePolly()
always returns false for optlevel equal to zero. This was previously different,
but was accidentally changed by a commit a couple of months ago. As this
behavior was mainly a debugging tool and adding this to clang never really made
sense, we just remove the last traces.

llvm-svn: 198370
2014-01-02 22:48:50 +00:00
Tobias Grosser 9a26f2986c ScopInfo: Ensure the RegionInfo analysis is always available
This fixes a crash that appeared when generating dotty graphs for functions
without loops (for which we do not calculate polyhedral information).

llvm-svn: 198364
2014-01-02 22:28:53 +00:00
NAKAMURA Takumi d40d387fb1 Update the copyright credits -- Happy new year 2014!
FIXME: Dragonegg may be updated at non-trivial changes.
llvm-svn: 198274
2014-01-01 08:27:31 +00:00
Tobias Grosser 2658ea9e90 www: Simplify css
llvm-svn: 197847
2013-12-21 00:26:05 +00:00
Tobias Grosser 556416dab8 www: Fix typos
Reported-by: Dmitry N. Mikushin <maemarcus@gmail.com>
llvm-svn: 197796
2013-12-20 09:49:24 +00:00
Tobias Grosser eb145bb449 www: Do not use a fixed with, but use max-width
Further:

  o ensure that the header is properly readable even on smaller screen sizes.
  o Shorten the table of contents of the documentation section.

llvm-svn: 197794
2013-12-20 09:24:34 +00:00
Tobias Grosser b2ecb3c8f5 www: Do not use a small fonts for the core text
llvm-svn: 197793
2013-12-20 09:24:28 +00:00
Tobias Grosser 837c4d0ace www: Name the tiling scheme in the header
llvm-svn: 197763
2013-12-20 01:18:58 +00:00
Tobias Grosser 7110f332eb www: No need to mention Polly in each subtitle
llvm-svn: 197760
2013-12-20 00:53:01 +00:00
Tobias Grosser 1d67bbb96b www: Highlight title, add subtitle
llvm-svn: 197752
2013-12-19 23:44:07 +00:00
Tobias Grosser bd5262349d www: Mark more items done
llvm-svn: 197747
2013-12-19 23:23:44 +00:00
Tobias Grosser 1b7f94161d www: We already integrated the isl code generator
llvm-svn: 197746
2013-12-19 23:22:28 +00:00
Tobias Grosser b3bf54e812 www: Use red for visited links
llvm-svn: 197745
2013-12-19 23:22:25 +00:00
Tobias Grosser 0f6108269d www: Add favicon
llvm-svn: 197739
2013-12-19 22:59:47 +00:00
Tobias Grosser ca4ca288d3 www: Add nice header
llvm-svn: 197738
2013-12-19 22:50:10 +00:00
Tobias Grosser 5c6c62f7fc www: shorten menu entry
llvm-svn: 197724
2013-12-19 21:26:44 +00:00
Tobias Grosser 3905cb3d70 www: Rename menu items
llvm-svn: 197723
2013-12-19 21:25:48 +00:00
Tobias Grosser fcb4874454 www: Use a modern menu style
llvm-svn: 197722
2013-12-19 21:22:24 +00:00
Tobias Grosser 1b12f46464 Fix formatting
The polly on-commit formatting checker notified me that I forgot to format
the code before submitting.

llvm-svn: 197560
2013-12-18 11:14:36 +00:00
Tobias Grosser 8519f897e7 Report detected scops using the new diagnostics
We now report the following:

$ polly-clang -O3 -mllvm -polly -mllvm -polly-report test.c  -c \
  -gline-tables-only

note: Polly detected an optimizable loop region (scop) in function 'foo'
test.c:2: Start of scop
test.c:3: End of scop
note: Polly detected an optimizable loop region (scop) in function 'bar'
test.c:9: Start of scop
test.c:13: End of scop

llvm-svn: 197558
2013-12-18 10:49:53 +00:00
Tobias Grosser 7b6f9ba572 ScopValidator: smax expressions are no parameters
This fixes PR18155 which is a regression introduced in 152913.

llvm-svn: 196827
2013-12-09 21:51:46 +00:00
Tobias Grosser 7d66a19fe4 test: Remove use of defaultOpts
llvm-svn: 196826
2013-12-09 21:51:31 +00:00
Tobias Grosser e10a9fc08d Update isl to latest maintenance release
This includes isl commits b9c7b8c8c98a6722262f076b27f833a25b83f55d and
454621e935ff836361c77df436fbd7066c9d44e0 which fix PR18130.

llvm-svn: 196655
2013-12-07 11:58:06 +00:00
Tobias Grosser 2cbc7bf64a (re)enable formatting checks
llvm-svn: 195935
2013-11-28 23:35:08 +00:00
Tobias Grosser 37eff6aad9 Really stop the buildbot noise
llvm-svn: 195521
2013-11-22 23:56:11 +00:00
Tobias Grosser 70409740d0 Disable format checking
We still have troubles as clang is not properly built yet. I messed up a path
in the PollyBuilder and am waiting for another buildmaster restart.

llvm-svn: 195520
2013-11-22 23:45:21 +00:00
Tobias Grosser c8f0779c38 cmake: Provide path to installed clang-format
This will now also enable the automatic formatting checks in the Polly buildbot.

llvm-svn: 195507
2013-11-22 22:42:13 +00:00
Tobias Grosser e264111bda Disable formatting checks to silent buildbots
Sorry for the noice.

llvm-svn: 195446
2013-11-22 11:44:15 +00:00
Tobias Grosser cf7f6db300 cmake: Add option POLLY_USE_CLOOG
This allows to build Polly without CLooG.

llvm-svn: 195344
2013-11-21 11:48:07 +00:00
Tobias Grosser e5f00c8bd2 Fix 80 column violation
Found by clang-format.

llvm-svn: 194949
2013-11-17 03:18:32 +00:00
Tobias Grosser 54ee0ba74d IslCodegen: Support for run-time conditions
llvm-svn: 194948
2013-11-17 03:18:25 +00:00
Tobias Grosser 378a9f2b91 ScopDetection: Improve formatting
llvm-svn: 194931
2013-11-16 19:34:11 +00:00
Sebastian Pop 3d1806b907 prepend LLVM to all Polly* libs
llvm-svn: 194923
2013-11-16 15:28:55 +00:00
Sebastian Pop 8d6cca1906 factor out code in shouldEnablePolly
to be able to call the same functionality from registerPollyEarlyAsPossiblePasses
and registerPollyOptLevel0Passes.

llvm-svn: 194922
2013-11-16 15:28:49 +00:00
Sebastian Pop 4915ccbe8b move MayAliasSet.cpp into lib/Analysis
llvm-svn: 194921
2013-11-16 15:28:45 +00:00
Tobias Grosser 1c84d80457 Style fixes, brought to you by clang-format
llvm-svn: 194910
2013-11-16 01:07:06 +00:00
Andy Gibbs 78fc064b1a PassManagerBase has moved into the legacy namespace as of r194324; match it here.
llvm-svn: 194490
2013-11-12 17:10:46 +00:00
Tobias Grosser 2ea6deb62f IslCodegen: Do not build upper bound in vector for
For for-nodes that are translated to a set of vector lanes, we already know the
overall number of iterations. Calculating the upper bound is consequently not
necessary. This change removes the code for upper bound calculation, which was
probably copy/pasted from the code generation for the normal for-loop.

This issue was found by Sylvestre's scan-build server.

llvm-svn: 193925
2013-11-02 12:59:39 +00:00
Tobias Grosser d764fcbd5a Update comments to address Sebastian's review
llvm-svn: 193741
2013-10-31 11:50:52 +00:00
Tobias Grosser e86109f508 ScopInfo: Add support for AssumedContext
When constructing a scop sometimes the exact representation of a statement or
condition would be very complex, but there is a common case which is a lot
simpler, but which is only valid under certain assumptions. The assumed context
records the assumptions taken during the construction of this scop and that need
to be code generated as a run-time test.

At the moment, we do not yet model any assumptions, but only added the
AssumedContext as well as the isl-ast generation support. As a next step,
this needs to be hooked up with the isl code generation.

if (1) /* run-time condition */
  {  /* optimized code */ }
else
  {  /* original code */ }

llvm-svn: 193652
2013-10-29 21:05:49 +00:00
Sylvestre Ledru 6a20b7e771 Fix a typo in my family name. Tobias: ;)
llvm-svn: 193603
2013-10-29 11:05:18 +00:00
Tobias Grosser ce4647227c www: Add information about upcoming Loop Optimization BoF
llvm-svn: 193468
2013-10-26 10:08:35 +00:00
Tobias Grosser 1bb2683589 www: Add information about isl-0.12.1 release
Polly can now be compiled without explicitly linking to GMP licensed code.

This patch also contains some formatting improvements.

llvm-svn: 193467
2013-10-26 10:01:52 +00:00
Tobias Grosser 8aa20901dc www: Add information about code coverage and static analysis
llvm-svn: 193466
2013-10-26 10:01:42 +00:00
Tobias Grosser dd6dc8276f clang-format: No empty line after 'public:'
llvm-svn: 192710
2013-10-15 14:41:02 +00:00
Tobias Grosser 4f8c0877e8 This test case requires assertions
llvm-svn: 192530
2013-10-12 09:15:56 +00:00
Tobias Grosser 49457d2767 Move to CLooG 0.18.1 and isl 0.12.1
llvm-svn: 192426
2013-10-11 07:38:50 +00:00
Sebastian Pop 20594a842c use -polly-codegen-isl in tests under test/Isl
llvm-svn: 192110
2013-10-07 16:43:04 +00:00
Sebastian Pop 946070f2f0 do not use -polly-cloog in a ScopInfo testcase
llvm-svn: 192109
2013-10-07 16:43:00 +00:00
Sebastian Pop 40408760c1 do not compute isl_map_dim in the loop
llvm-svn: 191969
2013-10-04 17:14:53 +00:00
Tobias Grosser 0d17013cb7 clang-format
llvm-svn: 191895
2013-10-03 13:09:19 +00:00
Tobias Grosser 51b78752fe Use LLVM_DELETED_FUNCTION instead of a comment
Contributed-by:  Michael Kruse  <MichaelKruse@meinersbur.de>
llvm-svn: 191894
2013-10-03 13:09:14 +00:00
Tobias Grosser 1ff0be799d ScopInfo: Do not include "isl/int.h" any more
We already removed all uses of isl_int in ScopInfo.

Contributed-by:  Michael Kruse  <MichaelKruse@meinersbur.de>
llvm-svn: 191893
2013-10-03 13:09:07 +00:00
Tobias Grosser abe9193b6b ScopInfo: Fix typos
Contributed-by:  Michael Kruse  <MichaelKruse@meinersbur.de>
llvm-svn: 191892
2013-10-03 13:08:59 +00:00
Tobias Grosser b276158efa clang-format recent change
llvm-svn: 190842
2013-09-17 03:30:36 +00:00
Tobias Grosser 0695ee433e Move SCEVAffinator member definitions out of class body
Instead of defining the relevant functions inline, we now just keep the
declarations in the class itself. This makes the class declaration a lot
easier to read as all functions can be seen at once. We also use this
opportunity to privatize all functions not used in the public interface of the
class.

llvm-svn: 190841
2013-09-17 03:30:31 +00:00
Matt Arsenault 77d55f8abd Fix build after SCEV change
llvm-svn: 190429
2013-09-10 20:22:17 +00:00
Tobias Grosser e2622c2acc TempScopInfo: Microoptimize constant conditions
Use 0 >= 1 instead of 0 != 0 to represent 'false'. This might be slightly more
efficient as isl may create a union of sets for 0 != 0, whereas this is never
needed for the expression 0 >= 1.

Contributed-by: Alexandre Isoard <alexandre.isoard@gmail.com>
llvm-svn: 190384
2013-09-10 04:47:19 +00:00
Tobias Grosser 3613fd7a35 ScopInfo: Correctly handle true/false conditions
This is a modified version of the orignally contributed patch.

Contributed-by: alexandre.isoard@gmail.com
llvm-svn: 190237
2013-09-07 01:54:13 +00:00
Tobias Grosser 815c635cec [CodeGen] Fixup assert fails caused by incorrect LoopInfo update
Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 189764
2013-09-02 16:13:00 +00:00
Tobias Grosser 4c932b8a4b Remove unneeded comma and update formatting
llvm-svn: 189177
2013-08-24 17:58:59 +00:00
Logan Chien f166ea6715 Rename "polly-test" in the document and script.
The Makefile rule "polly-test" has been renamed to
"check-polly" in r182171.  This CL updates the document and
the automatic build script.

llvm-svn: 188624
2013-08-18 07:33:28 +00:00
Daniel Dunbar 2bd59a2cc7 [tests] Update to use lit_config and lit package, as appropriate.
llvm-svn: 188114
2013-08-09 21:54:36 +00:00
Tobias Grosser e2c05bbefe PollyDependence: Simplify Read/Write/MayWrite before feeding them into ISL.
Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 187981
2013-08-08 13:55:45 +00:00
Tobias Grosser 22a155a7a6 ScopInfo: add a testcase that share parameters within nested start.
Contributed-by:  Star Tan <tanmx_star@yeah.net>
llvm-svn: 187772
2013-08-06 04:36:45 +00:00
Tobias Grosser e42ddb9ad3 ScopInfo: Split start value from SCEVAddRecExpr to enable parameter sharing.
SCoP invariant parameters with the different start value would deter parameter
sharing. For example, when compiling the following C code:

  void foo(float *input) {
    for (long j = 0; j < 8; j++) {
      // SCoP begin
      for (long i = 0; i < 8; i++) {
        float x = input[j * 64 + i + 1];
        input[j * 64 + i] = x * x;
      }
    }
  }

Polly would creat two parameters for these memory accesses:

    p_0: {0,+,256}
    p_2: {4,+,256}
    [j * 64 + i + 1] => MemRef_input[o0] : 4o0 = p_1 + 4i0
    [j * 64 + i]     => MemRef_input[o0] : 4o0 = p_0 + 4i0

These parameters only differ from start value. To enable parameter sharing,
we split the start value from SCEVAddRecExpr, so they would share a single
parameter that always has zero start value:

    p0: {0,+,256}<%for.cond1.preheader>
    [j * 64 + i + 1] => MemRef_input[o0] : 4o0 = 4 + p_1 + 4i0
    [j * 64 + i]     => MemRef_input[o0] : 4o0 = p_0 + 4i0

Such translation can make the polly-dependence much faster.

Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 187728
2013-08-05 15:14:15 +00:00
Tobias Grosser abd96a0c0a Dependence: Add DEBUG support.
Contributed-by:  Star Tan <tanmx_star@yeah.net>
llvm-svn: 187498
2013-07-31 14:35:17 +00:00
Tobias Grosser 96ef078583 Remove '-debug-only' from test case
This flags was not used in the test case, but caused failures when LLVM was
built without debugging. We can savely remove it.

llvm-svn: 187343
2013-07-29 05:35:11 +00:00
Tobias Grosser 6e358c067a TempScop: Actually load Polly in this test case
llvm-svn: 187342
2013-07-29 05:18:09 +00:00
Tobias Grosser 7032ea6f5b Remove second '-analyze' from command line
llvm-svn: 187341
2013-07-29 05:15:33 +00:00
Tobias Grosser 85f7421731 JSONImporter: Free new schedule if found invalid
In case we detect that the schedule the user wants to import is invalid we
refuse it _and_ free the isl_maps containing it.

Another bug found thanks to Rafael.

llvm-svn: 187339
2013-07-29 05:12:01 +00:00
Tobias Grosser 880c52f56a CodeGeneration: Fix double free in vector for
We now use __isl_take to annotate the uses of the isl_set where we got the
memory management wrong.

Thanks to Rafael! His pipefail work hardened our test environment and exposed
this bug nicely.

llvm-svn: 187338
2013-07-29 01:58:07 +00:00
Rafael Espindola cd61afb4ee Use a slightly smaller hammer to make this pass.
When first updating this test I only noticided the first RUN line.

llvm-svn: 187328
2013-07-28 11:13:49 +00:00
Tobias Grosser 983e785f17 gitattributes: .png and .txt are no text files
llvm-svn: 187326
2013-07-28 09:05:20 +00:00
Tobias Grosser 25f0342a68 Temporary disable a test until I finished the fix
llvm-svn: 187305
2013-07-27 15:19:57 +00:00
Rafael Espindola 0329bb4fce Looks like this test crashes. Add --crash to not for now.
llvm-svn: 187300
2013-07-27 11:08:44 +00:00
Rafael Espindola e559af8205 Add not to commands that fail.
Polly devs: please check if these commands really should fail.

llvm-svn: 187263
2013-07-26 22:49:25 +00:00
Hongbin Zheng 5b463ceaf5 BlockGenerator: Split getNewValue.
Split the old getNewValue into two parts:

1. The function "lookupAvailableValue" that return the new version of
the instruction which is already available.

2. The function calls "lookupAvailableValue", and tries to generate
the new version if it is not available yet.

llvm-svn: 187114
2013-07-25 09:12:07 +00:00
Tobias Grosser c7d3fc5547 ScopDetect: Only track detection failures if actually needed.
String operations resulted by raw_string_ostream in the INVALID macro can lead
to significant compile-time overhead when compiling large size source code.
This is because raw_string_ostream relies on TypeFinder class, whose
compile-time cost increases as the size of the module increases. This patch
targets to ensure that it only track detection failures if actually needed.
In this way, we can avoid expensive string operations in normal execution.

With this patch file, the relative compile-time cost of Polly-detect pass does
not increase even when compiling very large size source code.

Contributed-by:   Star Tan <tanmx_star@yeah.net>
llvm-svn: 187102
2013-07-25 03:02:29 +00:00
Tobias Grosser 8002201fd6 Convert line endings to unix style
llvm-svn: 187101
2013-07-25 03:02:26 +00:00
Tobias Grosser 6bcb34b180 ScopDetect: Add some test cases for sequential loops
llvm-svn: 187024
2013-07-24 06:10:37 +00:00
Tobias Grosser ff9bfdfa80 ScopInfo/IndependentBlocks: clang-format
llvm-svn: 187023
2013-07-24 06:10:30 +00:00
Tobias Grosser 54cb789d39 RegisterPass: Unhide -polly-show and -polly-show-only
llvm-svn: 186806
2013-07-22 04:11:00 +00:00
Tobias Grosser 5b1a7f2245 ScopDetect: move "return false" out of INVALID macro.
Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 186805
2013-07-22 03:50:33 +00:00
Hongbin Zheng 63cc9467af Ensure a correct order between memory accesses.
Ensure that the scalar write access corresponds to the result of a load
instruction appears after the generic read access corresponds to the load
instruction.

llvm-svn: 186419
2013-07-16 15:20:29 +00:00