Skip to content
  1. Jun 21, 2018
    • Simon Atanasyan's avatar
      CODE_OWNERS: Take ownership of the MIPS backend · f38e6313
      Simon Atanasyan authored
      As agreed with Simon Dardis, I'm taking over as a code owner
      for the MIPS backend.
      
      llvm-svn: 335213
      f38e6313
    • David Green's avatar
      [DAGCombine] Fix alignment for offset loads/stores · a4651885
      David Green authored
      The alignment parameter to getExtLoad is treated as a base alignment,
      not the alignment of the load (base + offset). When we infer a better
      alignment for a Ptr we need to ensure that it applies to the base to
      prevent the alignment on the load from being wrong.
      
      This fixes a bug where the alignment could then be used to incorrectly
      prove noalias between a load and a store, leading to a miscompile.
      
      Differential Revision: https://reviews.llvm.org/D48029
      
      llvm-svn: 335210
      a4651885
    • Eric Christopher's avatar
      Remove FIXME comment about WIP. · 12e221d9
      Eric Christopher authored
      This is the only line other than the function signature remaining
      of the original patch.
      
      llvm-svn: 335208
      12e221d9
    • Eric Christopher's avatar
      Add some explanatory text to the associated symbol support. · 76cfef46
      Eric Christopher authored
      llvm-svn: 335207
      76cfef46
    • Florian Hahn's avatar
      Recommit r333268: [IPSCCP] Use PredicateInfo to propagate facts from cmp instructions. · d36aa1f7
      Florian Hahn authored
      r335150 should resolve the issues with the clang-with-thin-lto-ubuntu
      and clang-with-lto-ubuntu builders.
      
      Original message:
      This patch updates IPSCCP to use PredicateInfo to propagate
      facts to true branches predicated by EQ and to false branches
      predicated by NE.
      
      As a follow up, we should be able to extend it to also propagate additional
      facts about nonnull.
      
      Reviewers: davide, mssimpso, dberlin, efriedma
      
      Reviewed By: davide, dberlin
      
      llvm-svn: 335206
      d36aa1f7
    • Mikael Holmen's avatar
      [DebugInfo] Keep DBG_VALUE undef in LiveDebugVariables · 57b33f6a
      Mikael Holmen authored
      Summary:
      Fixes PR36579.
      
      For cases where we had e.g.
      
       DBG_VALUE 42
       [...]
       DBG_VALUE undef
      
      LiveDebugVariables would discard all undef DBG_VALUEs and then it would
      look like the variable had the value 42 throughout the rest of the
      function, which is incorrect.
      
      With this patch we don't remove all undef DBG_VALUEs in LiveDebugVariables
      so they will be kept after register allocation just like other DBG_VALUEs
      which will yield more correct debug information.
      
      Reviewers: aprantl
      
      Reviewed By: aprantl
      
      Subscribers: bjope, Ka-Ka, JDevlieghere, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D48277
      
      llvm-svn: 335205
      57b33f6a
    • Craig Topper's avatar
      [X86] Go through some tests that still reference old intrinsics that have been... · 76df3d61
      Craig Topper authored
      [X86] Go through some tests that still reference old intrinsics that have been autoupgraded and replace them with the upgraded IR.
      
      This is mostly the stack folding tests and is by no means a thorough audit of tests.
      
      llvm-svn: 335204
      76df3d61
    • Chandler Carruth's avatar
      [PM/LoopUnswitch] Add partial non-trivial unswitching for invariant · d1dab0c3
      Chandler Carruth authored
      conditions feeding a chain of `and`s or `or`s for a branch.
      
      Much like with full non-trivial unswitching, we rely on the pass manager
      to handle iterating until all of the profitable unswitches have been
      done. This is to allow other more profitable unswitches to fire on any
      of the cloned, simpler versions of the loop if viable.
      
      Threading the partial unswiching through the non-trivial unswitching
      logic motivated some minor refactorings. If those are too disruptive to
      make it reasonable to review this patch, I can separate them out, but
      it'll be somewhat timeconsuming so I wanted to send it for initial
      review as-is. Feel free to tell me whether it warrants pulling apart.
      
      I've tried to re-use (and factor out) logic form the partial trivial
      unswitching, but not as much could be shared as I had haped. Still, this
      wasn't as bad as I naively expected.
      
      Some basic testing is added, but I probably need more. Suggestions for
      things you'd like to see tested more than welcome. One thing I'd like to
      do is add some testing that when we schedule this with loop-instsimplify
      it effectively cleans up the cruft created.
      
      Last but not least, this uncovered a bug that has been in loop cloning
      the entire time for non-trivial unswitching. Specifically, we didn't
      correctly add the outer-most cloned loop to the list of cloned loops.
      This meant that LCSSA wouldn't be updated for it hypothetically, and
      more significantly that we would never visit it in the loop pass
      manager. I noticed this while checking loop-instsimplify by hand. I'll
      try to separate this bugfix out into its own patch with a more focused
      test. But it is just one line, so shouldn't significantly confuse the
      review here.
      
      After this patch, the only missing "feature" in this unswitch I'm aware
      of us non-trivial unswitching of switches. I'll try implementing *full*
      non-trivial unswitching of switches (which is at least a sound thing to
      implement), but *partial* non-trivial unswitching of switches is
      something I don't see any sound and principled way to implement. I also
      have no interesting test cases for the latter, so I'm not really
      worried. The rest of the things that need to be ported are bug-fixes and
      more narrow / targeted support for specific issues.
      
      Differential Revision: https://reviews.llvm.org/D47522
      
      llvm-svn: 335203
      d1dab0c3
    • Chandler Carruth's avatar
      [RISC-V] Fix a test case to not include label names as those aren't · e5f1b8e2
      Chandler Carruth authored
      stable in non-asserts builds. This fixes a test failure in release
      config.
      
      llvm-svn: 335202
      e5f1b8e2
    • Michael Zolotukhin's avatar
      ProvenanceAnalysis: Store WeakTrackingVH instead of Value* in UnderlyingValue Cache. · 336d75cc
      Michael Zolotukhin authored
      Summary:
      Since the value stored in the cache might be deleted or replaced with
      something else, we need to use tracking ValueHandlers instead of plain
      Value pointers. It was discovered in one of internal builds, and
      unfortunately there is no small reproducer for the issue.
      
      The cache was introduced in rL327328.
      
      Reviewers: ahatanak, pete
      
      Subscribers: hiraditya, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D48407
      
      llvm-svn: 335201
      336d75cc
    • Craig Topper's avatar
    • Tim Shen's avatar
      Revert "[SCEV] Improve zext(A /u B) and zext(A % B)" · 433b9761
      Tim Shen authored
      This reverts commit r335197, as some bots are not happy.
      
      llvm-svn: 335198
      433b9761
    • Tim Shen's avatar
      [SCEV] Improve zext(A /u B) and zext(A % B) · 5af61e0a
      Tim Shen authored
      Summary:
      Try to match udiv and urem patterns, and sink zext down to the leaves.
      
      I'm not entirely sure why some unrelated tests change, but the added <nsw>s seem right.
      
      Reviewers: sanjoy
      
      Subscribers: jlebar, hiraditya, bixia, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D48338
      
      llvm-svn: 335197
      5af61e0a
    • Wolfgang Pieb's avatar
      [DWARF] Improved error reporting for range lists. · 61d8c8d9
      Wolfgang Pieb authored
      Errors found processing the DW_AT_ranges attribute are propagated by lower level 
      routines and reported by their callers.
      
      Reviewer: JDevlieghere
      
      Differential Revision: https://reviews.llvm.org/D48344
      
      llvm-svn: 335188
      61d8c8d9
    • Simon Dardis's avatar
      [mips] Add microMIPS specific addressing patterns. · 0f111dd7
      Simon Dardis authored
      These are identical but use microMIPS instructions instead of MIPS instructions.
      
      Also, flatten the 'let AdditionalPredicates = [InMicroMips]' by using the
      ISA_MICROMIPS adjective. Add tests for constant materialization.
      
      Reviewers: atanasyan, abeserminji, smaksimovic
      
      Differential Revision: https://reviews.llvm.org/D48275
      
      llvm-svn: 335185
      0f111dd7
    • Alina Sbirlea's avatar
      Generalize MergeBlockIntoPredecessor. Replace uses of MergeBasicBlockIntoOnlyPred. · dfd14ade
      Alina Sbirlea authored
      Summary:
      Two utils methods have essentially the same functionality. This is an attempt to merge them into one.
      1. lib/Transforms/Utils/Local.cpp : MergeBasicBlockIntoOnlyPred
      2. lib/Transforms/Utils/BasicBlockUtils.cpp : MergeBlockIntoPredecessor
      
      Prior to the patch:
      1. MergeBasicBlockIntoOnlyPred
      Updates either DomTree or DeferredDominance
      Moves all instructions from Pred to BB, deletes Pred
      Asserts BB has single predecessor
      If address was taken, replace the block address with constant 1 (?)
      
      2. MergeBlockIntoPredecessor
      Updates DomTree, LoopInfo and MemoryDependenceResults
      Moves all instruction from BB to Pred, deletes BB
      Returns if doesn't have a single predecessor
      Returns if BB's address was taken
      
      After the patch:
      Method 2. MergeBlockIntoPredecessor is attempting to become the new default:
      Updates DomTree or DeferredDominance, and LoopInfo and MemoryDependenceResults
      Moves all instruction from BB to Pred, deletes BB
      Returns if doesn't have a single predecessor
      Returns if BB's address was taken
      
      Uses of MergeBasicBlockIntoOnlyPred that need to be replaced:
      
      1. lib/Transforms/Scalar/LoopSimplifyCFG.cpp
      Updated in this patch. No challenges.
      
      2. lib/CodeGen/CodeGenPrepare.cpp
      Updated in this patch.
        i. eliminateFallThrough is straightforward, but I added using a temporary array to avoid the iterator invalidation.
        ii. eliminateMostlyEmptyBlock(s) methods also now use a temporary array for blocks
      Some interesting aspects:
        - Since Pred is not deleted (BB is), the entry block does not need updating.
        - The entry block was being updated with the deleted block in eliminateMostlyEmptyBlock. Added assert to make obvious that BB=SinglePred.
        - isMergingEmptyBlockProfitable assumes BB is the one to be deleted.
        - eliminateMostlyEmptyBlock(BB) does not delete BB on one path, it deletes its unique predecessor instead.
        - adding some test owner as subscribers for the interesting tests modified:
          test/CodeGen/X86/avx-cmp.ll
          test/CodeGen/AMDGPU/nested-loop-conditions.ll
          test/CodeGen/AMDGPU/si-annotate-cf.ll
          test/CodeGen/X86/hoist-spill.ll
          test/CodeGen/X86/2006-11-17-IllegalMove.ll
      
      3. lib/Transforms/Scalar/JumpThreading.cpp
      Not covered in this patch. It is the only use case using the DeferredDominance.
      I would defer to Brian Rzycki to make this replacement.
      
      Reviewers: chandlerc, spatel, davide, brzycki, bkramer, javed.absar
      
      Subscribers: qcolombet, sanjoy, nemanjai, nhaehnle, jlebar, tpr, kbarton, RKSimon, wmi, arsenm, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D48202
      
      llvm-svn: 335183
      dfd14ade
  2. Jun 20, 2018
Loading