Commit Graph

2223 Commits

Author SHA1 Message Date
Tobias Grosser 45a8534893 doxygen: Also show private members
llvm-svn: 262859
2016-03-07 21:38:19 +00:00
Tobias Grosser f0458ea170 doxygen: Fix region marker
llvm-svn: 262858
2016-03-07 21:35:01 +00:00
Tobias Grosser 43fb775fc9 Drop comment separators
The cause trouble in the doxygen output.

llvm-svn: 262857
2016-03-07 21:26:41 +00:00
Tobias Grosser 6733ba826a docs: Add doxygen mainpage
(and test if doxygen is updated on-commit)

llvm-svn: 262855
2016-03-07 21:17:48 +00:00
Tobias Grosser af97a282b9 Test documentation rebuild
llvm-svn: 262850
2016-03-07 20:44:20 +00:00
Michael Kruse afd2db5351 [SCEVValidator] Fix loop exit values considered affine.
Index calculations can use the last value that come out of a loop.
Ideally, ScalarEvolution can compute that exit value directly without
depending on the loop induction variable, but not in all cases.

This changes isAffine to not consider such loop exit values as affine to
avoid that SCEVExpander adds uses of the original loop induction
variable.

This fix is analogous to r262404 that applies to general uses of loop
exit values instead of index expressions and loop bouds as in this
patch.

This reduces the number of LNT test-suite fails with
-polly-position=before-vectorizer -polly-unprofitable
from 10 to 8.

llvm-svn: 262665
2016-03-03 22:10:52 +00:00
Michael Kruse 09eb4451d2 Pass scope and LoopInfo to SCEVValidator. NFC.
The scope will be required in the following fix. This commit separates
the large changes that do not change behaviour from the small, but
functional change.

llvm-svn: 262664
2016-03-03 22:10:47 +00:00
Tobias Grosser 2880f10aa4 tests: Fix some spelling mistakes
llvm-svn: 262649
2016-03-03 19:51:03 +00:00
Tobias Grosser 4e442d75e5 docs: Fix some spelling mistakes
llvm-svn: 262647
2016-03-03 19:48:30 +00:00
Michael Kruse faedfcbf6d [BlockGenerator] Fix PHI merges for MK_Arrays.
Value merging is only necessary for scalars when they are used outside
of the scop. While an array's base pointer can be used after the scop,
it gets an extra ScopArrayInfo of type MK_Value. We used to generate
phi's for both of them, where one was assuming the reault of the other
phi would be the original value, because it has already been replaced by
the previous phi. This resulted in IR that the current IR verifier
allows, but is probably illegal.

This reduces the number of LNT test-suite fails with
-polly-position=before-vectorizer -polly-process-unprofitable
from 16 to 10.

Also see llvm.org/PR26718.

llvm-svn: 262629
2016-03-03 17:20:43 +00:00
Johannes Doerfert ac37c565b5 Fix typo [NFC]
llvm-svn: 262613
2016-03-03 12:30:19 +00:00
Johannes Doerfert df88023d2b [FIX] Consolidation of loads with same pointer but different access relation
This should fix PR19422.

  Thanks to Jeremy Huddleston Sequoia for reporting this.
  Thanks to Roman Gareev for his investigation and the reduced test case.

llvm-svn: 262612
2016-03-03 12:26:58 +00:00
Johannes Doerfert 0a21113a52 [DOC] Add documentation for the supported call instructions
llvm-svn: 262608
2016-03-03 11:33:49 +00:00
Johannes Doerfert d1be3b05bb [DOC] Add more documentation about the different element type support
llvm-svn: 262607
2016-03-03 11:33:30 +00:00
Hongbin Zheng 2a798853f8 Allow the client of DependenceInfo to obtain dependences at different granularities.
llvm-svn: 262591
2016-03-03 08:15:33 +00:00
Tobias Grosser a64c8233b8 www: Add links to sphinx/doxygen documentation
llvm-svn: 262589
2016-03-03 07:03:21 +00:00
Tobias Grosser b4d54d7ccd docs: Drop modindex from sphinx
For an unknown reason modindex is not be built correctly by sphinx. Take it
out of the index until we can build it correctly.

llvm-svn: 262588
2016-03-03 07:01:00 +00:00
Michael Kruse 1bf6bafb2d Fix: Add pass manager barrier.
The LNT test suite with -polly-process-unprofitable
-polly-position=before-vectorizer currenty fails 59 tests. With this
barrier added, only 16 keep failing. This is probably because Polly's
code generation currently does not correctly preserve all analyses it
promised to preserve. Temporarily add this barrier until further
investigation.

