Commit Graph

213072 Commits

Author SHA1 Message Date
Rui Ueyama efc23de4dd ELF2: Move Target concrete classes from .h to .cpp.
llvm-svn: 250330
2015-10-14 21:30:32 +00:00
Eric Fiselier 27dec39996 Use correct CMake variable for the libname
llvm-svn: 250329
2015-10-14 21:20:28 +00:00
Rui Ueyama 80edbbbdf8 ELF2: Remove {set,get}OutputSection accessors.
These accessors didn't provide any additional value over a public
member variable, too.

llvm-svn: 250328
2015-10-14 21:09:55 +00:00
Zachary Turner 18426935ac Get Python unit tests working with Python 3.
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
2015-10-14 21:06:13 +00:00
Rui Ueyama edffd91bce ELF2: Remove {set,get}OutputSectionOff accessors.
These accessors didn't provide any additional value over a public
member variable.

llvm-svn: 250326
2015-10-14 21:00:23 +00:00
Eric Fiselier 9da4c8ed75 Link to new documentation from existing homepage
llvm-svn: 250325
2015-10-14 20:51:33 +00:00
Bill Schmidt 048cc97fb1 [PowerPC] Fix invalid lxvdsx optimization (PR25157)
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
2015-10-14 20:45:00 +00:00
Eric Fiselier 147bb89d52 Update testing guide for libc++
llvm-svn: 250323
2015-10-14 20:44:44 +00:00
Stephane Sezer 7686644691 Avoid a -Wreorder warning in ScriptInterpreterPython.cpp.
llvm-svn: 250322
2015-10-14 20:39:41 +00:00
Davide Italiano ab25621997 [Bugpoint] Use 'CC' instead of 'GCC' for variable naming.
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
2015-10-14 20:29:54 +00:00
Daniel Berlin 92b9ec3c84 [IDFCalculator] Use DominatorTreeBase instead of DominatorTree
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
2015-10-14 19:54:24 +00:00
Eric Fiselier 8241405ad4 [libcxx] Make it drastically simpler to link libc++.
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
2015-10-14 19:54:03 +00:00
Davide Italiano 8a5d04396d [Bugpoint] Use clang by default.
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
2015-10-14 19:48:01 +00:00
Chen Li 567aa7ab30 [LoopUnswitch] Correct misleading comments.
Reviewers: reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13738

llvm-svn: 250317
2015-10-14 19:47:43 +00:00
Eric Fiselier 3cf3cfc4c5 Fix LIBCXXABI_HAS_NO_THREADS configuration.
llvm-svn: 250316
2015-10-14 19:21:38 +00:00
Rui Ueyama 4fcadaf5e7 ELF2: Merge .{text,rodata,data,bss}.* sections.
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
2015-10-14 19:21:25 +00:00
Arch D. Robison a7f8f25264 Add 'other' in description of extractvalue operands.
llvm-svn: 250314
2015-10-14 19:10:45 +00:00
Eric Fiselier 035ddc2046 Configure for config site header
llvm-svn: 250313
2015-10-14 19:01:47 +00:00
Eric Fiselier f71de32d7b Split out config_site logic so libc++abi can use it
llvm-svn: 250312
2015-10-14 19:00:35 +00:00
Rafael Espindola cc6ebb8e69 Handle dynamic relocs to weak undefined when possible.
llvm-svn: 250311
2015-10-14 18:42:16 +00:00
Diego Novillo 33452761bb Sample profiles - Update text profile documentation.
There's been some changes to the text encoding for sample profiles. This
updates the documentation and an example.

llvm-svn: 250310
2015-10-14 18:37:39 +00:00
Diego Novillo bb5605ca3a Sample profiles - Add documentation for binary profile encoding. NFC.
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
2015-10-14 18:36:30 +00:00
Eric Fiselier 0a534eec65 [libcxx] Use __config_site to configure the test suite features.
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
2015-10-14 18:22:15 +00:00
Eric Fiselier 453da19d2d Add config.project_obj_root to the libc++abi testsuite
llvm-svn: 250307
2015-10-14 18:20:48 +00:00
Zachary Turner 079fe48a1d Fix Python initialization for Python 3.
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
2015-10-14 17:51:29 +00:00
Artyom Skrobov 4bca0bb010 A doccomment for CombineTo, and some NFC refactorings
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
2015-10-14 17:18:35 +00:00
Zachary Turner 87f4772985 Minor cleanup on PythonDataObject constructors.
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
2015-10-14 16:59:44 +00:00
Zachary Turner 60c24f70fe Change swig interface files to use PythonDataObjects.
llvm-svn: 250303
2015-10-14 16:59:32 +00:00
Artyom Skrobov a5b9ad22b3 Merge DAGCombiner::visitSREM and DAGCombiner::visitUREM (NFC)
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
2015-10-14 16:54:14 +00:00
Hans Wennborg 4ca00afd7c Intrin.h: implement __emul and __emulu
llvm-svn: 250301
2015-10-14 16:24:28 +00:00
Rafael Espindola 227556e1c7 Add support for a R_X86_64_32 referring to a plt.
This can show up with a non-PIC .o being linked into an executable that uses
shared libraries.

