Commit Graph

72 Commits

Author SHA1 Message Date
Tobias Grosser 96682025c7 Add some tests for the independent blocks pass.
llvm-svn: 158306
2012-06-11 10:25:12 +00:00
Tobias Grosser 18daacad61 ScopInfo: Add parameter bounds to context
Derive the maximal and minimal values of a parameter from the type it has. Add
this information to the scop context. This information is needed, to derive
optimal types during code generation.

llvm-svn: 157245
2012-05-22 10:47:27 +00:00
Hongbin Zheng 6417255283 Regression tests: Adapt the vectorize option change.
llvm-svn: 156255
2012-05-06 10:22:43 +00:00
Tobias Grosser e71c6ab54c SCEV based code generation
This is an incomplete implementation of the SCEV based code generation.
When finished it will remove the need for -indvars -enable-iv-rewrite.

For the moment it is still disabled. Even though it passes 'make polly-test',
there are still loose ends especially in respect of OpenMP code generation.

llvm-svn: 155717
2012-04-27 16:36:14 +00:00
Tobias Grosser 7c3061acdd Make vector tests less sensible to codegen changes
llvm-svn: 155438
2012-04-24 11:08:07 +00:00
Tobias Grosser 216ea58b21 ScheduleOpt: Fix crash with -enable-polly-vector
llvm-svn: 154808
2012-04-16 11:06:06 +00:00
Tobias Grosser 4cb5461dae CodeGen: Generate scalar code if vector instructions cannot be generated
This fixes two crashes that appeared in case of:
  - A load of a non vectorizable type (e.g. float**)
  - An instruction that is not vectorizable (e.g. call)

llvm-svn: 154586
2012-04-12 10:46:55 +00:00
Hongbin Zheng e2107f0999 Revert "Make the "all" target depend on polly-test, so that users can run regression"
This reverts commit 97bd8d50881000c11b65b0e033996ec5f57bcd15.

llvm-svn: 154487
2012-04-11 07:43:24 +00:00
Tobias Grosser 84ecc47e1c CodeGen: Allow Polly to do 'grouped unrolling', but no vector generation.
Grouped unrolling means that we unroll a loop such that the different instances
of a certain statement are scheduled right after each other, but we do
not generate any vector code. The idea here is that we can schedule the
bb vectorizer right afterwards and use it heuristics to decide when
vectorization should be performed.

llvm-svn: 154251
2012-04-07 06:16:08 +00:00
Tobias Grosser 0905a23806 CodeGen: Recreate old ivs with the original type
To avoid overflows we still use a larger type (i64) while calculating the value
of the old ivs.  However, we truncate the result to the type of the old iv when
providing it to the new code.

A corresponding test case is added to the polly test suite. Also, a failing test
case is fixed.

This fixes PR12311.

Contributed by: Tsingray Liu  <tsingrayliu@gmail.com>

llvm-svn: 153952
2012-04-03 12:24:32 +00:00
Tobias Grosser de49ef76f6 Remove unneeded alias analysis
llvm-svn: 153839
2012-04-01 16:49:48 +00:00
Tobias Grosser 89339067b0 CodeGen: Allow function parameters to be rewritten in getNewValue()
When deriving new values for the statements of a SCoP, we assumed that parameter
values are constant within the SCoP and consquently do not need to be rewritten.
For OpenMP code generation this assumption is wrong, as such values are not
available in the OpenMP subfunction and consequently also may need to be
rewritten.

Committed with some changes.

Contributed-By: Johannes Doerfert  <s9jodoer@stud.uni-saarland.de>
llvm-svn: 153838
2012-04-01 16:49:45 +00:00
Hongbin Zheng b5bf8cfa17 Make the "all" target depend on polly-test, so that users can run regression
tests by simply typing "make -C tools/polly/test", like llvm's regression
  tests.

llvm-svn: 153739
2012-03-30 09:27:16 +00:00
Hongbin Zheng 2700adebfa Autoconf build: Try to update LLVMPolly.so before running regression tests
llvm-svn: 153738
2012-03-30 09:27:07 +00:00
Tobias Grosser 900893d2d8 CodeGeneration: Proberly build the dominator tree
llvm-svn: 153645
2012-03-29 13:10:26 +00:00
Hongbin Zheng e53bdfe633 Use python script to silence the expected testcase fails on 32bit platform.
llvm-svn: 153644
2012-03-29 13:10:10 +00:00
Hongbin Zheng 689e84fcec Regession testing: Substitut POLLY_LIB_DIR, which is introduced by commit
r152924, by $(LibDir). Because we assume polly built by autoconf is always
  in llvm tree.