llvm-svn: 262488
2016-03-02 14:59:16 +00:00
Michael Kruse c7e0d9c216 Fix non-synthesizable loop exit values.
Polly recognizes affine loops that ScalarEvolution does not, in
particular those with loop conditions that depend on hoisted invariant
loads. Check for SCEVAddRec dependencies on such loops and do not
consider their exit values as synthesizable because SCEVExpander would
generate them as expressions that depend on the original induction
variables. These are not available in generated code.

llvm-svn: 262404
2016-03-01 21:44:06 +00:00
Michael Kruse b3a7935d54 [SCEVValidator] Remove redundant visit.
SCEVAddRecExpr::getStart() is synonymous to SCEVAddRecExpr::getOperand(0)
which will be visited in the following loop anyway.

llvm-svn: 262375
2016-03-01 19:30:54 +00:00
Johannes Doerfert 066dbf3f8e Track assumptions and restrictions separatly
In order to speed up compile time and to avoid random timeouts we now
  separately track assumptions and restrictions. In this context
  assumptions describe parameter valuations we need and restrictions
  describe parameter valuations we do not allow. During AST generation
  we create a runtime check for both, whereas the one for the
  restrictions is negated before a conjunction is build.

  Except the In-Bounds assumptions we currently only track restrictions.

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

llvm-svn: 262328
2016-03-01 13:06:28 +00:00
Johannes Doerfert abadd71da1 [FIX] Prevent compile time problems due to complex invariant loads
This cures the symptoms we see in h264 of SPEC2006 but not the cause.

llvm-svn: 262327
2016-03-01 13:05:14 +00:00
Michael Kruse 0b56681d21 [ScopDetection] Fix use-after-free.
removeCachedResults deletes the DetectionContext from
DetectionContextMap such that any it cannot be used anymore.
Unfortunately invalid<ReportUnprofitable> and RejectLogs.insert still do
use it. Because the memory is part of a map and not returned to to the
OS immediatly, such that the observable effect was only a memory leak
due to reference counters not decreased when the second call to
removeCachedResults does not remove the DetectionContext because because
it already has been removed.

Fix by not removing the DetectionContext prematurely. The second call to
removeCachedResults will handle it anyway.

llvm-svn: 262235
2016-02-29 16:54:18 +00:00
Michael Kruse c0a19b079d Reapply "Add update_test.py script."
Originally committed in r261899 and reverted in r262202 due to failing
in out-of-LLVM tree builds.

Replace the use of LLVM_TOOLS_BINARY_DIR by LLVM_TOOLS_DIR which exists
in both, in-tree and out-of-tree builds.

Original commit message:
The script updates a lit test case that uses FileCheck using the actual
output of the 'RUN:'-lines program. Useful when updating test cases due
to expected output changes and diff'ing expected and actual output.

llvm-svn: 262227
2016-02-29 14:58:13 +00:00
Tobias Grosser 0865e775bf ScopInfo: Remove indentation in hoistInvariantLoads
We move verifyInvariantLoads out of this function to allow for an early return
without the need for code duplication. A similar transformation was suggested
by Johannes Doerfert in post commit review of r262033.

llvm-svn: 262203
2016-02-29 07:29:42 +00:00
Tobias Grosser a4835c5673 Revert "Add update_test.py script."
This reverts commit r261899. Even though I am not yet 100% certain, this is
commit is the only one that has some relation to the recent cmake failures
in Polly.

llvm-svn: 262202
2016-02-29 07:12:10 +00:00
Tobias Grosser 4fb9e51664 ScopInfo: Drop some debug statements
This debug output distracts from the -debug-only=polly-scops output. As it is
rather verbose and only really needed for debugging the domain construction
I drop this output. The domain construction is meanwhile stable enough to
not require regular debugging.

llvm-svn: 262117
2016-02-27 06:59:30 +00:00
Tobias Grosser 0bed1eab39 LoopGenerators: Expose some parts of the parallel loop generator
Some of this functionality is useful beyond the generation of a normal OpenMP
loop.

llvm-svn: 262114
2016-02-27 06:24:58 +00:00
Tobias Grosser abafafe07c ScopInfo: Add function to invalidate ScopArrayInfo object
In case the underlying basepointer of a ScopArrayInfo object is moved to another
module while the scop is still processed is it necessary to free dependent
ScopArrayInfo objects as they might otherwise be looked accidentally when a
new llvm basepointer value is reassigned the very same memory location as the
llvm value that has been moved earlier.

This function is not yet used in Polly itself, but is useful for external users.

llvm-svn: 262113
2016-02-27 06:04:40 +00:00
Hongbin Zheng b1908ea5b9 Update the fine-grain dependences analysis test case.
llvm-svn: 262101
2016-02-27 01:50:01 +00:00
Hongbin Zheng 8efb22ef25 Enable llvm's isa/cast/dyn_cast on MemAccInst.
Differential Revision: http://reviews.llvm.org/D17250

