Commit Graph

2614 Commits

Author SHA1 Message Date
Johannes Doerfert 99191c78c2 Decouple SCoP building logic from pass
Created a new pass ScopInfoRegionPass. As name suggests, it is a
  region pass and it is there to preserve compatibility with our
  existing Polly passes.  ScopInfoRegionPass will return a SCoP object
  for a valid region while the creation of the SCoP stays in the
  ScopInfo class.

  Contributed-by: Utpal Bora <cs14mtech11017@iith.ac.in>
  Reviewed-by: Tobias Grosser <tobias@grosser.es>,
               Johannes Doerfert <doerfert@cs.uni-saarland.de>

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

llvm-svn: 271259
2016-05-31 09:41:04 +00:00
Michael Kruse 7410a27820 MSVC compile fix: #include <ciso646>. NFC.
This header is required to make the ISO 646 alternative operator
spellings ("and", "or" instead of "&&", "||") work. Should these
operators be replaced by the standard ones as already suggested by
Johannes, also remove this #include again.

llvm-svn: 271206
2016-05-30 14:27:14 +00:00
Sanjoy Das 03bcb910de [Polly] Remove usage of the `apply` function
Summary:
API-wise `apply` is a somewhat unidiomatic one-off function, and
removing the only(?) use in polly will let me remove it from SCEV's
exposed interface.

Reviewers: jdoerfert, Meinersbur, grosser

Subscribers: grosser, mcrosier, pollydev

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

llvm-svn: 271177
2016-05-29 07:33:16 +00:00
Tobias Grosser 6a114505c4 Temporarily xfail test case which broke after a fix in SCEV
This should keep the buildbots quite while we decide how to update the test
case.

llvm-svn: 271169
2016-05-29 06:03:44 +00:00
Roman Gareev 9c3eb5960a Determination of statements that contain matrix multiplication
Add determination of statements that contain, in particular,
matrix multiplications and can be optimized with [1] to try to
get close-to-peak performance. It can be enabled
via polly-pm-based-opts, which is false by default.

Refs:
[1] - http://www.cs.utexas.edu/users/flame/pubs/TOMS-BLIS-Analytical.pdf

Contributed-by: Roman Gareev <gareevroman@gmail.com>
Reviewed-by: Tobias Grosser <tobias@grosser.es>

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

llvm-svn: 271128
2016-05-28 16:17:58 +00:00
Michael Kruse e73bf3cfff [ScopInfo] Remove unused typedef OutgoingValueMapTy. NFC.
llvm-svn: 270439
2016-05-23 14:51:52 +00:00
Michael Kruse 1007182cf7 [ScopInfo] Change removeMemoryAccesses to remove only one access. NFC.
This exposes the more basic operation for use by code not related to
invariant code hoisting.

