Commit Graph

850 Commits

Author SHA1 Message Date
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
Hongbin Zheng 5a772dcd84 IndependentBlock: Add option to disable scalar to array rewriting.
llvm-svn: 186418
2013-07-16 15:19:33 +00:00
Hongbin Zheng c6aa9f5c2a Make sure the each instruction is mapped to one memory access.
llvm-svn: 186417
2013-07-16 15:18:51 +00:00
Tobias Grosser 298a7646f3 ScopDetect: clang-format
llvm-svn: 186289
2013-07-14 18:09:43 +00:00
Tobias Grosser 001bd274f5 Dependences: Use ostream printer to print analysis output
llvm-svn: 186288
2013-07-14 18:09:40 +00:00
Tobias Grosser 8c895b4248 Support: No need to comment __isl_keep
llvm-svn: 186281
2013-07-14 06:59:38 +00:00
Tobias Grosser b58f6a4211 ScopInfo: Add getTupe() method to MemoryAccess
We also move the enum to UPPERCASE.

llvm-svn: 186259
2013-07-13 20:41:24 +00:00
Tobias Grosser 6f0d6988a5 Dependences: Add a couple of basic test cases
llvm-svn: 186254
2013-07-13 18:31:46 +00:00
Tobias Grosser 229d681675 Dependences: Clarify difference between value and memory based dependences
We make the option a clear choice between the two analysis types and add
descriptions about the difference between the two.

llvm-svn: 186251
2013-07-13 17:37:55 +00:00
Tobias Grosser aef925e81f Small style improvements
llvm-svn: 186248
2013-07-13 16:58:07 +00:00
Sebastian Pop 784c012982 scop detection: remove an iteration over all uses
reenabled reverted patch after checking that it passes without regressions on
the nightly test-suite.  Added testcase from Tobi.

llvm-svn: 185720
2013-07-05 20:24:47 +00:00
Sebastian Pop 8c2d75302f scop detection: early return
to reduce indentation level
No functionality changed.

llvm-svn: 185590
2013-07-03 22:50:36 +00:00
Tobias Grosser 14a3999354 clang-format latest changes
llvm-svn: 185440
2013-07-02 16:13:07 +00:00
Tobias Grosser 24bb46bc66 [autoconf/cmake] Make sure we detect the latest version of isl.
llvm-svn: 185429
2013-07-02 14:11:32 +00:00
Hongbin Zheng fe11e287b4 BlockGenerator: Simplify the old value searching code.
Orignally, we first test if a ValueMap contains a Value, and than use the
index operator to get the corresponding new value. This requires the ValueMap
to lookup the key (i.e. the old value) twice.

Now, we directly use the "lookup" function provided by DenseMap to implement
the same functionality.

llvm-svn: 185260
2013-06-29 13:22:15 +00:00
Hongbin Zheng 243e53977a Add the git attributes file.
The attribute in the file allows git to perform End-of-Line
normalization (CRLF to LF).

llvm-svn: 185255
2013-06-29 07:21:57 +00:00
Hongbin Zheng 8d3a888ca3 TempScop: (Partial) Implement the printDetail function.
llvm-svn: 185254
2013-06-29 07:00:14 +00:00
Hongbin Zheng b5f24a665e Refactor memory access getting code in ScopStmt.
1. Do not allow creating new memory access record in the InstructionToAccess map
   on the fly in function getAccessFor.
2. Do not allow user to modify the memory accesses returned by getAccessFor
   during the code generation process.

llvm-svn: 185253
2013-06-29 06:31:39 +00:00
Hongbin Zheng f4adf0fc44 Minor change: No need to specify the namespace of raw_ostream.
llvm-svn: 185252
2013-06-29 06:30:55 +00:00
Tobias Grosser 20bbbd30d2 Update CLooG such that the isl test cases are really up to date
llvm-svn: 184699
2013-06-24 07:38:29 +00:00
Tobias Grosser 04d6ae65b7 Fix my own formatting mistakes
llvm-svn: 184659
2013-06-23 06:04:54 +00:00
Tobias Grosser 4f96749351 ScopInfo: Clarify may-write and must-write accesses
llvm-svn: 184658
2013-06-23 05:21:18 +00:00
Tobias Grosser 58032cb029 Integrate latest clang-format changes
llvm-svn: 184655
2013-06-23 01:29:29 +00:00
Tobias Grosser edab1359a0 Use isl_val instead of isl_int in the core of Polly
isl recently introduced isl_val as an abstract interface to represent arbitrary
precision numbers. This interface superseeds the old isl_int interface. In
contrast to the old interface which implemented arbitrary precision arithmetic
using macros that forward to the gmp library, the new library hides the math
library implementation in isl. This allows us to switch the math library used by
isl without affecting users such as Polly.

llvm-svn: 184529
2013-06-21 06:41:31 +00:00
Sebastian Pop a189a5763c revert r183799: scop detection: remove an iteration over all uses
llvm-svn: 184128
2013-06-17 21:43:10 +00:00
Tobias Grosser c00bd98695 Update to a newer CLooG version
This update fixes the test cases to give correct results with the isl version
we are currently using.

llvm-svn: 184064
2013-06-16 19:55:07 +00:00
Tobias Grosser c5f290f6c6 Fix typo in header guards
Found by the new -Wheader-guard warning.

llvm-svn: 184047
2013-06-15 18:52:49 +00:00
Sebastian Pop 8ca899c781 scop detection: inline and remove isValidBasicBlock
llvm-svn: 184001
2013-06-14 20:20:43 +00:00
Sebastian Pop e1e4a2d534 scop detection: check flag before expensive call
llvm-svn: 184000
2013-06-14 20:20:39 +00:00
Tobias Grosser 3e030e178a Correctly convert APInt to gmp values
Previously this happend to work for integers up to i64, but we got it wrong
for larger numbers. Fix this and add test cases to verify this keeps working.

Reported by: Sven Verdoolaege <skimo at kotnet dot org>

llvm-svn: 183986
2013-06-14 16:23:38 +00:00
Tobias Grosser ef2ee4fec2 PoCC: Adjust to recent sys::Path removal
llvm-svn: 183969
2013-06-14 06:26:33 +00:00
Tobias Grosser aa76805796 Do not create an object to call a static function
llvm-svn: 183897
2013-06-13 09:10:23 +00:00