Skip to content
  1. Oct 13, 2015
  2. Oct 12, 2015
  3. Oct 09, 2015
  4. Oct 07, 2015
  5. Oct 06, 2015
  6. Oct 03, 2015
    • Piotr Padlewski's avatar
      inariant.group handling in GVN · dc9b2cfc
      Piotr Padlewski authored
      The most important part required to make clang
      devirtualization works ( ͡°͜ʖ ͡°).
      The code is able to find non local dependencies, but unfortunatelly
      because the caller can only handle local dependencies, I had to add
      some restrictions to look for dependencies only in the same BB.
      
      http://reviews.llvm.org/D12992
      
      llvm-svn: 249196
      dc9b2cfc
  7. Oct 02, 2015
  8. Sep 30, 2015
  9. Sep 29, 2015
    • Evgeniy Stepanov's avatar
      Move dbg.declare intrinsics when merging and replacing allocas. · d8b86f7c
      Evgeniy Stepanov authored
      Place new and update dbg.declare calls immediately after the
      corresponding alloca.
      
      Current code in replaceDbgDeclareForAlloca puts the new dbg.declare
      at the end of the basic block. LLVM codegen has problems emitting
      debug info in a situation when dbg.declare appears after all uses of
      the variable. This usually kinda works for inlining and ASan (two
      users of this function) but not for SafeStack (see the pending change
      in http://reviews.llvm.org/D13178).
      
      llvm-svn: 248769
      d8b86f7c
  10. Sep 28, 2015
    • 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
  11. Sep 27, 2015
    • 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
  12. Sep 24, 2015
  13. Sep 23, 2015
  14. Sep 21, 2015
  15. Sep 16, 2015
  16. Sep 15, 2015
  17. Sep 14, 2015
    • David Blaikie's avatar
      [opaque pointer types] Switch a few cases of getElementType over, since I had... · 6614d8d2
      David Blaikie authored
      [opaque pointer types] Switch a few cases of getElementType over, since I had them lying around anyway
      
      llvm-svn: 247610
      6614d8d2
    • David Blaikie's avatar
      Revert "[opaque pointer type] Pass GlobalAlias the actual pointer type rather... · 16a2f3e3
      David Blaikie authored
      Revert "[opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space"
      
      This was a flawed change - it just caused the getElementType call to be
      deferred until later, when we really need to remove it. Now that the IR
      for GlobalAliases has been updated, the root cause is addressed that way
      instead and this change is no longer needed (and in fact gets in the way
      - because we want to pass the pointee type directly down further).
      
      Follow up patches to push this through GlobalValue, bitcode format, etc,
      will come along soon.
      
      This reverts commit 236160.
      
      llvm-svn: 247585
      16a2f3e3
  18. Sep 11, 2015
  19. Sep 10, 2015
    • Matthew Simpson's avatar
      [LV] Relax Small Size Reduction Type Requirement · 29dc0f70
      Matthew Simpson authored
      This patch enables small size reductions in which the source types are smaller
      than the reduction type (e.g., computing an i16 sum from the values in an i8
      array). The previous behavior was to only allow small size reductions if the
      source types and reduction type were the same. The change accounts for the fact
      that the existing sign- and zero-extend instructions in these cases should
      still be included in the cost model.
      
      Differential Revision: http://reviews.llvm.org/D12770
      
      llvm-svn: 247337
      29dc0f70
    • Philip Reames's avatar
      [SimplifyCFG] Use known bits to eliminate dead switch defaults · 05370139
      Philip Reames authored
      This is a follow up to http://reviews.llvm.org/D11995 implementing the suggestion by Hans.
      
      If we know some of the bits of the value being switched on, we know that the maximum number of unique cases covers the unknown bits. This allows to eliminate switch defaults for large integers (i32) when most bits in the value are known.
      
      Note that I had to make the transform contingent on not having any dead cases. This is conservatively correct with the old code, but required for the new code since we might have a dead case which varies one of the known bits. Counting that towards our number of covering cases would be bad.  If we do have dead cases, we'll eliminate them first, then revisit the possibly dead default.
      
      Differential Revision: http://reviews.llvm.org/D12497
      
      llvm-svn: 247309
      05370139
    • Sanjay Patel's avatar
      80-cols; NFC · 9361d355
      Sanjay Patel authored
      llvm-svn: 247295
      9361d355
    • Sanjay Patel's avatar
      use range-based for loop; NFCI · f4b34b76
      Sanjay Patel authored
      llvm-svn: 247294
      f4b34b76
    • Sanjay Patel's avatar
      use range-based for loop; NFCI · 5e7bd918
      Sanjay Patel authored
      llvm-svn: 247293
      5e7bd918
    • Sanjay Patel's avatar
      fix typo; NFC · 59661459
      Sanjay Patel authored
      llvm-svn: 247287
      59661459
  20. Sep 09, 2015
    • Chandler Carruth's avatar
      [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible · 7b560d40
      Chandler Carruth authored
      with the new pass manager, and no longer relying on analysis groups.
      
      This builds essentially a ground-up new AA infrastructure stack for
      LLVM. The core ideas are the same that are used throughout the new pass
      manager: type erased polymorphism and direct composition. The design is
      as follows:
      
      - FunctionAAResults is a type-erasing alias analysis results aggregation
        interface to walk a single query across a range of results from
        different alias analyses. Currently this is function-specific as we
        always assume that aliasing queries are *within* a function.
      
      - AAResultBase is a CRTP utility providing stub implementations of
        various parts of the alias analysis result concept, notably in several
        cases in terms of other more general parts of the interface. This can
        be used to implement only a narrow part of the interface rather than
        the entire interface. This isn't really ideal, this logic should be
        hoisted into FunctionAARe...
      7b560d40
  21. Sep 07, 2015
  22. Sep 05, 2015
  23. Sep 03, 2015
    • Joseph Tremoulet's avatar
      [WinEH] Add cleanupendpad instruction · 9ce71f76
      Joseph Tremoulet authored
      Summary:
      Add a `cleanupendpad` instruction, used to mark exceptional exits out of
      cleanups (for languages/targets that can abort a cleanup with another
      exception).  The `cleanupendpad` instruction is similar to the `catchendpad`
      instruction in that it is an EH pad which is the target of unwind edges in
      the handler and which itself has an unwind edge to the next EH action.
      The `cleanupendpad` instruction, similar to `cleanupret` has a `cleanuppad`
      argument indicating which cleanup it exits.  The unwind successors of a
      `cleanuppad`'s `cleanupendpad`s must agree with each other and with its
      `cleanupret`s.
      
      Update WinEHPrepare (and docs/tests) to accomodate `cleanupendpad`.
      
      Reviewers: rnk, andrew.w.kaylor, majnemer
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D12433
      
      llvm-svn: 246751
      9ce71f76
  24. Sep 02, 2015
    • Piotr Padlewski's avatar
      Constant propagation after hitting assume(cmp) bugfix · 28ffcbe1
      Piotr Padlewski authored
      Last time code run into assertion `BBE.isSingleEdge()` in
      lib/IR/Dominators.cpp:200.
      
      http://reviews.llvm.org/D12170
      
      llvm-svn: 246696
      28ffcbe1
    • Benjamin Kramer's avatar
      [RemoveDuplicatePHINodes] Start over after removing a PHI. · f175e044
      Benjamin Kramer authored
      This makes RemoveDuplicatePHINodes more effective and fixes an assertion
      failure. Triggering the assertions requires a DenseSet reallocation
      so this change only contains a constructive test.
      
      I'll explain the issue with a small example. In the following function
      there's a duplicate PHI, %4 and %5 are identical. When this is found
      the DenseSet in RemoveDuplicatePHINodes contains %2, %3 and %4.
      
      define void @F() {
        br label %1
      
      ; <label>:1                                       ; preds = %1, %0
        %2 = phi i32 [ 42, %0 ], [ %4, %1 ]
        %3 = phi i32 [ 42, %0 ], [ %5, %1 ]
        %4 = phi i32 [ 42, %0 ], [ 23, %1 ]
        %5 = phi i32 [ 42, %0 ], [ 23, %1 ]
        br label %1
      }
      
      after RemoveDuplicatePHINodes runs the function looks like this. %3 has
      changed and is now identical to %2, but RemoveDuplicatePHINodes never
      saw this.
      
      define void @F() {
        br label %1
      
      ; <label>:1                                       ; preds = %1, %0
        %2 = phi i32 [ 42, %0 ], [ %4, %1 ]
        %3 = phi i32 [ 42, %0 ], [ %4, %1 ]
        %4 = phi i32 [ 42, %0 ], [ 23, %1 ]
        br label %1
      }
      
      If the DenseSet does a reallocation now it will reinsert all
      keys and stumble over %3 now having a different hash value than it had
      when inserted into the map for the first time. This change clears the
      set whenever a PHI is deleted and starts the progress from the
      beginning, allowing %3 to be deleted and avoiding inconsistent DenseSet
      state. This potentially has a negative performance impact because
      it rescans all PHIs, but I don't think that this ever makes a difference
      in practice.
      
      llvm-svn: 246694
      f175e044
  25. Aug 28, 2015
Loading