Commit Graph

193737 Commits

Author SHA1 Message Date
Andrea Di Biagio e7b58ee555 [X86][FastIsel] Teach how to select scalar integer to float/double conversions.
This patch teaches fast-isel how to select a (V)CVTSI2SSrr for an integer to 
float conversion, and how to select a (V)CVTSI2SDrr for an integer to double
conversion.

Added test 'fast-isel-int-float-conversion.ll'.

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

llvm-svn: 229589
2015-02-17 23:40:58 +00:00
Oleksiy Vyalov 891f88c1ac Fix TestAttachDenied.py remote execution on Linux.
http://reviews.llvm.org/D7659

llvm-svn: 229587
2015-02-17 23:37:19 +00:00
Rafael Espindola df19519800 Add r228939 back with a fix.
The problem in the original patch was not switching back to .text after printing
an eh table.

Original message:

On ELF, put PIC jump tables in a non executable section.

Fixes PR22558.

llvm-svn: 229586
2015-02-17 23:34:51 +00:00
Matthias Braun c0a2279099 Revert "Remove support for building sanitizers from Makefile/autoconf build."
This reverts commit r229556.

Reverting this for now as internal apple builds rely on this
functionality.

llvm-svn: 229585
2015-02-17 23:30:51 +00:00
Filipe Cabecinhas 0c098bfdfd We require MSVC 2013 Update 4 due to previous versions miscompiling ASTMatchers
Previous versions of MSVC 2013 would miscompile ASTMatchers (and/or their
tests). Bump up the requirement and make sure we know about the minor
revision.

Minimum required version found by Michael Edwards!

llvm-svn: 229584
2015-02-17 23:29:00 +00:00
Reid Kleckner 469b6bce61 clang-cl: Map /wd4996 to -Wno-deprecated-declarations
This is typically used to suppress warnings about calling snprintf and
other "deprecated" POSIX functions. Accepting this flag helps avoid tons
of useless warnings when trying out clang-cl on a new project.

Patch by Scott Graham!

llvm-svn: 229583
2015-02-17 23:28:19 +00:00
Matthias Braun 44bf1c9c53 Revert "Remove support for building sanitizers from Makefile/autoconf build."
This reverts commit r229554.

Reverting this commit for now as several apple internal builds still
rely on this functionality.

llvm-svn: 229582
2015-02-17 23:27:37 +00:00
Alexey Samsonov e194dfa6be [TSan] Provide default values for compile definitions.
Provide defaults for TSAN_COLLECT_STATS and TSAN_NO_HISTORY.
Replace #ifdef directives with #if. This fixes a bug introduced
in r229112, where building TSan runtime with -DTSAN_COLLECT_STATS=0
would still enable stats collection and reporting.

llvm-svn: 229581
2015-02-17 23:23:10 +00:00
Rafael Espindola 8c77768609 Add a test showing the problem in r228939.
If an EH table is printed in between the function and the jump table we would
fail to switch back to the text section to print the jump table.

llvm-svn: 229580
2015-02-17 23:21:46 +00:00
Duncan P. N. Exon Smith 6873feaa2c IR: Add missing clone() overloads
Add missing specialized node overloads for `MDNode::clone()` (they were
on most of the node types already, but missing from the others).
`MDNode::clone()` returns `TempMDNode` (`std::unique_ptr<MDNode,...>`),
while `TempMDSubrange::clone()` (for example) returns the more
convenient `TempMDSubrange` (`std::unique_ptr<TempMDSubrange,...>`).

llvm-svn: 229579
2015-02-17 23:10:13 +00:00
Oleksiy Vyalov 09daa881ea Make PlatformPOSIX::KillProcess to delegate to a remote platform if connected.
http://reviews.llvm.org/D7660

llvm-svn: 229577
2015-02-17 22:57:56 +00:00
Reid Kleckner 5177a81e25 clang-cl: Disable frame pointer elimination at -O0
This wasn't kicking in because the _SLASH_O flag didn't match our check
for OPT_O0. Add an alias that does to keep the logic simple.

llvm-svn: 229575
2015-02-17 22:40:42 +00:00
Sanjay Patel e951a3839a rename variables again because these tables also deal with stores; NFC
Suggestion by Simon Pilgrim

llvm-svn: 229574
2015-02-17 22:38:06 +00:00
Duncan P. N. Exon Smith a55dcaf427 IR: fieldIsMDNode() should be false for MDString
Simplify the code.  It has been a while since the schema has been so
"flexible".

llvm-svn: 229573
2015-02-17 22:34:15 +00:00
Duncan P. N. Exon Smith 57bab0bc97 AsmPrinter: Take range in DwarfExpression::AddExpression(), NFC
Previously `DwarfExpression::AddExpression()` relied on
default-constructing the end iterators for `DIExpression` -- once the
operands are represented explicitly via `MDExpression` (instead of via
the strange `StringRef` navigator in `DIHeaderIterator`) this won't
work.  Explicitly take an iterator for the end of the range.

