Commit Graph

472 Commits

Author SHA1 Message Date
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
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 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 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 62afff33c8 Dependences: Simplify isParallelDimension
llvm-svn: 152238
2012-03-07 17:42:49 +00:00
Tobias Grosser 04734a4843 Dependences: Restructure and Document code
llvm-svn: 152237
2012-03-07 17:42:45 +00:00
Tobias Grosser 1d8c0d799c Dependences: Remove unused no_source information
llvm-svn: 152235
2012-03-07 17:42:36 +00:00
Tobias Grosser 5c0e7190ff Dependences: Simplify the check if a new scattering is valid.
We now just check if the new scattering would create non-positive dependences.
This is a lot faster than recalculating dependences (which is especially slow
on tiled code).

llvm-svn: 152230
2012-03-07 16:10:40 +00:00
Tobias Grosser 3c2efba7ff CodeGen: Fix typo 'form' -> 'from'
Suggested by: Sebastian Pop  <sebpop@gmail.com>

llvm-svn: 152109
2012-03-06 07:38:57 +00:00
Tobias Grosser 55d5208eae CodeGen: Document and beautify the parts of the BlockGenerators
llvm-svn: 151917
2012-03-02 15:20:39 +00:00
Tobias Grosser df3823750e CodeGen: Pass the scalar maps properly
llvm-svn: 151916
2012-03-02 15:20:35 +00:00
Tobias Grosser 8367e0c3d2 CodeGen: Prettify
llvm-svn: 151915
2012-03-02 15:20:31 +00:00
Tobias Grosser 260e86d3f0 CodeGen: Style
llvm-svn: 151914
2012-03-02 15:20:28 +00:00
Tobias Grosser 08a8238b7a CodeGen: Move domain into the VectorBlockGenerator
llvm-svn: 151913
2012-03-02 15:20:24 +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 415245def5 CodeGen: Prettify function
llvm-svn: 151911
2012-03-02 15:20:17 +00:00
Tobias Grosser 80998e7618 CodeGen: Create separate VectorBlockGenerator
llvm-svn: 151907
2012-03-02 11:27:28 +00:00
Tobias Grosser 642c41116d CodeGen: Extract code generation for isl types into its own class
llvm-svn: 151906
2012-03-02 11:27:25 +00:00
Tobias Grosser 44d169552b CodeGen: Remove unneeded member variable
llvm-svn: 151905
2012-03-02 11:27:21 +00:00
Tobias Grosser 32152cbd1c CodeGen: Extract code into the new function copyVectorInstruction
llvm-svn: 151904
2012-03-02 11:27:18 +00:00
Tobias Grosser fc1153fb09 CodeGen: Sink loop to iterate vector lanes down into copyInstruction
llvm-svn: 151903
2012-03-02 11:27:15 +00:00
Tobias Grosser 8b4bf8b2fa CodeGenerator: Rename functions to show they produce vector code
llvm-svn: 151902
2012-03-02 11:27:11 +00:00
Tobias Grosser b35d9c1dfc Fix typo
llvm-svn: 151901
2012-03-02 11:27:08 +00:00
Tobias Grosser 8927a44f90 CodeGen: No need to forward the vector dimension
llvm-svn: 151900
2012-03-02 11:27:05 +00:00
Tobias Grosser f81a691ef7 CodeGen: Store the vector width in the block generator
This allows us to remove a lot of redundant parameters.

llvm-svn: 151899
2012-03-02 11:27:02 +00:00
Tobias Grosser 32386750a6 CodeGen: Remove dead code
llvm-svn: 151898
2012-03-02 11:26:59 +00:00
Tobias Grosser 8412cda5ad Codegen: Add Pass as a member variable of BlockGenerator
llvm-svn: 151897
2012-03-02 11:26:55 +00:00
Tobias Grosser 14bcbd5380 CodeGen: Simplify and Prettify code
llvm-svn: 151896
2012-03-02 11:26:52 +00:00
Tobias Grosser c941ede854 CodeGen: Hide the private implementation of the block generator
llvm-svn: 151895
2012-03-02 11:26:49 +00:00
Tobias Grosser 262df3b9e7 CodeGen: Start with uppercase letter
llvm-svn: 151894
2012-03-02 11:26:46 +00:00
Tobias Grosser ce3f537ae2 CodeGen: Only check once if a loop is parallel
Suggested by: Sebastian Pop  <sebpop@gmail.com>

llvm-svn: 151893
2012-03-02 11:26:42 +00:00
Tobias Grosser 92f5480f04 ScheduleOpt: Add option to bound scheduling coefficients of dimensions.
llvm-svn: 150953
2012-02-20 08:41:47 +00:00
Tobias Grosser 4d63b9d0f9 ScheduleOptimizer: Dump the calculated schedule in debug mode
llvm-svn: 150951
2012-02-20 08:41:21 +00:00
Tobias Grosser 992e60ca57 ScheduleOpt: Add option to bound constant term coefficients
llvm-svn: 150950
2012-02-20 08:41:15 +00:00
Tobias Grosser 9a44b97913 Revert "CodeGeneration: Implement ceild/floord exactly as CLooG does"
I think I did not get the implementation right. As the current implementation
works well, we will just stick with it for now.

llvm-svn: 150691
2012-02-16 14:13:19 +00:00
Tobias Grosser 62a3c96e5d CodeGen: Code following a clast_guard comes after the merge block
llvm-svn: 150675
2012-02-16 09:56:21 +00:00
Tobias Grosser eeafc867ed RegisterPasses: Allow to print the CFG right after polly
llvm-svn: 150674
2012-02-16 09:56:17 +00:00
Tobias Grosser e04f318772 CodeGeneration: Implement ceild/floord exactly as CLooG does
llvm-svn: 150673
2012-02-16 09:56:14 +00:00
Tobias Grosser 906eafe32c CodeGen: Simplify code slightly
llvm-svn: 150672
2012-02-16 09:56:10 +00:00
Tobias Grosser 099cb16700 RegisterPasses: Add -polly-run-export-cloog option
llvm-svn: 150671
2012-02-16 09:56:07 +00:00
Tobias Grosser f12cea4257 CodeGen: Update the BasicBlock pointer correctly when creating 'polly.split...'
Problem reported by: Ryan Taylor <ryta1203@gmail.com>