llvm-svn: 262100
2016-02-27 01:49:58 +00:00
Hongbin Zheng 9691d71674 Introduce fine-grain dependence analysis by tagging access functions and schedules tree with either the id of memory access or memory references.
Differential Revision: http://reviews.llvm.org/D17381

llvm-svn: 262039
2016-02-26 17:05:24 +00:00
Tobias Grosser 8fa3e4c3fb ScopDetect/Info: Add option to disable invariant load hoisting
This is helpful for test case reduction and other experiments.

llvm-svn: 262033
2016-02-26 16:43:35 +00:00
Michael Kruse 0ac2d3e217 ScopDetection: Fix mix-up of isLoad and isStore.
This was accidentally introduced in r258947.

Thanks to Hongbin Zheng for finding this.

Found-by: etherzhhb
llvm-svn: 262032
2016-02-26 16:40:35 +00:00
Michael Kruse 37d136e48e Reduce indention. NFC.
The functions buildAccessMultiDimFixed and buildAccessMultiDimParam were
refactored from buildMemoryAccess. In their own functions, the control
flow can be shortcut and simplified using returns.

Suggested-by: etherzhhb
llvm-svn: 262029
2016-02-26 16:08:24 +00:00
Tobias Grosser f8746fc88e BlockGenerators: Allow values to be removed from ScalarMap
This function is not yet used in Polly, but is useful to external projects that
generate multi-module code using Polly.

llvm-svn: 262010
2016-02-26 13:27:02 +00:00
Tobias Grosser 64ca00c344 IslAst: Expose run-time check generation as individual function
This allows to construct run-time checks for a scop without having to generate
a full AST. This is currently not taken advantage of in Polly itself, but
external users may benefit from this feature.

llvm-svn: 262009
2016-02-26 12:59:38 +00:00
Tobias Grosser a67ac9767a Update to isl-0.16.1-68-g8fad211
This commit updates to the latest isl development version. There is no specific
feature we need on the Polly side, but we want to ensure test coverage for the
latest isl changes.

llvm-svn: 262001
2016-02-26 11:35:12 +00:00
Hongbin Zheng f3d6612c0a [MemAccInst] Introduce the '->' operator and remove the simple wrapper functions. NFC
llvm-svn: 261994
2016-02-26 09:47:11 +00:00
Hongbin Zheng f43e9925ee Coalesce Read/Write/MayWrite right after we collected them. NFC
llvm-svn: 261993
2016-02-26 09:47:08 +00:00
Chandler Carruth 7553e95098 Fix a warning about an unused variable in release builds.
llvm-svn: 261956
2016-02-26 02:25:06 +00:00
Hongbin Zheng defd098612 Adapt to LLVM head, again
llvm-svn: 261905
2016-02-25 17:54:42 +00:00
Michael Kruse 9cfc49d5b5 Add update_test.py script.
The script updates a lit test case that uses FileCheck using the actual
output of the 'RUN:'-lines program. Useful when updating test cases due
expected output changes and diff'ing expected and actual output.

llvm-svn: 261899
2016-02-25 17:12:12 +00:00
Hongbin Zheng 566c614525 Revert "Adapt to LLVM head. NFC"
This reverts commit 4d3753b9646a69c00d234ccd6e91dc3d0ea5d643.

llvm-svn: 261892
2016-02-25 16:46:17 +00:00
Hongbin Zheng f4e35f9cb9 Adapt to LLVM head. NFC
llvm-svn: 261886
2016-02-25 16:36:09 +00:00
Michael Kruse 8f25b0cb4d Use inline local variable declaration. NFC.
llvm-svn: 261876
2016-02-25 15:52:43 +00:00
Tobias Grosser b9baae529f www: Fix typo
Reported-by: Hongbin Zheng
llvm-svn: 261873
2016-02-25 15:21:02 +00:00
Tobias Grosser 6b00ef338e Add Polly GSoC projects
These projects are just some first thoughts. Feel free to updated / add ideas
for further projects.

llvm-svn: 261867
2016-02-25 14:17:11 +00:00
Johannes Doerfert a792098047 Support calls with known ModRef function behaviour
Check the ModRefBehaviour of functions in order to decide whether or
  not a call instruction might be acceptable.

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

llvm-svn: 261866
2016-02-25 14:08:48 +00:00
Michael Kruse f33c125dd2 Fix DomTree preservation for generated subregions.
The generated dedicated subregion exit block was assumed to have the same
dominance relation as the original exit block. This is incorrect if the exit
block receives other edges than only from the subregion, which results in that
e.g. the subregion's entry block does not dominate the exit block.

llvm-svn: 261865
2016-02-25 14:08:48 +00:00