Commit Graph

518 Commits

Author SHA1 Message Date
Sebastian Pop 5cc8caf88d make registerPollyPasses static, remove param
llvm-svn: 156325
2012-05-07 21:27:09 +00:00
Sebastian Pop e1f6554ed8 add some more missing ifdef CLOOG_FOUND
llvm-svn: 156306
2012-05-07 16:35:11 +00:00
Sebastian Pop 082cea8616 add a check for ISL codegen at configure time
llvm-svn: 156305
2012-05-07 16:20:07 +00:00
Hongbin Zheng da4bf55066 WWW: Adapt the vectorize option change.
llvm-svn: 156256
2012-05-06 10:22:57 +00:00
Hongbin Zheng 6417255283 Regression tests: Adapt the vectorize option change.
llvm-svn: 156255
2012-05-06 10:22:43 +00:00
Hongbin Zheng 6879421727 Allow polly ask bb-vectorizer to vectorize the loop body.
llvm-svn: 156254
2012-05-06 10:22:19 +00:00
Sebastian Pop 775d8e65e8 fix typo
llvm-svn: 156210
2012-05-04 21:36:08 +00:00
Chandler Carruth 30dfdfca3b Try to fix the Polly build while I'm trying to get it to build at all locally.
llvm-svn: 156207
2012-05-04 21:24:27 +00:00
Chandler Carruth d6447953f2 Update Polly to match the LLVM interface change in r156196.
llvm-svn: 156203
2012-05-04 20:57:29 +00:00
Sebastian Pop c200977905 compile cloog code only when CLOOG_FOUND is set
llvm-svn: 156199
2012-05-04 20:30:03 +00:00
Sebastian Pop de613265c5 move Cloog.cpp to CodeGen
llvm-svn: 156184
2012-05-04 18:15:57 +00:00
Tobias Grosser 14afc07577 Fix typo.
Reported by: Andreas Simbuerger

llvm-svn: 156171
2012-05-04 12:11:01 +00:00
Tobias Grosser 913fa54836 ScopDection: Improve status message for non-affine memory accesses.
llvm-svn: 156170
2012-05-04 11:26:52 +00:00
Tobias Grosser ca9a2913b7 Remove unused function
Suggested by: Sebastian Pop

llvm-svn: 155863
2012-04-30 23:49:05 +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
Hongbin Zheng 746eefeddd 1. Add a header guard for RegisterPasses.h to prevent multiple inclusion.
2. Include the helper function and the helper class in the RegisterPasses.h into the polly namespace.

llvm-svn: 155636
2012-04-26 13:55:33 +00:00
Tobias Grosser f91c441e72 Further simplify parallelism test
llvm-svn: 155634
2012-04-26 13:43:03 +00:00
Tobias Grosser 460e9a463d ScheduleOptimizer: Move functions into class
llvm-svn: 155548
2012-04-25 13:22:43 +00:00
Hongbin Zheng 8a8466106c Refactor: Move the code generation related header files to include/polly/CodeGen.
llvm-svn: 155547
2012-04-25 13:18:28 +00:00
Hongbin Zheng 3b11a16a44 Refactor: Move the declaration of the BlockGenerator/VectorBlockGenerator
to standalone header and source files.

llvm-svn: 155546
2012-04-25 13:16:49 +00:00
Hongbin Zheng 39645abf4c ScopStmt: Provide a function to allow users look up the corresponding
memory access of a particular instruction, the function will return
  null if no such memory access.

llvm-svn: 155544
2012-04-25 09:34:33 +00:00
Hongbin Zheng 86a37745eb Minor change: Replace convertInt in ScopInfo.cpp by utostr_32, which is
defined in StringExtras.h.

llvm-svn: 155539
2012-04-25 08:01:38 +00:00
Tobias Grosser fe0675927d Simplify import/export command line flags.
Instead of -polly-run-import-jscop and -polly-run-export-jscop, we just use
-polly-import and -polly-export.

llvm-svn: 155446
2012-04-24 16:12:34 +00:00
Tobias Grosser 58eee8f106 Unify the optimizer selection.
We now support -polly-optimizer=isl, -polly-optimizer=pocc and
-polly-optimizer=none. The option -polly-no-optimizer is gone.

llvm-svn: 155445
2012-04-24 16:12:30 +00:00
Tobias Grosser 7c3061acdd Make vector tests less sensible to codegen changes
llvm-svn: 155438
2012-04-24 11:08:07 +00:00
Hongbin Zheng 4ac4e15582 Refactor: Pass the argument 'IRBuilder' and 'AfterBlock' of function 'createLoop' by
reference, so that we do not need to type an extra '&' operator when calling the function.

llvm-svn: 155349
2012-04-23 13:03:56 +00:00
Hongbin Zheng 6f7aa074ad 1. Add a header guard for LoopGenerators.h to prevent multiple inclusion.
2. Include the helper function and the helper class in the LoopGenerator.h into the polly namespace.