llvm-svn: 150577
2012-02-15 09:58:53 +00:00
Tobias Grosser cb47dfeb96 CodeGen: Retain the old BB names within the original SCoP
llvm-svn: 150576
2012-02-15 09:58:50 +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 1e03ad7213 ScheduleOpt: Only get RAW dependences if we asked for raw
llvm-svn: 150574
2012-02-15 09:58:42 +00:00
Tobias Grosser 1deda29598 ScheduleOpt: Allow to configure for which dependences to optimize
We can either optimize for RAW dependences or for all dependences.
For the moment, I do not see a big difference here.

llvm-svn: 150484
2012-02-14 14:02:48 +00:00
Tobias Grosser 00383a75b8 CodeGen: Get dependences for validity and proximity separately
This change itself should not change functionality, but it will make it easier
to support use different dependence kinds in for validity and proximity
constraints.

llvm-svn: 150483
2012-02-14 14:02:44 +00:00
Tobias Grosser 5f9a762056 ScopInfo: Add Scop::getDomains()
llvm-svn: 150482
2012-02-14 14:02:40 +00:00
Tobias Grosser cef36d5b99 Copy IndVarSimplify pass from LLVM to Polly
This allows us to enable -enable-iv-rewrite by default and releases LLVM from
the burdon to keep that feature. This is an intermediate step. We plan to soon
remove the need for rewritten induction variables entirely.

llvm-svn: 150481
2012-02-14 14:02:33 +00:00
Tobias Grosser 0ac9214c2f Recommit "CodeGen: Maintain a valid CFG during code generation"
When I first tried to commit this patch, the builder pointed after generation
of a loop still into the loop body. This means that code that was supposed to
be generated after the loop was generated right into the loop body. We fixed
this by pointing the builder to the BB after the loop, as soon as code
generation of the loop body itself is finished.

llvm-svn: 150480
2012-02-14 14:02:27 +00:00
Tobias Grosser 1773fb1c00 Revert "CodeGen: Maintain a valid CFG during code generation"
This commit contained some bugs. Revert it until I get around to fix them.

llvm-svn: 150431
2012-02-13 23:31:43 +00:00
Tobias Grosser 98610eed34 ScheduleOptimizer: Change vars to start with uppercase letter
llvm-svn: 150430
2012-02-13 23:31:39 +00:00
Tobias Grosser 5c853bab78 CodeGen: Remove unused variable.
llvm-svn: 150376
2012-02-13 12:29:34 +00:00
Tobias Grosser 0b6c613a10 CodeGen: Maintain a valid CFG during code generation
Before this change we built the CFG such that it was only valid after code was
fully generated. During code generation itself, it was often incomplete. After
this change always maintain a valid CFG. This will later allow us to use the
SCEVExpander during code generation. This is the first step to get rid of the
independent blocks pass.

llvm-svn: 150339
2012-02-12 12:09:53 +00:00
Tobias Grosser 194beea739 CodeGen: Remove unused instruction
llvm-svn: 150338
2012-02-12 12:09:49 +00:00
Tobias Grosser 8518bbe39f CodeGen: Always name merge block
llvm-svn: 150337
2012-02-12 12:09:46 +00:00
Tobias Grosser bd608a8949 CodeGen: Start variable names with uppercase letter.
llvm-svn: 150336
2012-02-12 12:09:41 +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 d855cc5720 CodeGen: Further improve style
llvm-svn: 150334
2012-02-12 12:09:32 +00:00
Tobias Grosser b1c9599faa CodeGen: Move generation of OpenMP out of the way
We also fix some style issues. This change contains no functional change.

llvm-svn: 150333
2012-02-12 12:09:27 +00:00
Tobias Grosser a2a9b9a3e8 RegisterPasses: Make sure to always execute the SCoPInfo pass
llvm-svn: 149871
2012-02-06 14:53:51 +00:00
Tobias Grosser c327932cf5 ScopInfo: Simplify some isl code
llvm-svn: 149503
2012-02-01 14:23:36 +00:00
Tobias Grosser 5772e65be0 CodeGeneration: Rephrase comment slightly
llvm-svn: 149502
2012-02-01 14:23:33 +00:00
Tobias Grosser bda1f8f808 CodeGeneration: Order includes alphabetically
llvm-svn: 149501
2012-02-01 14:23:29 +00:00
Tobias Grosser 1d348673e0 Add a sceleton for a polyhedral dead code elimination.
Such a dead code elimination can remove redundant stores to arrays. It can also
eliminate calculations where the results are stored to memory but where they are
overwritten before ever being read. It may also fix bugs like:
http://llvm.org/bugs/show_bug.cgi?id=5117

This commit just adds a sceleton without any functionality.

If anybody is interested to learn about polyhedral optimizations this would be
a good task. Well definined, self contained and pretty simple. Ping me if you
want to start and you need some pointers to get going.

llvm-svn: 149386
2012-01-31 14:00:27 +00:00
Tobias Grosser 8ad6bc339a Schedule: Sort includes and remove useless ones
llvm-svn: 149383
2012-01-31 13:26:29 +00:00
Tobias Grosser 9f75aba51f Remove leftover constant
llvm-svn: 149290
2012-01-30 22:46:22 +00:00
Tobias Grosser 18aa54cbae Scheduling: Limiting the constant term is not necessary any more
Due to our gist simplifications, limiting the constant term does not seem to
be necessary any more.

Pointed out by Sven Verdoolaege

llvm-svn: 149288
2012-01-30 22:44:05 +00:00
Tobias Grosser a4ea90b88c Typo: Maxize -> Mazimize
Found by Sebastian Pop.

llvm-svn: 149287
2012-01-30 22:43:56 +00:00
Tobias Grosser 50ff31dabe Scheduling: Set fusion strategy to minimal
This has shown better results for 2mm, 3mm and a couple of other benchmarks.