llvm-svn: 250300
2015-10-14 16:15:46 +00:00
Todd Fiala d6f840609b cmake: provide flag that enables 'log enable --stack' to provide useful 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
2015-10-14 14:52:15 +00:00
Filipe Cabecinhas 2432ff59d3 Tweak a -g related test for the PS4
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
2015-10-14 14:45:36 +00:00
Simon Atanasyan 9c2d788dda [ELF2][mips] Support both big and little endian MIPS 32-bit targets
- 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
2015-10-14 14:24:46 +00:00
Rui Ueyama 5f551aee02 ELF2: Remove getAddrSize().
llvm-svn: 250296
2015-10-14 14:02:06 +00:00
Pavel Labath 3bf1125619 lldb-server: add support for binary memory reads
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
2015-10-14 12:59:37 +00:00
Filipe Cabecinhas c888e190ba Bring back r250262: PS4 toolchain
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
2015-10-14 12:25:43 +00:00
Igor Kudrin bd716ab08c [llvm-readobj/ELF] fix: add correct test inputs
llvm-svn: 250292
2015-10-14 12:21:30 +00:00
Igor Kudrin 496fb2f040 [llvm-readobj/ELF] Print GNU Hash section
Add a new command line switch, -gnu-hash-table, to print the content of that section.

Differential Revision: http://reviews.llvm.org/D13696

llvm-svn: 250291
2015-10-14 12:11:50 +00:00
Pavel Labath dee8834570 Revert "RenderScript command for printing allocation contents"
This commit breaks TestDataFormatterSmartArray on all buildbots.

llvm-svn: 250290
2015-10-14 11:50:37 +00:00
Tamas Berghammer 3fe5ce0b3e Change ConstString to support massive multi-threaded access
Previously ConstString had a single mutex guarding the global string
pool for each access what become a bottleneck when using it with a
large number of threads.

This CL distributes the strings to 256 individual string pools based on
a simple hash function to eliminate the bottleneck and speed up the
multi-thread access.

The goal of the change is to prepare to multi-threaded symbol parsing code
to speed up the symbol parsing speed.

Differential revision: http://reviews.llvm.org/D13652

llvm-svn: 250289
2015-10-14 10:38:22 +00:00
Angel Garcia Gomez 9eb6e2e3cb Use __SIZE_TYPE__ to fix buildbot failures.
Summary: Use __SIZE_TYPE__ to fix buildbot failures.

Reviewers: klimek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D13720

llvm-svn: 250288
2015-10-14 10:30:32 +00:00
Tamas Berghammer 2b8c98100a Fix warning in CommandObjectMemory
llvm-svn: 250287
2015-10-14 10:29:36 +00:00
Tamas Berghammer 75cb3c5077 Make use of lldv::Triple::isAndroid
It is a new function added to the llvm::Triple class to simplify the
checking if we are targeting android to clean up the confusion between
android being an OS or an environment.

llvm-svn: 250286
2015-10-14 10:29:17 +00:00
Andrea Di Biagio c47edbef4c [x86][FastISel] Teach how to select nontemporal stores.
This patch teaches x86 fast-isel how to select nontemporal stores.

On x86, we can use MOVNTI for nontemporal stores of doublewords/quadwords.
Instructions (V)MOVNTPS/PD/DQ can be used for SSE2/AVX aligned nontemporal
vector stores.

Before this patch, fast-isel always selected 'movd/movq' instead of 'movnti'
for doubleword/quadword nontemporal stores. In the case of nontemporal stores
of aligned vectors, fast-isel always selected movaps/movapd/movdqa instead of
movntps/movntpd/movntdq.

With this patch, if we use SSE2/AVX intrinsics for nontemporal stores we now
always get the expected (V)MOVNT instructions.
The lack of fast-isel support for nontemporal stores was spotted when analyzing
the -O0 codegen for nontemporal stores.

Differential Revision: http://reviews.llvm.org/D13698

llvm-svn: 250285
2015-10-14 10:03:13 +00:00
Angel Garcia Gomez 2df36481b6 Prevent modernize-use-auto from emitting a warning when 'auto' was already being used.
Summary: This fixes https://llvm.org/bugs/show_bug.cgi?id=25082 .

Reviewers: bkramer, klimek

Subscribers: cfe-commits, alexfh

Differential Revision: http://reviews.llvm.org/D13504

llvm-svn: 250284
2015-10-14 09:29:55 +00:00
Angel Garcia Gomez baf573eb4c Support every kind of initialization.
Summary: modernize-make-unique now correctly supports the different kinds of list initialization.

Reviewers: klimek

Subscribers: cfe-commits, alexfh

Differential Revision: http://reviews.llvm.org/D13590

llvm-svn: 250283
2015-10-14 09:22:32 +00:00
Pavel Labath cb57fdd98d Fix compiler warnings in ScriptInterpreterPython
llvm-svn: 250282
2015-10-14 09:18:23 +00:00
Ewan Crawford 838e7bbf1f RenderScript command for printing allocation contents
This patch adds the command 'language renderscript allocation dump <ID>' for printing the contents of a RS allocation.
Displaying the coordinate of each element as well as its formatted value

e.g (lldb) language renderscript allocation dump 1
      Data (X, Y, Z):
     (0, 0, 0) = {0 1}
     (1, 0, 0) = {2 3}
     (2, 0, 0) = {4 5}

A --file <filename> option is also included, since for large allocations it may be more helpful to view this text as a file.

Reviewed by: jingham, clayborg
Subscribers: lldb-commits, ADodds, domipheus, brucem
Differential Revision: http://reviews.llvm.org/D13699

llvm-svn: 250281
2015-10-14 09:02:20 +00:00
Pavel Labath 6934ef31e8 Mark TestBatchMode as flaky on linux
llvm-svn: 250280
2015-10-14 08:57:55 +00:00