Skip to content
  1. Feb 22, 2019
    • Matt Arsenault's avatar
      BreakCriticalEdges: Update PostDominatorTree · 65b4ab99
      Matt Arsenault authored
      llvm-svn: 354673
      65b4ab99
    • Roman Tereshin's avatar
      [LowerSwitch][AMDGPU] Do not handle impossible values · 99a6672b
      Roman Tereshin authored
      This patch adds LazyValueInfo to LowerSwitch to compute the range of the
      value being switched over and reduce the size of the tree LowerSwitch
      builds to lower a switch.
      
      Reviewed By: arsenm
      
      Differential Revision: https://reviews.llvm.org/D58096
      
      llvm-svn: 354670
      99a6672b
    • Chijun Sima's avatar
      [DTU] Refine the interface and logic of applyUpdates · 70e97163
      Chijun Sima authored
      Summary:
      This patch separates two semantics of `applyUpdates`:
      1. User provides an accurate CFG diff and the dominator tree is updated according to the difference of `the number of edge insertions` and `the number of edge deletions` to infer the status of an edge before and after the update.
      2. User provides a sequence of hints. Updates mentioned in this sequence might never happened and even duplicated.
      
      Logic changes:
      
      Previously, removing invalid updates is considered a side-effect of deduplication and is not guaranteed to be reliable. To handle the second semantic, `applyUpdates` does validity checking before deduplication, which can cause updates that have already been applied to be submitted again. Then, different calls to `applyUpdates` might cause unintended consequences, for example,
      ```
      DTU(Lazy) and Edge A->B exists.
      1. DTU.applyUpdates({{Delete, A, B}, {Insert, A, B}}) // User expects these 2 updates result in a no-op, but {Insert, A, B} is queued
      2. Remove A->B
      3. DTU.applyUpdates({{Delete, A, B}}) // DTU cancels this update with {Insert, A, B} mentioned above together (Unintended)
      ```
      But by restricting the precondition that updates of an edge need to be strictly ordered as how CFG changes were made, we can infer the initial status of this edge to resolve this issue.
      
      Interface changes:
      The second semantic of `applyUpdates`  is separated to `applyUpdatesPermissive`.
      These changes enable DTU(Lazy) to use the first semantic if needed, which is quite useful in `transforms/utils`.
      
      Reviewers: kuhar, brzycki, dmgreen, grosser
      
      Reviewed By: brzycki
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D58170
      
      llvm-svn: 354669
      70e97163
    • Alina Sbirlea's avatar
      [MemorySSA & LoopPassManager] Resolve PR40038. · 90d2e3a1
      Alina Sbirlea authored
      The correct edge being deleted is not to the unswitched exit block, but to the
      original block before it was split. That's the key in the map, not the
      value.
      The insert is correct. The new edge is to the .split block.
      
      The splitting turns OriginalBB into:
      OriginalBB -> OriginalBB.split.
      Assuming the orignal CFG edge: ParentBB->OriginalBB, we must now delete
      ParentBB->OriginalBB, not ParentBB->OriginalBB.split.
      
      llvm-svn: 354656
      90d2e3a1
    • Chijun Sima's avatar
      [DTU] Deprecate insertEdge*/deleteEdge* · f131d611
      Chijun Sima authored
      Summary: This patch converts all existing `insertEdge*/deleteEdge*` to `applyUpdates` and marks `insertEdge*/deleteEdge*` as deprecated.
      
      Reviewers: kuhar, brzycki
      
      Reviewed By: kuhar, brzycki
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D58443
      
      llvm-svn: 354652
      f131d611
  2. Feb 21, 2019
  3. Feb 20, 2019
    • Philip Reames's avatar
      [GVN] Small tweaks to comments, style, and missed vector handling · 79d5e16f
      Philip Reames authored
      Noticed these while doing a final sweep of the code to make sure I hadn't missed anything in my last couple of patches.  The (minor) missed optimization was noticed because of the stylistic fix to avoid an overly specific cast.
      
      llvm-svn: 354412
      79d5e16f
    • Philip Reames's avatar
      [GVN] Fix last crasher w/non-integral pointers · a259dc32
      Philip Reames authored
      Same case as for memset and memcpy, but this time for clobbering stores and loads.  We still can't allow coercion to or from non-integrals, regardless of the transform.
      
      Now that I'm done the whole little sequence, it seems apparent that we'd entirely missed reasoning about clobbers in the original GVN support for non-integral pointers.
      
      My appologies, I thought we'd upstreamed all of this, but it turns out we were still carrying a downstream hack which hid all of these issues.  My chanks to Cherry Zhang for helping debug.
      
      llvm-svn: 354407
      a259dc32
    • Philip Reames's avatar
      [GVN] Fix a crash bug w/non-integral pointers and memtransfers · 952d234d
      Philip Reames authored
      Problem is very similiar to the one fixed for memsets in r354399, we try to coerce a value to non-integral type, and then crash while try to do so.  Since we shouldn't be doing such coercions to start with, easy fix.  From inspection, I see two other cases which look to be similiar and will follow up with most test cases and fixes if confirmed.
      
      llvm-svn: 354403
      952d234d
    • Philip Reames's avatar
      [GVN] Fix a non-integral pointer bug w/vector types · 322eb766
      Philip Reames authored
      GVN generally doesn't forward structs or array types, but it *will* forward vector types to non-vectors and vice versa.  As demonstrated in tests, we need to inhibit the same set of transforms for vector of non-integral pointers as for non-integral pointers themselves.
      
      llvm-svn: 354401
      322eb766
    • Philip Reames's avatar
      [GVN] Fix a crash bug around non-integral pointers · 92756a80
      Philip Reames authored
      If we encountered a location where we tried to forward the value of a memset to a load of a non-integral pointer, we crashed.  Such a forward is not legal in general, but we can forward null pointers.  Test for both cases are included.
      
      llvm-svn: 354399
      92756a80
  4. Feb 19, 2019
  5. Feb 18, 2019
  6. Feb 17, 2019
  7. Feb 15, 2019
Loading