Commit Graph

21 Commits

Author SHA1 Message Date
Tobias Grosser 3613fd7a35 ScopInfo: Correctly handle true/false conditions
This is a modified version of the orignally contributed patch.

Contributed-by: alexandre.isoard@gmail.com
llvm-svn: 190237
2013-09-07 01:54:13 +00:00
Tobias Grosser 815c635cec [CodeGen] Fixup assert fails caused by incorrect LoopInfo update
Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 189764
2013-09-02 16:13:00 +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 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 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
Sebastian Pop 2c9ec2e651 scop detection: do not run scop detection on regions without loops
otherwise, use -polly-detect-scops-in-regions-without-loops to also detect scops
in regions without loops

llvm-svn: 183113
2013-06-03 16:35:37 +00:00
Sebastian Pop 8fe6d11b84 scop detection: only handle functions with loops
to detect scops in functions with no loops, use -polly-detect-scops-in-functions-without-loops

llvm-svn: 182941
2013-05-30 17:47:32 +00:00
Tobias Grosser 3081b0f5ec Update LoopInfo correctly
When the Polly code generation was written we did not correctly update the
LoopInfo data, but still claimed that the loop information is correct. This
does not only lead to missed optimizations, but it can also cause
miscompilations in case passes such as LoopSimplify are run after Polly.

Reported-by: Sergei Larin <slarin@codeaurora.org>
llvm-svn: 181987
2013-05-16 06:40:24 +00:00
Tobias Grosser 5db6ffd76f LoopGenerators: Construct loops such that they are already loop rotated
BeforeBB
                   |
                   v
                GuardBB
                /      \
       __  PreHeaderBB  \
      /  \    /         |
   latch  HeaderBB      |
      \  /    \         /
       <       \       /
                \     /
                ExitBB

This does not only remove the need for an explicit loop rotate pass, but it also
gives us the possibility to skip the construction of the guard condition in case
the loop is known to be executed at least once. We do not yet exploit this, but
by implementing this analysis in the isl code generator we should be able to
remove more guards than the generic loop rotate pass can.  Another point is that
loop rotation can introduce additional PHI nodes, which may hide that a loop can
be executed in parallel. This change avoids this complication and will make it
easier to move the openmp code generation into a separate pass.

llvm-svn: 181986
2013-05-16 06:40:06 +00:00
Tobias Grosser 637bd63123 Move polly options into separate option category
Use the new cl::OptionCategory support to move the Polly options into a separate
option category. The aim is to hide most options and show by default only the
options a user needs to influence '-O3 -polly'. The available options probably
need some care, but here is the current status:

Polly Options:
Configure the polly loop optimizer

  -enable-polly-openmp              - Generate OpenMP parallel code
  -polly                            - Enable the polly optimizer (only at -O3)
  -polly-no-tiling                  - Disable tiling in the scheduler
  -polly-only-func=<function-name>  - Only run on a single function
  -polly-report                     - Print information about the activities
                                      of Polly
  -polly-vectorizer                 - Select the vectorization strategy
    =none                           -   No Vectorization
    =polly                          -   Polly internal vectorizer
    =unroll-only                    -   Only grouped unroll the vectorize
                                        candidate loops
    =bb                             -   The Basic Block vectorizer driven by
                                        Polly

llvm-svn: 181295
2013-05-07 07:31:10 +00:00
Tobias Grosser 7f54714dcc tests: Properly check if asserts are available
In my previous commits I failed to realise that my new requires lines fully
disabled these tests. We now properly check if we are in an asserts build and
only disable the tests if assertions are not available.

Reported-by: Sean Silva <silvas@purdue.edu>
llvm-svn: 176900
2013-03-12 21:27:39 +00:00
Tobias Grosser ee9423920e Missed on test case in the last commit
llvm-svn: 176864
2013-03-12 13:39:40 +00:00
Bill Wendling 83e9312ece Use attributes references on call/invoke instructions.
llvm-svn: 175881
2013-02-22 09:29:15 +00:00
Sebastian Pop b08a52898a execute cloog specific testcases only with CLOOG_FOUND
llvm-svn: 169159
2012-12-03 21:33:40 +00:00
Tobias Grosser 38ea9cd721 Tests: Pipe test files into 'opt'
Use 'opt < %s' instead of just 'opt %s' to ensure that no temporary files are
created.

llvm-svn: 167372
2012-11-04 16:56:20 +00:00
Tobias Grosser 04eadc476e tests: Replace . by %s
llvm-svn: 150377
2012-02-13 12:29:43 +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