llvm-svn: 229572
2015-02-17 22:30:56 +00:00
Simon Pilgrim 1d89a02abb [X86][SSE] Generalised unpckl/unpckh shuffle matching
Added commuted unpckl/unpckh shuffle matching patterns as many cases containing undefined lanes fail to commute by themselves.

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

llvm-svn: 229571
2015-02-17 22:24:32 +00:00
Reid Kleckner c12cc5eba8 WinASan: Fix escaping in dll_host.cc test to work with internal shell
llvm-svn: 229570
2015-02-17 22:22:20 +00:00
Zachary Turner aeda626d80 [CMake] Create a custom target for generating extension module.
Previously we would create the extension module as a post-build
step of creating liblldb.  As part of this process, we created
symlinks and did other stuff.

This had several longstanding issues related to target
dependencies, such as not re-creating the symlink if liblldb.dll
failed to link, or if the build was Ctrl+C'ed from.

Then, the script that creates the symlinks began to grow to
include other things, such as argdumper, and it would try to
create symlinks before it had finished building the targets it
needed to symlink to.

This patches addresses all of these problems by creating an
explicit target for the script to run, and making it have a
dependency on all the targets it needs to create symlinks from/to.

llvm-svn: 229569
2015-02-17 22:20:29 +00:00
Zachary Turner 7513e82075 Remove the CMake duplication for liblldb.
Previously the CMake had a lot of duplication for the public API
due to some differences regarding how we link on Windows.  This
fixes the issue, so making changes to the public API should be
much easier now.

llvm-svn: 229568
2015-02-17 22:20:20 +00:00
Sanjay Patel 1a20fdf36f Add comment to explain a non-obvious setting; NFC.
This is paraphrased from Simon Pilgrim's comment in:
http://reviews.llvm.org/D7492

llvm-svn: 229566
2015-02-17 22:09:54 +00:00
Sanjay Patel 5562c554f0 use a triple instead of a cpu; less builbot sadness
llvm-svn: 229563
2015-02-17 21:59:54 +00:00
Reid Kleckner 6fec509ac7 Silence an MSVC warning about testing a function for truth without calling it
In general, this is a reasonable warning, except real_pthread_create is
weak and can be null.  The existing usage is correct as it the function
is declared with SANITIZER_WEAK, but MSVC can't know that because it is
defined to nothing on Windows.

llvm-svn: 229562
2015-02-17 21:57:42 +00:00
Reid Kleckner 7885776604 Use lit's internal shell when running tests on Windows
The internal shell is faster and more predictable than any copy of
bash.exe on the user's system.

LLVM and Clang use the internal shell by default, and have an
environment variable to disable it. I don't think compiler-rt needs that
complexity, so I left it out.

llvm-svn: 229560
2015-02-17 21:57:10 +00:00
Sanjay Patel 203ee500e9 remove function names from comments; NFC
llvm-svn: 229558
2015-02-17 21:55:20 +00:00
Benjamin Kramer 57dddd4840 Sema: Replace some push_backs of expensive to move objects with emplace_back.
NFC.

llvm-svn: 229557
2015-02-17 21:55:18 +00:00
Alexey Samsonov d907016dd0 Remove support for building sanitizers from Makefile/autoconf build.
They autotools build has a number of missing features, supports less
OS, architectures, build configurations, doesn't have any tests and
is hard to support in sync with CMake build.

llvm-svn: 229556
2015-02-17 21:53:45 +00:00
Alexey Samsonov 883a04ade7 Remove support for building sanitizers from Makefile/autoconf build.
They autotools build has a number of missing features, supports less
OS, architectures, build configurations, doesn't have any tests and
is hard to support in sync with CMake build.

llvm-svn: 229554
2015-02-17 21:53:22 +00:00
Gabor Horvath 21b76badeb [clang-tidy] Fixed two wrong fix-it cases in misc-inefficient-algorithm checker.
llvm-svn: 229552
2015-02-17 21:45:38 +00:00
Meador Inge 8dfa40b84b Revert r229543.
Reverting this while build bot failures are investigated.

llvm-svn: 229550
2015-02-17 21:42:45 +00:00
Sanjay Patel 52f9f7c0f3 replace meaningless variable names; NFCI
llvm-svn: 229549
2015-02-17 21:37:28 +00:00
Kevin Enderby 578fe5a303 Add code to llvm-objdump so the -section option with -macho will dump literal pointer sections
with the Mach-O S_LITERAL_POINTERS section type.

Also fix the printing of the leading addresses for literal sections to be consistent and
not print the 0x prefix.  Updated test cases to match.

llvm-svn: 229548
2015-02-17 21:35:48 +00:00
Justin Bogner 9f61520d40 Re-apply "InstrProf: Use a test fixture in the coverage mapping tests"
This time we use a helper to format the assertion so we can just use
ASSERT_TRUE instead of relying on ASSERT_EQ being able to deal with
conversions between enum types.

This reverts r229496, re-applying r229473.

llvm-svn: 229547
2015-02-17 21:33:43 +00:00
Meador Inge 006e0e6531 Sema: Allow 'constexpr' variables in range loops
This fixes PR22492, which is in response to CWG issue #1204.
Per the CWG issue 'contexpr' variables are now allowed in
for range loops.