llvm-svn: 270438
2016-05-23 14:45:58 +00:00
Michael Kruse 996fb611b3 Remove some unused local variables. NFC.
Found by clang static analyzer (http://llvm.org/reports/scan-build/)
and Visual Studio.

llvm-svn: 270432
2016-05-23 13:00:41 +00:00
Johannes Doerfert 0f0d209bec Use the SCoP directly for canSynthesize [NFC]
llvm-svn: 270429
2016-05-23 12:47:09 +00:00
Johannes Doerfert 57a7317fb8 Simplify ScopInfo function interfaces [NFC]
llvm-svn: 270428
2016-05-23 12:45:17 +00:00
Johannes Doerfert e0b08077bf Allow to check for dominance wrt. a SCoP [NFC]
llvm-svn: 270427
2016-05-23 12:43:44 +00:00
Johannes Doerfert ef74443c97 Duplicate part of the Region interface in the Scop class [NFC]
This allows to use the SCoP directly for various queries,
  thus to hide the underlying region more often.

llvm-svn: 270426
2016-05-23 12:42:38 +00:00
Johannes Doerfert 952b5304bc Add and use Scop::contains(Loop/BasicBlock/Instruction) [NFC]
llvm-svn: 270424
2016-05-23 12:40:48 +00:00
Johannes Doerfert 3f52e35471 Directly access information through the Scop class [NFC]
llvm-svn: 270421
2016-05-23 12:38:05 +00:00
Johannes Doerfert c553ce50fa Add missing doxygen comments [NFC]
llvm-svn: 270420
2016-05-23 12:36:44 +00:00
Johannes Doerfert 25227fe7b0 Optimistic assume required invariant loads to be invariant
Before this patch we bailed if a required invariant load was potentially
  overwritten. However, now we will optimistically assume it is actually
  invariant and, to this end, restrict the valid parameter space as well as the
  execution context with regards to potential overwrites of the location.

llvm-svn: 270416
2016-05-23 10:40:54 +00:00
Johannes Doerfert 764b7e66f0 [FIX] Require base pointers of loads that might alias to be hoisted
Since the base pointer of a possibly aliasing pointer might not alias
  with any other pointer it (the base pointer) might not be tagged as
  "required invariant". However, we need it do be in order to compare
  the accessed addresses of the derived (possibly aliasing) pointer.

  This patch also tries to clean up the load hoisting a little bit.

llvm-svn: 270412
2016-05-23 09:26:46 +00:00
Johannes Doerfert 38a012c46b Simplify BlockGenerator::handleOutsideUsers interface [NFC]
llvm-svn: 270411
2016-05-23 09:14:07 +00:00
Johannes Doerfert 1dafea4114 Make the detection context non-constant [NFC]
llvm-svn: 270410
2016-05-23 09:07:08 +00:00
Johannes Doerfert a61eda7698 [FIX] Let ScalarEvolution forget hoisted values
We have to rethink the handling of escaping values in order to make
  this kind of "fixes" go away.

llvm-svn: 270409
2016-05-23 09:02:54 +00:00
Johannes Doerfert 1a4ad8f771 [FIX] Synthezise Sdiv/Srem/Udiv instructions correctly.
This patch simplifies the Sdiv/Srem/Udiv expansion and thereby
  prevents errors, e.g., regarding the insertion point.

llvm-svn: 270408
2016-05-23 08:55:43 +00:00
Johannes Doerfert cda1bd5048 Revert "Optimistic assume required invariant loads to be invariant"
This reverts commit 787e642207ca978f2e800140529fc7049ea1f3de until the
lnt failures are fixed.

llvm-svn: 270061
2016-05-19 13:47:34 +00:00
Johannes Doerfert cb77542d1c Optimistic assume required invariant loads to be invariant
So far we bailed if a required invariant load was potentially overwritten in
  the SCoP. From now on we will optimistically assume it is actually invariant
  and, to this end, restrict the valid parameter space.

llvm-svn: 270060
2016-05-19 13:24:10 +00:00
Johannes Doerfert 469db6a247 Move internal enum out of class declaration [NFC]
llvm-svn: 270054
2016-05-19 12:36:43 +00:00
Johannes Doerfert ffd222f2d6 Propagate the DetectionContext to the SCoP [NFC]
The SCoP now holds a reference to the ScopDetection::DetectionContext
  which allows to simplify the type of various methods and remove code.

llvm-svn: 270053
2016-05-19 12:34:57 +00:00
Johannes Doerfert 60dd9e1346 Compute the MaxLoopDepth during domain construction [NFC]
llvm-svn: 270052
2016-05-19 12:33:14 +00:00
Johannes Doerfert f5841a66af Remove leftover debug output [NFC]
llvm-svn: 270051
2016-05-19 12:32:54 +00:00
Johannes Doerfert 6dc3616195 Remove unsused methodes [NFC]
llvm-svn: 270050
2016-05-19 12:31:16 +00:00
Tobias Grosser 0a828aa000 docs: Remove reference to PoCC
Since several releases we do not ship any more with PoCC.

llvm-svn: 269809
2016-05-17 19:44:16 +00:00
Tobias Grosser 35b544adc5 docs: Do not suggest the user to ignore aliasing
Since a long time Polly can automatically generate run-time alias checks.

llvm-svn: 269806
2016-05-17 19:42:19 +00:00
Tobias Grosser 97afc45b08 docs: Fix code-block to avoid sphinx error
llvm-svn: 269763
2016-05-17 13:41:00 +00:00
Johannes Doerfert e6e3c9246a Check late for profitability
Before this patch we only expanded valid __and__ profitable region. Therefor
  we did not allow the expansion to create a profitable region from a
  non-profitable one.  With this patch we will remember and expand all valid
  regions and check for profitability only at the end.

  This patch increases the number of valid SCoPs in the LLVM-TS and SPEC
  2000/2006 by 28% (from 303 to 390), including the hot loop in hmmer.

llvm-svn: 269343
2016-05-12 20:21:50 +00:00
Johannes Doerfert 6c7639b380 Cleanup rejection log handling [NFC]
This patch cleans up the rejection log handling during the
  ScopDetection. It consists of two interconnected parts:
    - We keep all detection contexts for a function in order to provide
      more information to the user, e.g., about the rejection of
      extended/intermediate regions.
    - We remove the mutable "RejectLogs" member as the information is
      available through the detection contexts.

llvm-svn: 269323
2016-05-12 18:50:01 +00:00
Johannes Doerfert 5c2b556b13 Bring some comments up to date [NFC]
llvm-svn: 269301
2016-05-12 15:15:50 +00:00
Johannes Doerfert 6f1bb7a9d9 Support truncate operations
Truncate operations are basically modulo operations, thus we can model
  them that way. However, for large types we assume the operand to fit
  in the new type size instead of introducing a modulo with a very large
  constant.

llvm-svn: 269300
2016-05-12 15:13:49 +00:00
Johannes Doerfert 404a0f81ea Check overflows in RTCs and bail accordingly
We utilize assumptions on the input to model IR in polyhedral world.
  To verify these assumptions we version the code and guard it with a
  runtime-check (RTC). However, since the RTCs are themselves generated
  from the polyhedral representation we generate them under the same
  assumptions that they should verify. In other words, the guarantees
  that we try to provide with the RTCs do not hold for the RTCs
  themselves. To this end it is necessary to employ a different check
  for the RTCs that will verify the assumptions did hold for them too.

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

llvm-svn: 269299
2016-05-12 15:12:43 +00:00
Johannes Doerfert 27d12d3d1f Invalidate unprofitable SCoPs after creation
If a profitable run is performed we will check if the SCoP seems to be
  profitable after creation but before e.g., dependence are computed. This is
  needed as SCoP detection only approximates the actual SCoP representation.
  In the end this should allow us to be less conservative during the SCoP
  detection while keeping the compile time in check.

llvm-svn: 269074
2016-05-10 16:38:09 +00:00
Johannes Doerfert bf9473b2d8 Weaken profitability constraints during ScopDetection
Regions with one affine loop can be profitable if the loop is
  distributable. To this end we will allow them to be treated as
  profitable if they contain at least two non-trivial basic blocks.

llvm-svn: 269064
2016-05-10 14:42:30 +00:00
Johannes Doerfert ede4ecaefb [FIX] Cleanup isl objects prior to early exit
llvm-svn: 269061
2016-05-10 14:01:21 +00:00
Johannes Doerfert 2b92a0e4ee Handle llvm.assume inside the SCoP
The assumption attached to an llvm.assume in the SCoP needs to be
  combined with the domain of the surrounding statement but can
  nevertheless be used to refine the context.

  This fixes the problems mentioned in PR27067.

llvm-svn: 269060
2016-05-10 14:00:57 +00:00
Johannes Doerfert 297c720d15 Propagate complexity problems during domain generation [NFC]
This patches makes the propagation of complexity problems during
  domain generation consistent. Additionally, it makes it less likely to
  encounter ill-formed domains later, e.g., during schedule generation.

llvm-svn: 269055
2016-05-10 13:06:42 +00:00
Johannes Doerfert 14b1cf35b5 [FIX] Create error-restrictions late
Before this patch we generated error-restrictions only for
  error-blocks, thus blocks (or regions) containing a not represented
  function call. However, the same reasoning is needed if the invalid
  domain of a statement subsumes its actual domain. To this end we move
  the generation of error-restrictions after the propagation of the
  invalid domains. Consequently, error-statements are now defined more
  general as statements that are assumed to be not executed.
  Additionally, we do not record an empty domain for such statements but
  a nullptr instead. This allows to distinguish between error-statements
  and dead-statements.

llvm-svn: 269053
2016-05-10 12:42:26 +00:00
Johannes Doerfert 2640454d1c Refactor simplifySCoP [NFC]
Remove obsolete code and decrease the indention in the
  Scop::simplifySCoP() function.

llvm-svn: 269049
2016-05-10 12:19:47 +00:00
Johannes Doerfert a60ad845c0 Simplify the internal representation according to the context [NFC]
We now use context information to simplify the domains and access
  functions of the SCoP instead of just aligning them with the parameter
  space.

llvm-svn: 269048
2016-05-10 12:18:22 +00:00
Johannes Doerfert e243753a4d Simplify access relation for invariant loads early [NFC]
llvm-svn: 269046
2016-05-10 11:59:59 +00:00
Johannes Doerfert 5f173d414e Prevent complex access ranges with low number of pieces.
Previously we checked the number of pieces to decide whether or not a
  invariant load was to complex to be generated. However, there are
  cases when e.g., divisions cause the complexity to spike regardless of
  the number of pieces. To this end we now check the number of totally
  involved dimensions which will increase with the number of pieces but
  also the number of divisions.

llvm-svn: 269045
2016-05-10 11:46:57 +00:00
Johannes Doerfert 56b377644a Expose interpretAsUnsigned in the SCEVAffinator [NFC]
This exposes the functionality to interpret a SCEV, or better the
  piece-wise function created from the SCEV, as an unsigned value
  instead of a signed one.

llvm-svn: 269044
2016-05-10 11:45:46 +00:00
Tobias Grosser 1022ca5646 Codegen: Enable the detection of min/max expressions
Min/max expressions are easier to read and can in some cases also result in
more concise IR that is generated as the min/max --- when lowered to a
cmp+select pattern -- commonly has a simpler condition then the ternary
condition isl would normally generate.

llvm-svn: 268855
2016-05-07 08:03:44 +00:00
Tobias Grosser 7ec06a86c1 test: Use CHECK-NEXT to not miss instructions in test output
llvm-svn: 268854
2016-05-07 08:03:32 +00:00
Tobias Grosser 6b49f17764 Update isl to isl-0.17-5-g57dc5ff
This update fixes an assertion in the isl scheduler.

llvm-svn: 268853
2016-05-07 07:41:25 +00:00
Michael Kruse e0b34f366f Update to ISL 0.17.
This release includes sevaral improvments compared to the previous
version isl-0.16.1-145-g243bf7c (from the ISL 0.17 announcement):
- optionally combine SCCs incrementally in scheduler
- optionally maximize coincidence in scheduler
- optionally avoid loop coalescing in scheduler
- minor AST generator improvements
- improve support for expansions in schedule trees

llvm-svn: 268500
2016-05-04 14:41:36 +00:00
Michael Kruse f7a4a94d05 Typo: ToComplex -> TooComplex. NFC.
llvm-svn: 268224
2016-05-02 12:25:36 +00:00
Michael Kruse bc150127ae Rename Conjuncts -> Disjunctions. NFC.
The check for complexity compares the number of polyhedra in a set,
which are combined by disjunctions (union, "OR"),
not conjunctions (intersection, "AND").

llvm-svn: 268223
2016-05-02 12:25:18 +00:00
Michael Kruse 315aa3278e [ScheduleOptimizer] Add -polly-opt-outer-coincidence option.
Add a command line switch to set the
isl_options_set_schedule_outer_coincidence option. ISL then tries to
build schedules where the outer member of a band satisfies the
coincidence constraints.

In practice this allows loop skewing for more parallelism in inner
loops.

llvm-svn: 268222
2016-05-02 11:35:27 +00:00
Johannes Doerfert 90f5fed10b [WWW] Mark task as done and me as owner of some task
llvm-svn: 268221
2016-05-02 11:21:30 +00:00
Michael Kruse 2d3ff2a5ba Typo: isToComplex -> isTooComplex. NFC.
llvm-svn: 268220
2016-05-02 10:44:20 +00:00
Tobias Grosser c4a80160b0 doc: A source code with Polly does not use a separate module (by default)
llvm-svn: 268034
2016-04-29 12:35:46 +00:00
Johannes Doerfert 172dd8b923 Allow unsigned divisions
After zero-extend operations and unsigned comparisons we now allow
  unsigned divisions. The handling is basically the same as for signed
  division, except the interpretation of the operands. As the divisor
  has to be constant in both cases we can simply interpret it as an
  unsigned value without additional complexity in the representation.
  For the dividend we could choose from the different representation
  schemes introduced for zero-extend operations but for now we will
  simply use an assumption.

llvm-svn: 268032
2016-04-29 11:53:35 +00:00
Johannes Doerfert ba9725ff41 Refactor SCEVAffinator [NFC]
llvm-svn: 268031
2016-04-29 11:52:30 +00:00
Tobias Grosser 2937b59393 ScopInfo: Add option to control abort on isl errors
For debugging it is often convenient to not abort at the very first memory
management error. This option allows to control this behavior at run-time.

llvm-svn: 268030
2016-04-29 11:43:20 +00:00
Johannes Doerfert 99ec00a2bb [FIX] Typo
llvm-svn: 268027
2016-04-29 10:47:07 +00:00
Johannes Doerfert 64c69f79fb [FIX] Prevent division/modulo by zero in parameters -- test case
This commits a test case for r268023.

llvm-svn: 268026
2016-04-29 10:45:39 +00:00
Johannes Doerfert 3e48ee2ab9 [FIX] Unsigned comparisons change invalid domain
It does not suffice to take a global assumptions for unsigned comparisons but
  we also need to adjust the invalid domain of the statements guarded by such
  an assumption. To this end we allow to specialize the getPwAff call now in
  order to indicate unsigned interpretation.

llvm-svn: 268025
2016-04-29 10:44:41 +00:00
Johannes Doerfert bfaa63a82e [FIX] Prevent division/modulo by zero in parameters
When we materialize parameter SCEVs we did so without considering the
  side effects they might have, e.g., both division and modulo are
  undefined if the right hand side is zero. This is a problem because we
  potentially extended the domain under which we evaluate parameters,
  thus we might have introduced such undefined behaviour. To prevent
  that from happening we will now guard divisions and modulo operations
  in the parameters with a compare and select.

llvm-svn: 268023
2016-04-29 10:36:58 +00:00
Johannes Doerfert 8475d1c163 [FIX] Correct assumption simplification
Assumptions and restrictions can both be simplified with the domain of a
  statement but not the same way. After this patch we will correctly
  distinguish them.

llvm-svn: 267885
2016-04-28 14:32:58 +00:00
Tobias Grosser 947dbe3aae test: Make test case independent of earlier instructions
Instead of matching for %6, we use a regexp to match for the result strings.
This test case caused unrelated noise in http://reviews.llvm.org/D15722.

llvm-svn: 267875
2016-04-28 12:36:39 +00:00
Tobias Grosser 2e27a0f5fd BlockGenerator: Drop leftover debug statement
llvm-svn: 267874
2016-04-28 12:31:05 +00:00
Johannes Doerfert 8ab2803b63 [FIX] Propagate execution domain of invariant loads
If the base pointer of an invariant load is is loaded conditionally, that
  condition needs to hold for the invariant load too. The structure of the
  program will imply this for domain constraints but not for imprecisions in
  the modeling. To this end we will propagate the execution context of base
  pointers during code generation and thus ensure the derived pointer does
  not access an invalid base pointer.

llvm-svn: 267707
2016-04-27 12:49:11 +00:00
Johannes Doerfert 792374b941 Allow unsigned comparisons
With this patch we will optimistically assume that the result of an unsigned
  comparison is the same as the result of the same comparison interpreted as
  signed.

llvm-svn: 267559
2016-04-26 14:33:12 +00:00
Johannes Doerfert 323ab3975b [FIX] Adjust assumption space for zext instructions
llvm-svn: 267552
2016-04-26 12:44:01 +00:00
Johannes Doerfert b2885799d1 Do not use the number of parameters in the complexity check
llvm-svn: 267532
2016-04-26 09:20:41 +00:00
Johannes Doerfert 625bb1fc10 Do not add but record signed-unsigned assumptions
llvm-svn: 267528
2016-04-26 09:16:36 +00:00
Johannes Doerfert 9cc8340fea Extract some constant factors from "SCEVAddExprs"
Additive expressions can have constant factors too that we can extract
  and thereby simplify the internal representation. For now we do
  compute the gcd of all constant factors but only extract the same
  (possibly negated) factor if there is one.

llvm-svn: 267445
2016-04-25 19:09:10 +00:00
Johannes Doerfert d5c369f460 Do not check all GEPs for assumptions
Before, we checked all GEPs in a statement in order to derive
  out-of-bound assumptions. However, this can not only introduce new
  parameters but it is also not clear what we can learn from GEPs that
  are not immediately used in a memory accesses inside the SCoP. As this
  case is very rare, no actual change in the behaviour is expected.

llvm-svn: 267442
2016-04-25 18:55:15 +00:00
Johannes Doerfert c78ce7dc21 Only add user assumptions on known parameters [NFC]
Before, assumptions derived from llvm.assume could reference new
  parameters that were not known to the SCoP before. These were neither
  beneficial to the representation nor to the user that reads the
  emitted remark. Now we project them out and keep only user assumptions
  on known parameters. Nevertheless, the new parameters are still part
  of the SCoPs parameter space as the SCEVAffinator currently adds them
  on demand.

llvm-svn: 267441
2016-04-25 18:51:27 +00:00
Johannes Doerfert 4e3bb7b98c Refactor Scop parameter handling
The new handling is consistent with the remaining code, e.g., we do
  not create a new parameter id for each lookup call but copy an
  existing one. Additionally, we now use the implicit order defined by
  the Parameters set instead of an explicit one defined in a map.

llvm-svn: 267423
2016-04-25 16:15:13 +00:00
Johannes Doerfert c3596284c3 Model zext-extend instructions
A zero-extended value can be interpreted as a piecewise defined signed
  value. If the value was non-negative it stays the same, otherwise it
  is the sum of the original value and 2^n where n is the bit-width of
  the original (or operand) type. Examples:
    zext i8 127 to i32 -> { [127] }
    zext i8  -1 to i32 -> { [256 + (-1)] } = { [255] }
    zext i8  %v to i32 -> [v] -> { [v] | v >= 0; [256 + v] | v < 0 }

  However, LLVM/Scalar Evolution uses zero-extend (potentially lead by a
  truncate) to represent some forms of modulo computation. The left-hand side
  of the condition in the code below would result in the SCEV
  "zext i1 <false, +, true>for.body" which is just another description
  of the C expression "i & 1 != 0" or, equivalently, "i % 2 != 0".

    for (i = 0; i < N; i++)
      if (i & 1 != 0 /* == i % 2 */)
        /* do something */

  If we do not make the modulo explicit but only use the mechanism described
  above we will get the very restrictive assumption "N < 3", because for all
  values of N >= 3 the SCEVAddRecExpr operand of the zero-extend would wrap.
  Alternatively, we can make the modulo in the operand explicit in the
  resulting piecewise function and thereby avoid the assumption on N. For the
  example this would result in the following piecewise affine function:
  { [i0] -> [(1)] : 2*floor((-1 + i0)/2) = -1 + i0;
    [i0] -> [(0)] : 2*floor((i0)/2) = i0 }
  To this end we can first determine if the (immediate) operand of the
  zero-extend can wrap and, in case it might, we will use explicit modulo
  semantic to compute the result instead of emitting non-wrapping assumptions.

  Note that operands with large bit-widths are less likely to be negative
  because it would result in a very large access offset or loop bound after the
  zero-extend. To this end one can optimistically assume the operand to be
  positive and avoid the piecewise definition if the bit-width is bigger than
  some threshold (here MaxZextSmallBitWidth).

  We choose to go with a hybrid solution of all modeling techniques described
  above. For small bit-widths (up to MaxZextSmallBitWidth) we will model the
  wrapping explicitly and use a piecewise defined function. However, if the
  bit-width is bigger than MaxZextSmallBitWidth we will employ overflow
  assumptions and assume the "former negative" piece will not exist.

llvm-svn: 267408
2016-04-25 14:01:36 +00:00
Johannes Doerfert 517d8d2f94 Check only loop control of loops that are part of the region
This also removes a duplicated line of code in the region generator
  that caused a SPEC benchmark to fail with the new SCoPs.

llvm-svn: 267404
2016-04-25 13:37:24 +00:00
Johannes Doerfert a4dd8ef40f Initialize the invalid domain of an access with an empty set
llvm-svn: 267403
2016-04-25 13:36:23 +00:00
Johannes Doerfert e4459a24cc Do not propagate invalid domains over back edges
llvm-svn: 267402
2016-04-25 13:34:50 +00:00
Johannes Doerfert f560b3d2db Introduce a parameter set type [NFC]
llvm-svn: 267401
2016-04-25 13:33:07 +00:00
Johannes Doerfert ec8a217729 Remove unnecessary argument of the SCEVValidator [NFC]
llvm-svn: 267400
2016-04-25 13:32:36 +00:00
Johannes Doerfert 6862f0cb5c Remove unused iterators [NFC]
llvm-svn: 267336
2016-04-24 12:31:02 +00:00
Johannes Doerfert 85676e3674 Add an invalid domain to memory accesses
Memory accesses can have non-precisely modeled access functions that
  would cause us to build incorrect execution context for hoisted loads.
  This is the same issue that occurred during the domain construction for
  statements and it is dealt with the same way.

llvm-svn: 267289
2016-04-23 14:32:34 +00:00
Johannes Doerfert ac9c32e216 Translate SCEVs to isl_pw_aff and their invalid domain
The SCEVAffinator will now produce not only the isl representaiton of
  a SCEV but also the domain under which it is invalid. This is used to
  record possible overflows that can happen in the statement domains in
  the statements invalid domain. The result is that invalid loads have
  an accurate execution contexts with regards to the validity of their
  statements domain. While the SCEVAffinator currently is only taking
  "no-wrapping" assumptions, we can add more withouth worrying about the
  execution context of loads that are optimistically hoisted.

llvm-svn: 267288
2016-04-23 14:31:17 +00:00
Johannes Doerfert a3519515b5 Track invalid domains not invalid contexts for statements
The invalid context is not enough to describe the parameter constraints under
  which a statement is not modeled precisely. The reason is that during the
  domain construction the bounds on the induction variables are not known but
  needed to check if e.g., an overflow can actually happen. To this end we
  replace the invalid context of a statement with an invalid domain. It is
  initialized during domain construction and intersected with the domain once
  it was completely build. Later this invalid domain allows to eliminate
  falsely assumed wrapping cases and other falsely assumed mismatches in the
  modeling.

llvm-svn: 267286
2016-04-23 13:02:23 +00:00
Johannes Doerfert 94341c996d Improve accuracy of Scop::hasFeasibleRuntimeContext
If the AssumptionContext is a subset of the InvalidContext the runtime
  context is not feasible.

llvm-svn: 267285
2016-04-23 13:00:27 +00:00
Johannes Doerfert 1dc12aff8a Simplify the execution context for dereferencable loads
If we know it is safe to execute a load we do not need an execution
  context, however only if we are sure it was modeled correctly.

llvm-svn: 267284
2016-04-23 12:59:18 +00:00
Johannes Doerfert f4f1d9a5cf Remove simplification calls for the execution domain [NFC]
These calls were sometimes costly and do not show any improvements on our
  small test cases.

llvm-svn: 267283
2016-04-23 12:56:58 +00:00
Johannes Doerfert d77089e62d Bail for complex execution contexts of invariant loads
llvm-svn: 267146
2016-04-22 11:41:14 +00:00
Johannes Doerfert 5d03f84cf5 Early exit for addInvariantLoads
llvm-svn: 267143
2016-04-22 11:38:44 +00:00
Johannes Doerfert 6296d95420 Bail for complex alias checks
llvm-svn: 267142
2016-04-22 11:38:19 +00:00
Johannes Doerfert 06ae425e28 Repair doxygen comment [NFC]
llvm-svn: 267141
2016-04-22 11:36:13 +00:00
Johannes Doerfert 171b92f1e1 Relate domains to statements during construction [NFC]
Instead of the Scop::getPwAff() function we now use the ScopStmt::getPwAff()
  function during the statements domain construction.

llvm-svn: 266741
2016-04-19 14:53:13 +00:00
Johannes Doerfert ff68f46458 Add user assumptions after domain generation [NFC]
llvm-svn: 266740
2016-04-19 14:49:42 +00:00
Johannes Doerfert 535de03571 Do not build domains for out of SCoP blocks [NFC]
llvm-svn: 266739
2016-04-19 14:49:05 +00:00
Johannes Doerfert fff283df7a Mark Scop::getDomainConditions as const [NFC]
llvm-svn: 266738
2016-04-19 14:48:22 +00:00
Tobias Grosser 90303f872d SCoPValidator: Use SCEVTraversal to simplify SCEVInRegionDependences
llvm-svn: 266622
2016-04-18 15:46:27 +00:00
Tobias Grosser b99b97420f Update two more test cases for r266445+r266446 II
llvm-svn: 266475
2016-04-15 21:02:35 +00:00
Tobias Grosser 8af5e2f7bb Update two more test cases for r266445+r266446
llvm-svn: 266474
2016-04-15 20:56:17 +00:00
Tobias Grosser ad25f0fee6 Update debug metadata after LLVM commits r266445+r266446
llvm-svn: 266473
2016-04-15 20:51:27 +00:00
Mandeep Singh Grang 0aed05ae4b [Polly] Remove unwanted --check-prefix=CHECK from unit tests. NFC.
Summary:
Removed unwanted --check-prefix=CHECK from the following unit tests:
      DeadCodeElimination/dead_iteration_elimination.ll
      Isl/CodeGen/simple_vec_cast.ll

Patch by: Mandeep Singh Grang (mgrang)

Reviewers: jdoerfert, zinob, spop, grosser

Projects: #polly

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

llvm-svn: 266411
2016-04-15 06:12:29 +00:00
Michael Kruse 5c7d0cb834 Add contexts to test cases. NFC.
As discussed in the Polly weekly phone call and reviews.llvm.org/D18878,
the assumed contexts changed (widen) due to D18878/r265942. Also check
these contexts in the tests affected by that change.

llvm-svn: 266323
2016-04-14 15:22:13 +00:00
Michael Kruse b931d4c387 Add InvalidContext to update_test.py.
This allows the test update script to add 'Invalid Context:' to test
cases. Enable with --check-include=InvalidContext.

llvm-svn: 266322
2016-04-14 15:22:04 +00:00
Johannes Doerfert fb72187fdd [FIX] Check the invalid context agains the context to rule out SCoPs
llvm-svn: 266096
2016-04-12 17:54:29 +00:00
Johannes Doerfert 2f70584ae6 Do not by default minimize remarks
We used checks to minimize the number of remarks we present to a user
  but these checks can become expensive, especially since all wrapping
  assumptions are emitted separately. Because there is not benefit for a
  "headless" run we put these checks under a command line flag. Thus, if
  the flag is not given we will emit "non-effective" remarks, e.g.,
  duplicates and revert to the old behaviour if it is given. As this
  also changes the internal representation of some sets we set the flag
  by default for our unit tests.

llvm-svn: 266087
2016-04-12 16:09:44 +00:00
Johannes Doerfert 615e0b85f8 Record wrapping assumptions early
Utilizing the record option for assumptions we can simplify the wrapping
  assumption generation a lot. Additionally, we can now report locations
  together with wrapping assumptions, though they might not be accurate yet.

llvm-svn: 266069
2016-04-12 13:28:39 +00:00
Johannes Doerfert 3bf6e4129f Record assumptions first and add them later
There are three reasons why we want to record assumptions first before we
add them to the assumed/invalid context:

  1) If the SCoP is not profitable or otherwise invalid without the
     assumed/invalid context we do not have to compute it.
  2) Information about the context are gathered rather late in the SCoP
     construction (basically after we know all parameters), thus the user
     might see overly complicated assumptions to be taken while they would
     have been simplified later on.
  3) Currently we cannot take assumptions at any point but have to wait,
     e.g., for the domain generation to finish. This makes wrapping
     assumptions much more complicated as they need to be and it will
     have a similar effect on "signed-unsigned" assumptions later.

