1. Sep 10, 2016
    • Filipe Cabecinhas's avatar
      [asan] Store access_size in the {Stack,Global}AddressDescription objects · def8d5fc
      Filipe Cabecinhas authored
      Summary:
      This is important information when we want to describe errors, and should be
      part of these descriptions. Otherwise, we need to know the access size when
      printing/emitting the description.
      
      Reviewers: kcc, eugenis, vitalybuka
      
      Subscribers: llvm-commits, kubabrecka
      
      Differential Revision: https://reviews.llvm.org/D24387
      
      llvm-svn: 281093
      def8d5fc
    • Justin Lebar's avatar
      [NVPTX] Implement llvm.fabs.f32, llvm.max.f32, etc. · b5e88497
      Justin Lebar authored
      Summary:
      Previously these only worked via NVPTX-specific intrinsics.
      
      This change will allow us to convert these target-specific intrinsics
      into the general LLVM versions, allowing existing LLVM passes to reason
      about their behavior.
      
      It also gets us some minor codegen improvements as-is, from situations
      where we canonicalize code into one of these llvm intrinsics.
      
      Reviewers: majnemer
      
      Subscribers: llvm-commits, jholewinski, tra
      
      Differential Revision: https://reviews.llvm.org/D24300
      
      llvm-svn: 281092
      b5e88497
    • Justin Lebar's avatar
      [StreamExecutor] Make SE work with an in-tree LLVM build. · b9e51397
      Justin Lebar authored
      Summary:
      With these changes, we can put parallel-libs within llvm/projects and
      build as normal.
      
      This is kind of the minimal change I could figure out how to make while
      still making us compatible with llvm's build system.  Some things I'm
      not thrilled about include:
      
       * The creation of a CoreTests directory (the macros really seemed to
         want this)
      
       * Pulling SimpleHostPlatformDevice.h into CoreTests.  It seems to me
         this should live inside unittests/include, or maybe tests/include,
         but I didn't want to make that change in this patch.
      
      One important piece of work that remains to be done is to make
      
        $ ninja check-streamexecutor
      
      run all the tests.  Right now the only way I've figured out to run the
      tests is
      
        $ ninja projects/parallel-libs/streamexecutor/unittests/StreamExecutorUnitTests
        $ projects/parallel-libs/streamexecutor/unittests/CoreTests/CoreTests
      
      Reviewers: jhen
      
      Subscribers: beanz, parallel_libs-commits, jprice
      
      Differential Revision: https://reviews.llvm.org/D24368
      
      llvm-svn: 281091
      b9e51397
    • Filipe Cabecinhas's avatar
      [asan] Add a new AddressDescription structure, which can describe any type of address. · 4aff9e6d
      Filipe Cabecinhas authored
      Summary:
      This is useful for inclusion in the Error* structures, to describe an
      arbitrary address.
      
      Remove the old struct since it's used only once. This removes one level of
      indirection, and moves all *AddressDescription to be one of the recently
      introduced structures.
      
      This merges differential revisions: D24131 and D24132
      
      Reviewers: kcc, eugenis, vitalybuka
      
      Subscribers: kubabrecka, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D24131
      
      llvm-svn: 281090
      4aff9e6d
    • Justin Lebar's avatar
      [CUDA] Make __GCC_ATOMIC_XXX_LOCK_FREE macros the same on host/device. · 5057f177
      Justin Lebar authored
      Summary:
      This fixes a bug where we were unable to compile the following CUDA
      file with libstdc++ (didn't try libc++):
      
        #include <future>
        void foo() { std::shared_future<int> x; }
      
      The problem is that <future> only defines std::shared_future if
      __GCC_ATOMIC_INT_LOCK_FREE > 1.  When we compiled this file for device,
      the macro was set to 1, and then the class didn't exist at all.
      
      Reviewers: tra
      
      Subscribers: cfe-commits, jhen
      
      Differential Revision: https://reviews.llvm.org/D24407
      
      llvm-svn: 281089
      5057f177
    • Saleem Abdulrasool's avatar
      ARM: move the builtins libcall CC setup · 92e33a3e
      Saleem Abdulrasool authored
      Move the target specific setup into the target specific lowering setup.  As
      pointed out by Anton, the initial change was moving this too high up the stack
      resulting in a violation of the layering (the target generic code path setup
      target specific bits).  Sink this into the ARM specific setup.  NFC.
      
      llvm-svn: 281088
      92e33a3e
    • Michael Gottesman's avatar
      f27ef414
    • Michael Gottesman's avatar
      [cmake] Export gtest/gtest_main and its dependencies via a special build tree... · 31e9363a
      Michael Gottesman authored
      [cmake] Export gtest/gtest_main and its dependencies via a special build tree only cmake exports file.
      
      Previously, gtest/gtest_main were not exported via cmake. The intention here was
      to ensure that users whom are linking against the LLVM install tree would not
      get the gtest/gtest_main targets. This prevents downstream projects that link
      against the LLVM build tree (i.e. Swift) from getting this dependency
      information in their cmake builds. Without such dependency information, linker
      issues can result on linux due to LLVMSupport being put before gtest on the
      linker command line.
      
      This commit preserves behavior that we want for the install tree, while adding
      support for the build tree by:
      
      1. The special casing for gtest/gtest_main in the add_llvm_library code is
      removed in favor of a flag called "BUILDTREE_ONLY". If this is set, then the
      library is communicating that it is only meant to be exported into the build
      tree and is not meant to be installed or exported via the install tree. This
      part is just a tweak to remove the special case, the underlying code is the
      same.
      
      2. The cmake code that exports cmake targets for the build tree has special code
      to import an additional targets file called
      LLVMBuildTreeOnlyExports.cmake. Additionally the extra targets are added to the
      LLVMConfig.cmake's LLVM_EXPORTED_TARGETS variable. In contrast, the
      "installation" cmake file uses the normal LLVM_EXPORTS_TARGETS as before and
      does not include the extra exports file. This is implemented by
      defining/undefining variables when performing a configure of the build/install
      tree LLVMConfig.cmake files.
      
      llvm-svn: 281085
      31e9363a
    • Rafael Espindola's avatar
      Compact InputSectionData from 64 to 48 bytes. NFC. · 82621dcb
      Rafael Espindola authored
      llvm-svn: 281084
      82621dcb
    • Saleem Abdulrasool's avatar
      test: adjust the GUID · c1b5f192
      Saleem Abdulrasool authored
      Although the GUID seems to be stable across test runs now, it seems to be
      unstable across hosts.  Lets be a bit more lax about the reading of the RSDS
      record.
      
      llvm-svn: 281083
      c1b5f192
    • Rafael Espindola's avatar
      Add a lower level zlib::uncompress. · 46cdcb03
      Rafael Espindola authored
      SmallVectors are convenient, but they don't cover every use case.
      
      In particular, they are fairly large (3 pointers + one element) and
      there is no way to take ownership of the buffer to put it somewhere
      else.  This patch then adds a lower lever interface that works with
      any buffer.
      
      llvm-svn: 281082
      46cdcb03
    • Wei Ding's avatar
      AMDGPU : Fix mqsad_u32_u8 instruction incorrect data type. · 06f8d394
      Wei Ding authored
      Differential Revision: http://reviews.llvm.org/D23700
      
      llvm-svn: 281081
      06f8d394
    • Tom Stellard's avatar
      AMDGPU/SI: Make sure llvm.amdgcn.implicitarg.ptr() is 8-byte aligned for HSA · b2869eb6
      Tom Stellard authored
      Reviewers: arsenm
      
      Subscribers: arsenm, wdng, nhaehnle, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D24405
      
      llvm-svn: 281080
      b2869eb6
    • Saleem Abdulrasool's avatar
      COFF: make builds more reproducible · 88f64075
      Saleem Abdulrasool authored
      Change the way we calculate the build id to use MD5 to give reproducible build
      ids. Previously we would generate random bytes for the build id GUID.
      
      llvm-svn: 281079
      88f64075
    • Manman Ren's avatar
      Modules: revert r280728. · 7d2f5c4a
      Manman Ren authored
      In post-commit review, Richard suggested a better way to fix this.
      rdar://27926200
      
      llvm-svn: 281078
      7d2f5c4a
    • Zachary Turner's avatar
      [pdb] Print out some more info when dumping a raw stream. · 36efbfa6
      Zachary Turner authored
      We have various command line options that print the type of a
      stream, the size of a stream, etc but nowhere that it can all be
      viewed together.
      
      Since a previous patch introduced the ability to dump the bytes
      of a stream, this seems like a good place to present a full view
      of the stream's properties including its size, what kind of data
      it represents, and the blocks it occupies.  So I added the
      ability to print that information to the -stream-data command
      line option.
      
      llvm-svn: 281077
      36efbfa6
    • Vedant Kumar's avatar
      [llvm-cov] Remove some asserts in the html renderer (NFC) · c236e5a0
      Vedant Kumar authored
      These asserts are making tests fragile. The renderer does not enter an
      invalid state when they fail, however, it may spit out a garbled
      coverage report because the source text no longer matches the provided
      coverage mapping.
      
      Another follow-up to r281072.
      
      llvm-svn: 281076
      c236e5a0
    • Evgeniy Stepanov's avatar
      [asan] Disable handle_abort in Android tests. · 627d78f6
      Evgeniy Stepanov authored
      The same thing is already done on Mac. handle_abort slows down tests
      significantly because it triggers tombstone collection on Android;
      also, it changes failed test outcome from "not-crash" to "crash" (as
      in "bin/not --crash").
      
      This change adds handle_abort=0 to asan options on android (test
      only!), and also tweaks android_run.py to semi-correctly pass the
      crash/no-crash status to the caller.
      
      llvm-svn: 281075
      627d78f6
    • Dehao Chen's avatar
      Do not widen load for different variable in GVN. · 22ce5eb0
      Dehao Chen authored
      Summary:
      Widening load in GVN is too early because it will block other optimizations like PRE, LICM.
      
      https://llvm.org/bugs/show_bug.cgi?id=29110
      
      The SPECCPU2006 benchmark impact of this patch:
      
      Reference: o2_nopatch
      (1): o2_patched
      
                 Benchmark             Base:Reference   (1)  
      -------------------------------------------------------
      spec/2006/fp/C++/444.namd                  25.2  -0.08%
      spec/2006/fp/C++/447.dealII               45.92  +1.05%
      spec/2006/fp/C++/450.soplex                41.7  -0.26%
      spec/2006/fp/C++/453.povray               35.65  +1.68%
      spec/2006/fp/C/433.milc                   23.79  +0.42%
      spec/2006/fp/C/470.lbm                    41.88  -1.12%
      spec/2006/fp/C/482.sphinx3                47.94  +1.67%
      spec/2006/int/C++/471.omnetpp             22.46  -0.36%
      spec/2006/int/C++/473.astar               21.19  +0.24%
      spec/2006/int/C++/483.xalancbmk           36.09  -0.11%
      spec/2006/int/C/400.perlbench             33.28  +1.35%
      spec/2006/int/C/401.bzip2                 22.76  -0.04%
      spec/2006/int/C/403.gcc                   32.36  +0.12%
      spec/2006/int/C/429.mcf                   41.04  -0.41%
      spec/2006/int/C/445.gobmk                 26.94  +0.04%
      spec/2006/int/C/456.hmmer                  24.5  -0.20%
      spec/2006/int/C/458.sjeng                    28  -0.46%
      spec/2006/int/C/462.libquantum            55.25  +0.27%
      spec/2006/int/C/464.h264ref               45.87  +0.72%
      
      geometric mean                                   +0.23%
      
      For most benchmarks, it's a wash, but we do see stable improvements on some benchmarks, e.g. 447,453,482,400.
      
      Reviewers: davidxl, hfinkel, dberlin, sanjoy, reames
      
      Subscribers: gberry, junbuml
      
      Differential Revision: https://reviews.llvm.org/D24096
      
      llvm-svn: 281074
      22ce5eb0
    • Rui Ueyama's avatar
      Fix another -Wunused-variable for non-assert build. · a5edf655
      Rui Ueyama authored
      llvm-svn: 281073
      a5edf655
    • Vedant Kumar's avatar
      [llvm-cov] Try to fix the native_separators.c test some more · db7f924c
      Vedant Kumar authored
      It's still breaking this bot (though, it looks like it always had been):
      
        http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015
      
      This time, add quotes around llvm-{cov,config} so that lit won't expand
      them.
      
      Thanks to Reid for suggesting the patch!
      
      llvm-svn: 281072
      db7f924c
    • Douglas Katzman's avatar
      Myriad: nominally "support" ASAN. · 3972f9e6
      Douglas Katzman authored
      Doesn't work, but needs to be enabled in order to get there.
      
      llvm-svn: 281071
      3972f9e6
    • Zachary Turner's avatar
      [pdb] Add command line options for dumping individual streams and blocks · 72c5b645
      Zachary Turner authored
      I ran into a situation where I wanted to print out the contents of
      page 6 of a PDB as a binary blob, and there was no straightforward
      way to do that.
      
      In addition to adding that, this patch also adds the ability to dump
      a stream by index as a binary blob, and it will stitch together all
      the blocks and dump the whole thing as one seemingly contiguous
      sequence of bytes.
      
      llvm-svn: 281070
      72c5b645
    • Rui Ueyama's avatar
      Fix -Wunused-variable for non-assert build. · 47320da1
      Rui Ueyama authored
      llvm-svn: 281069
      47320da1
    • George Rokos's avatar
      [OPENMP] ppc64le recognized as big-endian · 118de30b
      George Rokos authored
      There is a bug in CMakeLists which causes powerpc64le systems to be recognized as big-endian. This patch fixes the issue.
      
      Differential Revision: https://reviews.llvm.org/D23626
      
      llvm-svn: 281068
      118de30b
    • Zachary Turner's avatar
      [pdb] Pass CVRecord's through the visitor as non-const references. · 9ba31a5e
      Zachary Turner authored
      This simplifies a lot of code, and will actually be necessary for
      an upcoming patch to serialize TPI record hash values.
      
      The idea before was that visitors should be examining records, not
      modifying them.  But this is no longer true with a visitor that
      constructs a CVRecord from Yaml.  To handle this until now, we
      were doing some fixups on CVRecord objects at a higher level, but
      the code is really awkward, and it makes sense to just have the
      visitor write the bytes into the CVRecord.  In doing so I uncovered
      a few bugs related to `Data` and `RawData` and fixed those.
      
      Reviewed By: rnk
      Differential Revision: https://reviews.llvm.org/D24362
      
      llvm-svn: 281067
      9ba31a5e
    • Kostya Serebryany's avatar
      [libFuzzer] one more puzzle, value_profile cracks it in a second · 00ef2711
      Kostya Serebryany authored
      llvm-svn: 281066
      00ef2711
    • George Rokos's avatar
      [OPENMP] Implementation of omp_get_default_device and omp_set_default_device · 28f31b40
      George Rokos authored
      Implementation of missing OpenMP 4.0 API functions omp_get_default_device and omp_set_default_device.
      Also, added support for the environment variable OMP_DEFAULT_DEVICE.
      
      Differential Revision: https://reviews.llvm.org/D23587
      
      llvm-svn: 281065
      28f31b40
    • Eric Liu's avatar
      Also cleanup comments around redundant colons/commas in format::cleanup. · 01426ff8
      Eric Liu authored
      Reviewers: djasper
      
      Subscribers: klimek, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D24400
      
      llvm-svn: 281064
      01426ff8
    • Zachary Turner's avatar
      [pdb] Write PDB TPI Stream from Yaml. · c6d54da8
      Zachary Turner authored
      This writes the full sequence of type records described in
      Yaml to the TPI stream of the PDB file.
      
      Reviewed By: rnk
      Differential Revision: https://reviews.llvm.org/D24316
      
      llvm-svn: 281063
      c6d54da8
    • Vedant Kumar's avatar
      [llvm-cov] Handle native paths correctly in the text index · d938dfb3
      Vedant Kumar authored
      Treat filenames the same way in the text index as we do in the html
      index. This is a follow-up to r281008 (an attempt to unbreak the
      native_separators.c test on Windows).
      
      Patch by Maggie Yi!
      
      llvm-svn: 281062
      d938dfb3
    • Aaron Ballman's avatar
      Move the ocaml_all target into the Misc folder for cleanliness; NFC. · 6a6e4598
      Aaron Ballman authored
      llvm-svn: 281061
      6a6e4598
    • Reid Kleckner's avatar
      [codeview] Don't assert if the array element type is incomplete · 1076288e
      Reid Kleckner authored
      This can happen when the frontend knows the debug info will be emitted
      somewhere else. Usually this happens for dynamic classes with out of
      line constructors or key functions, but it can also happen when modules
      are enabled.
      
      llvm-svn: 281060
      1076288e
    • Vedant Kumar's avatar
      [Bitcode] Add compatibility test for the 3.9 release · e3249093
      Vedant Kumar authored
      Fork off compatibility.ll for the 3.9 release. The *.bc file in this
      commit was produced using a Release build of the release_39 branch.
      
      llvm-svn: 281059
      e3249093
    • Todd Fiala's avatar
      xfail DarwinLog "filter message by regex" tests · ace732a0
      Todd Fiala authored
      These tests are not working reliably.  I'm marking them
      xfail until I resolve the issue.
      
      Tracked by:
      llvm.org/pr30299
      
      llvm-svn: 281058
      ace732a0
    • Reid Kleckner's avatar
      [DebugInfo] Ensure complete type is emitted with -fstandalone-debug · 22466a92
      Reid Kleckner authored
      The logic for upgrading a class from a forward decl to a complete type
      was not checking the debug info emission level before applying the
      vtable optimization. This meant we ended up without debug info for a
      class which was required to be complete. I noticed it because it
      triggered an assertion during CodeView emission, but that's a separate
      issue.
      
      llvm-svn: 281057
      22466a92
    • Reid Kleckner's avatar
      Make -fstandalone-debug and -flimit-debug-info available in clang-cl · b6bee516
      Reid Kleckner authored
      Our limited debug info optimizations are breaking down at DLL
      boundaries, so we're going to evaluate the size impact of these
      settings, and possibly change the default.
      
      Users should be able to override our settings, though.
      
      llvm-svn: 281056
      b6bee516
    • Sanjay Patel's avatar
      [InstCombine] add tests to show pattern matching failures due to commutation · 6da0fb8c
      Sanjay Patel authored
      I was looking to fix a bug in getComplexity(), and these cases showed up as 
      obvious failures. I'm not sure how to find these in general though.
      
      llvm-svn: 281055
      6da0fb8c
    • Justin Lebar's avatar
      Attempt to fix static_asserts in SelectionDAGNodes.h that MSVC chokes on. · aa4adccc
      Justin Lebar authored
      These were added in r281051, which, I am embarrassed to admit, has an
      incomplete commit message that I forgot to update before pushing.  You
      can ignore element (2) in that list.
      
      llvm-svn: 281054
      aa4adccc
    • Reid Kleckner's avatar
      [codeview] Extend the heuristic for detecting classes imported from DLLs · c9404e10
      Reid Kleckner authored
      If a dynamic class contains a dllimport method, then assume the class
      may not be constructed in this DLL, and therefore the vtable will live
      in a different PDB.
      
      This heuristic is still incomplete, and will miss things like abstract
      base classes that are only constructed on one side of the DLL interface.
      That said, this heuristic does detect some cases that are currently
      problematic, and may be useful to other projects that don't use many
      DLLs.
      
      llvm-svn: 281053
      c9404e10