After this we show consistenly better results as PoCC with maxfuse. We need
to see if PoCC can also give better results with another fusion strategy.

llvm-svn: 149267
2012-01-30 19:38:58 +00:00
Tobias Grosser 95e860c19c Scheduling: Add option to disable schedule_maximise_band_depth
maximise_band_depth does not seem to have any effect for now, but it may help to
increase the amount of tileable loops. We expose the flag to be able to analyze
its effects when looking into individual benchmarks.

llvm-svn: 149266
2012-01-30 19:38:54 +00:00
Tobias Grosser b3ad85b03c Scheduler: Allow to select the fusion strategy
llvm-svn: 149265
2012-01-30 19:38:50 +00:00
Tobias Grosser 42152ff3c7 Scheduling: Use original schedule if we cannot find a new one
After this we can now compile all polybench 2.0 kernels without any compiler
crash.

llvm-svn: 149264
2012-01-30 19:38:47 +00:00
Tobias Grosser a26db47083 Scheduler: Simplify dependences by default (only isl)
This speeds up the scheduler by orders of magnitude and in addition yields often
to a better schedule.

With this we can compile all polybench kernels with less than 5x compile time
overhead. In general the overhead is even less than 2-3x.  This is still with
running a lot of redundant passes and no compile time tuning at all. There are
several obvious areas where we can improve here further.

There are also two test cases where we cannot find a schedule any more (cholesky
and another). I will look into them later on.

With this we have a very solid base line from which we can start to optimize
further.

llvm-svn: 149263
2012-01-30 19:38:43 +00:00
Tobias Grosser bc3bc42491 Dependences: Coalesce the dependences before returning them.
llvm-svn: 149261
2012-01-30 19:38:36 +00:00
Tobias Grosser a132155bd8 RegisterPass: Expose functions to register Polly passes
llvm-svn: 149240
2012-01-30 09:07:50 +00:00
Tobias Grosser a1f093465b Disable some clang warnings in imported JSON code.
llvm-svn: 149239
2012-01-30 09:07:45 +00:00
Tobias Grosser fc98d453df Remove unneeded default case
This silences a clang warning.

llvm-svn: 149073
2012-01-26 19:53:01 +00:00
Tobias Grosser 9bc5eb08c2 CodeGen: Separate declaration and definition of ClastStmtCodeGen
llvm-svn: 148814
2012-01-24 16:42:32 +00:00
Tobias Grosser bb137e3f03 CodeGen: Separate declaration and definition of ClastExpCodeGen
llvm-svn: 148813
2012-01-24 16:42:28 +00:00
Tobias Grosser e5b4232572 CodeGen: Use getNullValue to simplify some code
llvm-svn: 148812
2012-01-24 16:42:25 +00:00
Tobias Grosser 70e8cdbbd1 CodeGen: Separate declaration and definitions of BlockGenerator
llvm-svn: 148811
2012-01-24 16:42:21 +00:00
Tobias Grosser 28dd48613e ScopInfo: Add isStrideX to unify stride checking
llvm-svn: 148810
2012-01-24 16:42:16 +00:00
Tobias Grosser 5013c699e4 Dependences: Simplify code
llvm-svn: 148620
2012-01-21 02:38:27 +00:00
Tobias Grosser 030b0d77ed ScopInfo: Further style improvements
llvm-svn: 148328
2012-01-17 20:39:11 +00:00
Tobias Grosser dea982300e ScopInfo: Simplify some code II
llvm-svn: 148327
2012-01-17 20:34:27 +00:00
Tobias Grosser 78d8a3d505 ScopInfo: Simplify some code
llvm-svn: 148326
2012-01-17 20:34:23 +00:00
Raghesh Aloor ea6c99c1d9 Memaccess: Removing some unwanted code
llvm-svn: 148100
2012-01-13 06:02:13 +00:00
Raghesh Aloor a71989c94e Memaccess: Using isl_map_dim_max
Use isl_map_dim_max to extract the details of the changed
access relation. Only constant access functions are supported
now.

llvm-svn: 147305
2011-12-28 02:48:26 +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 f5c8ae5f4b Adapt to move of isSafeToSpeculativelyExecute into another header.
llvm-svn: 146727
2011-12-16 08:27:42 +00:00
Tobias Grosser e1bc007afa Allow to run the Polly preopt passes with -O0
To extract a preoptimized LLVM-IR file from a C-file run:

clang -Xclang -load -Xclang LLVMPolly.so -O0 -mllvm -polly file.c -S -emit-llvm

On the generated file you can directly run passes such as:
'opt -view-scops file.s'

llvm-svn: 146560
2011-12-14 12:21:31 +00:00
Tobias Grosser f4bea399a9 Scheduler: Try to maximize the band depth
Previously the scheduler was splitting bands at the level at which it detected
that the splitting of the band is necessary. This may introduce an additional
level of bands, that can be avoided by backtracking and splitting on a higher
level. Additional splits reduce the number of loops that can be tiled, such that
avoiding splits and maximizing the band depth seems preferable.

As a first data point we looked at 2mm and 3mm from the polybench test suite.
For both maximizing the tilable bands results in a significant (5-10x)
performance improvement.

This patch enables the isl scheduler option to maximize the band depth.

llvm-svn: 146557
2011-12-14 08:58:43 +00:00
Tobias Grosser 768140c6e1 Scheduler: Set maximal constant term
If larger coefficients appear as part of the input dependences, the schedule
calculation can take a very long time. We observed that the main overhead in
this calculation is due to optimizing the constant coefficients. They are
misused to increase locality by merging several unrelated dimensions into a
single dimension. This unwanted optimization increases the complexity of the
generated code and furthermore slows it down.

We use a new isl scheduler option to bound the values in the constant dimension
by a user defined value (20 in our case). If the right value is choosen, costly
overoptimization is prevented.

This solution works, but requires a specific (here almost randomly choosen)
value by which the constants are bound. For the moment, this is our best
solution, but we hope to to find a more generic one later on.

After these patch the extremly long compile time for simple kernels like 2mm or
3mm is reduced to a reasonable amount of time (Not more than a couple of seconds
even in debug mode).

