1. Jun 25, 2015
  2. Jun 24, 2015
    • Ed Maste's avatar
      Remove unused variable · ff666dcb
      Ed Maste authored
      llvm-svn: 240547
      ff666dcb
    • Ewan Crawford's avatar
      Proper handling of QNonStop packet response. · aa7eda7a
      Ewan Crawford authored
      Turn non-stop mode off if reply to QNonStop packet isn't an OK.
      
      llvm-svn: 240546
      aa7eda7a
    • Douglas Katzman's avatar
      Express Driver::GetFilePath more concisely. · 26eabf6d
      Douglas Katzman authored
      llvm-svn: 240545
      26eabf6d
    • Rafael Espindola's avatar
      Don't get confused with sections whose section number is reserved. · d68fb74c
      Rafael Espindola authored
      It is perfectly possible for SHNDX to contain indexes that have the same value
      as reserved st_shndx values.
      
      llvm-svn: 240544
      d68fb74c
    • Pavel Labath's avatar
      Remove old local-only linux debugging code · b36f9178
      Pavel Labath authored
      Summary:
      Currently, the local-only path fails about 50% of the tests, which means that: a) nobody is using
      it; and b) the remote debugging path is much more stable. This commit removes the local-only
      linux debugging code (ProcessLinux) and makes remote-loopback the only way to debug local
      applications (the same architecture as OSX). The ProcessPOSIX code is moved to the FreeBSD
      directory, which is now the only user of this class. Hopefully, FreeBSD will soon move to the new
      architecture as well and then this code can be removed completely.
      
      Test Plan: Test suite passes via remote stub.
      
      Reviewers: emaste, vharron, ovyalov, clayborg
      
      Subscribers: tberghammer, emaste, lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D10661
      
      llvm-svn: 240543
      b36f9178
    • Simon Pilgrim's avatar
      [X86][AVX] Added full set of 256-bit vector shift tests. · 51aa1f86
      Simon Pilgrim authored
      llvm-svn: 240542
      51aa1f86
    • Dmitry Vyukov's avatar
      asan: fix 32-bit build · b086a702
      Dmitry Vyukov authored
      llvm-svn: 240541
      b086a702
    • Daniel Sanders's avatar
      Eliminate additional redundant copies of Triple objects. NFC. · 110bf6da
      Daniel Sanders authored
      Subscribers: rafael, llvm-commits, rengolin
      
      Differential Revision: http://reviews.llvm.org/D10654
      
      llvm-svn: 240540
      110bf6da
    • Dmitry Vyukov's avatar
      tsan: don't print external PCs in reports · c871c035
      Dmitry Vyukov authored
      They are meaningless.
      
      llvm-svn: 240539
      c871c035
    • Pawel Bylica's avatar
      Fix instruction scheduling live register tracking · cc358128
      Pawel Bylica authored
      Summary:
      This patch fixes PR23405 (https://llvm.org/bugs/show_bug.cgi?id=23405).
      
      During a node unscheduling an entry in LiveRegGens can be replaced with a new value. That corrupts the live reg tracking and LiveReg* structure is not cleared as should be during unscheduling. Problematic condition that enforces Gen replacement is `I->getSUnit()->getHeight() < LiveRegGens[I->getReg()]->getHeight()`. This condition should be checked only if LiveRegGen was set in current node unscheduling.
      
      Test Plan: Regression test included.
      
      Reviewers: hfinkel, atrick
      
      Reviewed By: atrick
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D9993
      
      llvm-svn: 240538
      cc358128
    • Tamas Berghammer's avatar
      Fix location of symbol size calculation in ObjectFileELF · 2480fe06
      Tamas Berghammer authored
      Bug introduced by r240533
      
      llvm-svn: 240537
      2480fe06
    • Aaron Ballman's avatar
      d95d0dab
    • Dmitry Vyukov's avatar
      tsan: fix unbounded memory consumption for large mallocs · 89e0d571
      Dmitry Vyukov authored
      This happens only in corner cases, but we observed this on a real app.
      See the test for description of the exact scenario that lead to unbounded memory consumption.
      
      llvm-svn: 240535
      89e0d571
    • Pawel Bylica's avatar
      [llvm-stress] Simple refactoring and better style. NFC. · 23663472
      Pawel Bylica authored
      llvm-svn: 240534
      23663472
    • Tamas Berghammer's avatar
      Improve instruction emulation based stack unwinding on ARM · 44ff9cce
      Tamas Berghammer authored
      * Add and fix the emulation of several instruction.
      * Disable frame pointer usage on Android.
      * Specify return address register for the unwind plan instead of explict
        tracking the value of RA.
      * Replace prologue detection heuristics (unreliable in several cases)
        with a logic to follow the branch instructions and restore the CFI
        value based on them. The target address for a branch should have the
        same CFI as the source address (if they are in the same function).
      * Handle symbols in ELF files where the symbol size is not specified
        with calcualting their size based on the next symbol (already done
        in MachO files).
      * Fix architecture in FuncUnwinders with filling up the inforamtion
        missing from the object file with the architecture of the target.
      * Add code to read register wehn the value is set to "IsSame" as it
        meanse the value of a register in the parent frame is the same as the
        value in the current frame.
      
      Differential revision: http://reviews.llvm.org/D10447
      
      llvm-svn: 240533
      44ff9cce
    • Alexey Bataev's avatar
      [OPENMP] Codegen for 'depend' clause (OpenMP 4.0). · 1d2353d4
      Alexey Bataev authored
      If task directive has associated 'depend' clause then function kmp_int32 __kmpc_omp_task_with_deps ( ident_t *loc_ref, kmp_int32 gtid, kmp_task_t * new_task, kmp_int32 ndeps, kmp_depend_info_t *dep_list,kmp_int32 ndeps_noalias, kmp_depend_info_t *noalias_dep_list) must be called instead of __kmpc_omp_task().
      If this directive has associated 'if' clause then also before a call of kmpc_omp_task_begin_if0() a function void __kmpc_omp_wait_deps ( ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps, kmp_depend_info_t *dep_list, kmp_int32 ndeps_noalias, kmp_depend_info_t *noalias_dep_list) must be called.
      Array sections are not supported yet.
      
      llvm-svn: 240532
      1d2353d4
    • Zoran Jovanovic's avatar
    • Chandler Carruth's avatar
      Remove a limited and somewhat questionable DenseMapInfo specialization · c026e394
      Chandler Carruth authored
      for StringRef now that the core DenseMap library provides this facility.
      
      llvm-svn: 240530
      c026e394
    • Rafael Espindola's avatar
      Change how symbol sizes are handled in lib/Object. · d7a32ea4
      Rafael Espindola authored
      COFF and MachO only define symbol sizes for common symbols. Reflect that
      in the class hierarchy by having a method for common symbols only in the base
      and a general one in ELF.
      
      This avoids the need of using a magic value for the size, which had a few
      problems
      * Most callers didn't check for it.
      * The ones that did could not tell the magic value from a file actually having
        that value.
      
      llvm-svn: 240529
      d7a32ea4
    • Chandler Carruth's avatar
      [ADT] Teach DenseMap to support StringRef keys. · 59534822
      Chandler Carruth authored
      While often you want to use something specialized like StringMap, when
      the strings already have persistent storage a normal densemap over them
      can be more efficient.
      
      This can't go into StringRef.h because of really obnoxious header chains
      from the hashing code to the endian detection code to CPU feature
      detection code to StringMap.
      
      llvm-svn: 240528
      59534822
    • Ed Schouten's avatar
      Make support for thread-unsafe C functions optional. · e0cf3b9a
      Ed Schouten authored
      One of the aspects of CloudABI is that it aims to help you write code
      that is thread-safe out of the box. This is very important if you want
      to write libraries that are easy to reuse. For CloudABI we decided to
      not provide the thread-unsafe functions. So far this is working out
      pretty well, as thread-unsafety issues are detected really early on.
      
      The following patch adds a knob to libc++,
      _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS, that can be set to disable
      thread-unsafe functions that can easily be avoided in practice. The
      following functions are not thread-safe:
      
      - <clocale>: locale handles should be preferred over setlocale().
      - <cstdlib>: mbrlen(), mbrtowc() and wcrtomb() should be preferred over
        their non-restartable counterparts.
      - <ctime>: asctime(), ctime(), gmtime() and localtime() are not
        thread-safe. The first two are also deprecated by POSIX.
      
      Differential Revision:	http://reviews.llvm.org/D8703
      Reviewed by:	marshall
      
      llvm-svn: 240527
      e0cf3b9a
    • Justin Bogner's avatar
      Hexagon: Paper over the undefined behaviour introduced by r238692 · aa315fbb
      Justin Bogner authored
      This stops shifting a 32-bit value by such absurd amounts as 96 and
      120. We do this by dropping a call to the function that was doing this
      entirely, which rather surprisingly doesn't break *any* tests.
      
      I've also added an assert in the misbehaving function to prove that
      it's no longer being called with completely invalid arguments.
      
      This change looks pretty bogus and we should probably be reverting
      r238692 instead, but this is hard to do with the number of follow ups
      that have happened since. It can't be any worse than the undefined
      behaviour that was happening before though.
      
      llvm-svn: 240526
      aa315fbb
    • NAKAMURA Takumi's avatar
      MILexer.cpp: Try to fix a warning. [-Wsign-compare] · c267b5f5
      NAKAMURA Takumi authored
      llvm-svn: 240525
      c267b5f5
    • Craig Topper's avatar
      [TableGen] Restore the use of the TheInit field in Record to cache the... · a60ee86f
      Craig Topper authored
      [TableGen] Restore the use of the TheInit field in Record to cache the Record's DefInit. I broke this when I fixed memory leaks recently. Remove the DenseMap that mapped Record's to DefInit.
      
      llvm-svn: 240524
      a60ee86f
    • Bob Wilson's avatar
      Do not treat ARM _MoveToCoprocessor* intrinsics as MSBuiltins. · 8d6b6f23
      Bob Wilson authored
      Those builtins are now handled via ad-hoc code in clang with r240522 to
      deal with reordering the arguments to fix PR22560.
      
      llvm-svn: 240523
      8d6b6f23
    • Bob Wilson's avatar
      Move the special-case check from r240462 into ARM-specific code. · 63c93144
      Bob Wilson authored
      This fixes a serious bug in r240462: checking the BuiltinID for
      ARM::BI_MoveToCoprocessor* in EmitBuiltinExpr() ignores the fact that
      each target has an overlapping range of the BuiltinID values. That check
      can trigger for builtins from other targets, leading to very bad
      behavior.
      
      Part of the reason I did not implement r240462 this way to begin with is
      the special handling of the last argument for Neon builtins. In this
      change, I have factored out the check to see which builtins have that
      extra argument into a new HasExtraNeonArgument() function. There is still
      some awkwardness in having to check for those builtins in two separate
      places, i.e., once to see if the extra argument is present and once to
      generate the appropriate IR, but this seems much cleaner than my previous
      patch.
      
      llvm-svn: 240522
      63c93144
    • Justin Bogner's avatar
      Hexagon: Avoid left shifting negative values (it's UB) · ee1247be
      Justin Bogner authored
      Found by ubsan.
      
      llvm-svn: 240521
      ee1247be
    • Justin Bogner's avatar
      SystemZ: Rephrase this allOnes calculation to avoid UB · c97c48aa
      Justin Bogner authored
      This allOnes function hits undefined behaviour if Count is greater
      than 64, but we can avoid that and simplify the calculation by just
      saturating if such a value is passed in.
      
      This comes up under ubsan becauseRxSBGOperands is sometimes created
      with values that are 128 bits wide. Somebody more familiar with this
      code should probably look into whether that's expected, as a 64 bit
      mask may or may not be appropriate for such types.
      
      llvm-svn: 240520
      c97c48aa
    • Rui Ueyama's avatar
      COFF: Initial implementation of Identical COMDAT Folding. · ddf71fc3
      Rui Ueyama authored
      Identical COMDAT Folding (ICF) is an optimization to reduce binary
      size by merging COMDAT sections that contain the same metadata,
      actual data and relocations. MSVC link.exe and many other linkers
      have this feature. LLD achieves on per with MSVC in terms produced
      binary size with this patch.
      
      This technique is pretty effective. For example, LLD's size is
      reduced from 64MB to 54MB by enaling this optimization.
      
      The algorithm implemented in this patch is extremely inefficient.
      It puts all COMDAT sections into a set to identify duplicates.
      Time to self-link with/without ICF are 3.3 and 320 seconds,
      respectively. So this option roughly makes LLD 100x slower.
      But it's okay as I wanted to achieve correctness first.
      LLD is still able to link itself with this optimization.
      I'm going to make it more efficient in followup patches.
      
      Note that this optimization is *not* entirely safe. C/C++ require
      different functions have different addresses. If your program
      relies on that property, your program wouldn't work with ICF.
      However, it's not going to be an issue on Windows because MSVC
      link.exe turns ICF on by default. As long as your program works
      with default settings (or not passing /opt:noicf), your program
      would work with LLD too.
      
      llvm-svn: 240519
      ddf71fc3
    • Tobias Grosser's avatar
      Add support for srem instruction · 50165ffd
      Tobias Grosser authored
      Remainder operations with constant divisor can be modeled as quasi-affine
      expression. This patch adds support for detecting and modeling them. We also
      add a test that ensures they are correctly code generated.
      
      This patch was extracted from a larger patch contributed by Johannes Doerfert
      in http://reviews.llvm.org/D5293
      
      llvm-svn: 240518
      50165ffd
    • Alexey Bataev's avatar
      Proper changing/restoring for CapturedStmtInfo, NFC. · d157d470
      Alexey Bataev authored
      Added special RAII class for proper values changing/restoring in CodeGenFunction::CapturedStmtInfo.
      
      llvm-svn: 240517
      d157d470
    • Rafael Espindola's avatar
      Don't repeat name in comments. · 02b54b47
      Rafael Espindola authored
      llvm-svn: 240516
      02b54b47
    • Peter Collingbourne's avatar
      COFF: Remove unused field SectionChunk::SectionIndex. · bd3a29d0
      Peter Collingbourne authored
      llvm-svn: 240512
      bd3a29d0
    • Peter Collingbourne's avatar
      2ed4c8f5
    • Ahmed Bougacha's avatar
      [X86] Don't generate vbroadcasti128 for v4i64 splats from memory. · dd5da3e7
      Ahmed Bougacha authored
      We used to erroneously match:
          (v4i64 shuffle (v2i64 load), <0,0,0,0>)
      
      Whereas vbroadcasti128 is more like:
          (v4i64 shuffle (v2i64 load), <0,1,0,1>)
      
      This problem doesn't exist for vbroadcastf128, which kept matching
      the intrinsic after r231182.  We should perhaps re-introduce the
      intrinsic here as well, but that's a separate issue still being
      discussed.
      
      While there, add some proper vbroadcastf128 tests.  We don't currently
      match those, like for loading vbroadcastsd/ss on AVX (the reg-reg
      broadcasts where added in AVX2).
      
      Fixes PR23886.
      
      llvm-svn: 240488
      dd5da3e7
    • Peter Collingbourne's avatar
      COFF: Ignore debug symbols. · c7b685d9
      Peter Collingbourne authored
      Differential Revision: http://reviews.llvm.org/D10675
      
      llvm-svn: 240487
      c7b685d9