llvm-svn: 229543
2015-02-17 21:02:56 +00:00
Rafael Espindola 928e9ae89c Add testcases I missed in r229541.
llvm-svn: 229542
2015-02-17 20:50:39 +00:00
Rafael Espindola 68fa249cb5 Add r228980 back.
Add support for having multiple sections with the same name and comdat.

Using this in combination with -ffunction-sections allows LLVM to output a .o
file with mulitple sections named .text. This saves space by avoiding long
unique names of the form .text.<C++ mangled name>.

llvm-svn: 229541
2015-02-17 20:48:01 +00:00
John Thompson 3dcb3934c6 Add canonical path conversion function and use it so paths are consistent.
llvm-svn: 229540
2015-02-17 20:43:47 +00:00
Rafael Espindola 7fe7e05379 Add r228889 back.
Original message:
Invert the section relocation map.

It now points from rel section to section. Use it to set sh_info, avoiding
a brittle name lookup.

llvm-svn: 229539
2015-02-17 20:40:59 +00:00
Rafael Espindola 3a7c0eb32e Add r228888 back.
Original message:

Use the existing SymbolTableIndex instead of doing a lookup. NFC.

llvm-svn: 229538
2015-02-17 20:37:50 +00:00
Rafael Espindola ead8549cab Add r228886 back now that r229530 fixed the issue lldb was hitting.
Original message:

Create the Seciton -> Rel Section map when it is first needed. NFC.

Saves a walk over every section.

llvm-svn: 229536
2015-02-17 20:31:13 +00:00
Sanjay Patel 716fef68c7 make basic block label matching more flexible for less sad buildbots
llvm-svn: 229535
2015-02-17 20:29:31 +00:00
Tom Stellard 7b3aa88ac1 R600/SI: Fix asam errors in SIFoldOperands
We were trying to fold into implicit uses, which led to out of bounds
access of the MCInstrDesc::OpInfo arrray.

llvm-svn: 229533
2015-02-17 20:11:54 +00:00
Nico Weber f91435e16d Remove a recovery attempt that was untested and crashed when used.
Found by SLi's bot.

llvm-svn: 229532
2015-02-17 20:09:39 +00:00
Sanjay Patel b811c1d6a5 prevent folding a scalar FP load into a packed logical FP instruction (PR22371)
Change the memory operands in sse12_fp_packed_scalar_logical_alias from scalars to vectors. 
That's what the hardware packed logical FP instructions define: 128-bit memory operands.
There are no scalar versions of these instructions...because this is x86.

Generating the wrong code (folding a scalar load into a 128-bit load) is still possible
using the peephole optimization pass and the load folding tables. We won't completely
solve this bug until we either fix the lowering in fabs/fneg/fcopysign and any other
places where scalar FP logic is created or fix the load folding in foldMemoryOperandImpl()
to make sure it isn't changing the size of the load.

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

llvm-svn: 229531
2015-02-17 20:08:21 +00:00
Rafael Espindola 127b6c3ba7 Don't deference the section_end() iterator.
Hard to test given the undefined behavior nature.

llvm-svn: 229530
2015-02-17 20:07:28 +00:00
Reid Kleckner 9d6eb573d7 Expose LLVM_VERSION_PATCH in llvm-config.h
There was no reason to keep this private in config.h, and users
requested that it be available in PR22615.

Also fix a bug where patch versions of '0' would cause the macro to
remain undefined. The "#cmakedefine" command only creates a macro if the
named variable would be considered true in the context of an if().

llvm-svn: 229529
2015-02-17 20:02:34 +00:00
Eric Christopher a49d68e078 Make the ARM AsmPrinter independent of global subtarget
initialization. Initialize the subtarget once per function and
migrate Emit{Start|End}OfAsmFile to either use attributes on the
TargetMachine or get information from the subtarget we'd use
for assembling. One bit (getISAEncoding) touched the general
AsmPrinter and the debug output. Handle this one by passing
the function for the subprogram down and updating all callers
and users.

The top-level-ness of the ARM attribute output for assembly is,
by nature, contrary to how we'd want to do this for an LTO
situation where we have multiple cpu architectures so this
solution is good enough for now.

llvm-svn: 229528
2015-02-17 20:02:32 +00:00
Eric Christopher ffc5ff32d1 80-column fixups.
llvm-svn: 229527
2015-02-17 20:02:28 +00:00
Eric Christopher 718f6f53bc Remove the ABI from the target features. It's obsoleted by
the -target-abi use and those features don't exist anymore.

llvm-svn: 229526
2015-02-17 19:51:15 +00:00
Colin LeMahieu 3c56f47f68 [MC] Constifying MCInst::size()
llvm-svn: 229524
2015-02-17 19:46:23 +00:00
Zachary Turner 7a234a5bbc Add LLDB_API to all of the public API class definitions.
You cannot export a class from a DLL without this on
Windows, so it was causing lldb-mi to fail to link
after recent changes.

Please make sure to include this at the start of every
public type in the future.

llvm-svn: 229523
2015-02-17 19:36:25 +00:00