llvm-svn: 146556
2011-12-14 08:58:39 +00:00
Benjamin Kramer 66af99eb34 Update after LLVM API change.
llvm-svn: 146279
2011-12-09 21:34:43 +00:00
Raghesh Aloor 46eceba361 Memacess: Some style changes
llvm-svn: 146255
2011-12-09 14:27:17 +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 2493e92530 ScheduleOptimizer: Rewrite getPrevectorMap to use isl_pw_aff
This increases the readablity. This also adds some comments that explain
what this function does.

llvm-svn: 146028
2011-12-07 07:42:57 +00:00
Tobias Grosser 4a8e356f36 Make isl abort when an error is encountered
llvm-svn: 146027
2011-12-07 07:42:51 +00:00
Tobias Grosser 545bc31324 CodeGen: Style improvements.
llvm-svn: 145932
2011-12-06 10:48:27 +00:00
Tobias Grosser cdea7df0fe Cloog: Include header file for pipe/open/close
We forgot to include the unistd.h header file that defines the
functions mentioned above. This was not a problem with gnu C++ library,
however it did not work for libc++.

llvm-svn: 145790
2011-12-04 10:44:14 +00:00
Tobias Grosser 9fe98cc3eb autoconf: Change order of linking files
This fixes (or hides) the problem of symbols not being available in the
autoconf build.

llvm-svn: 145074
2011-11-22 19:40:31 +00:00
Tobias Grosser 34525d37b1 OpenScop: Remove use of getNameStr()
llvm-svn: 145073
2011-11-22 19:40:28 +00:00
Tobias Grosser 23156484f3 cmake: Create libPollyExchange as in the autoconf build
llvm-svn: 145072
2011-11-22 19:40:24 +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 52277852a4 RegisterPass: Disable Polly by default
We disable Polly by default and add a new option '-polly' that enables Polly.
This allows us to create an the alias

$ alias clang clang -Xclang -load -Xclang LLVMPolly.so

which loads Polly always into clang. It can now be enabled by running:

$ clang -O3 -mllvm -polly file.c

To enable it by default an alias pollycc can be create

$ alias pollycc clang -O3 -mllvm -polly

llvm-svn: 144917
2011-11-17 19:10:48 +00:00
Tobias Grosser 29ee0b14d5 Do not use getNameStr() anymore.
Instead we switch to the recommended getName(). This fixes compilation with
recent versions of LLVM.

llvm-svn: 144909
2011-11-17 14:52:36 +00:00
Tobias Grosser 135c9c6534 autoconf: Specify that pollyanalysis depends on pollysupport
llvm-svn: 144908
2011-11-17 12:56:23 +00:00
Tobias Grosser edb8a2807a SCEVValidator: Fix coding standards in ValidatorResult
llvm-svn: 144907
2011-11-17 12:56:21 +00:00
Tobias Grosser fa043f00cd SCEVValidator: Make ValidatorResult a class and enforce the use of wproper accessors
llvm-svn: 144906
2011-11-17 12:56:19 +00:00
Tobias Grosser b1f07c5c0b SCEVValidator: Document SCEVType and ValidatorResult
Suggested by Sebastian Pop.

llvm-svn: 144905
2011-11-17 12:56:17 +00:00
Tobias Grosser bcc0a0d560 SCEVValidator: Restructure the logic of visitAddRecExpr
Suggested by Sebastian Pop.

llvm-svn: 144904
2011-11-17 12:56:14 +00:00
Tobias Grosser 2a7cd94215 SCEVValidator: Fix typo
llvm-svn: 144903
2011-11-17 12:56:12 +00:00
Tobias Grosser 7ffe4e8b0b Fix placement of the '*' that marks a pointer
Suggested by Sebastian Pop.

llvm-svn: 144902
2011-11-17 12:56:10 +00:00
Tobias Grosser 92a00f818a RegisterPasses: Avoid double negation
Fix suggested by Sebastian Pop.

llvm-svn: 144901
2011-11-17 12:56:06 +00:00
Tobias Grosser 6287201d6e ScheduleOptimizer: Start with an empty union_map and add elements
llvm-svn: 144900
2011-11-17 12:56:04 +00:00
Tobias Grosser 1ae9a60426 ScheduleOptimizer: Some style changes
- Use uppercase letters according to the LLVM coding style
- Rename functions to not include 'tiledSchedule', but just Schedule. This
  is more correct as tiling might be disabled.

llvm-svn: 144899
2011-11-17 12:56:03 +00:00
Tobias Grosser 79b30201d6 ScheduleOptimizer: Use early exit
Style fix, noted by Sebastian Pop.

llvm-svn: 144898
2011-11-17 12:56:00 +00:00
Tobias Grosser eb21b70d93 ScopLib: Fix export/import after parameters are now tagged with isl_ids.
llvm-svn: 144643
2011-11-15 11:39:02 +00:00
Tobias Grosser 626227462d JSONImporter: Fix parameter ids when importing new access functions
The new isl_id support for parmeters created problems when importing new
access functions. Even though the parameters had the same names,
they were mapped to different ids and where therefore incompatible.
We copy the ids now from the old parameter dimensions. This fixes the
problem.

llvm-svn: 144642
2011-11-15 11:38:59 +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 1fb76bd6f7 Cloog: Copy parameter names from isl data structures
llvm-svn: 144640
2011-11-15 11:38:47 +00:00
Tobias Grosser ff9b54d5a9 JScop: Allow to update the context
llvm-svn: 144639
2011-11-15 11:38:44 +00:00
Tobias Grosser ecf6cd06f0 Make JScop export/reimport accessible from clang
llvm-svn: 144638
2011-11-15 11:38:36 +00:00
Tobias Grosser fff5adca2e ScopDetection: Do not verify Aliasing
This does not work reliable and is probably not needed. I accidentally changed
this in this recent commit:

commit a0bcd63c6ffa81616cf8c6663a87588803f7d91c
Author: grosser <grosser@91177308-0d34-0410-b5e6-96231b3b80d8>
Date:   Thu Nov 10 12:47:21 2011 +0000

    ScopDetect: Use INVALID macro to fail in case of aliasing

    This simplifies the code and also makes the error message available to the
    graphviz scop viewer.

    git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@144284

