1. Oct 15, 2015
    • Enrico Granata's avatar
      c3ef0ed5
    • Enrico Granata's avatar
      Fix a problem where LLDB could sometimes try to get the size of an Objective-C... · 95438038
      Enrico Granata authored
      Fix a problem where LLDB could sometimes try to get the size of an Objective-C type without passing an appropriate ExecutionContext
      
      llvm-svn: 250339
      95438038
    • Philip Reames's avatar
      Tighten known bits for ctpop based on zero input bits · ddcf6b35
      Philip Reames authored
      This is a cleaned up patch from the one written by John Regehr based on the findings of the Souper superoptimizer.
      
      The basic idea here is that input bits that are known zero reduce the maximum count that the intrinsic could return. We know that the number of bits required to represent a particular count is at most log2(N)+1.
      
      Differential Revision: http://reviews.llvm.org/D13253
      
      llvm-svn: 250338
      ddcf6b35
    • Rui Ueyama's avatar
      Simplify. · 690db678
      Rui Ueyama authored
      llvm-svn: 250337
      690db678
    • Eric Fiselier's avatar
      Update issues status · dfdf929a
      Eric Fiselier authored
      llvm-svn: 250336
      dfdf929a
    • Stephane Sezer's avatar
      Fix codesign command with cmake. · 86388ae7
      Stephane Sezer authored
      Summary:
      Looks like having a space in the Xcode path triggers this bug. We need
      to use cmake -E env FOO=bar [COMMAND] to set the environment instead.
      
      I am using cmake 3.3.1 and ninja 1.6.0 and I get this:
      
          [2681/2756] Linking CXX executable bin/debugserver
          FAILED: : && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -std=c++11 -fcolor-diagnostics -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-deprecated-register -Wno-vla-extension  -fno-exceptions -fno-rtti -Wno-gnu-zero-variadic-macro-arguments -Wno-zero-length-array -Wno-extended-offsetof -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names -stdlib=libc++ -Wl,-sectcreate,__TEXT,__info_plist,/Users/sas/Source/llvm/tools/lldb/tools/debugserver/source/../resources/lldb-debugserver-Info.plist tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/HasAVX.s.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/CFBundle.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/CFData.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/CFString.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/Genealogy.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachException.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachProcess.mm.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachTask.mm.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachThread.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachThreadList.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachVMMemory.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/MachVMRegion.cpp.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/mach_excServer.c.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/mach_excUser.c.o tools/lldb/tools/debugserver/source/MacOSX/CMakeFiles/debugserver.dir/debugserver_vers.c.o  -o bin/debugserver  lib/liblldbDebugserverCommon.a lib/liblldbUtility.a lib/liblldbDebugserverMacOSX_I386.a lib/liblldbDebugserverMacOSX_X86_64.a -framework Cocoa -Wl,-rpath,@executable_path/../lib && cd /Users/sas/Source/llvm/build/bin && "CODESIGN_ALLOCATE=/Applications/Xcode 6.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate" codesign --force --sign lldb_codesign debugserver
          /bin/sh: CODESIGN_ALLOCATE=/Applications/Xcode 6.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate: No such file or directory
          [2681/2756] Building CXX object tools/lldb/source/Target/CMakeFiles/lldbTarget.dir/Target.cpp.o
          ninja: build stopped: subcommand failed.
      
      Reviewers: clayborg, dawn, brucem, tfiala
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D13742
      
      llvm-svn: 250335
      86388ae7
    • Rui Ueyama's avatar
      ELF2: Support --entry=<addr>. · 2b675074
      Rui Ueyama authored
      If an argument for --entry is a number, that's not a symbol name but
      an absolute address. If that's the case, the address is directly set
      to ELF header's e_entry.
      
      llvm-svn: 250334
      2b675074
    • Chris Bieneman's avatar
      [CMake] Make LLVM_VERSION_* variables user definable · f9e0b253
      Chris Bieneman authored
      CMake's set command overwrites existing values. Package maintainers may want or need to set the version variables manually, so we need to only set them if they are not already defined. Note I use the "if(NOT DEFINED ...)" syntax deliberately in the last case because empty string is a valid value for the suffx, but not the other variables.
      
      llvm-svn: 250333
      f9e0b253
    • Sanjay Patel's avatar
      add x86 codegen tests for 'add nsw' followed by 'sext' · e2b52807
      Sanjay Patel authored
      llvm-svn: 250332
      e2b52807
    • Zachary Turner's avatar
      Make uses of /dev/null portable across OSes. · 4eff2d31
      Zachary Turner authored
      Most platforms have "/dev/null".  Windows has "nul".  Instead of
      hardcoding the string /dev/null at various places, make a constant
      that contains the correct value depending on the platform, and use
      that everywhere instead.
      
      llvm-svn: 250331
      4eff2d31
    • Rui Ueyama's avatar
      ELF2: Move Target concrete classes from .h to .cpp. · efc23de4
      Rui Ueyama authored
      llvm-svn: 250330
      efc23de4
    • Eric Fiselier's avatar
      Use correct CMake variable for the libname · 27dec399
      Eric Fiselier authored
      llvm-svn: 250329
      27dec399
    • Rui Ueyama's avatar
      ELF2: Remove {set,get}OutputSection accessors. · 80edbbbd
      Rui Ueyama authored
      These accessors didn't provide any additional value over a public
      member variable, too.
      
      llvm-svn: 250328
      80edbbbd
    • Zachary Turner's avatar
      Get Python unit tests working with Python 3. · 18426935
      Zachary Turner authored
      There were a couple of issues related to string handling that
      needed to be fixed.  In particular, we cannot get away with
      converting `PyUnicode` objects to `PyBytes` objects and storing
      the `PyBytes` regardless of Python version.  Instead we have to
      store a `PyUnicode` on Python 3 and a `PyString` on Python 2.
      
      The reason for this is that if you call `PyObject_Str` on a
      `PyBytes` in Python 3, it will return you a string that actually
      contains the string value wrappedin the characters b''.  So if we
      create a `PythonString` with the value "test", and we call Str()
      on it, we will get back the string "b'test'", which breaks string
      equality.  The only way to fix this is to store a native
      `PyUnicode` object under Python 3.
      
      With this CL, ScriptInterpreterPythonTests unit tests pass 100%
      under Python 2 and Python 3.
      
      llvm-svn: 250327
      18426935
    • Rui Ueyama's avatar
      ELF2: Remove {set,get}OutputSectionOff accessors. · edffd91b
      Rui Ueyama authored
      These accessors didn't provide any additional value over a public
      member variable.
      
      llvm-svn: 250326
      edffd91b
    • Eric Fiselier's avatar
      Link to new documentation from existing homepage · 9da4c8ed
      Eric Fiselier authored
      llvm-svn: 250325
      9da4c8ed
    • Bill Schmidt's avatar
      [PowerPC] Fix invalid lxvdsx optimization (PR25157) · 048cc97f
      Bill Schmidt authored
      PR25157 identifies a bug where a load plus a vector shuffle is
      incorrectly converted into an LXVDSX instruction.  That optimization
      is only valid if the load is of a doubleword, and in the noted case,
      it was not.  This corrects that problem.
      
      Joint patch with Eric Schweitz, who provided the bugpoint-reduced test
      case.
      
      llvm-svn: 250324
      048cc97f
    • Eric Fiselier's avatar
      Update testing guide for libc++ · 147bb89d
      Eric Fiselier authored
      llvm-svn: 250323
      147bb89d
    • Stephane Sezer's avatar
      Avoid a -Wreorder warning in ScriptInterpreterPython.cpp. · 76866446
      Stephane Sezer authored
      llvm-svn: 250322
      76866446
    • Davide Italiano's avatar
      [Bugpoint] Use 'CC' instead of 'GCC' for variable naming. · ab256219
      Davide Italiano authored
      We now use clang by default and fallback to gcc when requested.
      With this commit, names reflect reality. No functional change
      intended.
      
      Discussed with: Rafael Espindola.
      
      llvm-svn: 250321
      ab256219
    • Daniel Berlin's avatar
      [IDFCalculator] Use DominatorTreeBase instead of DominatorTree · 92b9ec3c
      Daniel Berlin authored
      Summary:
      IDFCalculator used a DominatorTree instance for its calculations. Since the PostDominatorTree struct is not a subclass of DominatorTree, it wasn't possible to use PDT in IDFCalculator to compute post-dominance frontiers.
      
      This patch makes IDFCalculator work with a DominatorTreeBase<BasicBlock> instead, which enables PDTs to be utilized.
      
      Patch by Victor Campos (vhscampos@gmail.com)
      
      Reviewers: dberlin
      
      Subscribers: dberlin, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D13725
      
      llvm-svn: 250320
      92b9ec3c
    • Eric Fiselier's avatar
      [libcxx] Make it drastically simpler to link libc++. · 8241405a
      Eric Fiselier authored
      Summary:
      Currently on most platforms you have to manually link the c++ abi library used with libc++ whenever you use libc++. So your typical libc++ command like invocation might look like:
      
      ```
      clang++ -stdlib=libc++ foo.cpp -lc++abi
      ```
      
      Having to manually link `libc++abi.so` makes it harder for libc++ to be used generically. This patch fixes that by generating a linker script for `libc++.so` that correctly links the ABI library. On linux the linker script for libc++abi would look like:
      
      ```
      # libc++.so
      INPUT(libc++.so.1 -lc++abi)
      ```
      
      With the linker script you can now use libc++ using only `-stdlib=libc++`. This is the technique that is used on FreeBSD in ordered to link cxxrt and I think it's the best approach to make our users lives simpler.
      
      The CMake option used to enable this is `LIBCXX_ENABLE_ABI_LINKER_SCRIPT`. In future I would like to enable this by default on all platforms except for Darwin.
      
      Reviewers: mclow.lists, danalbert, rsmith, jroelofs, EricWF
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D12508
      
      llvm-svn: 250319
      8241405a
    • Davide Italiano's avatar
      [Bugpoint] Use clang by default. · 8a5d0439
      Davide Italiano authored
      We now rely on gcc only if either of the following is true:
      1) -gcc option is passed by the user
      2) clang is not found in the default path.
      
      Differential Revision:	 http://reviews.llvm.org/D13642
      
      llvm-svn: 250318
      8a5d0439
    • Chen Li's avatar
      [LoopUnswitch] Correct misleading comments. · 567aa7ab
      Chen Li authored
      Reviewers: reames
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D13738
      
      llvm-svn: 250317
      567aa7ab
    • Eric Fiselier's avatar
      Fix LIBCXXABI_HAS_NO_THREADS configuration. · 3cf3cfc4
      Eric Fiselier authored
      llvm-svn: 250316
      3cf3cfc4
    • Rui Ueyama's avatar
      ELF2: Merge .{text,rodata,data,bss}.* sections. · 4fcadaf5
      Rui Ueyama authored
      Previously, we used input section names as output section names.
      That resulted that we created lots of sections for comdat
      or -f{function,data}-section sections.
      
      This patch reduces the number of sections by dropping suffix from
      all section names which start with ".text.", ".rodata.", ".data."
      or ".bss.". GNU linker does this using the internal linker script,
      but for LLD I chose to do that directly.
      
      Interestingly, this makes the linker faster. Time to link Clang
      is this.
      
      Before:
      
        real    0m0.537s
        user    0m0.433s
        sys     0m0.104s
      
      After:
      
        real    0m0.390s
        user    0m0.268s
        sys     0m0.120s
      
      It make sense because previously we created 57659 sections now only 27.
      
      llvm-svn: 250315
      4fcadaf5
    • Arch D. Robison's avatar
      Add 'other' in description of extractvalue operands. · a7f8f252
      Arch D. Robison authored
      llvm-svn: 250314
      a7f8f252
    • Eric Fiselier's avatar
      Configure for config site header · 035ddc20
      Eric Fiselier authored
      llvm-svn: 250313
      035ddc20
    • Eric Fiselier's avatar
      Split out config_site logic so libc++abi can use it · f71de32d
      Eric Fiselier authored
      llvm-svn: 250312
      f71de32d
    • Rafael Espindola's avatar
      Handle dynamic relocs to weak undefined when possible. · cc6ebb8e
      Rafael Espindola authored
      llvm-svn: 250311
      cc6ebb8e
    • Diego Novillo's avatar
      Sample profiles - Update text profile documentation. · 33452761
      Diego Novillo authored
      There's been some changes to the text encoding for sample profiles. This
      updates the documentation and an example.
      
      llvm-svn: 250310
      33452761
    • Diego Novillo's avatar
      Sample profiles - Add documentation for binary profile encoding. NFC. · bb5605ca
      Diego Novillo authored
      This adds documentation for the binary profile encoding and moves the
      documentation for the text encoding into the header file
      SampleProfReader.h.
      
      llvm-svn: 250309
      bb5605ca
    • Eric Fiselier's avatar
      [libcxx] Use __config_site to configure the test suite features. · 0a534eec
      Eric Fiselier authored
      Summary:
      This patch changes the tests to use the "__config_site" header if present instead of manually configuring for each option. This patch also removes the test flags for configuring some of these options. For example "lit -sv --param=enable_threads=OFF" no longer works. However lit will still correctly configure if  the CMake option "-DLIBCXX_ENABLE_THREADS=OFF" is given at build time. 
      
      This patch will fix the libc++abi test configuration for `LIBCXX_ABI_VERSION` and `LIBCXX_ABI_UNSTABLE` one we teach it about 'project_obj_dir' . I would like to land this ASAP to prevent more work blockage.
      
      Reviewers: mclow.lists, danalbert, eugenis, ed, jroelofs
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D13714
      
      llvm-svn: 250308
      0a534eec
    • Eric Fiselier's avatar
      Add config.project_obj_root to the libc++abi testsuite · 453da19d
      Eric Fiselier authored
      llvm-svn: 250307
      453da19d
    • Zachary Turner's avatar
      Fix Python initialization for Python 3. · 079fe48a
      Zachary Turner authored
      Python 3 reverses the order in which you must call Py_InitializeEx
      and PyEval_InitThreads.  Since that log is in itself already a
      little nuanced, it is refactored into a function so that the reversal
      is more clear.  At the same time, there's a lot of logic during
      Python initialization to save off a bunch of state and then restore
      it after initialization is complete.  To express this more cleanly,
      it is refactored to an RAII-style pattern where state is saved off
      on acquisition and restored on release.
      
      llvm-svn: 250306
      079fe48a
    • Artyom Skrobov's avatar
      A doccomment for CombineTo, and some NFC refactorings · 4bca0bb0
      Artyom Skrobov authored
      Summary:
      Caching SDLoc(N), instead of recreating it in every single
      function call, keeps the code denser, and allows to unwrap long lines.
      
      Reviewers: sunfish, atrick, sdmitrouk
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D13726
      
      llvm-svn: 250305
      4bca0bb0
    • Zachary Turner's avatar
      Minor cleanup on PythonDataObject constructors. · 87f47729
      Zachary Turner authored
      Added a constructor that takes list_size for `PythonList`.
      Made all single-argument constructors explicit.
      Re-ordered constructors to be consistent with other classes.
      
      llvm-svn: 250304
      87f47729
    • Zachary Turner's avatar
      Change swig interface files to use PythonDataObjects. · 60c24f70
      Zachary Turner authored
      llvm-svn: 250303
      60c24f70
    • Artyom Skrobov's avatar
      Merge DAGCombiner::visitSREM and DAGCombiner::visitUREM (NFC) · a5b9ad22
      Artyom Skrobov authored
      Summary: The two implementations had more code in common than not.
      
      Reviewers: sunfish, MatzeB, sdmitrouk
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D13724
      
      llvm-svn: 250302
      a5b9ad22
    • Hans Wennborg's avatar
      Intrin.h: implement __emul and __emulu · 4ca00afd
      Hans Wennborg authored
      llvm-svn: 250301
      4ca00afd