Skip to content
  1. Apr 30, 2018
    • Nico Weber's avatar
      IWYU for llvm-config.h in llvm, additions. · 432a3883
      Nico Weber authored
      See r331124 for how I made a list of files missing the include.
      I then ran this Python script:
      
          for f in open('filelist.txt'):
              f = f.strip()
              fl = open(f).readlines()
      
              found = False
              for i in xrange(len(fl)):
                  p = '#include "llvm/'
                  if not fl[i].startswith(p):
                      continue
                  if fl[i][len(p):] > 'Config':
                      fl.insert(i, '#include "llvm/Config/llvm-config.h"\n')
                      found = True
                      break
              if not found:
                  print 'not found', f
              else:
                  open(f, 'w').write(''.join(fl))
      
      and then looked through everything with `svn diff | diffstat -l | xargs -n 1000 gvim -p`
      and tried to fix include ordering and whatnot.
      
      No intended behavior change.
      
      llvm-svn: 331184
      432a3883
    • Bjorn Pettersson's avatar
      [BranchFolding] Salvage DBG_VALUE instructions from empty blocks · 9a8483a4
      Bjorn Pettersson authored
      Summary:
      This patch will introduce copying of DBG_VALUE instructions
      from an otherwise empty basic block to predecessor/successor
      blocks in case the empty block is eliminated/bypassed. It
      is currently only done in one identified situation in the
      BranchFolding pass, before optimizing on empty block.
      It can be seen as a light variant of the propagation done
      by the LiveDebugValues pass, which unfortunately is executed
      after the BranchFolding pass.
      
      We only propagate (copy) DBG_VALUE instructions in a limited
      number of situations:
       a) If the empty BB is the only predecessor of a successor
          we can copy the DBG_VALUE instruction to the beginning of
          the successor (because the DBG_VALUE instruction is always
          part of the flow between the blocks).
       b) If the empty BB is the only successor of a predecessor
          we can copy the DBG_VALUE instruction to the end of the
          predecessor (because the DBG_VALUE instruction is always
          part of the flow between the blocks). In this case we add
          the DBG_VALUE just before the first terminator (assuming
          that the terminators do not impact the DBG_VALUE).
      
      A future solution, to handle more situations, could perhaps
      be to run the LiveDebugValues pass before branch folding?
      
      This fix is related to PR37234. It is expected to resolve
      the problem seen, when applied together with the fix in
      SelectionDAG from here: https://reviews.llvm.org/D46129
      
      Reviewers: #debug-info, aprantl, rnk
      
      Reviewed By: #debug-info, aprantl
      
      Subscribers: ormris, gbedwell, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46184
      
      llvm-svn: 331183
      9a8483a4
    • Bjorn Pettersson's avatar
      [SelectionDAG] Improve selection of DBG_VALUE using a PHI node result · abafca61
      Bjorn Pettersson authored
      Summary:
      When building the selection DAG at ISel all PHI nodes are
      selected and lowered to Machine Instruction PHI nodes before
      we start to create any SDNodes. So there are no SDNodes for
      values produced by the PHI nodes.
      
      In the past when selecting a dbg.value intrinsic that uses
      the value produced by a PHI node we have been handling such
      dbg.value intrinsics as "dangling debug info". I.e. we have
      not created a SDDbgValue node directly, because there is
      no existing SDNode for the PHI result, instead we deferred
      the creationg of a SDDbgValue until we found the first use
      of the PHI result.
      
      The old solution had a couple of flaws. The position of the
      selected DBG_VALUE instruction would end up quite late in a
      basic block, and for example not directly after the PHI node
      as in the LLVM IR input. And in case there were no use at all
      in the basic block the dbg.value could be dropped completely.
      
      This patch introduces a new VREG kind of SDDbgValue nodes.
      It is similar to a SDNODE kind of node, but it refers directly
      to a virtual register and not a SDNode. When we do selection
      for a dbg.value that is using the result of a PHI node we
      can do a lookup of the virtual register directly (as it already
      is determined for the PHI node) and create a SDDbgValue node
      immediately instead of delaying the selection until we find a
      use.
      
      This should fix a problem with losing debug info at ISel
      as seen in PR37234 (https://bugs.llvm.org/show_bug.cgi?id=37234).
      It does not resolve PR37234 completely, because the debug info
      is dropped later on in the BranchFolder (see D46184).
      
      Reviewers: #debug-info, aprantl
      
      Reviewed By: #debug-info, aprantl
      
      Subscribers: rnk, gbedwell, aprantl, JDevlieghere, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D46129
      
      llvm-svn: 331182
      abafca61
    • Zaara Syeda's avatar
      Fix warning: result of 32-bit shift implicitly converted to 64 bits - NFC · 116c0424
      Zaara Syeda authored
      Fix warning caused by rL331046.
      
      Differential Revision: https://reviews.llvm.org/D45729
      
      llvm-svn: 331181
      116c0424
    • Pavel Labath's avatar
      llgs tests: Use noack-mode for communication to avoid pr37294 · d2f36c86
      Pavel Labath authored
      llvm-svn: 331180
      d2f36c86
    • Gabor Buella's avatar
      NFC, Avoid a warning on pointer casting in PassPlugin.cpp · ad9a0429
      Gabor Buella authored
      llvm-svn: 331179
      ad9a0429
    • Simon Dardis's avatar
      Revert "[mips] Fix the predicates of jump and branch and link instructions" · 5a512d63
      Simon Dardis authored
      That commit broke one of the LLD builders, reverting while I investigate.
      
      This patch reverts r331175.
      
      llvm-svn: 331178
      5a512d63
    • Nico Weber's avatar
      IWYU for llvm-config.h in clang. See r331124 for details. · d637c059
      Nico Weber authored
      llvm-svn: 331177
      d637c059
    • Nico Weber's avatar
      Remove unnecessary indirection. No behavior change. · cf512ab5
      Nico Weber authored
      llvm-svn: 331176
      cf512ab5
    • Simon Dardis's avatar
      [mips] Fix the predicates of jump and branch and link instructions · cc95a9c5
      Simon Dardis authored
      Reviewers: smaksimovic, atanasyan, abeserminji
      
      Differential Revision: https://reviews.llvm.org/D46114
      
      llvm-svn: 331175
      cc95a9c5
    • Florian Hahn's avatar
      [LV] Use BB::instructionsWithoutDebug to skip DbgInfo (NFC). · deb01ea1
      Florian Hahn authored
      This patch updates some code responsible the skip debug info to use
      BasicBlock::instructionsWithoutDebug. I think this makes things
      slightly simpler and more direct.
      
      Reviewers: mkuper, rengolin, dcaballe, aprantl, vsk
      
      Reviewed By: rengolin
      
      Differential Revision: https://reviews.llvm.org/D46254
      
      llvm-svn: 331174
      deb01ea1
    • Pavel Labath's avatar
      ObjectFileELF: Add support for arbitrarily named code sections · edb01276
      Pavel Labath authored
      ObjectFileELF assumes that code section has ".text" name. There is an
      exception for kalimba toolchain that can use arbitrary names, but other
      toolchains also could use arbitrary names for code sections. For
      example, corert uses separate section for compiled managed code. As lldb
      doesn't recognize such section it leads to problem with breakpoints on
      arm, because debugger cannot determine instruction set (arm/thumb) and
      uses incorrect breakpoint opcode that breaks program execution.
      
      This change allows debugger to correctly handle such code sections. We
      assume that section is a code section if it has SHF_EXECINSTR flag set
      and has SHT_PROGBITS type.
      
      Patch by Konstantin Baladurin <k.baladurin@partner.samsung.com>.
      Differential Revision: https://reviews.llvm.org/D44998
      
      llvm-svn: 331173
      edb01276
    • Pavel Labath's avatar
      Fixup r331049 (FileSpec auto-normalization) · 410c5acf
      Pavel Labath authored
      A typo in the patch (using syntax instead of m_syntax) resulted in the
      normalization not working properly for windows filespecs when the syntax
      was passed as host-native. This did not affect the unit tests, as all of
      those pass an explicity syntax, but failed gloriously when running the
      full test suite.
      
      I also fix an expectation in an lldb-mi test, which was now failing
      because it was expecting a path to be echoed verbatim, but we were now
      normalizing it.
      
      As a drive-by, this also fixes the default-in-fully-covered-switch
      warning and removes an unused argument from the NeedsNormalization
      function.
      
      llvm-svn: 331172
      410c5acf
    • Benjamin Kramer's avatar
      [bindings] Fix dibuilder go bindings after r331114. · 4aace8a3
      Benjamin Kramer authored
      llvm-svn: 331171
      4aace8a3
    • Andrea Di Biagio's avatar
      [llvm-mca] Regenerate test Atom/resources-sse3.s. NFC · 77bd1c74
      Andrea Di Biagio authored
      Before this change, it wrongly specified -mcpu=slm instead of -mcpu=atom.
      
      llvm-svn: 331170
      77bd1c74
    • Andrea Di Biagio's avatar
      [llvm-mca] Support for in-order CPU for -instruction-tables testing. · e9384eb1
      Andrea Di Biagio authored
      Added Intel Atom tests to verify that the tool correctly generates instruction
      tables even if the CPU is in-order.
      
      Fixes PR37282.
      
      llvm-svn: 331169
      e9384eb1
    • Haojian Wu's avatar
      [clangd] Also use UTF-16 in index position. · c5340015
      Haojian Wu authored
      Reviewers: sammccall
      
      Subscribers: klimek, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D46258
      
      llvm-svn: 331168
      c5340015
    • Simon Pilgrim's avatar
      [X86] Fix typo in skylake-avx512 model for PMAXSD/PMINSD instructions · 318f816f
      Simon Pilgrim authored
      The PMAXSD/PMINSD instregexs had been written as PMAX(C?)SD - looks like this was a search+replace error when matching float MAXSD/MINSD commutative instructions.
      
      llvm-svn: 331167
      318f816f
    • Gabor Buella's avatar
      NFC - Typo fixes lib/VMCore -> lib/IR · 61ff2864
      Gabor Buella authored
      llvm-svn: 331166
      61ff2864
    • Simon Dardis's avatar
      [mips] Fix microMIPS loads and stores. · 57c2095d
      Simon Dardis authored
      Previously these instructions were unselectable and instead were generated
      through the instruction mapping tables.
      
      Reviewers: atanasyan, smaksimovic, abeserminji
      
      Differential Revision: https://reviews.llvm.org/D46055
      
      llvm-svn: 331165
      57c2095d
    • Mikhail Maltsev's avatar
      [Targets] Implement getConstraintRegister for ARM and AArch64 · 89f7b46b
      Mikhail Maltsev authored
      Summary:
      The getConstraintRegister method is used by semantic checking of
      inline assembly statements in order to diagnose conflicts between
      clobber list and input/output lists. Currently ARM and AArch64 don't
      override getConstraintRegister, so conflicts between registers
      assigned to variables in asm labels and clobber lists are not
      diagnosed. Such conflicts can cause assertion failures in the back end
      and even miscompilations.
      
      This patch implements getConstraintRegister for ARM and AArch64
      targets. Since these targets don't have single-register constraints,
      the implementation is trivial and just returns the register specified
      in an asm label (if any).
      
      Reviewers: eli.friedman, javed.absar, thopre
      
      Reviewed By: thopre
      
      Subscribers: rengolin, eraman, rogfer01, myatsina, kristof.beyls, cfe-commits, chrib
      
      Differential Revision: https://reviews.llvm.org/D45965
      
      llvm-svn: 331164
      89f7b46b
    • Dmitry Vyukov's avatar
      tsan: disable trace switching after multithreaded fork · 6c33998c
      Dmitry Vyukov authored
      The problem is reported in:
      https://github.com/google/sanitizers/issues/945
      
      We already disable as much as possible after multithreaded fork,
      trace switching is last place that can hang due to basic
      operations (memory accesses, function calls).
      Disable it too.
      
      llvm-svn: 331163
      6c33998c
    • Sander de Smalen's avatar
      [AArch64][SVE] Asm: Improve diagnostics for gather loads. · 5861c263
      Sander de Smalen authored
      This patch extends the 'isSVEVectorRegWithShiftExtend' function to 
      improve diagnostics for SVE's gather load (scalar + vector) addressing 
      modes. Instead of always suggesting the 'unscaled' addressing mode, 
      the use of DiagnosticPredicate enables a more specific error message
      in the context where the scaling is incorrect. For example:
      
        ld1h z0.d, p0/z, [x0, z0.d, lsl #2]
                                         ^ 
                 shift amount should be '1'
      
      Instead of suggesting the packed, unscaled addressing mode:
        expected 'z[0..31].d, (uxtw|sxtw)'
      
      the assembler now suggests using the proper scaling:
        expected 'z[0..31].d, (lsl|uxtw|sxtw) #1'
      
      Reviewers: fhahn, rengolin, samparker, SjoerdMeijer, javed.absar
      
      Reviewed By: fhahn
      
      Differential Revision: https://reviews.llvm.org/D46124
      
      llvm-svn: 331162
      5861c263
    • Craig Topper's avatar
      [X86] Add a Requires<[In64BitMode]> to FARJMP64 · 5a4c8800
      Craig Topper authored
      Otherwise we can try to assemble it in 32-bit mode and throw an assert in the encoder.
      
      llvm-svn: 331161
      5a4c8800
    • Craig Topper's avatar
    • Craig Topper's avatar
    • Craig Topper's avatar
      [X86] Remove some instructions from the Intel assembly matcher table as there... · 429ae3d7
      Craig Topper authored
      [X86] Remove some instructions from the Intel assembly matcher table as there are equivalent mode aware InstAliases that conflict.
      
      The instructions have predicates of Not64BitMode, but there are identical strings in InstAliases that have Mode32Bit and Mode16Bit. But the ordering is uncontrolled and the less specific Not64BitMode was ordered first.
      
      This patch hides the Not64BitMode from the table so there is no conflict anymore.
      
      llvm-svn: 331158
      429ae3d7
    • Craig Topper's avatar
      [X86] Use a MnemonicAlias instead of an InstAlias. · ebc7de07
      Craig Topper authored
      llvm-svn: 331157
      ebc7de07
    • Richard Smith's avatar
      Fix up after clang r331155. · 4bb15ab8
      Richard Smith authored
      llvm-svn: 331156
      4bb15ab8
    • Richard Smith's avatar
      PR37189 Fix incorrect end source location and spelling for a split '>>' token. · b5f8171a
      Richard Smith authored
      When a '>>' token is split into two '>' tokens (in C++11 onwards), or (as an
      extension) when we do the same for other tokens starting with a '>', we can't
      just use a location pointing to the first '>' as the location of the split
      token, because that would result in our miscomputing the length and spelling
      for the token. As a consequence, for example, a refactoring replacing 'A<X>'
      with something else would sometimes replace one character too many, and
      similarly diagnostics highlighting a template-id source range would highlight
      one character too many.
      
      Fix this by creating an expansion range covering the first character of the
      '>>' token, whose spelling is '>'. For this to work, we generalize the
      expansion range of a macro FileID to be either a token range (the common case)
      or a character range (used in this new case).
      
      llvm-svn: 331155
      b5f8171a
    • Craig Topper's avatar
      [X86] Remove support for accepting 'fnstsw %eax' and 'fnstsw %al'. · 64e7a16f
      Craig Topper authored
      I assume this was done because gas accepted it at one point, but current versions of gas don't.
      
      llvm-svn: 331154
      64e7a16f
    • Craig Topper's avatar
      [X86] Mark some more InstAliases as 'att' syntax only. · b2bf3da1
      Craig Topper authored
      These aliases are used to default the memory forms of call and jmp to the size of the operating mode. This doesn't work for Intel syntax. We have a different hack in the AsmParser code itself to force a size on unsized memory operands.
      
      llvm-svn: 331153
      b2bf3da1
    • Fangrui Song's avatar
      Rename DiagnosticClient to DiagnosticConsumer as per issue 5397. · 0f587e53
      Fangrui Song authored
      llvm-svn: 331152
      0f587e53
    • Nico Weber's avatar
      Remove a dead #ifdef. · e7c4af32
      Nico Weber authored
      Unix/Threading.inc should never be included on _WIN32. See also
      https://reviews.llvm.org/D30526#1082292
      
      llvm-svn: 331151
      e7c4af32
    • Nico Weber's avatar
      Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system · 297ec32b
      Nico Weber authored
      _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS is currently used to
      bring back std::unexpected, which is removed in C++17, but still needed
      for libc++abi for backward compatibility.
      
      This macro used to define in cxa_exception.cpp only, but actually
      needed for all sources that touches exceptions.
      So, a build-system-level macro is better fit to define this macro.
      
      https://reviews.llvm.org/D46056
      Patch from Taiju Tsuiku <tzik@chromium.org>!
      
      llvm-svn: 331150
      297ec32b
    • Craig Topper's avatar
      [X86] Make 64-bit sysret/sysexit not ambiguous in Intel assembly syntax. · 57315589
      Craig Topper authored
      This also makes it default to the 32-bit non REX.W version in 64-bit mode. This seems to be more consistent with gas.
      
      llvm-svn: 331149
      57315589
  2. Apr 29, 2018
Loading