llvm-svn: 144286
2011-11-10 13:21:43 +00:00
Tobias Grosser 60cd932536 ScopDetection: Add flag to ignore possible aliasing
llvm-svn: 144285
2011-11-10 12:47:26 +00:00
Tobias Grosser 6f24d9d9ee ScopDetect: Use INVALID macro to fail in case of aliasing
This simplifies the code and also makes the error message available to
the graphviz scop viewer.

llvm-svn: 144284
2011-11-10 12:47:21 +00:00
Tobias Grosser 4eb7381607 ScopDetect: Clean the last failure message properly
llvm-svn: 144283
2011-11-10 12:45:15 +00:00
Tobias Grosser a66fa6cf02 ScopDetection: Improve formatting of error message and simplify some code
llvm-svn: 144282
2011-11-10 12:45:11 +00:00
Tobias Grosser bef690f57f Add a workaround to fix SCoPs rejected because of 'region not simple'
llvm-svn: 144281
2011-11-10 12:45:07 +00:00
Tobias Grosser e5e171eadd Reuse the old BaseAddress checking in SCEVValidator to make sure that no base
address is part of the access function. Also remove unused special cases that
were necessery when the base address was still contained in the access function

llvm-svn: 144280
2011-11-10 12:45:03 +00:00
Tobias Grosser 9759f85060 Use getBasePtr in TempScop/ScopInfo
llvm-svn: 144279
2011-11-10 12:44:55 +00:00
Tobias Grosser b8710b5952 ScopDetect: Use getPointerBase to get the base pointer
Previously we allowed in access functions only a single SCEVUnknown, which later
became the base address. We now use getPointerBase() to derive the base address
and all remaining unknowns are handled as parameters. This allows us to handle
cases like A[b+c];

llvm-svn: 144278
2011-11-10 12:44:50 +00:00
Tobias Grosser f50fc50c80 Remove unused parameters from TempScop
llvm-svn: 144232
2011-11-09 22:35:15 +00:00
Tobias Grosser e4e2f7b16e TempScop: Rename SCEVAffFunc to IRAccess
The SCEVAffFunc is now only used to express memory accesses. Give it a proper
name and rework the class such that this is obvious.

llvm-svn: 144231
2011-11-09 22:35:09 +00:00
Tobias Grosser 499f0a48d8 Further remove now invalid SCEVAffFunc features.
This also removes the construction of MayAliasSets that became invalid when
removing the use of SCEVAffFunc.

llvm-svn: 144230
2011-11-09 22:35:05 +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 f317e3ac83 Do not check memory accesses additionally with isValidAffineFunction
This check was necessary because of the use AffineSCEVIterator in TempScopInfo.
As we removed this use recently it is not necessary any more.

llvm-svn: 144228
2011-11-09 22:34:53 +00:00
Tobias Grosser 866b8ae928 Remove more unused stuff from SCEVAffFunc
llvm-svn: 144227
2011-11-09 22:34:48 +00:00
Tobias Grosser a601fbd682 Remove SCEVAffFunc from polly::Comparison
llvm-svn: 144226
2011-11-09 22:34:44 +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 63069c60cf ScopInfo: Use getParamsInAffineExpr to get the BaseAddress
llvm-svn: 144222
2011-11-09 22:34:28 +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 65b0058b56 Remove const
llvm-svn: 144086
2011-11-08 15:41:19 +00:00
Tobias Grosser 6be480c4ab ScopInfo: Don't add common parameters during realignment to the context.
Previously we built a context that contained already all parameter dimensions
from the start. We now build a context without any parameter dimensions and
extend the context as needed. All parameter dimensions are added during final
realignment.

llvm-svn: 144085
2011-11-08 15:41:13 +00:00
Tobias Grosser 8cae72f186 ScopInfo: Realign parameters after the scop is built
llvm-svn: 144084
2011-11-08 15:41:08 +00:00
Tobias Grosser 9a38ab8a04 Use a map to store the dimension of the the parameters
llvm-svn: 144083
2011-11-08 15:41:03 +00:00
Tobias Grosser 76c2e32a8e ScopInfo: Extract function getIdForParam()
llvm-svn: 143961
2011-11-07 12:58:59 +00:00
Tobias Grosser 120db6b583 SCEVValidator: Move into own file
llvm-svn: 143960
2011-11-07 12:58:54 +00:00
Tobias Grosser 60e85cbd9d ScopDetection: Introduce methods to check attributes of ValidatorResult
This simplifies e.g:

if (Op.type == SCEVType::INT || Op.type == SCEVType::PARAM)

  to

if (Op.isConstant())

llvm-svn: 143959
2011-11-07 12:58:46 +00:00
Tobias Grosser eadc4285db ScopDetection: Add ValidatorResult class
llvm-svn: 143958
2011-11-07 12:58:41 +00:00
Tobias Grosser 2d0b1f9d8a ScopDetection: Small fixes and improvements for the SCEVValidator
These fixes were part of a code audit of the SCEVValidator.

llvm-svn: 143692
2011-11-04 10:08:08 +00:00
Tobias Grosser 7b0ee0ec9f ScopInfo: Add two new asserts.
They show a bug recently reported by Marcello Maggioni <hayarms@gmail.com>

llvm-svn: 143691
2011-11-04 10:08:03 +00:00
Tobias Grosser 76164677f8 ScopDetection: Use SCEVValidator for memory accesses.
We currently run the old memory access checker in parallel, as we would
otherwise fail in TempScop because of currently unsupported functions. We will
remove the old memory access checker as soon as TempScop is fixed.

