Commit Graph

109 Commits

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