llvm-svn: 266068
2016-04-12 13:27:35 +00:00
Johannes Doerfert 97f0dcdea8 Introduce and use MemoryAccess::getPwAff() [NFC]
llvm-svn: 266066
2016-04-12 13:26:45 +00:00
Johannes Doerfert 127abd77a3 Do not assume switch modeling optimizes a SCoP
llvm-svn: 266065
2016-04-12 13:25:43 +00:00
Johannes Doerfert 7c01357cef Introduce an invalid context for each statement
Collect the error domain contexts (formerly in the ErrorDomainCtxMap)
  for each statement in the new InvalidContext member variable. While
  this commit is basically a [NFC] it is a first step to make hoisting
  sound by allowing a more fine grained record of invalid contexts,
  e.g., here on statement level.

llvm-svn: 266053
2016-04-12 09:57:34 +00:00
Johannes Doerfert 65f86cd8b0 Simplify SCEVAffinator code [NFC]
llvm-svn: 266051
2016-04-12 09:33:47 +00:00
Michael Kruse 3b425ff232 Allow overflow of indices with constant dim-sizes.
Allow overflow of indices into the next higher dimension if it has
constant size. E.g.

    float A[32][2];
    ((float*)A)[5];

is effectively the same as

    A[2][1];

This can happen since r265379 as a side effect if ScopDetection
recognizes an access as affine, but ScopInfo rejects the GetElementPtr.

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