llvm-svn: 155348
2012-04-23 13:03:43 +00:00
Tobias Grosser 902c9b243d Dependences: Rework parallelism check
After working and explaining this function to someone, I realized it could be
simplified and better documented.

llvm-svn: 155135
2012-04-19 16:38:16 +00:00
Tobias Grosser 105c984b51 www: Update matmul example slightly.
llvm-svn: 154952
2012-04-17 21:38:20 +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
Hongbin Zheng 91bfd78fb2 Revert "Fix a bug introduced by r153739: We are not able to provide the correct"
This reverts commit 2c6bdbf972ac966498489d30a33bfd252df9107d.

llvm-svn: 154486
2012-04-11 07:43:13 +00:00
Tobias Grosser d654c250c4 Fix typo
Suggested by: Sebastian Pop  <sebpop@gmail.com>

llvm-svn: 154415
2012-04-10 18:12:19 +00:00
Tobias Grosser f9fbbdfd74 Fix typos.
Pointed out by: Sebastian Pop  <sebpop@gmail.com>

llvm-svn: 154337
2012-04-09 19:46:05 +00:00
Hongbin Zheng ed986ab6a4 Rewritten expandRegion to clarify the intention and improve
performance, patched by Johannes Doerfert <johannes@jdoerfert.de>.

llvm-svn: 154260
2012-04-07 15:14:28 +00:00
Hongbin Zheng 3a2d6035d2 ScopDetection: Add some comments to function "expandRegion".
llvm-svn: 154259
2012-04-07 12:29:27 +00:00
Hongbin Zheng 94868e6cc6 Speed up SCoP detection time by checking the exit of the region first,
patched by Johannes Doerfert <johannes@jdoerfert.de>.

llvm-svn: 154258
2012-04-07 12:29:17 +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
Hongbin Zheng 2b4aeca74e Fix a bug introduced by r153739: We are not able to provide the correct
dependent list for target polly-test, hence making "all" from the top
  of llvm build directory will cause the target "polly-test" being built
  before its dependencing target built.

Patched by Sebastian Pop<spop@codeaurora.org>

llvm-svn: 154162
2012-04-06 03:56:27 +00:00
Tobias Grosser 8239a4cadf CodeGen: Remove unused declaration
llvm-svn: 153954
2012-04-03 12:37:14 +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
Hongbin Zheng 9270a8875a www: Fix typo, replace "LD_LBIRARY_PATH" by "LD_LIBRARY_PATH" in get_started.
llvm-svn: 153948
2012-04-03 09:15:52 +00:00
Hongbin Zheng da4138d105 www: Append path instead overwrite path when exporting the path of pocc.
llvm-svn: 153936
2012-04-03 06:29:27 +00:00
Hongbin Zheng eedc49c3d4 www: Fix typo in the setting LD_LBIRARY_PATH command, as pointed out by
Dmitry N. Mikushin.

llvm-svn: 153934
2012-04-03 04:39:47 +00:00
Tobias Grosser f00bd96cde CodeGen: Some style improvements
llvm-svn: 153871
2012-04-02 12:26:13 +00:00
Tobias Grosser d6d7d7e128 CodeGen: Remove unused variable
llvm-svn: 153840
2012-04-01 16:55:30 +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
Hongbin Zheng 609089f254 Move the CodeGeneration.cpp to the CodeGen folder and update the build system.
Patched by Tsingray.

llvm-svn: 153736
2012-03-30 08:46:18 +00:00
Hongbin Zheng 3ab0434bb7 Get started guide: Suggest users to append the parent directory of cloog
libraries to LD_LIBRARY_PATH.

llvm-svn: 153734
2012-03-30 08:18:19 +00:00
Tobias Grosser f49d11dfac www: Add more missing features to the TODO list
llvm-svn: 153664
2012-03-29 17:53:54 +00:00
Tobias Grosser f67a77b9b9 www: Update TODO list
- Link to several new bug reports that describe problems in more detail
- Add some more items
- Remove owners for inactive projects. This just blocks other people
- Rename 'middle part' to 'optimizer'

llvm-svn: 153647
2012-03-29 13:10:34 +00:00
Tobias Grosser 217616df99 www: Link to console view with only polly buildbots
llvm-svn: 153646
2012-03-29 13:10:30 +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 b7c07f3c2e Out of tree build support: Set TARGET_TRIPLE from the result of "llvm-config --host-target"
instead of loading the "LLVMConfig.cmake" which is only installed when
  llvm configured by cmake.

llvm-svn: 153503
2012-03-27 07:56:07 +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
Hongbin Zheng b85c0b3e0c Out-of-tree build: Load the configuration of the installed llvm.
llvm-svn: 153439
2012-03-26 15:16:29 +00:00
Tobias Grosser 5e8ffa83c0 CodeGen: Remove the need for setIVS
llvm-svn: 153331
2012-03-23 12:20:36 +00:00
Tobias Grosser ebf3008ec6 CodeGen: Simplify Variable Names
llvm-svn: 153330
2012-03-23 12:20:32 +00:00
Tobias Grosser f74a4cd3dd CodeGen: Extract the LLVM-IR generaction of scalar and OpenMP loops.
We create a new file LoopGenerators that provides utility classes for the
generation of OpenMP parallel and scalar loops. This means we move a lot
of the OpenMP generation out of the Polly specific code generator.

