1. Oct 19, 2016
    • Benjamin Kramer's avatar
      Remove unused diagnostics. NFC. · f1fce6e9
      Benjamin Kramer authored
      llvm-svn: 284595
      f1fce6e9
    • Rafael Espindola's avatar
      Add a faster binary search. · 88eb6482
      Rafael Espindola authored
      Even with the hash table cache, binary search was still pretty
      hot. This can be made even faster with prefetching.
      
      Idea from http://cglab.ca/~morin/misc/arraylayout-v2/
      
      I will suggest moving this to llvm.
      
      llvm-svn: 284594
      88eb6482
    • Dimitar Vlahovski's avatar
      Minidump plugin: functions parsing memory structures and filtering module list · b52206de
      Dimitar Vlahovski authored
      Summary:
      Now the Minidump parser can parse the:
      1) MemoryInfoList - containing region info about memory ranges (readable,
      writable, executable)
      2) Memory64List - this is the stuct used when the Minidump is a
      full-memory one.
      3) Adding filtering of the module list (shared libraries list) - there
      can be mutliple records in the module list under the same name but with
      different load address (e.g. when the binary has non contigious
      sections). FilterModuleList eliminates the duplicated modules, leaving
      the one with the lowest load addr.
      
      Added unit tests for everything.
      
      Reviewers: labath, zturner
      
      Subscribers: beanz, mgorny, modocache, lldb-commits, amccarth
      
      Differential Revision: https://reviews.llvm.org/D25569
      
      llvm-svn: 284593
      b52206de
    • Haojian Wu's avatar
      [clang-move] Move using-decl in old cc. · 67bb651a
      Haojian Wu authored
      Summary:
      Another fix is to move the whole anonymous namespace declaration
      completely instead of moving fun/var declarations only.
      
      Reviewers: ioeric
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D25762
      
      llvm-svn: 284592
      67bb651a
    • Chris Dewhurst's avatar
      [Sparc][LEON] Detects an erratum on UT699 LEON 3 processors involving rounding... · 2c3cdd66
      Chris Dewhurst authored
      [Sparc][LEON] Detects an erratum on UT699 LEON 3 processors involving rounding mode changes and issues an appropriate user error message.
      
      Differential Revision: https://reviews.llvm.org/D24665
      
      llvm-svn: 284591
      2c3cdd66
    • Pavel Labath's avatar
      Add Chrono.h - std::chrono support header · 13b6a10e
      Pavel Labath authored
      Summary:
      std::chrono mostly covers the functionality of llvm::sys::TimeValue and
      lldb_private::TimeValue. This header adds a bit of utility functions and
      typedefs, which make the usage of the library and porting code from TimeValues
      easier.
      
      Rationale:
      - TimePoint typedef - precision of system_clock is implementation defined -
        using a well-defined precision helps maintain consistency between platforms,
        makes it interact better with existing TimeValue classes, and avoids cases
        there a time point is implicitly convertible to a specific precision on some
        platforms but not on others.
      - system_clock::to_time_t only accepts time_points with the default system
        precision (even though time_t has only second precision on all platforms we
        support). To avoid the need for explicit casts, I have added a toTimeT()
        wrapper function. toTimePoint(time_t) was not strictly necessary, but I have
        added it for symmetry.
      
      Reviewers: zturner, mehdi_amini
      
      Subscribers: beanz, mgorny, llvm-commits, modocache
      
      Differential Revision: https://reviews.llvm.org/D25416
      
      llvm-svn: 284590
      13b6a10e
    • Benjamin Kramer's avatar
      Don't copy replacements in for-range loop. NFC. · 089a39e8
      Benjamin Kramer authored
      llvm-svn: 284589
      089a39e8
    • Sjoerd Meijer's avatar
      Reapply r284571 (with the new tests fixed). · 2fc4cb6f
      Sjoerd Meijer authored
      llvm-svn: 284588
      2fc4cb6f
    • NAKAMURA Takumi's avatar
      llvm/test/MC/Mips/macro-ld-sd.s: Sweep a spurious character \xA0 in the test file. · 74ed5a8c
      NAKAMURA Takumi authored
      It might crash FileCheck.
      
      llvm-svn: 284587
      74ed5a8c
    • Ulrich Weigand's avatar
      [SystemZ] Add missing vector instructions for the assembler · 6e31ab38
      Ulrich Weigand authored
      Most z13 vector instructions have a base form where the data type of
      the operation (whether to consider the vector to be 16 bytes, 8
      halfwords, 4 words, or 2 doublewords) is encoded into a mask field,
      and then a set of extended mnemonics where the mask field is not
      present but the data type is encoded into the mnemonic name.
      
      Currently, LLVM only supports the type-specific forms (since those
      are really the ones needed for code generation), but not the base
      type-generic forms.
      
      To complete the assembler support and make it fully compatible with
      the GNU assembler, this commit adds assembler aliases for all the
      base forms of the various vector instructions.
      
      It also adds two more alias forms that are documented in the PoP:
      VFPSO/VFPSODB/WFPSODB -- generic form of VFLCDB etc.
      VNOT -- special variant of VNO
      
      llvm-svn: 284586
      6e31ab38
    • Ulrich Weigand's avatar
      [SystemZ] Add optional argument to some vector string instructions · 556a90c0
      Ulrich Weigand authored
      The vfee[bhf], vfene[bhf], and vistr[bhf] assembler mnemonics are
      documented in the Principles of Operation to have an optional last
      operand to encode arbitrary values in a mask field.
      
      This commit adds support for those optional operands, and cleans up
      the patterns to generate vector string instruction as bit.  No change
      to code generation intended.
      
      llvm-svn: 284585
      556a90c0
    • Michal Gorny's avatar
      [cmake] Use LLVM_CMAKE_PATH for GetSVN script · e2f4b25d
      Michal Gorny authored
      Use the LLVM_CMAKE_PATH variable to locate the GetSVN.cmake script.
      The variable was already available in stand-alone builds, and is also
      set by LLVM since r284581.
      
      llvm-svn: 284584
      e2f4b25d
    • Michal Gorny's avatar
      [cmake] Allow testing against installed LLVM with no sources · 7c3e4ebd
      Michal Gorny authored
      Adjust the stand-alone build files to accept either CMake files from
      LLVM_CMAKE_PATH or from LLVM_MAIN_SRC_DIR instead of requiring both.
      This makes it possible to run libcxx tests on top of installed LLVM
      and lit, without having to unpack a copy of LLVM sources. Furthermore,
      it avoids adding duplicate paths.
      
      Differential Revision: https://reviews.llvm.org/D25093
      
      llvm-svn: 284583
      7c3e4ebd
    • Michal Gorny's avatar
      [cmake] Use LLVM_CMAKE_PATH for GetSVN script · 0ed2f4e9
      Michal Gorny authored
      Use the LLVM_CMAKE_PATH variable to locate the GetSVN.cmake script.
      The variable was already available in stand-alone builds, and is also
      set by LLVM since r284581.
      
      llvm-svn: 284582
      0ed2f4e9
    • Michal Gorny's avatar
      [cmake] Declare LLVM_CMAKE_PATH for use in subprojects · e22b7f5a
      Michal Gorny authored
      Declare the LLVM_CMAKE_PATH to the source directory location of CMake
      files, in order to make it possible to easily use them in subprojects.
      Such a variable is already declared in most of LLVM projects
      (and inconsistently mixed with direct source tree references), including
      Clang, LLDB, compiler-rt, libcxx... Declaring it inside main LLVM tree
      makes it possible to avoid having to declare fallback values or use
      conditionals in those projects.
      
      It should be noted that in some of the subprojects LLVM_CMAKE_PATH is
      used to reference generated LLVMConfig.cmake file. However, these
      references are conditional to stand-alone builds and explicitly
      including this file is unnecessary in combined builds.
      
      Differential Revision: https://reviews.llvm.org/D25724
      
      llvm-svn: 284581
      e22b7f5a
    • James Molloy's avatar
      [Thumb-1] Synthesize TBB/TBH instructions to make use of compressed jump tables · fbfd1734
      James Molloy authored
      The TBB and TBH instructions in Thumb-2 allow jump tables to be compressed into sequences of bytes or shorts respectively. These instructions do not exist in Thumb-1, however it is possible to synthesize them out of a sequence of other instructions.
      
      It turns out this sequence is so short that it's almost never a lose for performance and is ALWAYS a significant win for code size.
      
      TBB example:
      Before: lsls r0, r0, #2    After: add  r0, pc
              adr  r1, .LJTI0_0         ldrb r0, [r0, #6]
              ldr  r0, [r0, r1]         lsls r0, r0, #1
              mov  pc, r0               add  pc, r0
        => No change in prologue code size or dynamic instruction count. Jump table shrunk by a factor of 4.
      
      The only case that can increase dynamic instruction count is the TBH case:
      
      Before: lsls r0, r4, #2    After: lsls r4, r4, #1
              adr  r1, .LJTI0_0         add  r4, pc
              ldr  r0, [r0, r1]         ldrh r4, [r4, #6]
              mov  pc, r0               lsls r4, r4, #1
                                        add  pc, r4
        => 1 more instruction in prologue. Jump table shrunk by a factor of 2.
      
      So there is an argument that this should be disabled when optimizing for performance (and a TBH needs to be generated). I'm not so sure about that in practice, because on small cores with Thumb-1 performance is often tied to code size. But I'm willing to turn it off when optimizing for performance if people want (also note that TBHs are fairly rare in practice!)
      
      llvm-svn: 284580
      fbfd1734
    • Andrey Bokhanko's avatar
      [Sema] Gcc compatibility of vector shift · 9941ca8a
      Andrey Bokhanko authored
      Gcc prints error if elements of left and right parts of a shift have different
      sizes. This patch is provided the GCC compatibility.
      
      Patch by Vladimir Yakovlev.
      
      Differential Revision: https://reviews.llvm.org/D24669
      
      llvm-svn: 284579
      9941ca8a
    • Simon Pilgrim's avatar
      [DAGCombiner] Just call isConstOrConstSplat directly. NFCI. · 7dcb6e57
      Simon Pilgrim authored
      This will get the same ConstantSDNode scalar or vector splat value as the current separate dyn_cast<ConstantSDNode> / isVector() approach.
      
      llvm-svn: 284578
      7dcb6e57
    • Vassil Vassilev's avatar
      [modules] Do not report missing definitions of demoted constexpr variable templates. · c774a23b
      Vassil Vassilev authored
      This is a followup to regression introduced in r284284.
      
      This should fix our libstdc++ modules builds.
      
      https://reviews.llvm.org/D25678
      
      Reviewed by Richard Smith!
      
      llvm-svn: 284577
      c774a23b
    • Simon Pilgrim's avatar
      Fix line endings · 9122ac99
      Simon Pilgrim authored
      llvm-svn: 284576
      9122ac99
    • Eugene Leviant's avatar
      [ELF] Add "error" and "warning" prefixes to linker messages · 74c1b6c5
      Eugene Leviant authored
      Differential revision: https://reviews.llvm.org/D25729
      
      llvm-svn: 284575
      74c1b6c5
    • Simon Pilgrim's avatar
      [DAGCombine] Generalize distributeTruncateThroughAnd to work with any... · b2ca2505
      Simon Pilgrim authored
      [DAGCombine] Generalize distributeTruncateThroughAnd to work with any non-opaque constant or constant vector
      
      llvm-svn: 284574
      b2ca2505
    • Eric Liu's avatar
      [clang-format] Add comment manipulation header · 99eeab7f
      Eric Liu authored
      Summary:
      Introduces a separate target for comment manipulation.
      Currently, comment manipulation is in BreakableComment.cpp.
      Towards implementing comment reflowing, we want to factor out the
      comment-related functionality, so it can be reused.
      Start simple by just moving out getLineCommentIndentPrefix.
      
      Patch by Krasimir Georgiev!
      
      Reviewers: djasper
      
      Subscribers: klimek, beanz, mgorny, modocache
      
      Differential Revision: https://reviews.llvm.org/D25725
      
      llvm-svn: 284573
      99eeab7f
    • Sjoerd Meijer's avatar
      Revert of r284571 because of failing tests. · 3f5111d3
      Sjoerd Meijer authored
      llvm-svn: 284572
      3f5111d3
    • Sjoerd Meijer's avatar
      Checking FP function attribute values and adding more build attribute tests. · a3187792
      Sjoerd Meijer authored
      This renames the function for checking FP function attribute values and also
      adds more build attribute tests (which are in separate files because build
      attributes are set per file).
      
      Differential Revision: https://reviews.llvm.org/D25625
      
      llvm-svn: 284571
      a3187792
    • NAKAMURA Takumi's avatar
      DenseSet: Appease msc18 to define derived constructors explicitly. · da9dc6ad
      NAKAMURA Takumi authored
      msc18 doesn't recognize "using BaseT::BaseT;"
      
        llvm\include\llvm/ADT/DenseSet.h(213) : error C2875: using-declaration causes a multiple declaration of 'BaseT'
                llvm\include\llvm/ADT/DenseSet.h(214) : see reference to class template instantiation 'llvm::DenseSet<ValueT,ValueInfoT>' being compiled
        llvm\include\llvm/ADT/DenseSet.h(231) : error C2875: using-declaration causes a multiple declaration of 'BaseT'
                llvm\include\llvm/ADT/DenseSet.h(232) : see reference to class template instantiation 'llvm::SmallDenseSet<ValueT,InlineBuckets,ValueInfoT>' being compiled
      
      llvm-svn: 284570
      da9dc6ad
    • Craig Topper's avatar
      [AVX-512] Teach isel lowering that a subvector broadcast being inserted into... · a4dc340c
      Craig Topper authored
      [AVX-512] Teach isel lowering that a subvector broadcast being inserted into both halves of a 512-bit vector can be combined into a larger subvector broadcast.
      
      Summary:
      This allows us to create broadcasts of 128-bit vector loads into 512-bit vectors.
      
      New patterns added to support 8-bit and 16-bit vector types and v2f64/v2i64->v8f64/v8i64 without DQI instructions.
      
      There also fallback patterns when the load can't be folded. These patterns are a little complex as we first need to insert the lower 128-bits into the second 128-bits using a zmm subvector insert instruction. We need to use a zmm insert in case VLX isn't available. Then use another zmm sub vector insert to take those 256-bits and insert them into the upper bits. Since we used a zmm insert to create the 256-bits we also need to do a extract_subreg to get just the lower 256-bits to pass to the second insert.
      
      The outer insert for the fallback patterns should have its type correct because eventually we should also supported masked operations here too. So we need a DQI and a NoDQI version of the v16f32/v16i32 patterns.
      
      Reviewers: RKSimon, delena, igorb
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D25651
      
      llvm-svn: 284567
      a4dc340c
    • Dehao Chen's avatar
      Update the section.ll to fix non-x86 failure. · 4b41571d
      Dehao Chen authored
      llvm-svn: 284566
      4b41571d
    • Chris Bieneman's avatar
      Revert back to the state before r284550 · e0dcd6d7
      Chris Bieneman authored
      This patch is causing a lot of issues on bots that I didn't see in local testing. I'm going to have to work on this. Reverting for now while I sort it out.
      
      llvm-svn: 284565
      e0dcd6d7
    • Chris Bieneman's avatar
      Trying to fix a few more missing LDFLAGS. · 716ac768
      Chris Bieneman authored
      llvm-svn: 284564
      716ac768
    • Dehao Chen's avatar
      Revert r284545 again as the regression in ppc still exists. There is bug in... · 95fc4314
      Dehao Chen authored
      Revert r284545 again as the regression in ppc still exists. There is bug in MBPI exposed by th patch.
      
      Also update the section.ll to fix non-x86 failure.
      
      llvm-svn: 284563
      95fc4314
    • Vitaly Buka's avatar
      [asan] Replace std::to_string with llvm::to_string · 490fda33
      Vitaly Buka authored
      llvm-svn: 284557
      490fda33
    • Richard Smith's avatar
      5f4b3884
    • Chris Bieneman's avatar
      Fixing the linux bots I broke in r284550 · 87378bd2
      Chris Bieneman authored
      Need to gate cxx linker adding driver-mode flag based on the linker being clang.
      
      llvm-svn: 284555
      87378bd2
    • Kostya Serebryany's avatar
      [libFuzzer] extend -print_coverage to also print uncovered lines, functions, and files. · 95b1a434
      Kostya Serebryany authored
      Example of output:
      COVERAGE:
      COVERED: in DSO2(int) /pathto/DSO2.cpp:6
      COVERED: in DSO2(int) /pathto/DSO2.cpp:8
      COVERED: in DSO1(int) /pathto/DSO1.cpp:6
      COVERED: in DSO1(int) /pathto/DSO1.cpp:8
      COVERED: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:16
      COVERED: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:19
      COVERED: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:25
      COVERED: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:26
      MODULE_WITH_COVERAGE: /pathto/libLLVMFuzzer-DSO1.so
      UNCOVERED_LINE: in DSO1(int) /pathto/DSO1.cpp:9
      UNCOVERED_FUNC: in Uncovered1()
      MODULE_WITH_COVERAGE: /pathto/libLLVMFuzzer-DSO2.so
      UNCOVERED_LINE: in DSO2(int) /pathto/DSO2.cpp:9
      UNCOVERED_FUNC: in Uncovered2()
      MODULE_WITH_COVERAGE: /pathto/LLVMFuzzer-DSOTest
      UNCOVERED_LINE: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:21
      UNCOVERED_LINE: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:27
      UNCOVERED_FILE: /pathto/DSOTestExtra.cpp
      
      Several things are not perfect here:
      * we are using objdump+awk instead of sancov because sancov does not support DSOs yet.
      * this breaks in the presence of ASAN_OPTIONS=strip_path_prefix=...
        (need to implement another API to get the module name by PC)
      
      llvm-svn: 284554
      95b1a434
    • Justin Lebar's avatar
      [CUDA] Rework tests now that we emit deferred diagnostics during sema. Test-only change. · d3fd70de
      Justin Lebar authored
      Summary:
      Previously we had to split out a lot of our tests into a test that
      checked only immediate errors and a test that checked only deferred
      errors.  This was because, if you emitted any immediate errors, we
      wouldn't run codegen, where the deferred errors were emitted.
      
      We've fixed this, and now emit deferred errors during sema.  This lets
      us merge a bunch of tests, and lets us convert some other tests to
      -fsyntax-only.
      
      Reviewers: tra
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D25755
      
      llvm-svn: 284553
      d3fd70de
    • Chris Bieneman's avatar
      When invoking Terminal, don't assume the default shell · b47711ab
      Chris Bieneman authored
      Summary:
      If a user has their shell set to a non-POSIX conferment shell the TestTerminal.py tests fail because the shell blurb constructed here may not work in their shell.
      
      In my specific case fish-shell (The Friendly Interactive Shell - http://fishshell.com) does not support $?, it instead uses $status (because it is friendly).
      
      This patch removes the assumption of your default shell by running the constructed bash command via "/bin/bash -c ...". This should be safer for users mutating their shell environment.
      
      Reviewers: tfiala
      
      Subscribers: joerg, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D25750
      
      llvm-svn: 284552
      b47711ab
    • Chris Bieneman's avatar
      [CMake] Don't include LLDB_TEST_COMPILER in cached variable · f50761f1
      Chris Bieneman authored
      Summary:
      CMake has no builtin mechanism for cache invalidation. As a general convention you want to not expand user-specified variables in other cached variables because they will not get updated when the user changes their specified value.
      
      This patch moves the "-C" option for dotest.py into the LLDB_TEST_COMMON_ARGS and out of the CMake cache. In order to prevent issues with out-of-date cache files on builders I've added code to scrub "-C ${LLDB_TEST_COMPILER}" out of the CMake caches, by Force writing the variable. This code can be removed in a few days once the change has trickled through CI systems.
      
      Reviewers: tfiala, labath, zturner
      
      Subscribers: lldb-commits, mgorny
      
      Differential Revision: https://reviews.llvm.org/D25751
      
      llvm-svn: 284551
      f50761f1
    • Chris Bieneman's avatar
      Use clang --driver-mode instead of guessing c++ compiler path · e80f007d
      Chris Bieneman authored
      Summary:
      When building the LLDB test programs, if your CC is clang it actually isn't safe to make CXX a string replace of "clang -> clang++". This falls down on unix configurations if your compiler is clang-${version}.
      
      A safer approach is to use the "--driver-mode=g++" option to tell clang to act like clang++.
      
      Reviewers: tfiala, zturner, labath
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D25753
      
      llvm-svn: 284550
      e80f007d
    • Richard Smith's avatar
      DR1330: instantiate exception-specifications when "needed". We previously did · 84a0b6db
      Richard Smith authored
      not instantiate exception specifications of functions if they were only used in
      unevaluated contexts (other than 'noexcept' expressions).
      
      In C++17 onwards, this becomes essential since the exception specification is
      now part of the function's type.
      
      Note that this means that constructs like the following no longer work:
      
        struct A {
          static T f() noexcept(...);
          decltype(f()) *p;
        };
      
      ... because the decltype expression now needs the exception specification of
      'f', which has not yet been parsed.
      
      llvm-svn: 284549
      84a0b6db