llvm-svn: 265942
2016-04-11 14:34:08 +00:00
Michael Kruse 7071e8b355 Do not bind a non-const reference to a rvalue. NFC.
MSVC warns with:
warning C4239: nonstandard extension used: 'initializing': conversion from 'llvm::DebugLoc' to 'llvm::DebugLoc &'
note: A non-const reference may only be bound to an lvalue

Change the reference to a const reference.

llvm-svn: 265937
2016-04-11 13:24:29 +00:00
Johannes Doerfert 561d36b320 Allow pointer expressions in SCEVs again.
In r247147 we disabled pointer expressions because the IslExprBuilder did not
  fully support them. This patch reintroduces them by simply treating them as
  integers. The only special handling for pointers that is left detects the
  comparison of two address_of operands and uses an unsigned compare.

llvm-svn: 265894
2016-04-10 09:50:10 +00:00
Johannes Doerfert fbb63b8028 [FIX] Do not allow select as a base pointer in the SCoP region
llvm-svn: 265884
2016-04-09 21:57:13 +00:00
Johannes Doerfert 81c41b99a7 Do not allow exception handling code in SCoPs
llvm-svn: 265883
2016-04-09 21:55:58 +00:00
Johannes Doerfert 3c6a99b818 Add __isl_give annotations to return types [NFC]
llvm-svn: 265882
2016-04-09 21:55:23 +00:00
Johannes Doerfert b3410db2b7 [FIX] Do not recompute SCEVs but pass them to subfunctions
This reverts commit 2879c53e80e05497f408f21ce470d122e9f90f94.
  Additionally, it adds SDiv and SRem instructions to the set of values
  discovered by the findValues function even if we add the operands to
  be able to recompute the SCEVs. In subfunctions we do not want to
  recompute SDiv and SRem instructions but pass them instead as they
  might have been created through the IslExprBuilder and are more
  complicated than simple SDiv/SRem instructions in the code.

