1. Dec 16, 2015
    • Xinliang David Li's avatar
      [PGO] cleanup: unify prefix for portability macros · abfd553c
      Xinliang David Li authored
      llvm-svn: 255748
      abfd553c
    • Todd Fiala's avatar
      cd817ba2
    • Todd Fiala's avatar
      Really fix Xcode build. · 9ce27bba
      Todd Fiala authored
      Fixes target membership settings from my last check-in.
      
      llvm-svn: 255746
      9ce27bba
    • Peter Collingbourne's avatar
      Fuzzer: Fix library dependencies. · 16c19787
      Peter Collingbourne authored
      Newer versions of libstdc++ (4.9+), as well as libc++, depend directly on
      libpthread from the standard library headers, so libfuzzer needs to declare
      a standard library dependency.
      
      llvm-svn: 255745
      16c19787
    • Reid Kleckner's avatar
      Print qualified display names when emitting CodeView · 60103383
      Reid Kleckner authored
      This is what debuggers expect.  Words towards fixing PR21528.
      
      llvm-svn: 255744
      60103383
    • Philip Reames's avatar
      Speculative fix for windows build · 23319014
      Philip Reames authored
      llvm-svn: 255743
      23319014
    • Todd Fiala's avatar
      Xcode project changes for r255729. · 7236f324
      Todd Fiala authored
      llvm-svn: 255742
      7236f324
    • Enrico Granata's avatar
      Add a symbolic link from the test directory to the actual - elsewhere located... · b1329387
      Enrico Granata authored
      Add a symbolic link from the test directory to the actual - elsewhere located - path that contains the test cases - and teach the test suite driver to resolve paths that contain symbolic links to test cases
      
      This is meant to reduce the typing that one needs to do to get from the test subdirectory to actual test cases. Now one can just do
      
      $ ./dotest.py ./testcases/<yaddayaddayadda>
      
      llvm-svn: 255741
      b1329387
    • Chris Bieneman's avatar
      [CMake] Add support for generating profdata for clang from training files · ae543390
      Chris Bieneman authored
      Summary:
      This patch adds support for using LIT to drive generating PGO profile data for clang.
      
      This first pass implementation should work on Linux and Unix based platforms. If you build clang using CMake with LLVM_BUILD_INSTRUMENTED=On the CMake build generates a generate-profdata target that will use the just-built clang to build any test files (see hello_world.cpp as an example). Each test compile will generate profraw files for each clang process. After all tests have run CMake will merge the profraw files using llvm-profdata.
      
      Future opportunities for extension:
      * Support for Build->Profile->Build bootstrapping
      * Support for linker order file generation using a similar mechanism and the same training data
      * Support for Windows
      
      Reviewers: dexonsmith, friss, bogner, cmatthews, vsk, silvas
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D15462
      
      llvm-svn: 255740
      ae543390
    • Philip Reames's avatar
      [EarlyCSE] DSE of stores which write back loaded values · ae1f265b
      Philip Reames authored
      Extend EarlyCSE with an additional style of dead store elimination. If we write back a value just read from that memory location, we can eliminate the store under the assumption that the value hasn't changed.
      
      I'm implementing this mostly because I noticed the omission when looking at the code. It seemed strange to have InstCombine have a peephole which was more powerful than EarlyCSE. :)
      
      Differential Revision: http://reviews.llvm.org/D15397
      
      llvm-svn: 255739
      ae1f265b
    • Eric Fiselier's avatar
    • Philip Reames's avatar
      [IR] Add support for floating pointer atomic loads and stores · 61a24ab6
      Philip Reames authored
      This patch allows atomic loads and stores of floating point to be specified in the IR and adds an adapter to allow them to be lowered via existing backend support for bitcast-to-equivalent-integer idiom.
      
      Previously, the only way to specify a atomic float operation was to bitcast the pointer to a i32, load the value as an i32, then bitcast to a float. At it's most basic, this patch simply moves this expansion step to the point we start lowering to the backend.
      
      This patch does not add canonicalization rules to convert the bitcast idioms to the appropriate atomic loads. I plan to do that in the future, but for now, let's simply add the support. I'd like to get instruction selection working through at least one backend (x86-64) without the bitcast conversion before canonicalizing into this form.
      
      Similarly, I haven't yet added the target hooks to opt out of the lowering step I added to AtomicExpand. I figured it would more sense to add those once at least one backend (x86) was ready to actually opt out.
      
      As you can see from the included tests, the generated code quality is not great. I plan on submitting some patches to fix this, but help from others along that line would be very welcome. I'm not super familiar with the backend and my ramp up time may be material.
      
      Differential Revision: http://reviews.llvm.org/D15471
      
      llvm-svn: 255737
      61a24ab6
    • Evgeniy Stepanov's avatar
      [cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes). · e3fb51cf
      Evgeniy Stepanov authored
      Split the CFI runtime in two: cfi and cfi_diag. The latter includes
      UBSan runtime to allow printing diagnostics.
      
      llvm-svn: 255736
      e3fb51cf
    • Evgeniy Stepanov's avatar
      [cfi] Exclude ubsan runtime library from non-diag CFI builds. · 72b0111c
      Evgeniy Stepanov authored
      Split the CFI runtime in two: cfi and cfi_diag. The latter includes
      UBSan runtime to allow printing diagnostics.
      
      llvm-svn: 255735
      72b0111c
    • Eric Fiselier's avatar
      Workaround nasty GCC bug that caused testsuite to hang · af5b54a2
      Eric Fiselier authored
      llvm-svn: 255734
      af5b54a2
    • Evgeniy Stepanov's avatar
      [cfi] Fix GCC build. · 702a7739
      Evgeniy Stepanov authored
      llvm-svn: 255733
      702a7739
    • Mike Aizatsky's avatar
      [sancov] blacklist support. · 2ad650ea
      Mike Aizatsky authored
      Summary:
      Using the blacklist the user can filter own unwanted functions
      from all outputs. By default blacklist contains "fun:__sancov*" line.
      
      Differential Revision: http://reviews.llvm.org/D15364
      
      llvm-svn: 255732
      2ad650ea
    • Reid Kleckner's avatar
      Reland "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit" · 39329d57
      Reid Kleckner authored
      I forgot to initialize RecoverFP.
      
      llvm-svn: 255731
      39329d57
    • Evgeniy Stepanov's avatar
      [cfi] Limit cross-dso tests to Linux. · 65c3a4b9
      Evgeniy Stepanov authored
      Mac is missing the driver support to link the CFI runtime library.
      
      llvm-svn: 255730
      65c3a4b9
    • Siva Chandra's avatar
      Read macro info from .debug_macro section and use it for expression evaluation. · d8335e9a
      Siva Chandra authored
      Summary:
      DWARF 5 proposes a reinvented .debug_macro section. This change follows
      that spec.
      
      Currently, only GCC produces the .debug_macro section and hence
      the added test is annottated with expectedFailureClang.
      
      Reviewers: spyffe, clayborg, tberghammer
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D15437
      
      llvm-svn: 255729
      d8335e9a
    • Reid Kleckner's avatar
      Revert "[SEH] Use llvm.x86.seh.recoverfp for SEH filters on x64 as well as 32bit" · d8f719fa
      Reid Kleckner authored
      This reverts commit r255710.
      
      llvm-svn: 255728
      d8f719fa
    • Richard Smith's avatar
      Fix grammar. · 9043d75e
      Richard Smith authored
      llvm-svn: 255727
      9043d75e
    • Richard Smith's avatar
    • Evgeniy Stepanov's avatar
      [cfi] Fix shadow sanity check. · b99d6c8b
      Evgeniy Stepanov authored
      The current check may break if the starting address in fill_shadow is
      not page-aligned.
      
      llvm-svn: 255725
      b99d6c8b
    • Justin Bogner's avatar
      Fix typo in r255720 · e0fde5c6
      Justin Bogner authored
      llvm-svn: 255724
      e0fde5c6
    • Richard Smith's avatar
      90ae7922
    • Wolfgang Pieb's avatar
      Test commit: fixed spelling error in comment. · 60b7ca67
      Wolfgang Pieb authored
      llvm-svn: 255721
      60b7ca67
    • Justin Bogner's avatar
      LPM: Simplify how passes mark loops for deletion. NFC · 6e9810c8
      Justin Bogner authored
      When a pass removes a loop it currently has to reach up into the
      LPPassManager's internals to update the state of the iteration over
      loops. This reverse dependency results in a pretty awkward interplay
      of the LPPassManager and its Passes.
      
      Here, we change this to instead keep track of when a loop has become
      "unlooped" in the Loop objects themselves, then the LPPassManager can
      check this and manipulate its own state directly. This opens the door
      to allow most of the loop passes to work without a backreference to
      the LPPassManager.
      
      I've kept passes calling the LPPassManager::deleteLoopFromQueue API
      now so I could put an assert in to prove that this is NFC, but a later
      pass will update passes just to preserve the LoopInfo directly and
      stop referencing the LPPassManager completely.
      
      llvm-svn: 255720
      6e9810c8
    • Todd Fiala's avatar
      prevent rerun logic from kicking in on test runs including aarch64. · 54e12091
      Todd Fiala authored
      This is a workaround for:
      llvm.org/pr25844
      
      llvm-svn: 255719
      54e12091
    • Adrian McCarthy's avatar
      e376ba03
    • Tobias Grosser's avatar
      ScopInfo: Delete code that has been made dead by previous commits · 04d49644
      Tobias Grosser authored
      In case this functionality is needed in later patches, it should probably be
      (re)added by these patches.
      
      llvm-svn: 255717
      04d49644
    • Tobias Grosser's avatar
      ScopInfo: Use getArrayAccessFor in reduction detection · 35ec5fbb
      Tobias Grosser authored
      Load instructions may possibly be related to multiple memory accesses, but we
      are only interested in the array read access that describes the memory location
      the load instructions loads from. By using getArrayAccessfor we ensure to always
      obtain the right memory access.
      
      This issue was found by inspection without having a failing test case.
      
      llvm-svn: 255716
      35ec5fbb
    • Tobias Grosser's avatar
      BlockGenerator: Use getArrayAccessFor for vector code generation · 184a4926
      Tobias Grosser authored
      getAccessFor does not guarantee a certain access to be returned in case an
      instruction is related to multiple accesses. However, in the vector code
      generation we want to know the stride of the array access of a store
      instruction. By using getArrayAccessFor we ensure we always get the correct
      memory access.
      
      This patch fixes a potential bug, but I was unable to produce a failing test
      case. Several existing test cases cover this code, but all of them already
      passed out of luck (or the specific but not-guaranteed order in which we build
      memory accesses).
      
      llvm-svn: 255715
      184a4926
    • Tobias Grosser's avatar
      VectorBlockGenerator: Generate scalar loads for vector statements · a69d4f0d
      Tobias Grosser authored
      When generating scalar loads/stores separately the vector code has not been
      updated. This commit adds code to generate scalar loads for vector code as well
      as code to assert in case scalar stores are encountered within a vector loop.
      
      llvm-svn: 255714
      a69d4f0d
    • Tobias Grosser's avatar
      ScopInfo: Look up first (and only) array access · 09214772
      Tobias Grosser authored
      When rewriting the access functions of load/store statements, we are only
      interested in the actual array memory location. The current code just took
      the very first memory access, which could be a scalar or an array access. As
      a result, we failed to update access functions even though this was requested
      via .jscop.
      
      llvm-svn: 255713
      09214772
    • Evgeniy Stepanov's avatar
      Relax checks in cfi-cross-dso test. · 028685a5
      Evgeniy Stepanov authored
      The test is failing with unnamed labels.
      
      llvm-svn: 255712
      028685a5
    • Jason Molenda's avatar
      Add a new "thread-pcs" key-value pair to the T packet response from · 7e9bd599
      Jason Molenda authored
      debugserver.  thread-pcs has a comma separated list of base 16
      addresses - the current pc value for every thread in the process.
      It is a partner of the "threads:" key where a list of thread IDs
      is given.  The pc values in thread-pcs correspond one-to-one with
      the thread IDs in the threads list.
      
      This is a part of performance work.  When lldb is instruction
      stepping / fast stepping over a range of addresses for e.g. a "next"
      command, and it steps in to another function, lldb will put a
      breakpoint on the return address and continue the process.  Before
      it calls continue, it calls Thread::SetupForResume on all the
      threads, and SetupForResume needs to get the current pc value for
      every thread to see if any are at a breakpoint site.
      
      The result is that issuing a "c" continue requires that we send
      "read pc register" packets for every thread.
      
      We may do this sequence of step-into-function / continue-to-get-out
      many times for a single user-visible "next" or "step" command, and
      with highly multithreaded programs, we are sending many extra
      packets to get all the thread values.
      
      I looked at including this data in the "jstopinfo" JSON that
      we already have in the T packet.  But there are three problems that
      would make this increase the size of the T packet significantly.
      First, numbers in JSON are base 10.  Second, a proper JSON would
      have something like "thread_pcs": { "34224331112":383772734222, ...}
      for thread-id 34224331112 and pc 383772734222 - so we're including
      a whole extra copy of the thread id in addition to the pc.  Third,
      the JSON text is hex-ascii'fied so the size of it is doubled.
      In one example, 
      
      threads:585db8,585dc7,585dc8,585dc9,585dca,585dce;thread-pcs:100001400,7fff8badc6de,7fff8badcff6,7fff8badc6de,7fff8badc6de,7fff8badc6de;
      
      The "thread-pcs" adds 86 characters - 136 characters for both 
      threads and thread-pcs.  Doing this in JSON would look like
      
      threads={"5791160":4294972416,"5791175":140735536809694,"5791176":140735536812022,"5791177":140735536809694,"5791178":140735536809694,"5791182":140735536809694}
      
      or 160 characters -- or 320 characters once it is hex-asciified.
      
      Given that it's 86 characters vrs 320, I went with the old style
      approach.  I've seen real world programs that have up to 60 threads
      in them, so this could result in vastly larger packets if it
      was all done in the JSON with hex-ascii expansion.
      
      If we had an all-JSON T packet, where we didn't need to hex-ascii
      encode anything, that would have been the better approach.  But
      we'd already have a list of threads in JSON at that point so
      the additional text wouldn't be too bad.
      
      I'm working on finishing the patches to lldb to use this data;
      will commit those once I've had a chance to test them more.  But
      I wanted to commit the debugserver bits which are more
      straightforward.
      
      
      <rdar://problem/21963031> 
      
      llvm-svn: 255711
      7e9bd599
    • Reid Kleckner's avatar
      cf262660
    • Richard Trieu's avatar
      8f3118f4
    • Peter Collingbourne's avatar
      Un-XFAIL JIT EH tests under [am]san. · 87debbbb
      Peter Collingbourne authored
      These tests started passing after libcxxabi's r255559, which fixed a problem
      relating to how libcxxabi links its EH library. The test failures were
      caused by an issue with libc++, not the sanitizers (confirmed by building a
      pre-r255559 revision with libc++/libc++abi and without sanitizers), so they
      should never have been XFAILed under the sanitizers.
      
      llvm-svn: 255708
      87debbbb