Commit Graph

754 Commits

Author SHA1 Message Date
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