llvm-svn: 153642
2012-03-29 12:36:52 +00:00
Hongbin Zheng 0578aaf77c Don't fail the lli testcases on 32bit platform.
llvm-svn: 153440
2012-03-26 15:16:48 +00:00
Tobias Grosser cf88d84d79 test: Remove memaccess prefix
The prefix is not needed, as all test cases are already in a separate folder.

llvm-svn: 153320
2012-03-23 08:24:04 +00:00
Tobias Grosser d6adda3071 CodeGen: Full support for isl_pw expressions in modified access functions.
This also adds support for modifiable write accesses (until now only read
accesses where supported). We currently do not derive an exact type for the
expression, but assume that i64 is good enough. This will be improved in future
patches.

Contributed by: Yabin Hu <yabin.hwu@gmail.com>

llvm-svn: 153319
2012-03-23 08:21:22 +00:00
Tobias Grosser 3ec2abc5fb Don't allow pointer types in affine expressions
We currently do not support pointer types in affine expressions. Hence, we
disallow in the SCoP detection. Later we may decide to add support for them.

This fixes PR12277

Reported-By: Sebastian Pop  <sebpop@gmail.com>
llvm-svn: 152928
2012-03-16 16:36:47 +00:00
Hongbin Zheng c7584ff270 Off-tree build support: Set the path of Polly's library correctly.
llvm-svn: 152924
2012-03-16 14:34:20 +00:00
Hongbin Zheng 33254d1edf Revert "Minor change: Use config.polly_obj_root to locate Polly's library,"
This reverts commit 7dd9b6327b54b08ece32a4607d5ac093b518b79a.

llvm-svn: 152923
2012-03-16 13:49:55 +00:00
Hongbin Zheng 95c84eab5c Minor change: Use config.polly_obj_root to locate Polly's library,
so lit find Polly's library in off-tree build.

llvm-svn: 152920
2012-03-16 13:24:34 +00:00
Tobias Grosser 8a5070213a ScheduleOptimizer: Do not get dependences, if we do not calculate a schedule
This solves the 'isl_ctx freed, but some objects still reference it' problem
reported in PR12276.

llvm-svn: 152917
2012-03-16 11:51:41 +00:00
Tobias Grosser 371badaa47 SCEVValidator: Ensure that parameters are recorded correctly
This also fixes UMax where we did not correctly keep track of the parameters.
Fixes PR12275.

Reported-By: Sebastian Pop  <sebpop@gmail.com>
llvm-svn: 152913
2012-03-16 10:16:28 +00:00
Hongbin Zheng c0f53b1c00 Polly-test: Add a cmake option "POLLY_TEST_DISABLE_BAR". We can enable
this option in the configure step of Polly's builder to get more readable
 output from the stdio log.

llvm-svn: 152910
2012-03-16 09:04:09 +00:00
Tobias Grosser 3cbe5cfff3 Remove FinalRead
The FinalRead statement represented a virtual read that is executed after the
SCoP. It was used when we verified the correctness of a schedule by checking if
it yields the same FLOW dependences as the original code. This is only works, if
we have a final read that reads all memory at the end of the SCoP.
We now switched to just checking if a schedule does not introduce negative
dependences and also consider WAW WAR dependences. This restricts the schedules
a little bit more, but we do not have any optimizer that would calculate a more
complex schedule. Hence, for now final reads are obsolete.