llvm-svn: 153325
2012-03-23 10:35:18 +00:00
Tobias Grosser 46fc9ca53f CodeGen: Change some variables to uppercase
No functional changes intended.

llvm-svn: 153321
2012-03-23 08:24:10 +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 3e72197efc IndVarSimplify: Disable simplifyIVUsers
This functionality is not available in LLVM trunk and breaks the compilation of
Polly. This patch fixes the compilation, but may not be enough to recover all
functionality.

llvm-svn: 153318
2012-03-23 08:02:19 +00:00
Tobias Grosser d87492bb8c IndVarSimplify: Adapt to changes in LLVM trunk
Contributed-By: Andrew Trick <atrick@apple.com>
llvm-svn: 153317
2012-03-23 08:02:15 +00:00
Tobias Grosser d1f12db70e IndVarSimplify: Proberly initialize the pass.
llvm-svn: 153316
2012-03-23 08:02:05 +00:00
Tobias Grosser 2f809feec5 ScheduleOptimizer: Remove forgotten debug output
llvm-svn: 152936
2012-03-16 18:45:10 +00:00
Tobias Grosser 0acfcdbe7b Do not fail if a command line argument is given more than once
For boolean flags in Polly there is no problem if they are given more than once.
Hence, we can allow it to not fail for build systems that (acciently) add flags
several times.

This fixes: PR12278

Reported by: Sebastian Pop  <sebpop@gmail.com>

llvm-svn: 152933
2012-03-16 17:17:16 +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 c507b1e262 Off-tree build support: Also check the existence of the "not" utility.
llvm-svn: 152925
2012-03-16 14:34:27 +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 632f5f4934 Off-tree build support: Warn the user if FileCheck cannot be found.
llvm-svn: 152921
2012-03-16 13:24:42 +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
Tobias Grosser 540757b09c ScevValidator: Add printer for ValidatorResult
llvm-svn: 152912
2012-03-16 10:12:37 +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
Hongbin Zheng 73e53f510a More AddUsersIfInteresting related fix.
llvm-svn: 152909
2012-03-16 08:31:24 +00:00
Hongbin Zheng 741f8d666f IndVarSimplify: Adpat to IVUsers::AddUsersIfInteresting change.
llvm-svn: 152908
2012-03-16 08:26:12 +00:00
Tobias Grosser 0e979d1628 www: Fix german special characters
llvm-svn: 152800
2012-03-15 13:55:38 +00:00
Tobias Grosser 126af46c4c www: Add another GPGPU publication
llvm-svn: 152799
2012-03-15 13:54:12 +00:00
Raghesh Aloor f41d001384 Memaccess: Updating Documentation
Adding documentation for changes in coefficients of induction
variables.

llvm-svn: 152795
2012-03-15 11:40:05 +00:00
Tobias Grosser 00d898d6b0 CodeGen: Call isl_set_copy() within the loop
llvm-svn: 152793
2012-03-15 09:34:58 +00:00
Tobias Grosser 2da263e3b6 CodeGen: Start variables with uppercase letters
llvm-svn: 152792
2012-03-15 09:34:55 +00:00
Tobias Grosser d596b37eb0 CodeGen: Get analyses from the Pass instance
llvm-svn: 152791
2012-03-15 09:34:52 +00:00
Tobias Grosser e9ffea2ccf CodeGen: Introduce helper function to get pointer to int
llvm-svn: 152790
2012-03-15 09:34:48 +00:00
Raghesh Aloor b20b49e3f0 Memaccess: Removing unwanted code
When the code is moved to IslGenerator class there is no use for
IslPwAffUserInfo.

llvm-svn: 152612
2012-03-13 05:51:44 +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 45ed487a9c Dependences: Fix typo
llvm-svn: 152318
2012-03-08 15:21:42 +00:00
Tobias Grosser 9ffa550dd9 www: Really fix it
llvm-svn: 152311
2012-03-08 12:02:59 +00:00
Tobias Grosser 9206404faf www: Fix link to image
llvm-svn: 152310
2012-03-08 12:02:10 +00:00
Tobias Grosser f67424ef96 www: Move the Polly architecture to the documentation
llvm-svn: 152309
2012-03-08 11:59:43 +00:00
Tobias Grosser 3495b42f9d www: Point to the memaccess documentation
llvm-svn: 152308
2012-03-08 11:55:27 +00:00
Tobias Grosser 7a82da99b1 www: Simplify bugs text
llvm-svn: 152307
2012-03-08 11:45:49 +00:00