Skip to content
  1. Sep 29, 2015
  2. Sep 28, 2015
    • Sanjay Patel's avatar
      move one-use check under the comment that describes it; NFCI · 5e5f0e97
      Sanjay Patel authored
      llvm-svn: 248745
      5e5f0e97
    • Sanjoy Das's avatar
      [SCEV] Don't crash on pointer comparisons · 4f1c4595
      Sanjoy Das authored
      `ScalarEvolution::isImpliedCondOperandsViaNoOverflow` tries to cast the
      operand type of the comparison it is given to an `IntegerType`.  This is
      incorrect because it could actually be simplifying a comparison between
      two pointers.  Switch it to using `getTypeSizeInBits` instead, which
      does the right thing for both pointers and integers.
      
      Fixed PR24956.
      
      llvm-svn: 248743
      4f1c4595
    • Matt Arsenault's avatar
      AMDGPU: Factor switch into separate function · ba6aae78
      Matt Arsenault authored
      llvm-svn: 248742
      ba6aae78
    • Matt Arsenault's avatar
      AMDGPU: Fix splitting x16 SMRD loads · 73aa8f68
      Matt Arsenault authored
      When used recursively, this would set the kill flag
      on the intermediate step from first splitting
      x16 to x8.
      
      llvm-svn: 248741
      73aa8f68
    • Matt Arsenault's avatar
      AMDGPU: Fix moving SMRD loads with literal offsets on CI · e5d042cd
      Matt Arsenault authored
      llvm-svn: 248740
      e5d042cd
    • Matt Arsenault's avatar
      AMDGPU: Fix splitting SMRD with large offset · dd49c5fc
      Matt Arsenault authored
      The splitting of > 4 dword SMRD instructions
      if using an offset in an SGPR instead of an immediate
      was not setting the destination register,
      resulting an an instruction missing an operand
      which would assert later.
      
      Test will be included in a following commit
      which fixes a related issue.
      
      llvm-svn: 248739
      dd49c5fc
    • Matt Arsenault's avatar
      AMDGPU: Add testcases · b378f075
      Matt Arsenault authored
      Make sure we are testing moving users
      of the moved and split SMRD loads.
      
      llvm-svn: 248738
      b378f075
    • Matt Arsenault's avatar
      AMDGPU: Cleanup test · f3c91f57
      Matt Arsenault authored
      Run instnamer on it, and rename check prefix.
      
      This is in preparation for adding new testcases to cover
      bugs on other subtargets.
      
      llvm-svn: 248737
      f3c91f57
    • Andrew Kaylor's avatar
      Improved the interface of methods commuting operands, improved X86-FMA3 mem-folding&coalescing. · 16c4da03
      Andrew Kaylor authored
      Patch by Slava Klochkov (vyacheslav.n.klochkov@intel.com)
      
      Differential Revision: http://reviews.llvm.org/D11370
      
      llvm-svn: 248735
      16c4da03
    • Sean Silva's avatar
      [GlobalOpt] Sort members of llvm.used deterministically · ace7818c
      Sean Silva authored
      Patch by Jake VanAdrighem!
      
      Summary:
      Fix the way we sort the llvm.used and llvm.compiler.used members.
      
      This bug seems to have been introduced in rL183756 through a set of improper casts to GlobalValue*. In subsequent patches this problem was missed and transformed into a getName call on a ConstantExpr.
      
      Reviewers: silvas
      
      Subscribers: silvas, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D12851
      
      llvm-svn: 248728
      ace7818c
    • Fiona Glaser's avatar
      Improve performance of SimplifyInstructionsInBlock · f74cc40e
      Fiona Glaser authored
      1. Use a worklist, not a recursive approach, to avoid needless
         revisitation and being repeatedly forced to jump back to the
         start of the BB if a handle is invalidated.
      
      2. Only insert operands to the worklist if they become unused
         after a dead instruction is removed, so we don’t have to
         visit them again in most cases.
      
      3. Use a SmallSetVector to track the worklist.
      
      4. Instead of pre-initting the SmallSetVector like in
         DeadCodeEliminationPass, only put things into the worklist
         if they have to be revisited after the first run-through.
         This minimizes how much the actual SmallSetVector gets used,
         which saves a lot of time.
      
      llvm-svn: 248727
      f74cc40e
    • Daniel Sanders's avatar
      [mips][p5600] Added P5600 processor and initial scheduler. · 7727e109
      Daniel Sanders authored
      Summary:
      The P5600 is an out-of-order, superscalar implementation of the MIPS32R5
      architecture.
      
      The scheduler has a few missing details (see the 'Tricky Instructions'
      section and some quirks of the P5600 are deliberately omitted due to
      implementation difficulty and low chance of significant benefit (e.g. the
      predicate on P5600WriteEitherALU). However, testing on SingleSource is
      showing significant performance benefits on some apps (seven in the 10-30%
      range) and only one significant regression (12%) when
      -pre-RA-sched=linearize is given. Without -pre-RA-sched=linearize the
      results are more variable. Some do even better (up to 55% improvement) but
      increased numbers of copies are slowing others down (up to 12%).
      
      Overall, the scheduler as it currently stands is a 2.4% win with
      -pre-RA-sched=linearize and a 2.7% win without -pre-RA-sched=linearize.
      I'm sure we can improve on this further.
      
      For completeness, the FPGA this was tested on shows some failures with and
      without the P5600 scheduler. These appear to be scheduling related since
      the two test runs have fairly different sets of failing tests even after
      accounting for other factors (e.g. spurious connection failures) however
      it's not P5600 specific since we also get some for the generic scheduler.
      
      Reviewers: vkalintiris
      
      Subscribers: mpf, llvm-commits, atrick, vkalintiris
      
      Differential Revision: http://reviews.llvm.org/D12193
      
      llvm-svn: 248725
      7727e109
    • Artur Pilipenko's avatar
      Introduce !align metadata for load instruction · b4d00904
      Artur Pilipenko authored
      Reviewed By: hfinkel
      
      Differential Revision: http://reviews.llvm.org/D12853
      
      llvm-svn: 248721
      b4d00904
    • Philip Reames's avatar
      [InstSimplify] Fold simple known implications to true · 13f023c0
      Philip Reames authored
      This was split off of http://reviews.llvm.org/D13040 to make it easier to test the correctness of the implication logic. For the moment, this only handles a single easy case which shows up when eliminating and combining range checks. In the (near) future, I plan to extend this for other cases which show up in range checks, but I wanted to make those changes incrementally once the framework was in place.
      
      At the moment, the implication logic will be used by three places. One in InstSimplify (this review) and two in SimplifyCFG (http://reviews.llvm.org/D13040 & http://reviews.llvm.org/D13070). Can anyone think of other locations this style of reasoning would make sense?
      
      Differential Revision: http://reviews.llvm.org/D13074
      
      llvm-svn: 248719
      13f023c0
    • Weiming Zhao's avatar
      [LoopReroll] Ignore debug intrinsics · 310770a9
      Weiming Zhao authored
      Originally, debug intrinsics and annotation intrinsics may prevent
      the loop to be rerolled, now they are ignored.
      
      Differential Revision: http://reviews.llvm.org/D13150
      
      llvm-svn: 248718
      310770a9
    • Dan Gohman's avatar
      [WebAssembly] Support for direct call and call_indirect. · 05a17aa8
      Dan Gohman authored
      llvm-svn: 248716
      05a17aa8
    • Zoran Jovanovic's avatar
      [mips] Handling of immediates bigger than 16 bits · cdb64566
      Zoran Jovanovic authored
      Differential Revision: http://reviews.llvm.org/D10539
      
      llvm-svn: 248706
      cdb64566
    • Artyom Skrobov's avatar
      [ARM] Avoid redundant checks for isThumb1Only() after supportsTailCall() · ad8a0638
      Artyom Skrobov authored
      supportsTailCall() has two callers. Both of them double-check isThumb1Only(),
      and refuse to proceed with tail-calling in that case.
      Therefore, it makes sense to move this check to
      ARMSubtarget::initSubtargetFeatures, where SupportsTailCall is initialized;
      and to eliminate the extra checks at the call sites.
      
      Following a review comment, added an "assert(supportsTailCall())"
      in IsEligibleForTailCall.
      
      NFC.
      
      llvm-svn: 248703
      ad8a0638
    • Hal Finkel's avatar
      [DAGCombine] Fix getStoreMergeAndAliasCandidates's AA-enabled chain walking · bd582581
      Hal Finkel authored
      When AA is being used, non-aliasing stores are canonicalized to use the same
      chain, and DAGCombiner::getStoreMergeAndAliasCandidates can take advantage of
      this by looking only as users of a store's chain operand. However, user
      iteration is not result-number specific, we need to check that the use is as a
      chain operand, and not via some other operand. It is certainly possible to have
      another potentially-aliasing store, which shares the first's base pointer, and
      uses the first's chain's node via some other operand.
      
      Failure to catch this situation caused, at least in the included test case, an
      assert later because the relative sequence-number ordering caused later
      replacement to create a cycle in the DAG.
      
      llvm-svn: 248698
      bd582581
    • Craig Topper's avatar
      862d5d83
    • Justin Bogner's avatar
      AsmWriter: Print the argument names in declarations while debugging · d7d1a72f
      Justin Bogner authored
      When llvm declarations have argument names, it's helpful to actually
      print those names when debugging. Arguably, it'd be nice to print them
      all the time, but that would mean the IR we output wouldn't round trip
      through bitcode, which doesn't store the names.
      
      Make the varous print() methods in AsmWriter optionally print "for
      debug" and set that flag in the dump() methods. The only thing this
      does differently for now is print the argument names in declarations.
      
      llvm-svn: 248692
      d7d1a72f
  3. Sep 27, 2015
    • Yaron Keren's avatar
      Silence clang warning: variable ‘Status’ set but not used. · e5a9dc2f
      Yaron Keren authored
      llvm-svn: 248691
      e5a9dc2f
    • Sanjoy Das's avatar
      [SCEV] identical instructions don't compute equal values · f1090b60
      Sanjoy Das authored
      Before this change `HasSameValue` would return true for distinct
      `alloca` instructions if they happened to be allocating the same
      type (`alloca` instructions are not specified as reading memory).  This
      change adds an explicit whitelist of instruction types for which
      "identical" instructions compute the same value.
      
      Fixes PR24952.
      
      llvm-svn: 248690
      f1090b60
    • Sanjay Patel's avatar
      [InstCombine] fold zexts and constants into a phi (PR24766) · 95334075
      Sanjay Patel authored
      This is one step towards solving PR24766:
      https://llvm.org/bugs/show_bug.cgi?id=24766
      
      We were not producing the same IR for these two C functions because the store
      to the temp bool causes extra zexts:
      
      #include <stdbool.h>
      
      bool switchy(char x1, char x2, char condition) {
         bool conditionMet = false;
         switch (condition) {
         case 0: conditionMet = (x1 == x2); break;
         case 1: conditionMet = (x1 <= x2); break;
         }
         return conditionMet;
      }
      
      bool switchy2(char x1, char x2, char condition) {
         switch (condition) {
         case 0: return (x1 == x2);
         case 1: return (x1 <= x2);
         }
        return false;
      }
      
      As noted in the code comments, this test case manages to avoid the more general existing
      phi optimizations where there are only 2 phi inputs or where there are no constant phi 
      args mixed in with the casts ops. It seems like a corner case, but if we don't catch it, 
      then I don't think we can get SimplifyCFG to further optimize towards the canonical form
      for this function shown in the bug report.
      
      Differential Revision: http://reviews.llvm.org/D12866
      
      llvm-svn: 248689
      95334075
    • Joseph Tremoulet's avatar
      [EH] Create removeUnwindEdge utility · 09af67ab
      Joseph Tremoulet authored
      Summary:
      Factor the code that rewrites invokes to calls and rewrites WinEH
      terminators to their "unwind to caller" equivalents into a helper in
      Utils/Local, and use it in the three places I'm aware of that need to do
      this.
      
      
      Reviewers: andrew.w.kaylor, majnemer, rnk
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D13152
      
      llvm-svn: 248677
      09af67ab
  4. Sep 26, 2015
Loading