llvm-svn: 265873
2016-04-09 14:30:11 +00:00
Michael Kruse cc05ee5242 Fix: Always honor LLVM_LIBDIR_SUFFIX.
Static libraries where installed into "lib${LLVM_LIBDIR_SUFFIX}" while
shared ones into "lib". I found no justification for this behaviour.
This patch changes both types of libraries to be install into
"lib${LLVM_LIBDIR_SUFFIX}". LLVM and clang use the same behaviour.

This fixes llvm.org/PR27305.

llvm-svn: 265872
2016-04-09 14:09:08 +00:00
Johannes Doerfert 41725a1e7a [FIX] Do not crash on opaque (unsized) types.
llvm-svn: 265834
2016-04-08 19:20:03 +00:00
Johannes Doerfert 5155edc658 [FIX] Teach the ScopExpander about parallel subfunctions
llvm-svn: 265824
2016-04-08 18:16:58 +00:00
Johannes Doerfert a9dc529442 Collect and verify generated parallel subfunctions
We verify the optimized function now for a long time and it helped to track
  down bugs early. This will now also happen for all parallel subfunctions we
  generate.

llvm-svn: 265823
2016-04-08 18:16:02 +00:00
Michael Kruse b3de24f5e6 Add testcase from PR27218. NFC.
The the bug has already been fixed r265795, but this second testcase
still useful.

llvm-svn: 265809
2016-04-08 16:54:53 +00:00
Michael Kruse 436c90619c [ScopInfo] Fix check for element size mismatch.
The way to get the elements size with getPrimitiveSizeInBits() is not
the same as used in other parts of Polly which should use
DataLayout::getTypeAllocSize(). Its use only queries the size of the
pointer and getPrimitiveSizeInBits returns 0 for types that require a
DataLayout object such as pointers.

Together with r265379, this should fix PR27195.

llvm-svn: 265795
2016-04-08 16:20:08 +00:00
Michael Kruse 1fdc2fff1a [ScopInfo] Rename variable to AccType. NFC.
This avoids a name clash with the type llvm::Type.

