1. Apr 28, 2016
  2. Apr 27, 2016
    • Dmitry Vyukov's avatar
      tsan: fix windows support · 914b3997
      Dmitry Vyukov authored
      UnmapOrDie used to do MEM_DECOMMIT and so worked
      on partial regions. But r263160 changed it to use
      MEM_RELEASE and MEM_RELEASE can only work with
      whole regions mapped by VirtualAlloc. This broke
      windows as:
      
      FATAL: ThreadSanitizer CHECK failed: gotsan.cc:8296 "((mbi.AllocationBase == addr && "Windows cannot unmap part of a previous mapping")) != (0)" (0x0, 0x0)
      
      Restore the previous behavior.
      
      llvm-svn: 267730
      914b3997
    • Nicolai Haehnle's avatar
      AMDGPU/SI: Add llvm.amdgcn.s.waitcnt.all intrinsic · f66bdb5e
      Nicolai Haehnle authored
      Summary:
      So it appears that to guarantee some of the ordering requirements of a GLSL
      memoryBarrier() executed in the shader, we need to emit an s_waitcnt.
      
      (We can't use an s_barrier, because memoryBarrier() may appear anywhere in
      the shader, in particular it may appear in non-uniform control flow.)
      
      Reviewers: arsenm, mareko, tstellarAMD
      
      Subscribers: arsenm, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D19203
      
      llvm-svn: 267729
      f66bdb5e
    • Michael Zuckerman's avatar
      514f0554
    • Kuba Brecka's avatar
      Decorate TSan tests with "@skipUnlessThreadSanitizer" which skips the tests if... · 3f61a183
      Kuba Brecka authored
      Decorate TSan tests with "@skipUnlessThreadSanitizer" which skips the tests if the selected compiler can't compile with "-fsanitize=thread".
      
      llvm-svn: 267726
      3f61a183
    • Matthew Simpson's avatar
      [TTI] Add hook for vector extract with extension · e5dfb08f
      Matthew Simpson authored
      This change adds a new hook for estimating the cost of vector extracts followed
      by zero- and sign-extensions. The motivating example for this change is the
      SMOV and UMOV instructions on AArch64. These instructions move data from vector
      to general purpose registers while performing the corresponding extension
      (sign-extend for SMOV and zero-extend for UMOV) at the same time. For these
      operations, TargetTransformInfo can assume the extensions are free and only
      report the cost of the vector extract. The SLP vectorizer has been updated to
      make use of the new hook.
      
      Differential Revision: http://reviews.llvm.org/D18523
      
      llvm-svn: 267725
      e5dfb08f
    • Artem Tamazov's avatar
      [AMDGPU][llvm-mc] s_getreg/setreg* - Support symbolic names of hardware registers. · 5cd55b17
      Artem Tamazov authored
      Possibility to specify code of hardware register kept.
      Disassemble to symbolic name, if name is known.
      Tests updated/added.
      
      Differential Revision: http://reviews.llvm.org/D19335
      
      llvm-svn: 267724
      5cd55b17
    • Nico Weber's avatar
      Revert r267649, it caused PR27539. · e69b9548
      Nico Weber authored
      llvm-svn: 267723
      e69b9548
    • Kristof Beyls's avatar
      Remove size 1 from check as that isn't part of what the test is meant to be testing. · a14e9a55
      Kristof Beyls authored
      This test also runs on e.g. ARM-native builds when the X86 backend is also
      built.  This test produces code for the default instruction set, even though it
      is in a "X86" sub-directory. Given that this test doesn't seem to be testing
      anything architecture-specific, it seems it's best to adapt the check to not
      check for an architecture-dependent value (the size of the function), rather
      than hard-code the test to target x86.
      
      llvm-svn: 267722
      a14e9a55
    • Benjamin Kramer's avatar
      Add missing dependency. · cf4c6d86
      Benjamin Kramer authored
      llvm-svn: 267721
      cf4c6d86
    • Dmitry Vyukov's avatar
      tsan: fix darwin Go support · 4592eb05
      Dmitry Vyukov authored
      os_trace turns out to be a macro that creates static object.
      Function-static objects use __cxa_atexit and __dso_handle
      which are not present in Go runtime.
      
      llvm-svn: 267720
      4592eb05
    • Haojian Wu's avatar
      [include-fixer] Add a find-all-symbols tool for include-fixer. · f875acbd
      Haojian Wu authored
      Summary:
      The find-all-symbols tool generates a yaml symbol database for
      include-fixer.
      
      The symbol matcher is originally written by Xiaoyi Liu.
      
      Reviewers: bkramer, djasper
      
      Subscribers: cfe-commits, klimek, ioeric
      
      Differential Revision: http://reviews.llvm.org/D19482
      
      llvm-svn: 267719
      f875acbd
    • Benjamin Kramer's avatar
      Clean up the include fixer 'driver' a bit and make the database configurable. · f412e902
      Benjamin Kramer authored
      Also add a test for it. The library is covered by unit tests, the driver
      was not.
      
      llvm-svn: 267718
      f412e902
    • Teresa Johnson's avatar
      [ThinLTO] Refine fix to avoid renaming of uses in inline assembly. · df5ef871
      Teresa Johnson authored
      Summary:
      Refine the workaround from r266877 that attempts to prevent
      renaming of locals in inline assembly, so that in addition to looking
      for a llvm.used local value, that there is at least one inline assembly
      call in the module. Otherwise, debug functions added to the llvm.used
      can block importing/exporting unnecessarily.
      
      Reviewers: joker.eph
      
      Subscribers: llvm-commits, joker.eph
      
      Differential Revision: http://reviews.llvm.org/D19573
      
      llvm-svn: 267717
      df5ef871
    • Dmitry Vyukov's avatar
      tsan: fix windows Go support · 221e2c61
      Dmitry Vyukov authored
      Unmap can't unmap arbitrary regions on windows.
      
      llvm-svn: 267716
      221e2c61
    • Dmitry Vyukov's avatar
      tsan: fix darwin Go build · 51c294a9
      Dmitry Vyukov authored
      syslog_lock is not defined in Go build.
      
      llvm-svn: 267714
      51c294a9
    • Dmitry Vyukov's avatar
      tsan: make windows shadow mapping a bijection · 3e0315c0
      Dmitry Vyukov authored
      CheckShadowMapping function started catching that
      mem->shadow->mem mapping is not bijection.
      Make it bijection.
      
      llvm-svn: 267713
      3e0315c0
    • Teresa Johnson's avatar
      [ThinLTO] Use valueid instead of bitcode offsets in combined index file · 02e98331
      Teresa Johnson authored
      Summary:
      With the removal of support for lazy parsing of combined index summary
      records (e.g. r267344), we no longer need to include the summary record
      bitcode offset in the VST entries for definitions. Change the combined
      index format to be similar to the per-module index format in using value
      ids to cross-reference from the summary record to the VST entry (rather
      than the summary record bitcode offset to cross-reference in the other
      direction).
      
      The visible changes are:
      1) Add the value id to the combined summary records
      2) Remove the summary offset from the combined VST records, which has
      the following effects:
      - No longer need the VST_CODE_COMBINED_GVDEFENTRY record, as all
        combined index VST entries now only contain the value id and
        corresponding GUID.
      - No longer have duplicate VST entries in the case where there are
        multiple definitions of a symbol (e.g. weak/linkonce), as they all
        have the same value id and GUID.
      
      An implication of #2 above is that in order to hook up an alias to the
      correct aliasee based on the value id of the aliasee recorded in the
      combined index alias record, we need to scan the entries in the index
      for that GUID to find the one from the same module (i.e. the case where
      there are multiple entries for the aliasee). But the reader no longer
      has to maintain a special map to hook up the alias/aliasee.
      
      Reviewers: joker.eph
      
      Subscribers: joker.eph, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D19481
      
      llvm-svn: 267712
      02e98331
    • Haojian Wu's avatar
      Remove explain-config testcase that detect hard-coded check. · 68d2b881
      Haojian Wu authored
      Remove it for now, we need to better way to figure out how to test it.
      
      llvm-svn: 267711
      68d2b881
    • Dmitry Vyukov's avatar
      tsan: fix build · 5aac22fc
      Dmitry Vyukov authored
      error: implicit declaration of function 'abort' is invalid in C99
      llvm-svn: 267710
      5aac22fc
    • Dmitry Vyukov's avatar
      tsan: fix darwin Go build · 30452f82
      Dmitry Vyukov authored
      Ifdef out global variables with destructors.
      This requires runtime support that is not provided by Go runtime
      (in particular _dso_handle symbol).
      
      llvm-svn: 267709
      30452f82
    • Artur Pilipenko's avatar
      NFC. Introduce Value::getPointerDerferecnceableBytes · 345f0148
      Artur Pilipenko authored
      Extract a part of isDereferenceableAndAlignedPointer functionality to Value::getPointerDerferecnceableBytes. Currently it's a NFC, but in future I'm going to accumulate all the logic about value dereferenceability in this function similarly to Value::getPointerAlignment function (D16144).
      
      Reviewed By: reames
      
      Differential Revision: http://reviews.llvm.org/D17572
      
      llvm-svn: 267708
      345f0148
    • Johannes Doerfert's avatar
      [FIX] Propagate execution domain of invariant loads · 8ab2803b
      Johannes Doerfert authored
        If the base pointer of an invariant load is is loaded conditionally, that
        condition needs to hold for the invariant load too. The structure of the
        program will imply this for domain constraints but not for imprecisions in
        the modeling. To this end we will propagate the execution context of base
        pointers during code generation and thus ensure the derived pointer does
        not access an invalid base pointer.
      
      llvm-svn: 267707
      8ab2803b
    • Jonathan Coe's avatar
      Expose cxx constructor and method properties through libclang and python bindings. · 2956535b
      Jonathan Coe authored
      Summary:
      I have exposed the following function through libclang and the clang.cindex python bindings:
      
      clang_CXXConstructor_isConvertingConstructor,
      clang_CXXConstructor_isCopyConstructor,
      clang_CXXConstructor_isDefaultConstructor,
      clang_CXXConstructor_isMoveConstructor,
      clang_CXXMethod_isDefaulted
      
      I need (some of) these methods for a C++ code model I am building in Python to drive a code generator.
      
      Reviewers: compnerd, skalinichev
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D15469
      
      llvm-svn: 267706
      2956535b
    • Rafael Espindola's avatar
      Reduce usage of isRelRelative. · 7ac96286
      Rafael Espindola authored
      It is now used only for relocations that only set the low bits inside a
      page. Everything else is handled by getRelExpr.
      
      I will send a another review renaming and better documenting
      isRelRelative.
      
      llvm-svn: 267705
      7ac96286
    • Pavel Labath's avatar
      Remove flaky decorator from three tests on linux · e0ee7c60
      Pavel Labath authored
      The flakyness is no longer reproducible, and the tests seem to be passing reliably now.
      
      llvm-svn: 267704
      e0ee7c60
    • Dmitry Vyukov's avatar
      tsan: change tsan/Go interface for obtaining the current Processor · 3efe3957
      Dmitry Vyukov authored
      Current interface assumes that Go calls ProcWire/ProcUnwire
      to establish the association between thread and proc.
      With the wisdom of hindsight, this interface does not work
      very well. I had to sprinkle Go scheduler with wire/unwire
      calls, and any mistake leads to hard to debug crashes.
      This is not something one wants to maintian.
      Fortunately, there is a simpler solution. We can ask Go
      runtime as to what is the current Processor, and that
      question is very easy to answer on Go side.
      Switch to such interface.
      
      llvm-svn: 267703
      3efe3957
    • Rafael Espindola's avatar
      Represent TOC relative relocations as GOTREL. · 15cec298
      Rafael Espindola authored
      That way we only need to subtract the offset is relocateOne.
      
      llvm-svn: 267702
      15cec298