llvm-svn: 143654
2011-11-03 21:03:18 +00:00
Tobias Grosser 2fea5c68fd ScopDetection: Use SCEVValidator for conditions
llvm-svn: 143653
2011-11-03 21:03:14 +00:00
Tobias Grosser 56f4745c3f TempScop: Remove has_signed (was unused)
llvm-svn: 143651
2011-11-03 21:03:06 +00:00
Tobias Grosser ad96c4b06d ScopDetection: A parameter cannot appear inside a SCoP.
llvm-svn: 143650
2011-11-03 21:03:01 +00:00
Tobias Grosser 3fb4992221 ScopDetection: Add new SCEV Validator
The SCEV Validator is used to check if the bound of a loop can be translated
into a polyhedral constraint. The new validator is more general as the check
used previously and e.g. allows bounds like 'smax 1, %a'. At the moment, we
only allow signed comparisons. Also, the new validator is only used to verify
loop bounds. Memory accesses are still handled by the old validator.

llvm-svn: 143576
2011-11-02 21:40:08 +00:00
Tobias Grosser 1179afafca TempScop: Remove SCEVAffFunc from LoopBoundInfo
This is not needed anymore -> Reduce impact of SCEVAffFunc.

llvm-svn: 143575
2011-11-02 21:37:51 +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
Tobias Grosser bd54f3226f ScopInfo: Print SCEV and not the pointer to it
llvm-svn: 143004
2011-10-26 01:27:49 +00:00
Tobias Grosser 3638ef8fe1 PoCC: Fix bugs when executing PoCC
These are remainders of the switch to the newer isl version. At the point of
switching I did not test with PoCC support. I should have done. ;-)

llvm-svn: 142777
2011-10-23 20:59:49 +00:00
Tobias Grosser 967239c029 Only have a single option to disable tiling for both isl and Pocc optimzer
This also documents the new option on the website.

llvm-svn: 142775
2011-10-23 20:59:44 +00:00
Tobias Grosser 67707b7131 Enable prevectorization with -enable-polly-vector.
This removes the separate prevector options for the Pluto and isl scheduler.

llvm-svn: 142774
2011-10-23 20:59:40 +00:00
Tobias Grosser d5e80c5f9c Add an option to run the PoCC optimizer
llvm-svn: 142773
2011-10-23 20:59:35 +00:00
Tobias Grosser 12dcc646d5 Allow to disable the schedule optimizer
The option -polly-no-optimizer disables the scheduling optimizer.

llvm-svn: 142772
2011-10-23 20:59:32 +00:00
Tobias Grosser 22636bf498 Rename -enable-schedule-prevector to -polly-prevector
llvm-svn: 142771
2011-10-23 20:59:29 +00:00
Tobias Grosser 353a2684bc ScheduleOptimizer: Allow to disable tiling
llvm-svn: 142770
2011-10-23 20:59:26 +00:00
Tobias Grosser 70c31f9411 ScopLib: Fix memory issues
llvm-svn: 142769
2011-10-23 20:59:24 +00:00
Tobias Grosser 048c87943c ScopInfo: Remove unneeded code
llvm-svn: 142768
2011-10-23 20:59:20 +00:00
Tobias Grosser 318955b516 Fix compilation of Polly with scoplib support
llvm-svn: 142767
2011-10-23 20:59:17 +00:00
Tobias Grosser 76a42df06e Rename -enable-polly-viewer to -polly-run-viewer
Similar changes for polly-only-viewer, polly-printer and polly-only-printer.

llvm-svn: 142766
2011-10-23 20:59:14 +00:00
Tobias Grosser f50dbc44ba RegisterPasses: Allow to disable code generation.
llvm-svn: 142765
2011-10-23 20:59:11 +00:00
Tobias Grosser 2ff8723d5d ScopDetection: Allow to limit the scop detection to a single function
-polly-detect-only=<functionname> allows to limit the scop detection to
a single function.

llvm-svn: 142750
2011-10-23 11:17:06 +00:00
Tobias Grosser cf1a26838c Add CloogInfo debug output.
llvm-svn: 142745
2011-10-23 10:57:44 +00:00
Tobias Grosser 23b3666850 ScopInfo: Fix ctx->ref != 0 problem
Reported by: Yabin Hu <yabin.hwu@gmail.com>

llvm-svn: 142184
2011-10-17 08:32:36 +00:00
Tobias Grosser b43ba82c94 ScopDetection: Improve error messages and add another INVALID case.
llvm-svn: 141461
2011-10-08 00:49:30 +00:00
Tobias Grosser 0ad4caa263 ScopInfo: Proporly free the local space
llvm-svn: 141459
2011-10-08 00:35:17 +00:00
Tobias Grosser 4f129a6b43 Show the reason a region is not a SCoP in the DOT graphs.
llvm-svn: 141458
2011-10-08 00:30:55 +00:00
Tobias Grosser c4a0bd13ad ScopDetection: Unify the handling of invalid SCoPs
llvm-svn: 141457
2011-10-08 00:30:48 +00:00
Tobias Grosser a3263c85e2 Add flags to run the Polly Printers/Viewers
llvm-svn: 141456
2011-10-08 00:30:44 +00:00
Tobias Grosser 73600b8edd Initialize the passes early and properly.
llvm-svn: 141455
2011-10-08 00:30:40 +00:00
Tobias Grosser e19661e0ca ScopInfo: Some cleanups
- Use __isl_give and __isl_take
- Convert variables to start with Uppercase letter
- Only assign the 'domain' after it is fully constructed
- Only name it after it is fully constructed

llvm-svn: 141361
2011-10-07 08:46:57 +00:00
Tobias Grosser 9b13d3dbe5 ScopInfo: Simplify the construction of the iteration domain.
llvm-svn: 141325
2011-10-06 22:32:58 +00:00
Tobias Grosser 5d45381294 ScopInfo: Only give away a copy of the access relation.
Also take the chance and rename access functions to access relations. This is
because we do not only allow plain functions to describe an access, but we
can have any access relation that can be described with linear constraints.

llvm-svn: 141257
2011-10-06 00:04:11 +00:00
Tobias Grosser cf3942dfa6 ScopInfo: Only give away a copy of the schedule.
llvm-svn: 141256
2011-10-06 00:04:05 +00:00
Tobias Grosser 4da8d9fc15 ScopInfo: Only give away a copy of the Context
llvm-svn: 141255
2011-10-06 00:03:59 +00:00
Tobias Grosser 3c69fab0e8 ScopInfo: Get the isl_ctx always with getIslCtx()
llvm-svn: 141254
2011-10-06 00:03:54 +00:00
Tobias Grosser 0e27e24751 ScopInfo: Use separate function to build context
llvm-svn: 141253
2011-10-06 00:03:48 +00:00
Tobias Grosser 3748705fff Export the parameter space directly from the SCoP.
Use this to simplify some code.