llvm-svn: 265788
2016-04-08 14:35:59 +00:00
Johannes Doerfert 41cda15940 [FIX] Allow to lookup domains for non-affine subregion blocks
llvm-svn: 265779
2016-04-08 10:32:26 +00:00
Johannes Doerfert 3ef78d6d38 [FIX] Adjust execution context of hoisted loads wrt. error domains
If we build the domains for error blocks and later remove them we lose
  the information that they are not executed. Thus, in the SCoP it looks
  like the control will always reach the statement S:

            for (i = 0 ... N)
                if (*valid == 0)
                  doSth(&ptr);
          S:    A[i] = *ptr;

  Consequently, we would have assumed "ptr" to be always accessed and
  preloaded it unconditionally. However, only if "*valid != 0" we would
  execute the optimized version of the SCoP. Nevertheless, we would have
  hoisted and accessed "ptr"regardless of "*valid". This changes the
  semantic of the program as the value of "*valid" can cause a change of
  "ptr" and control if it is executed or not.

  To fix this problem we adjust the execution context of hoisted loads
  wrt. error domains. To this end we introduce an ErrorDomainCtxMap that
  maps each basic block to the error context under which it might be
  executed. Thus, to the context under which it is executed but an error
  block would have been executed to. To fill this map one traversal of
  the blocks in the SCoP suffices. During this traversal we do also
  "remove" error statements and those that are only reachable via error
  statements. This was previously done by the removeErrorBlockDomains
  function which is therefor not needed anymore.

  This fixes bug PR26683 and thereby several SPEC miscompiles.

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

llvm-svn: 265778
2016-04-08 10:30:09 +00:00
Johannes Doerfert b47cbe1c72 [FIX] Handle multiplications in the SCEVAffinator again
If ScalarEvolution cannot look through some expression but we do, it
  might happen that a multiplication will arrive at the
  SCEVAffinator::visitMulExpr. While we could always try to improve the
  extractConstantFactor function we might still miss something, thus we
  reintroduce the code to generate multiplicative piecewise-affine
  functions as a fall-back.

llvm-svn: 265777
2016-04-08 10:27:40 +00:00
Johannes Doerfert e85d50defb Add test cases for the removal of error blocks
llvm-svn: 265776
2016-04-08 10:26:39 +00:00
Johannes Doerfert 7b81103589 [FIX] Look through div & srem instructions in SCEVs
The findValues() function did not look through div & srem instructions
  that were part of the argument SCEV. However, in different other
  places we already look through it. This mismatch caused us to preload
  values in the wrong order.

llvm-svn: 265775
2016-04-08 10:25:58 +00:00
Tobias Grosser 6a44b7fdf0 Add test case forgotten in r265379.
Thanks Johannes for reminding me.

llvm-svn: 265423
2016-04-05 17:40:07 +00:00
Johannes Doerfert a49c557f70 Remove dead code and comment [NFC]
llvm-svn: 265413
2016-04-05 16:18:53 +00:00
Johannes Doerfert ed89fae6c5 [WWW] Update passes
llvm-svn: 265410
2016-04-05 16:15:44 +00:00
Johannes Doerfert 57c5f0b1c4 [FIX] Ensure SAI objects for exit PHIs
If all exiting blocks of a SCoP are error blocks and therefor not
  represented we will not generate accesses and consequently no SAI
  objects for exit PHIs. However, they are needed in the code generation
  to generate the merge PHIs between the original and optimized region.
  With this patch we enusre that the SAI objects for exit PHIs exist
  even if all exiting blocks turn out to be eror blocks.

  This fixes the crash reported in PR27207.

llvm-svn: 265393
2016-04-05 13:44:21 +00:00
Tobias Grosser 535afd808d ScopInfo: Check for possibly nested GEP in fixed-size delin
We currently only consider the first GEP when delinearizing access functions,
which makes us loose information about additional index expression offsets,
which results in our SCoP model to be incorrect. With this patch we now
compare the base pointers used to ensure we do not miss any additional offsets.
This fixes llvm.org/PR27195.

We may consider supporting nested GEP in our delinearization heuristics in
the future.

llvm-svn: 265379
2016-04-05 06:23:45 +00:00
Johannes Doerfert 1519491eaf Do not allow to complex branch conditions
Even before we build the domain the branch condition can become very
  complex, especially if we have to build the complement of a lot of
  equality constraints. With this patch we bail if the branch condition
  has a lot of basic sets and parameters.

  After this patch we now successfully compile
    External/SPEC/CINT2000/186_crafty/186_crafty
  with "-polly-process-unprofitable -polly-position=before-vectorizer".

llvm-svn: 265286
2016-04-04 07:59:41 +00:00
Johannes Doerfert 642594ae87 Exploit graph properties during domain generation
As a CFG is often structured we can simplify the steps performed during
  domain generation. When we push domain information we can utilize the
  information from a block A to build the domain of a block B, if A dominates B
  and there is no loop backede on a path from A to B. When we pull domain
  information we can use information from a block A to build the domain of a
  block B if B post-dominates A. This patch implements both ideas and thereby
  simplifies domains that were not simplified by isl. For the FINAL basic block
  in test/ScopInfo/complex-successor-structure-3.ll we used to build a universe
  set with 81 basic sets. Now it actually is represented as universe set.

  While the initial idea to utilize the graph structure depended on the
  dominator and post-dominator tree we can use the available region
  information as a coarse grained replacement. To this end we push the
  region entry domain to the region exit and pull it from the region
  entry for the region exit if applicable.

  With this patch we now successfully compile
    External/SPEC/CINT2006/400_perlbench/400_perlbench
  and
    SingleSource/Benchmarks/Adobe-C++/loop_unroll.

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

llvm-svn: 265285
2016-04-04 07:57:39 +00:00
Johannes Doerfert a07f0ac73f Factor out "adjustDomainDimensions" function [NFC]
llvm-svn: 265284
2016-04-04 07:50:40 +00:00
Johannes Doerfert d5edbd61a1 [FIX] Do not create a SCoP in the presence of infinite loops
If a loop has no exiting blocks the region covering we use during
  schedule genertion might not cover that loop properly. For now we bail
  out as we would not optimize these loops anyway.

llvm-svn: 265280
2016-04-03 23:09:06 +00:00
Tobias Grosser 151ae32dba Revert "[FIX] Do not create a SCoP in the presence of infinite loops"
This reverts commit r265260, as it caused the following 'make check-polly'
failures:

    Polly :: ScopDetect/index_from_unpredictable_loop.ll
    Polly :: ScopInfo/multiple_exiting_blocks.ll
    Polly :: ScopInfo/multiple_exiting_blocks_two_loop.ll
    Polly :: ScopInfo/schedule-const-post-dominator-walk-2.ll
    Polly :: ScopInfo/schedule-const-post-dominator-walk.ll
    Polly :: ScopInfo/switch-5.ll

llvm-svn: 265272
2016-04-03 19:36:52 +00:00
Johannes Doerfert 2075b5d2a1 [FIX] Do not create two SAI objects for exit PHIs
If an exit PHI is written and also read in the SCoP we should not create two
  SAI objects but only one. As the read is only modeled to ensure OpenMP code
  generation knows about it we can simply use the EXIT_PHI MemoryKind for both
  accesses.

llvm-svn: 265261
2016-04-03 11:16:00 +00:00
Johannes Doerfert 7dcceb82e9 [FIX] Do not create a SCoP in the presence of infinite loops
If a loop has no exiting blocks the region covering we use during
  schedule genertion might not cover that loop properly. For now we bail
  out as we would not optimize these loops anyway.

llvm-svn: 265260
2016-04-03 11:12:39 +00:00
Johannes Doerfert 6ba927148d [FIX] Adjust the insert point for non-affine region PHIs
If a non-affine region PHI is generated we should not move the insert
  point prior to the synthezised value in the same block as we might
  split that block at the insert point later on. Only if the incoming
  value should be placed in a different block we should change the
  insertion point.

llvm-svn: 265132
2016-04-01 11:25:47 +00:00
Tobias Grosser db6db505c9 ScoPDetection: Obtain a known free diagnostic ID
... instead of hardcoding something that has been free at some point. This fixes
a crash triggered by r265084, where the diagnostic IDs have been shifted in a
way that resulted our hardcode ID to not be assigned any implementation.  Our ID
was likely already wrong earlier on, but this time we really crashed nicely.

