Allow to generate a loop without the GuardBB

  This allows us to omit the GuardBB in front of created loops
  if we can show the loop trip count is at least one. It also
  simplifies the dominance relation inside the new created region.
  A GuardBB (even with a constant branch condition) might trigger
  false dominance errors during function verification.

Differential Revision: http://reviews.llvm.org/D5297



git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@217525 91177308-0d34-0410-b5e6-96231b3b80d8
Remove executable bit on all header files

Some header files had been marked executable by accident.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@217587 91177308-0d34-0410-b5e6-96231b3b80d8
Remove executable bit on test files

Some test files had been marked executable by accident.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@217663 91177308-0d34-0410-b5e6-96231b3b80d8
Improve test coverage for non-affine access functions

We now verify that such functions are correctly detected even in combination
with delinearization. This change is added to ensure we have good test coverage
for the subsequent delinearization fix.

We also remove unnecessary instructions from the test case.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@217664 91177308-0d34-0410-b5e6-96231b3b80d8
[Polly] Move MAY/MUST write property to IRAccess

  Differential Revision: http://reviews.llvm.org/D5223



git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@217665 91177308-0d34-0410-b5e6-96231b3b80d8
Check that the elements of an array have the same size

At the moment we assume that only elements of identical size are stored/loaded
to a certain base pointer. This patch adds logic to the scop detection to verify
this.

Differential Revision: http://reviews.llvm.org/D5329

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@217727 91177308-0d34-0410-b5e6-96231b3b80d8
Delinearize _all_ accesses to a multi-dimensional array

Even though we previously correctly detected the multi-dimensional access
pattern for accesses with a certain base address, we only delinearized
non-affine accesses to this address. Affine accesses have not been touched and
remained as single dimensional accesses. The result was an inconsistent
description of accesses to the same array, with some being one dimensional and
some being multi-dimensional.

This patch ensures that all accesses are delinearized with the same
dimensionality as soon as a single one of them has been detected as non-affine.

While writing this patch, it became evident that the options
-polly-allow-nonaffine and -polly-detect-keep-going have not been properly
supported in case delinearization has been turned on. This patch adds relevant
test coverage and addresses these issues as well. We also added some more
documentation to the functions that are modified in this patch.

This fixes llvm.org/PR20123

Differential Revision: http://reviews.llvm.org/D5329

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@217728 91177308-0d34-0410-b5e6-96231b3b80d8
Compute and print the minimal loop carried dependency distance

  During the IslAst parallelism check also compute the minimal dependency
  distance and store it in the IstAst for node.

Reviewer: sebpop

Differential Revision: http://reviews.llvm.org/D4987


git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@217729 91177308-0d34-0410-b5e6-96231b3b80d8
[Fix] Rewire the Region after a unconditional entry edge is created

  We use SplitEdge to split a conditional entry edge of the SCoP region.
  However, SplitEdge can cause two different situations (depending on
  whether or not the edge is critical). This patch tests
  which one is present and deals with the former unhandled one.

  It also refactors and unifies the case we have to change the basic
  blocks of the SCoP to new ones (see replaceScopAndRegionEntry).


git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@217802 91177308-0d34-0410-b5e6-96231b3b80d8
Update format and fix wrong file name
Add GPGPU codegen related files from ppcg into polly

Not made any changes at the moment.
Remove and comment unused header includes

- pet.h has been included in ppcg.h thus no need to include it once
  again.
- Change header include from <pet.h> to "pet.h"
Remove useless ppcg functions to make compiling success
Rename *.c to *.cpp

So that we can use polly's data structure in ppcg. In the next step,
pet_stmt will be replaced with polly::ScopStmt. Other than renaming all
c files into cpp files, there are two main kinds of changes in the code:
 - We rename all the varialbes named 'private', because 'private' is
   used as keyword in C++.
 - We enforce pointer type casts for 'void *' to avoid build errors that
   exist in C++ but not in C.
Update makefile to include GPGPU codegen files into build

All the added GPGPU codegen files compiled successfully.
Do not check format of the GPGPU codegen sources.
Remove use of isl_printer parameter in "generate" function

The original generate function is divided into 2 parts:
 - the new generate function: store the generated ast_node host tree
   in gen and return void.

Two functions call or use "generate" as callback are commented out.
 - generate_wrap
 - generate_gpu

Add new declaration of generate_gpu to gpu.h.
Replace use of pet_stmt with polly::ScopStmt
Add an isl_id to MemoryAccess class.

This ref_id is used to represent an id of an access.
Replace pet_scop with polly::Scop

Some functions from pet/scop.c file is copied into ppcg.cpp and
modified with input of a polly::Scop pointer.