Commit Graph

737 Commits

Author SHA1 Message Date
Johannes Doerfert 9e7b17b0d4 Added arcanist linters and cleaned errors and warnings
Arcanist (arc) will now always run linters before uploading any new
  commit to Phabricator. All errors/warnings (or their absence) will be
  shown in the web interface together with a explanation by the commiter
  (arcanist will ask the commiter if the build was not clean).

  The linters include:
    - clang-format
    - spelling check
    - permissions check (aka. chmod)
    - filename check
    - merge conflict marker check
  Note, that their scope is sometimes limited (see .arclint for
  details).

  This commit also fixes all errors and warnings these linters reported,
  namely:
    - spelling mistakes and typos
    - executable permissions for various text files

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

llvm-svn: 215871
2014-08-18 00:40:13 +00:00
Andreas Simbuerger 6bf77979e0 Diagnostic: Provide end-user message for non-affine loop bound errors
llvm-svn: 215832
2014-08-17 10:09:15 +00:00
Andreas Simbuerger d46b935267 Diagnostic: Provide end-user message for non-affine access function errors
llvm-svn: 215831
2014-08-17 10:09:11 +00:00
Andreas Simbuerger f29f625748 Diagnostic: Provide end-user message for aliasing errors
This will spill out information about LLVM-internals. However, in cases
where the name of the Value matches the name of the array in the source,
we provide more useful information. In cases where we spill internals,
the information still might help the user to pin down the correct
arrays.
The problem we face here is: The error is pinned to the debug location
of one of the offending values out of the alias set instead of all of them.

The more information we give the user about the set of aliasing
pointers the better.

llvm-svn: 215830
2014-08-17 10:09:07 +00:00
Andreas Simbuerger 3efe40b8d3 Diagnostic: Enable error tracking by default
llvm-svn: 215829
2014-08-17 10:09:03 +00:00
Tobias Grosser 2873594709 Revert "[Refactor] Cleanup runtime code generation"
This reverts commit 215466 (and 215528, a trivial formatting fix).

The intention of these commits is a good one, but unfortunately they broke
our LNT buildbot:

http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-codegen-isl

Several of the cleanup changes that have been combined in this 'fixup' are
trivial and could probably be committed as obvious changes without risking to
break the build. The remaining changes are little and it should be easy to
figure out what went wrong.

llvm-svn: 215817
2014-08-16 09:09:15 +00:00
Tobias Grosser f4daf34496 Revert "Added support for modulo expressions"
This reverts commit 215684. The intention of the commit is great, but
unfortunately it seems to be the cause of 14 LNT test suite failures:

http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly/builds/116

To make our buildbots and performance testers green until this issue is solved,
we temporarily revert this commit.

llvm-svn: 215816
2014-08-16 09:08:55 +00:00
Johannes Doerfert 5130c849aa Added support for modulo expressions
The support is limited to signed modulo access and condition
  expressions with a constant right hand side, e.g., A[i % 2] or
  A[i % 9]. Test cases are modified according to this new feature and
  new test cases are added.

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

llvm-svn: 215684
2014-08-15 01:14:11 +00:00
Andreas Simbuerger 57b469f842 Add print method to RejectLog
llvm-svn: 215627
2014-08-14 08:53:18 +00:00
Andreas Simbuerger 05ae147d25 Use a snapshot of the aliasing pointers
Store the llvm::Value pointers of the AliasSet instead of the AliasSet
itself.

We have to be careful about changed IR when the message is generated,
because the Value pointers might not exist anymore. This would render
the Diagnostic invalid. For now we just assert there.

Simply do not retreive a diagnostic message after the IR has changed
it's not valid information anyway.

llvm-svn: 215625
2014-08-14 08:53:12 +00:00
Andreas Simbuerger 730b01d88e Revert to heuristical DebugLoc finding
llvm-svn: 215623
2014-08-14 08:53:06 +00:00
Tobias Grosser b5c440f33f Fix formatting
llvm-svn: 215570
2014-08-13 19:39:08 +00:00
Johannes Doerfert 5aa2194ea5 [Polly] Remove the PoCC and ScopLib support
Remove the PoCC and ScopLib support from Polly as we do not have a
  user/maintainer for it.

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

llvm-svn: 215563
2014-08-13 17:49:16 +00:00
Tobias Grosser 5b1a04426b Fix formatting
llvm-svn: 215528
2014-08-13 08:38:34 +00:00
Johannes Doerfert 9744c4af16 [Refactor] Cleanup runtime code generation
+ Use regexp in two test case.
  + Refactor the runtime condition build function