llvm-svn: 141252
2011-10-06 00:03:42 +00:00
Tobias Grosser f53388034d Adapt to introduction of isl_space
Polly should now be compiled with CLooG 0c252c88946b27b7b61a1a8d8fd7f94d2461dbfd
and isl 56b7d238929980e62218525b4b3be121af386edf. The most convenient way to
update is utils/checkout_cloog.sh.

llvm-svn: 141251
2011-10-06 00:03:35 +00:00
Tobias Grosser c92151516f CodeGen: Support for Cast Operations in vector code generation
llvm-svn: 139097
2011-09-04 11:45:52 +00:00
Tobias Grosser 8b00a51164 CodeGen: Remove unused code
llvm-svn: 139096
2011-09-04 11:45:45 +00:00
Tobias Grosser 7551c3000a CodeGen: Better separate scalar and vector code generation.
llvm-svn: 139095
2011-09-04 11:45:41 +00:00
Tobias Grosser b06e71b95c CodeGeneration: Simplify code, fix style.
llvm-svn: 139094
2011-09-04 11:45:34 +00:00
Tobias Grosser 09c571008b CodeGen: Split large function in smaller ones.
llvm-svn: 139093
2011-09-04 11:45:29 +00:00
Tobias Grosser 8ae9aca5cc CodeGen: Improve naming of copied basic blocks
It may happen that we generate the code of a basic block from the original
scop is code generated several times. The new naming scheme reduces confusing
that earlier appeared as the version numbers of the new basic blocks could
have been interpreted as part of the name of the original basic block.

llvm-svn: 139092
2011-09-04 11:45:22 +00:00
Tobias Grosser c532f12965 Fix crashes due to unaligned parameters
Due to the recent introduction of isl_id, parameters need now always to be
aligned. This was not yet taken care of in the code path of vectorization and
dependence analysis.

llvm-svn: 138555
2011-08-25 08:40:59 +00:00
Tobias Grosser b406d227d2 ScheduleOptimizer: Fix another memleak
llvm-svn: 138554
2011-08-25 08:40:52 +00:00
Tobias Grosser 3df9c76d5c RegisterPasses: Rework comments slightly
llvm-svn: 138428
2011-08-24 07:33:05 +00:00
Tobias Grosser 792509b0db Register Polly passes automatically
Polly adds, after it is loaded into opt or clang, its passes to the default set
of -O3 passes. This means optimizing a program with clang and Polly becomes as
simple as executing.

clang -Xclang -load -Xclang lib/LLVMPolly.so -O3 program.c

The same should work for dragonegg powered gfortran, g++, ... or any other tool
that uses the PassManagerBuilder.

Warning: Even though using Polly became with this commit extremly easy, Polly
         is still Pre-Alpha Quality. This means in most cases it will rather
         destroy the world than doing anything positive. ;-)
llvm-svn: 138402
2011-08-23 22:35:38 +00:00
Tobias Grosser a954242c88 ScheduleOptimizer: Fix another memory leak
llvm-svn: 138401
2011-08-23 22:35:23 +00:00
Tobias Grosser 83f5c43ede Add some forgotten passes to LinkAllPasses
llvm-svn: 138400
2011-08-23 22:35:08 +00:00
Tobias Grosser 6e0fdcadfe ScheduleOptimizer: Fix some memory errors.
This fixes reference counting if the schedule optimizer is used.

llvm-svn: 138325
2011-08-23 12:31:14 +00:00
Tobias Grosser 604c981f40 Temporarily remove reduction support and interchange pass
I am planning to eliminate the TempScopInfo pass. To simplify this I remove
some features that may later be added to the ScopInfo pass.

The interchange pass is currently strongly tested and furthermore ment to be
replaced by the general scheduling optimizer. Reductions itself can later
be added easily.

llvm-svn: 138219
2011-08-21 14:57:58 +00:00
Tobias Grosser b76f385334 Free isl_ctx and fix several memory leaks
Because of me not understanding the LLVM pass structure well, I did not find a
good way to allocate isl_ctx and to free it later without getting issues with
reference counting. I now found this place, such that we can free isl_ctx. This
patch also fixes the memory leaks that were ignored beforehand.

llvm-svn: 138204
2011-08-20 11:11:25 +00:00
Tobias Grosser 15f5efff8f GICHelper: Fix memory leaks, as we forgot to free some strings.
llvm-svn: 138203
2011-08-20 11:11:18 +00:00
Tobias Grosser eec4d56e63 Move common code into the function it belongs to
llvm-svn: 138202
2011-08-20 11:11:14 +00:00
Tobias Grosser fa7bc2f1a3 ScopInfo/Dependences: Use parameter ids everywhere
llvm-svn: 138155
2011-08-20 00:03:28 +00:00
Tobias Grosser 7d4cee4b02 ScopInfo: Construct the accessrelations with isl_pw_aff
This simplifies the code quite a bit.

llvm-svn: 138147
2011-08-19 23:34:28 +00:00
Tobias Grosser d2795d0365 ScopInfo: Remove adhoc comparision of affine expressions
Until today, we compared two affine expressions by defining two maps describing
them, creating an union of those maps, adding constraints that do the comparison
and projecting out unneeded dimensions.

This was simplified to using the isl_pw_aff representation of the affine
expressions and using the relevant isl functions to compare them.

llvm-svn: 137932
2011-08-18 07:51:40 +00:00
Tobias Grosser 30b8a092d8 ScopInfo: Create all isl data structures with dimension ids
At the moment, we still remove the ids after all data structures are created,
as later passes do not yet support ids. This limitation will be removed later.