llvm-svn: 265114
2016-04-01 07:15:19 +00:00
Paul Robinson a7e5210eec Update copyright year to 2016.
llvm-svn: 264955
2016-03-30 22:41:38 +00:00
Tobias Grosser 6deba4ea03 Revert 264782 and 264789
These caused LNT failures due to new assertions when running with
-polly-position=before-vectorizer -polly-process-unprofitable for:

FAIL: clamscan.compile_time
FAIL: cjpeg.compile_time
FAIL: consumer-jpeg.compile_time
FAIL: shapes.compile_time
FAIL: clamscan.execution_time
FAIL: cjpeg.execution_time
FAIL: consumer-jpeg.execution_time
FAIL: shapes.execution_time

The failures have been introduced by r264782, but r264789 had to be reverted
as it depended on the earlier patch.

llvm-svn: 264885
2016-03-30 18:18:31 +00:00
Johannes Doerfert a144fb148b Exploit graph properties during domain generation
As a CFG is often structured we can simplify the steps performed
  during domain generation. When we push domain information we can
  utilize the information from a block A to build the domain of a
  block B, if A dominates B. When we pull domain information we can
  use information from a block A to build the domain of a block B
  if B post-dominates A. This patch implements both ideas and thereby
  simplifies domains that were not simplified by isl. For the FINAL
  basic block in
    test/ScopInfo/complex-successor-structure-3.ll .
  we used to build a universe set with 81 basic sets. Now it actually is
  represented as universe set.

  While the initial idea to utilize the graph structure depended on the
  dominator and post-dominator tree we can use the available region
  information as a coarse grained replacement. To this end we push the
  region entry domain to the region exit and pull it from the region
  entry for the region exit.

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

llvm-svn: 264789
2016-03-29 21:31:05 +00:00
Johannes Doerfert e11e08bd1f Factor out "adjustDomainDimensions" function [NFC]
llvm-svn: 264782
2016-03-29 20:41:24 +00:00
Johannes Doerfert 29cb067000 Factor out "getFirstNonBoxedLoopFor" function [NFC]
llvm-svn: 264781
2016-03-29 20:32:43 +00:00
Johannes Doerfert 5fb9b21c24 Bail as early as possible
Instead of waiting for the domain construction to finish we will now
  bail as early as possible in case a complexity problem is encountered.
  This might save compile time but more importantly it makes the "abort"
  explicit. While we can always check if we invalidated the assumed
  context we can simply propagate the result of the construction back.
  This also removes the HasComplexCFG flag that was used for the very
  same reason.

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

llvm-svn: 264775
2016-03-29 20:02:05 +00:00
Michael Kruse 88a2256a34 Revert "[ScopInfo] Fix domains after loops."
This reverts commit r264118. The approach is still under discussion.

llvm-svn: 264705
2016-03-29 07:50:52 +00:00
Tobias Grosser 77e2128580 docs: Fix section header committed in r264575
Ensure the length of the header underline matches the length of the header.
This prevents SPHINX from erroring on this file and consequently not updating
the documentation.

Also, make this its own point not belonging to the 'increased applicability'
section.

llvm-svn: 264592
2016-03-28 17:00:14 +00:00
Hongbin Zheng 52ae58259d Add fine-grain dependences analysis to release notes.
Differential Revision: http://reviews.llvm.org/D17905

llvm-svn: 264575
2016-03-28 12:41:49 +00:00
Johannes Doerfert 6462d8c1d9 Generalize the domain complexity restrictions
This patch applies the restrictions on the number of domain conjuncts
  also to the domain parts of piecewise affine expressions we generate.
  To this end the wording is change slightly. It was needed to support
  complex additions featuring zext-instructions but it also fixes PR27045.

  lnt profitable runs reports only little changes that might be noise:
  Compile Time:
    Polybench/[...]/2mm                     +4.34%
    SingleSource/[...]/stepanov_container   -2.43%
  Execution Time:
    External/[...]/186_crafty               -2.32%
    External/[...]/188_ammp                 -1.89%
    External/[...]/473_astar                -1.87%

llvm-svn: 264514
2016-03-26 16:17:00 +00:00
Tobias Grosser 7dcae2e14a Add files forgotten in r264452
llvm-svn: 264460
2016-03-25 20:32:51 +00:00
Tobias Grosser 37034db826 Update to isl-0.16.1-145-g243bf7c
Just an import to keep track with the latest version of isl. We are not looking
for specific features.

llvm-svn: 264452
2016-03-25 19:38:18 +00:00
Tobias Grosser e34aa7f482 Add title above the release notes
llvm-svn: 264448
2016-03-25 19:23:54 +00:00
Tobias Grosser 7a1e66b98a docs: Show two levels of content in index:
llvm-svn: 264447
2016-03-25 19:23:52 +00:00
Tobias Grosser 054ca24be7 docs: Describe Polly in the LLVM pass pipeline
llvm-svn: 264446
2016-03-25 19:23:44 +00:00
Tobias Grosser ddca355fe3 docs: Clearify that our release note describe the upcoming release of Polly
llvm-svn: 264406
2016-03-25 14:22:53 +00:00
Tobias Grosser 99807e4058 www: Directly link to our new SPHINX documentation
llvm-svn: 264405
2016-03-25 14:19:34 +00:00
Tobias Grosser 563c57b2e7 docs: Add links to the old documentation
llvm-svn: 264404
2016-03-25 14:18:42 +00:00
Tobias Grosser e16b8df605 Center picture
llvm-svn: 264402
2016-03-25 14:09:40 +00:00
Tobias Grosser 063ca0fc50 docs: Add architecture diagram
llvm-svn: 264400
2016-03-25 13:44:30 +00:00
Tobias Grosser 938d9cc03e www: Reference doxygen documentation directly from the menu
llvm-svn: 264399
2016-03-25 13:09:36 +00:00
Tobias Grosser 779576406f www; Drop memory access documentation
This is an old google summer of code project that has been replaced completely
by our new AST generator.