llvm-svn: 215466
2014-08-12 18:35:54 +00:00
Johannes Doerfert 13c8cf2544 [Refactor] Remove const keyword from access instruction
llvm-svn: 215309
2014-08-10 08:09:38 +00:00
Johannes Doerfert c5129d85e2 [Fix] Broken build after r215121
llvm-svn: 215183
2014-08-08 04:23:13 +00:00
Johannes Doerfert 2ef3f4fd23 Make used analysis passes explicit
Use the explicit analysis if possible, only for splitBlock we will continue
  to use the Pass * argument. This change allows us to remove the getAnalysis
  calls from the code generation.

llvm-svn: 215121
2014-08-07 17:14:54 +00:00
Tobias Grosser f57d63f906 Do allow negative offsets in the outermost array dimension
There is no needed for neither 1-dimensional nor higher dimensional arrays to
require positive offsets in the outermost array dimension.

We originally introduced this assumption with the support for delinearizing
multi-dimensional arrays.

llvm-svn: 214665
2014-08-03 21:07:30 +00:00
Johannes Doerfert a63b2579c6 Fix the modifiable access creation
+ Remove the class IslGenerator which duplicates the functionality of
    IslExprBuilder.
  + Use the IslExprBuilder to create code for memory access relations.
    + Also handle array types during access creation.
  + Enable scev codegen for one of the transformed memory access tests,
    thus access creation without canonical induction variables available.
  + Update one test case to the new output.

llvm-svn: 214659
2014-08-03 01:51:59 +00:00
Johannes Doerfert ed87831113 Allow the IslExprBuilder to generate access operations
llvm-svn: 214658
2014-08-03 01:50:50 +00:00
Tobias Grosser 5b5fd4e27c No need to run -mem2reg twice
llvm-svn: 214632
2014-08-02 13:37:25 +00:00
Johannes Doerfert dc6ad99aad Annotate the IslAst with broken reductions
+ Split all reduction dependences and map them to the causing memory accesses.
  + Print the types & base addresses of broken reductions for each "reduction
    parallel" marked loop (OpenMP style).
  + 3 test cases to show how reductions are now represented in the isl ast.

  The mapping "(ast) loops -> broken reductions" is also needed to find the
  memory accesses we need to privatize in a loop.

llvm-svn: 214489
2014-08-01 08:17:19 +00:00
Johannes Doerfert ed67f8baf6 Change the semantics of is*Parallel
The functions isParallel, isInnermostParallel and IsOutermostParallel in
  IslAstInfo will now return true even in the presence of broken reductions.
  To compensate for this change the negated result of isReductionParallel can
  be used.

llvm-svn: 214488
2014-08-01 08:14:28 +00:00
Johannes Doerfert 32868bf4c3 Change the printing of reduction types
We use the C operator representation when applicable.

  + Update all the test cases accordingly.

llvm-svn: 214486
2014-08-01 08:13:25 +00:00
Johannes Doerfert 99f6630c82 [Refactor] Remove unecessary check and function
+ Perform the parallelism check on the innermost loop only once.
  + Inline the markOpenmpParallel function.
  + Rename all IslAstUserPayload * into Payload to make it consistent.

llvm-svn: 214448
2014-07-31 21:34:32 +00:00
Johannes Doerfert 0eefb0258f [Refactor] Use nicer print callback function in IslAst
llvm-svn: 214447
2014-07-31 21:33:49 +00:00
Johannes Doerfert 13c5c64b5d [Refactor] Expose the IslExprBuilder (missing files)
llvm-svn: 214220
2014-07-29 21:06:08 +00:00
Johannes Doerfert 48cf6ecbb1 [Refactor] Expose the IslExprBuilder
This allows us to use to IslExprBuilder not only from within
  IslCodegeneration.

llvm-svn: 214215
2014-07-29 20:50:09 +00:00
Johannes Doerfert 47b906c815 Assume no annotations when visiting new domain (IslAst)
Whe we build the IslAst we visit for nodes (in pre and post order) as well as
  user/domain nodes. As these two sets are non overlapping we do not need to
  check if we annotated a node earlier when we visit it.

llvm-svn: 214170
2014-07-29 08:59:56 +00:00
Johannes Doerfert 5d83f09cdd Added base array id's to Memory Accesses
These id's allow us to cread id -> array base value mappings.