llvm-svn: 152319
2012-03-08 15:21:51 +00:00
Tobias Grosser df3823750e CodeGen: Pass the scalar maps properly
llvm-svn: 151916
2012-03-02 15:20:35 +00:00
Tobias Grosser f6beec674e CodeGen: Simplify the generation of a splat
llvm-svn: 151912
2012-03-02 15:20:21 +00:00
Tobias Grosser b61e6318ac CodeGen: Name stmt bbs 'polly.stmt.' + OriginalName
llvm-svn: 150575
2012-02-15 09:58:46 +00:00
Tobias Grosser 04eadc476e tests: Replace . by %s
llvm-svn: 150377
2012-02-13 12:29:43 +00:00
Tobias Grosser 8518bbe39f CodeGen: Always name merge block
llvm-svn: 150337
2012-02-12 12:09:46 +00:00
Tobias Grosser 0dbbdd7637 Codegen: Give split and merge basic blocks better names
llvm-svn: 150335
2012-02-12 12:09:37 +00:00
Tobias Grosser a187964bac Support non-affine access functions in Polly.
In case we can not analyze an access function, we do not discard the SCoP, but
assume conservatively that all memory accesses that can be derived from our base
pointer may be accessed.

Patch provided by: Marcello Maggioni <hayarms@gmail.com>

llvm-svn: 146972
2011-12-20 10:43:14 +00:00
Tobias Grosser b6033396fd ScheduleOptimizer: Do not tile bands with just one dimension
llvm-svn: 146149
2011-12-08 13:02:58 +00:00
Tobias Grosser 595ec0d0e3 ClooG: Make sure ambigous schedules do not introduce complicated code
Cloog continued to split the domains even after the scattering. This lead to
complicated code.

llvm-svn: 146033
2011-12-07 11:03:48 +00:00
Tobias Grosser 39913e3648 test: Switch to new atomic instructions
This fixes the test with recent versions of LLVM that do not support
the old atomic instructions any more.

llvm-svn: 145402
2011-11-29 14:51:05 +00:00
Tobias Grosser 1e06003227 test: Add more dependences to cmake build
llvm-svn: 145400
2011-11-29 14:50:47 +00:00
Tobias Grosser f281702686 test: Do not hardcode '.so' as library suffix
Contributed by: Marcello Maggioni <hayarms@gmail.com>

llvm-svn: 145076
2011-11-22 19:40:38 +00:00
Tobias Grosser 4dca439cfc Register Passes: Use -polly-optimizer=(isl|pocc) to switch optimizers
This replaces the old option -polly-use-pocc. Also call the passes uniformly
-polly-opt-pocc and -polly-opt-isl.

llvm-svn: 145071
2011-11-22 19:40:19 +00:00
Tobias Grosser 8f99c167cd ScopInfo: Use names of simple parameters to name the isl parameter dimensions.
Parameters can be complex SCEV expressions, but they can also be single scalar
values. If a parameters is such a simple scalar value and the value is named,
use this name to name the isl parameter dimensions.

llvm-svn: 144641
2011-11-15 11:38:55 +00:00
Tobias Grosser f50fc50c80 Remove unused parameters from TempScop
llvm-svn: 144232
2011-11-09 22:35:15 +00:00
Tobias Grosser 6e9f25a5d5 Remove AffineSCEVIterator
We do not use it anymore. It was replaced by SCEVVisitors like the
SCEVValidator.

llvm-svn: 144229
2011-11-09 22:35:00 +00:00
Tobias Grosser fb47d66a06 Remove unused code from SCEVAffFunc constructor
llvm-svn: 144224
2011-11-09 22:34:39 +00:00
Tobias Grosser 5683df4a23 Remove more of SCEVAffineFunc
llvm-svn: 144223
2011-11-09 22:34:34 +00:00
Tobias Grosser db87142b26 TempScop: Remove more of the buildAffineFunction
llvm-svn: 144221
2011-11-09 22:34:24 +00:00
Tobias Grosser e6efa37e76 TempScopInfo: Remove unneeded construction of SCEVAffFunc
llvm-svn: 144220
2011-11-09 22:34:18 +00:00
Tobias Grosser 60b54f19e6 Detect Parameters directly on the SCEV.
Instead of using TempScop to find parameters, we detect them directly
on the SCEV. This allows us to remove the TempScop parameter detection
in a subsequent commit.

This fixes a bug reported by Marcello Maggioni <hayarms@gmail.com>

llvm-svn: 144087
2011-11-08 15:41:28 +00:00
Tobias Grosser 65fa78e975 TempScopInfo: Print the original SCEV instead of using SCEVAffFunc
This is reducing the impact of SCEVAffFunc

llvm-svn: 143574
2011-11-02 21:37:06 +00:00