llvm-svn: 264398
2016-03-25 13:04:19 +00:00
Tobias Grosser 25a99e98c4 cmake: Ensure tools/* is still formatted
This got accidentally dropped in r264283.

Also, drop the wwwfiles from the removal list. This is not needed any more as
we now explicitly list the directories that should be formatted.

llvm-svn: 264397
2016-03-25 12:16:17 +00:00
Tobias Grosser b339594f5d CodegenCleanup: Drop -load-combine pass
This pass is not enabled in the default tool chain and currently can run into an
infinite loop, due to other parts of LLVM generating incorrect IR
(http://llvm.org/PR27065) -- which is not executed and consequently does not
seem to disturb other passes.  As this pass is not really needed, we can just
drop it to get our build clean.

This fixes the timeout issues in MultiSource/Benchmarks/MiBench/consumer-jpeg
and MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/cjpeg for
-polly-position=before-vectorizer -polly-process-unprofitable.. Unfortunately,
we are still left with a miscompile in cjpeg.

llvm-svn: 264396
2016-03-25 12:11:06 +00:00
Johannes Doerfert 6af7700ddf [CMAKE] Try to find the correct globbing expression
llvm-svn: 264286
2016-03-24 14:31:49 +00:00
Johannes Doerfert 733ea34f38 [FIX] Handle accesses to "null" in MemIntrinsics
This fixes PR27035. While we now exclude MemIntrinsics from the
  polyhedral model if they would access "null" we could exploit this
  even more, e.g., remove all parameter combinations that would lead to
  the execution of this statement from the context.

llvm-svn: 264284
2016-03-24 13:50:04 +00:00
Johannes Doerfert 8ff253bfbf Restrict clang-format to lib/ [NFC]
llvm-svn: 264283
2016-03-24 13:49:39 +00:00
Johannes Doerfert 549768c01a [FIX] Verify the alias group before returning it
Similar to r262612 we need to check not only the pointer SCEV and the
type of an alias group but also the actual access instruction. The
reason is again the same: The pointer SCEV is not flow sensitive but the
access function is. In r262612 we avoided consolidating alias groups
even though the pointer SCEV and the type were the same but the access
function was not. Here it is simpler as we can simply check all members
of an alias group against the given access instruction.

llvm-svn: 264274
2016-03-24 13:22:16 +00:00
Johannes Doerfert 9ea44aee64 [DOCS] Exclude python and shell scripts
llvm-svn: 264273
2016-03-24 13:21:12 +00:00
Johannes Doerfert 47197fe3f3 Add namespace for struct [NFC]
This will clean up the doxygen documentation.

llvm-svn: 264272
2016-03-24 13:20:52 +00:00
Johannes Doerfert 01b723ba43 Remove obsolete CMD option [NFC]
llvm-svn: 264270
2016-03-24 13:19:51 +00:00
Johannes Doerfert 2b470e8e61 Remove obsolete code
Since r261226 we should not see this situation any more, if so it is probably
  a bug that would only be hidden.

llvm-svn: 264269
2016-03-24 13:19:16 +00:00
Johannes Doerfert 13d5d5b184 Remove weird comment [NFC]
llvm-svn: 264268
2016-03-24 13:16:49 +00:00
Tobias Grosser 25e8ebe29d Drop explicit -polly-delinearize parameter
Delinearization is now enabled by default and does not need to explicitly need
to be enabled in our tests.

llvm-svn: 264154
2016-03-23 13:21:02 +00:00
Tobias Grosser 6895d9587e www: Drop one more </div>
llvm-svn: 264144
2016-03-23 09:27:41 +00:00
Tobias Grosser 00c85c6f2f www: Drop polyhedral news reference.
The feed2html service used has been unavailable a couple of times and always
causes the polly website to fail to load correctly.

llvm-svn: 264143
2016-03-23 09:26:39 +00:00
Tobias Grosser bfb6a9683b Codegen:Do not invalidate dominator tree when bailing out during code generation
When codegenerating invariant loads in some rare cases we cannot generate code
and bail out. This change ensures that we maintain a valid dominator tree
in these situations. This fixes llvm.org/PR26736

Contributed-by: Matthias Reisinger <d412vv1n@gmail.com>
llvm-svn: 264142
2016-03-23 06:57:51 +00:00
Tobias Grosser 898a636210 Add option to disallow modref function calls in scops.
This might be useful to evaluate the benefit of us handling modref funciton
calls. Also, a new bug that was triggered by modref function calls was
recently reported http://llvm.org/PR27035. To ensure the same issue does not
cause troubles for other people, we temporarily disable this until the bug
is resolved.

llvm-svn: 264140
2016-03-23 06:40:15 +00:00
Michael Kruse 49a59ca093 [ScopInfo] Fix domains after loops.
ISL can conclude additional conditions on parameters from restrictions
on loop variables. Such conditions persist when leaving the loop and the
loop variable is projected out. This results in a narrower domain for
exiting the loop than entering it and is logically impossible for
non-infinite loops.

We fix this by not adding a lower bound i>=0 when constructing BB
domains, but defer it to when also the upper bound it computed, which
was done redundantly even before this patch.

This reduces the number of LNT fails with -polly-process-unprofitable
-polly-position=before-vectorizer from 8 to 6.

llvm-svn: 264118
2016-03-22 23:27:42 +00:00
Tobias Grosser 5a8c052baf Invalidate scop on encountering a complex control flow
We bail out if current scop has a complex control flow as this could lead to
building of large domain conditions. This is to reduce compile time.  This
addresses r26382.

Contributed-by: Chris Jenneisch <chrisj@codeaurora.org>

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

llvm-svn: 264105
2016-03-22 22:05:32 +00:00
Tobias Grosser 0904c69110 ScopInfo: Do not generate dependences for i1 values used in affine branches
Affine branches are fully modeled and regenerated from the polyhedral domain and
consequently do not require any input conditions to be propagated.

llvm-svn: 263678
2016-03-16 23:33:54 +00:00
Tobias Grosser 0c2adbc7a0 MemAccInt: Do not strip pointer casts
This mirrors:

commit  https://llvm.org/svn/llvm-project/llvm/trunk@263462
Author: Michael Kuperstein <michael.kuperstein@gmail.com>
Date:   Mon Mar 14 18:34:29 2016 +0000

    [AliasSetTracker] Do not strip pointer casts when processing MemSetInst

and fixes the failure the above commit triggered in Polly.

llvm-svn: 263538
2016-03-15 06:35:08 +00:00
Mehdi Amini 16c445ae92 Revert "Revert "Update Polly for the removal of PreserveNames from IRBuilder stuff""
This reverts commit r263322 and reapplies r263296. The original
r263258 was reapplied in LLVM after being reverted in r263321 due to
issues with Release testing in Clang.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263399
2016-03-13 22:21:43 +00:00
David Blaikie a0d9990c59 Revert "Update Polly for the removal of PreserveNames from IRBuilder stuff"
The original r263258 was reverted in r263321 due to issues with Release
testing.

This reverts commit r263296.

llvm-svn: 263322
2016-03-12 01:53:28 +00:00
David Blaikie e16dc34e97 Update Polly for the removal of PreserveNames from IRBuilder stuff
llvm-svn: 263296
2016-03-11 21:33:58 +00:00
Tobias Grosser 114180db5b Also clang-format *.c run-time library files
llvm-svn: 262917
2016-03-08 07:34:58 +00:00
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
Johannes Doerfert 8c83078449 Simplify code [NFC]
llvm-svn: 261864
2016-02-25 14:07:49 +00:00
Johannes Doerfert 9dd42ee7c1 Try to build alias checks even when non-affine accesses are allowed
From now on we bail only if a non-trivial alias group contains a non-affine
  access, not when we discover aliasing and non-affine accesses are allowed.

llvm-svn: 261863
2016-02-25 14:06:11 +00:00
Michael Kruse 7b5caa4a72 Introduce ScopStmt::getRegionNode(). NFC.
Replace an inline ternary operator pattern.

llvm-svn: 261793
2016-02-24 22:08:28 +00:00
Michael Kruse 375cb5fe0a Introduce ScopStmt::getEntryBlock(). NFC.
This replaces an ungly inline ternary operator pattern.

llvm-svn: 261792
2016-02-24 22:08:24 +00:00
Michael Kruse 6f7721f02b Introduce Scop::getStmtFor. NFC.
Replace Scop::getStmtForBasicBlock and Scop::getStmtForRegionNode, and
add overloads for llvm::Instruction and llvm::RegionNode.

getStmtFor and overloads become the common interface to get the Stmt
that contains something. Named after LoopInfo::getLoopFor and
RegionInfo::getRegionFor.

llvm-svn: 261791
2016-02-24 22:08:19 +00:00
Michael Kruse eac9726e8c Add assertions checking def dominates use. NFC.
This is also be caught by the function verifier, but disconnected from
the place that produced it. Catch it already at creation to be able to
reason more directly about the cause.

llvm-svn: 261790
2016-02-24 22:08:14 +00:00
Michael Kruse a9c846c4ee Add assertion to MemoryAccess::addIncoming. NFC.
MemoryAccess::addIncoming exists to remember which values come from that
statement in PHI writes, relevant for subregions that have multiple
exiting edges to an exit block. The exit block can be separated from the
exiting block by regions simplifications. It should not be called for
any read accesses.

llvm-svn: 261789
2016-02-24 22:08:11 +00:00
Michael Kruse 526fcf5f0d Use inline variable declaration. NFC.
llvm-svn: 261788
2016-02-24 22:08:08 +00:00
Michael Kruse 264c3bc15a Replace std::auto_ptr with std::unique_ptr. NFC.
std::auto_ptr has been deprecated in C++11, which some compilers warn
about.

llvm-svn: 261787
2016-02-24 22:08:05 +00:00