1. Feb 28, 2020
    • Reid Kleckner's avatar
      Forward declare special case lists · 04da3dfe
      Reid Kleckner authored
      This avoids pulling in unordered_map from TrigramIndex.h:
      
      $ diff -u thedeps-before.txt thedeps-after.txt | \
              grep '^[-+] ' | sort | uniq -c | sort -nr
          976 -    ../llvm/include/llvm/Support/TrigramIndex.h
          976 -    ../llvm/include/llvm/Support/SpecialCaseList.h
          976 -    ../clang/include/clang/Basic/SanitizerSpecialCaseList.h
          502 -    ../../../PROGRA~2/MIB055~1/2019/PROFES~1/VC/Tools/MSVC/14.24.28314/include/unordered_map
          467 -    ../../../PROGRA~2/MIB055~1/2019/PROFES~1/VC/Tools/MSVC/14.24.28314/include/xhash
          467 -    ../../../PROGRA~2/MIB055~1/2019/PROFES~1/VC/Tools/MSVC/14.24.28314/include/xbit_ops.h
          212 -    ../llvm/include/llvm/ADT/StringSet.h
      04da3dfe
    • Sameer Sahasrabuddhe's avatar
      [AMDGPU] improve fragile test for divergent branches · 0c8a2187
      Sameer Sahasrabuddhe authored
      Summary:
      The affected LIT test intends to test the correct use of divergence
      analysis to detect a divergent branch with a uniform predicate. The
      passes involved are LLVM IR passes, but the test runs llc and tries to
      match against generated ISA, which makes it hard to demonstrate that
      the intended behavior was really tested. Replaced this with a test
      that invokes opt on the required passes and then checks for the
      appropriate changes in the LLVM IR.
      
      Reviewed By: arsenm
      
      Differential Revision: https://reviews.llvm.org/D75267
      0c8a2187
    • Nicolas Vasilache's avatar
    • Nikita Popov's avatar
      [InstCombine] DCE instructions earlier · 4ef272ec
      Nikita Popov authored
      When InstCombine initially populates the worklist, it already
      performs constant folding and DCE. However, as the instructions
      are initially visited in program order, this DCE can pick up only
      the last instruction of a dead chain, the rest would only get
      picked up in the main InstCombine run.
      
      To avoid this, we instead perform the DCE in separate pass over the
      collected instructions in reverse order, which will allow us to
      pick up full dead instruction chains. We already need to do this
      reverse iteration anyway to populate the worklist, so this
      shouldn't add extra cost.
      
      This by itself only fixes a small part of the problem though:
      The same basic issue also applies during the main InstCombine loop.
      We generally always want DCE to occur as early as possible,
      because it will allow one-use folds to happen. Address this by also
      performing DCE while adding deferred instructions to the main worklist.
      
      This drops the number of tests that perform more than 2 InstCombine
      iterations from ~80 to ~40. There's some spurious test changes due
      to operand order / icmp toggling.
      
      Differential Revision: https://reviews.llvm.org/D75008
      4ef272ec
    • John Brawn's avatar
      Add an attribute registry so plugins can add attributes · 75d4d4bd
      John Brawn authored
      When constructing a ParsedAttr the ParsedAttrInfo gets looked up in the
      AttrInfoMap, which is auto-generated using tablegen. If that lookup fails then
      we look through the ParsedAttrInfos that plugins have added to the registry and
      check if any has a spelling that matches.
      
      Differential Revision: https://reviews.llvm.org/D31338
      75d4d4bd
    • Simon Moll's avatar
      Remove BinaryOperator::CreateFNeg · ddd11273
      Simon Moll authored
      Use UnaryOperator::CreateFNeg instead.
      
      Summary:
      With the introduction of the native fneg instruction, the
      fsub -0.0, %x idiom is obsolete. This patch makes LLVM
      emit fneg instead of the idiom in all places.
      
      Reviewed By: cameron.mcinally
      
      Differential Revision: https://reviews.llvm.org/D75130
      ddd11273
  2. Feb 27, 2020
  3. Feb 28, 2020
  4. Feb 27, 2020