llvm-svn: 214169
2014-07-29 08:37:55 +00:00
Johannes Doerfert d9e1dbd376 [Refactor] Use non-const MemoryAccess base addresses
llvm-svn: 214168
2014-07-29 08:36:18 +00:00
Johannes Doerfert 770ec7a72f [Refactor] Remove unused MemoryAccess constructor
llvm-svn: 214165
2014-07-29 08:34:03 +00:00
Johannes Doerfert 515f85770c Replace the dependences parallelism check by the IslAst one
llvm-svn: 214061
2014-07-28 03:46:28 +00:00
Johannes Doerfert efa8504097 [Fix] Added RuntimeDebugBuilder to the build
llvm-svn: 213962
2014-07-25 17:49:55 +00:00
Johannes Doerfert a014a98255 [Refactor] Expose the runtime debug builder
llvm-svn: 213908
2014-07-24 23:55:19 +00:00
Johannes Doerfert 79fc23f26b Make getIslCompatibleName globaly available
llvm-svn: 213907
2014-07-24 23:48:02 +00:00
Johannes Doerfert af9b1e2d80 [Refactor] Remove containsLoop to find innermost loops
Use the fact that if we visit a for node first in pre and next in post order
  we know we did not visit any children, thus we found an innermost loop.

  + Test case for an innermost loop with a conditional inside

llvm-svn: 213870
2014-07-24 15:59:06 +00:00
Johannes Doerfert 94d908216b [Fix] Typo during refactoring
llvm-svn: 213795
2014-07-23 20:26:25 +00:00
Johannes Doerfert c4968e508b [Refactor] IslAst and payload struct
+ Renamed context into build when it's the isl_ast_build
  + Use the IslAstInfo functions to extract the schedule of a node
  + Use the IslAstInfo functions to extract the build/context of a node
  + Move the payload struct into the IslAstInfo class
  + Use a constructor and destructor (also new and delete) to
    allocate/initialize the payload struct

llvm-svn: 213792
2014-07-23 20:17:28 +00:00
Johannes Doerfert f6583176ab [Refactor] Unify IslAst print methods
+ Add const annotations to some member functions

llvm-svn: 213779
2014-07-23 18:14:43 +00:00
Bill Wendling 03074dd83e Update formatting with clang-format.
llvm-svn: 213468
2014-07-20 05:28:52 +00:00
Matt Arsenault 8ca36815ee Update for RegionInfo changes.
Mostly related to missing includes and renaming of
the pass to RegionInfoPass.

llvm-svn: 213457
2014-07-19 18:40:17 +00:00
Johannes Doerfert 6e81905ece [Refactor] Move code out of the IslAst header
Offer the static functions to extract information out of an IslAst for node
  as members of IslAstInfo not as top level entities.

  + Refactor common code
  + Add isParallel and isReductionParallel
  + Rename IslAstUser to IslAstUserPayload to make it clear this is just a (or
    the) payload struct.

llvm-svn: 213272
2014-07-17 16:11:28 +00:00
Johannes Doerfert 43e1eadf26 [Refactor] Use attributes to mark function as invalid for polly
+ Test case annotated with the new attribute
  + Modified test case to check if subfunctions are annotated

llvm-svn: 213093
2014-07-15 21:06:48 +00:00
Johannes Doerfert 3151463091 [Format] Clang format IslAst.cpp
llvm-svn: 213026
2014-07-15 00:58:57 +00:00
Johannes Doerfert 457f73eaee Annotate reduction parallel loops in the IslAst textual output
+ Introduced dependency type TYPE_TC_RED to represent the transitive closure
    (& the reverse) of reduction dependences. These are used when we check for
    reduction parallel loops.
  + Test cases including loop reversals and modulo schedules which compute
    reductions in a alternated order.

llvm-svn: 213019
2014-07-15 00:00:35 +00:00
Tobias Grosser c2920ff747 DeadCodeElimination: Fix liveout computation
We move back to a simple approach where the liveout is the last must-write
statement for a data-location plus all may-write statements. The previous
approach did not work out. We would have to consider per-data-access
dependences, instead of per-statement dependences to correct it. As this adds
complexity and it seems we would not gain anything over the simpler approach
that we implement in this commit, I moved us back to the old approach of
computing the liveout, but enhanced it to also add may-write accesses.

We also fix the test case and explain why we can not perform dead code
elimination in this case.

llvm-svn: 212925
2014-07-14 08:32:01 +00:00
Tobias Grosser e8162928c8 Remove unnecessary isl annotations
They where just left over from copy-pasting.

Reported-by:  Johannes Doerfert <jdoerfert@codeaurora.org>
llvm-svn: 212800
2014-07-11 09:02:41 +00:00
Tobias Grosser 780ce0f8e3 DeadCodeElim: Compute correct liveout for non-affine accesses
Thanks to Johannes Doerfert for narrowing down the bug.

Reported-by: Chris Jenneisch <chrisj@codeaurora.org>
llvm-svn: 212796
2014-07-11 07:12:10 +00:00