summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [MachO] Stop generating *coal* sections.Akira Hatanaka2015-10-147-17/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some background on why we don't have to use *coal* sections anymore: Long ago when C++ was new and "weak" had not been standardized, an attempt was made in cctools to support C++ inlines that can be coalesced by putting them into their own section (TEXT/textcoal_nt instead of TEXT/text). The current macho linker supports the weak-def bit on any symbol to allow it to be coalesced, but the compiler still puts weak-def functions/data into alternate section names, which the linker must map back to the base section name. This patch makes changes that are necessary to prevent the compiler from using the "coal" sections and have it use the non-coal sections instead when the target architecture is not powerpc: TEXT/textcoal_nt instead use TEXT/text TEXT/const_coal instead use TEXT/const DATA/datacoal_nt instead use DATA/data If the target is powerpc, we continue to use the *coal* sections since anyone targeting powerpc is probably using an old linker that doesn't have support for the weak-def bits. Also, have the assembler issue a warning if it encounters a *coal* section in the assembly file and inform the users to use the non-coal sections instead. rdar://problem/14265330 Differential Revision: http://reviews.llvm.org/D13188 llvm-svn: 250342
* Add a data formatter for __NSArray0, the type of empty arraysEnrico Granata2015-10-143-0/+76
| | | | llvm-svn: 250341
* Fix a couple issues where trying to print a type would cause LLDB to crashEnrico Granata2015-10-141-2/+2
| | | | llvm-svn: 250340
* Fix a problem where LLDB could sometimes try to get the size of an ↵Enrico Granata2015-10-144-7/+11
| | | | | | Objective-C type without passing an appropriate ExecutionContext llvm-svn: 250339
* Tighten known bits for ctpop based on zero input bitsPhilip Reames2015-10-142-2/+57
| | | | | | | | | | 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
* Simplify.Rui Ueyama2015-10-141-6/+2
| | | | llvm-svn: 250337
* Update issues statusEric Fiselier2015-10-141-2/+2
| | | | llvm-svn: 250336
* Fix codesign command with cmake.Stephane Sezer2015-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* ELF2: Support --entry=<addr>.Rui Ueyama2015-10-144-3/+22
| | | | | | | | 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
* [CMake] Make LLVM_VERSION_* variables user definableChris Bieneman2015-10-141-4/+12
| | | | | | 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
* add x86 codegen tests for 'add nsw' followed by 'sext'Sanjay Patel2015-10-141-0/+179
| | | | llvm-svn: 250332
* Make uses of /dev/null portable across OSes.Zachary Turner2015-10-147-7/+19
| | | | | | | | | 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
* ELF2: Move Target concrete classes from .h to .cpp.Rui Ueyama2015-10-142-84/+86
| | | | llvm-svn: 250330
* Use correct CMake variable for the libnameEric Fiselier2015-10-141-1/+1
| | | | llvm-svn: 250329
* ELF2: Remove {set,get}OutputSection accessors.Rui Ueyama2015-10-143-15/+9
| | | | | | | These accessors didn't provide any additional value over a public member variable, too. llvm-svn: 250328
* Get Python unit tests working with Python 3.Zachary Turner2015-10-142-299/+201
| | | | | | | | | | | | | | | | | | | | | 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
* ELF2: Remove {set,get}OutputSectionOff accessors.Rui Ueyama2015-10-143-13/+11
| | | | | | | These accessors didn't provide any additional value over a public member variable. llvm-svn: 250326
* Link to new documentation from existing homepageEric Fiselier2015-10-141-0/+10
| | | | llvm-svn: 250325
* [PowerPC] Fix invalid lxvdsx optimization (PR25157)Bill Schmidt2015-10-142-0/+60
| | | | | | | | | | | | 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
* Update testing guide for libc++Eric Fiselier2015-10-141-7/+56
| | | | llvm-svn: 250323
* Avoid a -Wreorder warning in ScriptInterpreterPython.cpp.Stephane Sezer2015-10-141-2/+2
| | | | llvm-svn: 250322
* [Bugpoint] Use 'CC' instead of 'GCC' for variable naming.Davide Italiano2015-10-146-149/+149
| | | | | | | | | | 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
* [IDFCalculator] Use DominatorTreeBase instead of DominatorTreeDaniel Berlin2015-10-141-3/+3
| | | | | | | | | | | | | | | | | 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
* [libcxx] Make it drastically simpler to link libc++.Eric Fiselier2015-10-144-2/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [Bugpoint] Use clang by default.Davide Italiano2015-10-141-2/+9
| | | | | | | | | | 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
* [LoopUnswitch] Correct misleading comments.Chen Li2015-10-141-2/+1
| | | | | | | | | | Reviewers: reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13738 llvm-svn: 250317
* Fix LIBCXXABI_HAS_NO_THREADS configuration.Eric Fiselier2015-10-141-8/+4
| | | | llvm-svn: 250316
* ELF2: Merge .{text,rodata,data,bss}.* sections.Rui Ueyama2015-10-142-1/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add 'other' in description of extractvalue operands.Arch D. Robison2015-10-141-1/+1
| | | | llvm-svn: 250314
* Configure for config site headerEric Fiselier2015-10-141-0/+1
| | | | llvm-svn: 250313
* Split out config_site logic so libc++abi can use itEric Fiselier2015-10-141-12/+15
| | | | llvm-svn: 250312
* Handle dynamic relocs to weak undefined when possible.Rafael Espindola2015-10-144-9/+64
| | | | llvm-svn: 250311
* Sample profiles - Update text profile documentation.Diego Novillo2015-10-141-12/+54
| | | | | | | There's been some changes to the text encoding for sample profiles. This updates the documentation and an example. llvm-svn: 250310
* Sample profiles - Add documentation for binary profile encoding. NFC.Diego Novillo2015-10-142-103/+174
| | | | | | | | 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
* [libcxx] Use __config_site to configure the test suite features.Eric Fiselier2015-10-143-70/+57
| | | | | | | | | | | | | | | 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
* Add config.project_obj_root to the libc++abi testsuiteEric Fiselier2015-10-141-0/+1
| | | | llvm-svn: 250307
* Fix Python initialization for Python 3.Zachary Turner2015-10-141-46/+91
| | | | | | | | | | | | | 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
* A doccomment for CombineTo, and some NFC refactoringsArtyom Skrobov2015-10-141-39/+34
| | | | | | | | | | | | | | 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
* Minor cleanup on PythonDataObject constructors.Zachary Turner2015-10-142-5/+13
| | | | | | | | 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
* Change swig interface files to use PythonDataObjects.Zachary Turner2015-10-145-87/+101
| | | | llvm-svn: 250303
* Merge DAGCombiner::visitSREM and DAGCombiner::visitUREM (NFC)Artyom Skrobov2015-10-141-66/+34
| | | | | | | | | | | | 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
* Intrin.h: implement __emul and __emuluHans Wennborg2015-10-141-0/+11
| | | | llvm-svn: 250301
* Add support for a R_X86_64_32 referring to a plt.Rafael Espindola2015-10-144-5/+24
| | | | | | | This can show up with a non-PIC .o being linked into an executable that uses shared libraries. llvm-svn: 250300
* cmake: provide flag that enables 'log enable --stack' to provide useful ↵Todd Fiala2015-10-143-1/+40
| | | | | | | | | | | | | | | | | | | | file/function info on POSIX systems Adding the following flag to a cmake line: -DLLDB_EXPORT_ALL_SYMBOLS=TRUE will cause all symbols to be exported from liblldb. This enables the llvm backtrace mechanism to see and report backtrace symbols properly when using (lldb) log enable --stack ... Prior to this change, only the SB API symbols would show up on Linux and other systems that use a public-symbols-based backtrace lookup mechanism. log enable --stack ... is a very handy, quick way to understand the flow of how some log lines are getting hit within lldb without having to hook up a top-level debugger over your current debug session. llvm-svn: 250299
* Tweak a -g related test for the PS4Filipe Cabecinhas2015-10-141-1/+7
| | | | | | | | Make sure we're matching what we want: - Always have -generate-arange-section (independent of -g) - Emit a -dwarf-version=... when -g is there. llvm-svn: 250298
* [ELF2][mips] Support both big and little endian MIPS 32-bit targetsSimon Atanasyan2015-10-143-19/+50
| | | | | | | | | | | | | - Make the `MipsTargetInfo` template class with `ELFType` argument. Use the argument to select an appropriate relocation type and read/write routines. - Add template function `add32` to add-and-write relocation value in both big and little endian cases. Keep the `add32le` to reduce code changes. Differential Revision: http://reviews.llvm.org/D13723 llvm-svn: 250297
* ELF2: Remove getAddrSize().Rui Ueyama2015-10-142-5/+3
| | | | llvm-svn: 250296
* lldb-server: add support for binary memory readsPavel Labath2015-10-146-14/+72
| | | | | | | | | | | | | | | | | Summary: This commit adds support for binary memory reads ($x) to lldb-server. It also removes the "0x" prefix from the $x client packet, to make it more compatible with the old $m packet. This allows us to use almost the same code for handling both packet types. I have verified that debugserver correctly handles $x packets even without the leading "0x". I have added a test which verifies that the stub returns the same memory contents for both kinds of memory reads ($x and $m). Reviewers: tberghammer, jasonmolenda Subscribers: iancottrell, lldb-commits Differential Revision: http://reviews.llvm.org/D13695 llvm-svn: 250295
* Bring back r250262: PS4 toolchainFilipe Cabecinhas2015-10-1418-8/+751
| | | | | | | | | | | | | | There was a minor problem with a test. Sorry for the noise yesterday. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250293
* [llvm-readobj/ELF] fix: add correct test inputsIgor Kudrin2015-10-144-0/+0
| | | | llvm-svn: 250292
OpenPOWER on IntegriCloud