llvm-svn: 137931
2011-08-18 07:51:37 +00:00
Tobias Grosser 33ba62ad11 ScopInfo: Build isl_pw_aff directly from SCEV.
Do not use AffFunc to derive the affine expressions, but use isl_pw_aff to
analyze the original SCEV directly. This will allow several simplifications in
follow up patches, with the final goal of removing AffFunc completely.

llvm-svn: 137930
2011-08-18 06:31:50 +00:00
Tobias Grosser 54a86e6c2a ScopInfo: Simplify code
llvm-svn: 137929
2011-08-18 06:31:46 +00:00
Tobias Grosser edd8372d4f TempSCoP: Store SCEV a SCEVAffFunc was derived from
llvm-svn: 137928
2011-08-18 06:31:43 +00:00
Tobias Grosser 223d4d0b37 TempScopInfo: Improve formatiing
llvm-svn: 137927
2011-08-18 06:29:25 +00:00
Raghesh Aloor 129e867865 Memaccess: Code generation for constant access function change
Support for generating code for an access function change which is
a constant is added. 

llvm-svn: 137603
2011-08-15 02:33:39 +00:00
Raghesh Aloor e75e986d03 Removing some trailing whitespaces
llvm-svn: 137304
2011-08-11 08:44:56 +00:00
Raghesh Aloor 490c5988f9 Memaccess: Some style changes
llvm-svn: 137043
2011-08-08 08:34:16 +00:00
Raghesh Aloor 62b13120ee Memaccess: Codegeneration for a simple access function change
Code is generated for a simple access function change imported
from JSCOP file. An access of A[i] is changed to A[0]. The code
for A[0] is generated directly without refering to isl function calls.

llvm-svn: 136789
2011-08-03 17:02:50 +00:00
Raghesh Aloor 7a04f4f9ba Memaccess: Display Changed Access Relation
The changed access relations imported from JSCOP file is shown
as output of -analyze pass.

llvm-svn: 136774
2011-08-03 13:47:59 +00:00
Tobias Grosser 3b660f8585 ScopInfo: Do not use >"< in statement names.
Signed-off-by: Tobias Grosser <tobias@grosser.es>

llvm-svn: 136750
2011-08-03 00:12:11 +00:00
Tobias Grosser 51e89bf87f Dependences: Fix memory corruption.
Signed-off-by: Tobias Grosser <tobias@grosser.es>
llvm-svn: 136749
2011-08-03 00:09:49 +00:00
Tobias Grosser 2bd3af1e89 Fix two compiler warnings
One of them actually pointed to an invalid condition in an assert.

llvm-svn: 136657
2011-08-01 22:39:00 +00:00
Tobias Grosser 55927aa400 Use llvm::*Type without const
llvm-svn: 135384
2011-07-18 09:53:32 +00:00
Raghesh Aloor 9ca0e917a3 Memaccess: Bugfix-Reading of JSCoP file fails
While iterating through the memory accesses in JSCOP file
the inner loop index was not initialized to zero.

llvm-svn: 135340
2011-07-16 04:55:09 +00:00
Tobias Grosser 0679e17644 CodeGeneration: Adjust call to CreateCall.
Needed to avoid compile error after the patch "Convert CallInst and
InvokeInst APIs to use ArrayRef.

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

llvm-svn: 135321
2011-07-15 22:54:41 +00:00
Raghesh Aloor 3cb6628d7c MemAccess: Reading Change in Access Function
This patch reads the change in access functions from
imported JSCOP file. A test case is also added.

llvm-svn: 134991
2011-07-12 17:14:03 +00:00
Tobias Grosser 851b96e7f0 Adapt to LLVM type system changes
Remove constness of Types and do not name the structures generated in the OpenMP
code.

llvm-svn: 134980
2011-07-12 12:42:54 +00:00
Raghesh Aloor 7eb661e636 Fix for broken build
isl/map.h is included in OpenScopExporter.cpp and
OpenScopImporter.cpp

llvm-svn: 134786
2011-07-09 03:10:22 +00:00
Tobias Grosser e790a8dac9 ScopLib: Add missing include
llvm-svn: 134513
2011-07-06 18:05:05 +00:00
Tobias Grosser 44f19ac3fb ScheduleOpt: Fix some bugs
isl changed a function name, we did not properly initialize some variables
and we freed an isl_ctx object.

llvm-svn: 134448
2011-07-05 22:15:53 +00:00
Tobias Grosser 9611623d02 CodeGen: Adapt to change of PHI operand storage
Commit 133435 "Change how PHINodes store their operands" broke Polly. Fix this
breakage by adapting to the changes in the commit.

llvm-svn: 134434
2011-07-05 19:13:31 +00:00
Tobias Grosser 7c5ba83015 ScheduleOpt: Prevectorize the innermost parallel loop
Only prevectorize loops that are actually parallel and can
be vectorized. Take the innermost loop that is eligible.

llvm-svn: 134187
2011-06-30 20:29:20 +00:00
Tobias Grosser c6699b7fe8 ScheduleOpt: Add first version of prevectorization
We just strip-mine the innermost dimension by the vector width. This does not
take into account if this dimension is parallel nor if it is constant.

llvm-svn: 134186
2011-06-30 20:29:13 +00:00
Tobias Grosser de68cc91cf ScheduleOpt: Use band forest to get the schedules
isl introduced a new representation for the schedules it calculates. The new
representation uses a forest of bands and is closer to the structure of the
data as the old interface. Switch to the new interface, as it is nicer to use
and as the old interface will soon be removed from isl.

WARNING: This commit needs a version of isl that is more recent that the one
         included in CLooG. See:
	 http://polly.grosser.es/get_started.html#islTrunk
llvm-svn: 134181
2011-06-30 20:01:02 +00:00
Tobias Grosser 97fb5acf48 CodeGeneration: Adapt to SCEVExpander change
Reported-By: Sebastian Pop <sebpop@gmail.com>
llvm-svn: 134179
2011-06-30 19:39:10 +00:00
Tobias Grosser 76747f76a0 ScheduleOptimizer: Declare functions static
Functions that are currently only used in this file can be declared static.

Suggested by: ether

llvm-svn: 131960
2011-05-24 12:20:07 +00:00