Skip to content
  1. May 23, 2018
  2. May 21, 2018
  3. May 19, 2018
  4. May 18, 2018
  5. May 16, 2018
  6. May 15, 2018
  7. May 10, 2018
  8. May 09, 2018
    • Michael Kruse's avatar
      [ScopInfo] Remove bail out condition in buildMinMaxAccess(). · e330071b
      Michael Kruse authored
      The condition was introduced in r267142 to mitigate a long compile-time
      case. In r306087, a max-computation limit was introduced that should
      handle the same case while leaving the max disjuncts heuristic it
      should have replaced intact.
      
      Today, the max disjuncts bail-out causes problems in that it prematurely
      stops SCoPs from being detected, e.g. in SPEC's lbm. This would hit less
      like if isl_set_coalesce would be called after isl_set_remove_divs
      (which makes more basic_set likely to be coalescable) instead of before.
      
      This patch tries to remove the premature max-disjuncts bail-out
      condition by using simple_hull() to reduce the computational overhead,
      instead of directly invalidating that SCoP.
      
      Differential Revision: https://reviews.llvm.org/D45066
      
      
      
      Contributed-by: default avatarSahil Girish Yerawar <cs15btech11044@iith.ac.in>
      llvm-svn: 331891
      e330071b
  9. May 08, 2018
  10. May 02, 2018
  11. Apr 29, 2018
  12. Apr 28, 2018
  13. Apr 25, 2018
    • Michael Kruse's avatar
      [CodeGen] Fix comment. NFC. · 8aedbd9d
      Michael Kruse authored
      llvm-svn: 330865
      8aedbd9d
    • Michael Kruse's avatar
      [CodeGen] Print executed statement instances at runtime. · e819fffe
      Michael Kruse authored
      Add the options -polly-codegen-trace-stmts and
      -polly-codegen-trace-scalars. When enabled, adds a call to the
      beginning of every generated statement that prints the executed
      statement instance. With -polly-codegen-trace-scalars, it also prints
      the value of all scalars that are used in the statement, and PHIs
      defined in the beginning of the statement.
      
      Differential Revision: https://reviews.llvm.org/D45743
      
      llvm-svn: 330864
      e819fffe
    • Michael Kruse's avatar
      [ScopDetect] Reject loop with multiple exit blocks. · beffdb9d
      Michael Kruse authored
      The current statement domain derivation algorithm does not (always)
      consider that different exit blocks of a loop can have different
      conditions to be reached.
      
      From the code
      
            for (int i = n; ; i-=2) {
              if (i <= 0) goto even;
              if (i <= 1) goto odd;
              A[i] = i;
            }
          even:
            A[0] = 42;
            return;
          odd:
            A[1] = 21;
            return;
      
      Polly currently derives the following domains:
      
              Stmt_even_critedge
                  Domain :=
                      [n] -> { Stmt_even_critedge[] };
              Stmt_odd
                  Domain :=
                      [n] -> { Stmt_odd[] : (1 + n) mod 2 = 0 and n > 0 };
      
      while the domain for the odd case is correct, Stmt_even is assumed to be
      executed unconditionally, which is obviously wrong. While projecting out
      the loop dimension in `adjustDomainDimensions`, it does not consider
      that there are other exit condition that have matched before.
      
      I don't know a how to fix this without changing a lot of code. Therefore
      This patch rejects loops with multiple exist blocks to fix the
      miscompile of test-suite's uuencode.
      
      The odd condition is transformed by LLVM to
      
          %cmp1 = icmp eq i64 %indvars.iv, 1
      
      such that the project_out in adjustDomainDimensions() indeed only
      matches for odd n (using this condition only, we'd have an infinite loop
      otherwise).
      
      The even condition manifests as
      
          %cmp = icmp slt i64 %indvars.iv, 3
      
      Because buildDomainsWithBranchConstraints() does not consider other exit
      conditions, it has to assume that the induction variable will eventually
      be lower than 3 and taking this exit.
      
      IMHO we need to reuse the algorithm that determines the number of
      iterations (addLoopBoundsToHeaderDomain) to determine which exit
      condition applies first. It has to happen in
      buildDomainsWithBranchConstraints() because the result will need to
      propagate to successor BBs. Currently addLoopBoundsToHeaderDomain() just
      look for union of all backedge conditions (which means leaving not the
      loop here). The patch in llvm.org/PR35465 changes it to look for exit
      conditions instead. This is required because there might be other exit
      conditions that do not alternatively go back to the loop header.
      
      Differential Revision: https://reviews.llvm.org/D45649
      
      llvm-svn: 330858
      beffdb9d
    • Tobias Grosser's avatar
      Update isl to isl-0.19-114-g385262af · 5fa86378
      Tobias Grosser authored
      llvm-svn: 330800
      5fa86378
  14. Apr 24, 2018
  15. Apr 21, 2018
  16. Apr 20, 2018
    • Michael Kruse's avatar
      [isl++] abort() on assertion violation. · 76238aac
      Michael Kruse authored
      
      
      Before this patch, ISL_ASSERT only printed an error message to stderr.
      This can be easily missed if the program continues or just fails later.
      To fail-early and help error diagnostics (e.g. using bugpoint), call
      abort() when an assertion does not hold.
      
      I seem to just have forgotten to add this abort() when I originally
      proposed the ISL_ASSERT macro.
      
      Suggested-By: default avatarEli Friedman <efriedma@codeaurora.org>
      
      Differential Revision: https://reviews.llvm.org/D45171
      
      llvm-svn: 330467
      76238aac
    • Michael Kruse's avatar
      Allow arbitrary function calls for debugging purposes. · 5369ea5d
      Michael Kruse authored
      Add the switch -polly-debug-func to define the name of a debug
      function. This function is ignored for any validity check.
      
      Its purpose is to allow to observe a value after transformation by a
      SCoP, and to follow which statements are executed in which order. For
      instance, consider the following code:
      
          static void dbg_printf(int sum, int i) {
            fprintf(stderr, "The value of sum is %d, i=%d\n", sum, i);
            fflush(stderr);
          }
      
          void func(int n) {
            int sum = 0;
            for (int i = 0; i < 16; i+=1) {
              sum += i;
              dbg_printf(sum, i);
            }
          }
      
      Executing this after Polly's codegen with -polly-debug-func=dbg_printf
      reveals the new execution order and the assumed values at that point of
      execution.
      
      Differential Revision: https://reviews.llvm.org/D45728
      
      llvm-svn: 330466
      5369ea5d
  17. Apr 19, 2018
    • Tobias Grosser's avatar
      [RuntimeDebugBuilder] Do not break for 64 bit integers · c49f115b
      Tobias Grosser authored
      In r330292 this assert was turned incorrectly into an unreachable, but
      the correct behavior (thanks Michael) is to assert for anything that is
      not 64 bit, but falltrough for 64 bit. I document this in the source
      code.
      
      llvm-svn: 330309
      c49f115b
  18. Apr 18, 2018
  19. Apr 17, 2018
  20. Apr 12, 2018
    • Tobias Grosser's avatar
      Add isl operator overloads for isl::pw_aff (Try II) · be483ae6
      Tobias Grosser authored
      Piecewise affine expressions have directly corresponding mathematical
      operators. Introduce these operators as overloads as this makes writing
      code with isl::pw_aff expressions more directly readable.
      
      We can now write:
      
        A = B + C    instead of    A = B.add(C)
      
      Reviewers: Meinersbur, bollu, sebpop
      
      Reviewed By: Meinersbur
      
      Subscribers: philip.pfaffe, pollydev, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D45534
      
      llvm-svn: 329880
      be483ae6
Loading