Commit Graph

207833 Commits

Author SHA1 Message Date
Alex Lorenz 6866104073 MIR Parser: Don't allow negative alignments for memory operands.
llvm-svn: 244953
2015-08-13 20:55:01 +00:00
Naomi Musgrave 0e7ac9ab2b Removed xfail, since test is passing in line with expanded dtor sanitizing functionality
Summary: Fixed test in response to buildbot failures from last night.

Reviewers: eugenis, kcc

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

llvm-svn: 244952
2015-08-13 20:54:05 +00:00
Zachary Turner ba2ab8e92b Disable lldb-mi tests on Windows.
Most were already XFAIL'ed, but the reason for the XFAIL is that
we don't have a suitable pexpect implementation on Windows.  This
isn't going to change unintentionally, so there is no reason to
XFAIL them as opposed to just skip them.

llvm.org/pr22274 tracks finding a suitable pexpect module for
Windows, which should fix many of these issues.  llvm.org/pr24452
tracks the larger issue of making the entire lldb-mi test suite
work on Windows, of which finding a pexpect module is just one
component.

llvm-svn: 244951
2015-08-13 20:50:17 +00:00
Zachary Turner 3b8446712e XFAIL Watchpoint tests on Windows.
https://llvm.org/pr24446 tracks getting these tests re-enabled.

llvm-svn: 244950
2015-08-13 20:49:43 +00:00
Simon Pilgrim 4a8d6b3b9e [X86][SSE] Use the general SMAX/SMIN/UMAX/UMIN pattern matching and remove the X86 implementation
Follow up to D10947 - D9746 added general SMAX/SMIN/UMAX/UMIN pattern matching to SelectionDAGBuilder::visitSelect.

This patch removes the X86 implementation and improves the AVX1/AVX2 support to correctly lower 256-bit integer vectors.

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

llvm-svn: 244949
2015-08-13 20:45:55 +00:00
Chris Bieneman 361231ecd5 [CMake] Add experimental support for building compiler-rt for iOS
Summary:
This is a reunification of three separate reviews D11073, D11082, D11083.

Having them separate was not constructive even though the patches were smaller because it led to fragmented conversations, and this is really all about one change.

This patch incorporates feedback from samsonov, and refactors the hacky darwin code out of the root CMakeLists.txt and int config-ix.cmake.

Reviewers: zaks.anna, bogner, kubabrecka, chandlerc, samsonov

Subscribers: jevinskie, filcab, llvm-commits

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

llvm-svn: 244948
2015-08-13 20:38:16 +00:00
Davide Italiano a195386ca1 [SimplifyLibCalls] Correctly set the is_zero_undef flag for llvm.cttz
If <src> is non-zero we can safely set the flag to true, and this
results in less code generated for, e.g. ffs(x) + 1 on FreeBSD.
Thanks to majnemer for suggesting the fix and reviewing.

Code generated before the patch was applied:


 0:   0f bc c7                bsf    %edi,%eax
 3:   b9 20 00 00 00          mov    $0x20,%ecx
 8:   0f 45 c8                cmovne %eax,%ecx
 b:   83 c1 02                add    $0x2,%ecx
 e:   b8 01 00 00 00          mov    $0x1,%eax
13:   85 ff                   test   %edi,%edi
15:   0f 45 c1                cmovne %ecx,%eax
18:   c3                      retq

Code generated after the patch was applied:

 0:   0f bc cf                bsf    %edi,%ecx
 3:   83 c1 02                add    $0x2,%ecx
 6:   85 ff                   test   %edi,%edi
 8:   b8 01 00 00 00          mov    $0x1,%eax
 d:   0f 45 c1                cmovne %ecx,%eax
10:   c3                      retq

It seems we can still use cmove and save another 'test' instruction, but
that can be tackled separately.

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

llvm-svn: 244947
2015-08-13 20:34:26 +00:00
Alexey Samsonov ff1ca4af4b [UBSan] Enable 'help' option output, report unrecognized flags
Summary:
Let UBSan output flag description if 'help' options is provided.
Report unrecognized flags if verbosity mode is turned on.

Patch by Svetlana Ryabkova!

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

llvm-svn: 244946
2015-08-13 20:34:00 +00:00
Alex Lorenz 620f89145b MIR Parser: Extract the code that parses the alignment into a new method. NFC.
This commit extracts the code that parses the memory operand's alignment into
a new method named 'parseAlignment' so that it can be reused when parsing the
basic block's alignment attribute.

llvm-svn: 244945
2015-08-13 20:33:33 +00:00
Simon Pilgrim 829091e310 [X86][SSE] Tests for SMAX/SMIN/UMAX/UMIN vector instructions
llvm-svn: 244944
2015-08-13 20:31:03 +00:00
Alex Lorenz 9b62cf6143 MIR Parser: Rename the method 'diagFromLLVMAssemblyDiag'. NFC.
This commit renames the method 'diagFromLLVMAssemblyDiag' to
'diagFromBlockStringDiag'. This method will be used when converting diagnostics
from other YAML block strings, and not just the LLVM module block string, so
the new name should reflect that.

llvm-svn: 244943
2015-08-13 20:30:11 +00:00
Rafael Espindola 2db634d8f1 Correctly align output sections.
They don't need to be aligned to page boundaries. Only segments need that.

llvm-svn: 244942
2015-08-13 20:24:18 +00:00
Rafael Espindola 0160a281c2 Record the alignment of the output sections.
llvm-svn: 244941
2015-08-13 20:13:39 +00:00
Reid Kleckner afbb1a9523 Add more error logging to win/asan
llvm-svn: 244940
2015-08-13 20:10:54 +00:00
Rafael Espindola 5d83ccd55b Make getSectionName non virtual. NFC.
llvm-svn: 244939
2015-08-13 19:18:30 +00:00
Rafael Espindola ea133eaa39 Delete dead code.
llvm-svn: 244938
2015-08-13 19:00:23 +00:00
Jingyue Wu 13a80eaceb [SeparateConstOffsetFromGEP] strengthen the inbounds attribute
We used to be over-conservative about preserving inbounds. Actually, the second
GEP (which applies the constant offset) can inherit the inbounds attribute of
the original GEP, because the resultant pointer is equivalent to that of the
original GEP. For example,

  x  = GEP inbounds a, i+5
    =>
  y = GEP a, i               // inbounds removed
  x = GEP inbounds y, 5      // inbounds preserved

llvm-svn: 244937
2015-08-13 18:48:49 +00:00
Yaron Keren 65270736c7 Remove more uses of raw_svector_ostream::flush() call following r244928.
llvm-svn: 244936
2015-08-13 18:48:44 +00:00
Yaron Keren baf355bc5a Remove raw_svector_ostream::flush() call following r244928.
llvm-svn: 244935
2015-08-13 18:42:29 +00:00
Rafael Espindola a175eb6ca6 Template OutputSection only over Is64Bit.
This is a bit more c++ code, but:
* It is less machine code: lld's text is 44688 bytes smaller.
* It should be a bit more efficient in the non native endian case.
* It should be a bit more efficient on architectures with slow unaligned access.

llvm-svn: 244934
2015-08-13 18:37:23 +00:00
Naomi Musgrave e50cb9b9c8 Fix previous commit: poison only class members, simpler tests
Summary: Poisoning applied to only class members, and before dtors for base class invoked

Implement poisoning of only class members in dtor, as opposed to also
poisoning fields inherited from base classes. Members are poisoned
only once, by the last dtor for a class. Skip poisoning if class has
no fields.
Verify emitted code for derived class with virtual destructor sanitizes
its members only once.
Removed patch file containing extraneous changes.

Reviewers: eugenis, kcc

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


Simplified test cases for use-after-dtor

Summary: Simplified test cases to focus on one feature at time.
Tests updated to align with new emission order for sanitizing
callback.

Reviewers: eugenis, kcc

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

llvm-svn: 244933
2015-08-13 18:35:11 +00:00
David Majnemer d7fafa0ffc [llvm-cxxdump] Correctly process relocations when given multiple files
Archive files wouldn't lead to us reprocessing the section relocations
for the new object files.

llvm-svn: 244932
2015-08-13 18:31:43 +00:00
Richard Smith be9b6c75c3 [modules] For explicit module file dependencies, only list direct dependency module files.
llvm-svn: 244931
2015-08-13 18:30:25 +00:00
Rafael Espindola 184d94e009 Define trivial methods inline. NFC.
llvm-svn: 244930
2015-08-13 18:25:47 +00:00
Rafael Espindola 64e888ba5f Set the file offset of zero sized sections.
There is no reason not to do it and this matches what gold and bfd ld do.

llvm-svn: 244929
2015-08-13 18:23:43 +00:00
Yaron Keren 556b21aa10 Remove and forbid raw_svector_ostream::flush() calls.
After r244870 flush() will only compare two null pointers and return,
doing nothing but wasting run time. The call is not required any more
as the stream and its SmallString are always in sync.

Thanks to David Blaikie for reviewing.

llvm-svn: 244928
2015-08-13 18:12:56 +00:00
Richard Smith 1dbb95151b Fix wrong expected test output in r244923.
llvm-svn: 244927
2015-08-13 18:11:20 +00:00
Reid Kleckner 90fd1db21b Try to fix the build after r244923
llvm-svn: 244926
2015-08-13 18:10:34 +00:00
Reid Kleckner 7ec8ba44b5 Try to fix new.cpp after r244920 to make it pass
llvm-svn: 244925
2015-08-13 18:10:32 +00:00
Nick Lewycky e2f6fb5d0a Fix GCC warning: extra `;' [-Wpedantic].
llvm-svn: 244924
2015-08-13 18:10:19 +00:00
Richard Smith 216a3bd70d [modules] Change the way we deal with .d output for explicitly-specified module
files: include the .pcm file itself in the .d output, rather than including its
own input files. Other forms of module file continue to be transparent for .d
output.

Arguably, the input files for the .pcm file are still inputs to the
compilation, but that's unnecessary for make-like build systems (where the
mtime of the .pcm file is sufficient) and harmful for smarter build systems
that know about module files and want to track only the local dependencies.

llvm-svn: 244923
2015-08-13 17:57:10 +00:00
Reid Kleckner 6cf4a6ba9b Turn off __has_feature(cxx_rtti) when -fno-rtti-data is present
-fno-rtti-data makes it so that vtables emitted in the current TU lack
RTTI data. This means that dynamic_cast usually fails at runtime. Users
of the existing cxx_rtti feature expect all of RTTI to work, not just
some of it.

Chromium bug for context: http://crbug.com/518191

llvm-svn: 244922
2015-08-13 17:56:49 +00:00
Nemanja Ivanovic 1c39ca6501 Scalar to vector conversions using direct moves
This patch corresponds to review:
http://reviews.llvm.org/D11471

It improves the code generated for converting a scalar to a vector value. With
direct moves from GPRs to VSRs, we no longer require expensive stack operations
for this. Subsequent patches will handle the reverse case and more general
operations between vectors and their scalar elements.

llvm-svn: 244921
2015-08-13 17:40:44 +00:00
Igor Laevsky 30143aee11 Emit argmemonly attribute for intrinsics.
Differential Revision: http://reviews.llvm.org/D11352

llvm-svn: 244920
2015-08-13 17:40:04 +00:00
Rafael Espindola 29e8d343e4 Rename addSectionChunk to addChunk now that it can handle any Chunk.
llvm-svn: 244919
2015-08-13 17:35:13 +00:00
Rafael Espindola 375a508234 Pass the type and flags to the OutputSection constructor. NFC.
This will allow further cleanups.

llvm-svn: 244918
2015-08-13 17:32:30 +00:00
Ben Langmuir 41f81994fe Attempt to fix build after r244912
Some compilers were less happy about converting a lambda to a comparator
function for array_pod_sort.

llvm-svn: 244917
2015-08-13 17:30:07 +00:00
James Molloy 31117875c2 [ARM] FMINNAN/FMAXNAN of f64 are not legal.
This was my error. We've got f32 marked as legal because they're simulated using a v2f32 instruction, but there's no equivalent for f64.

This will get test coverage imminently when D12015 lands.

llvm-svn: 244916
2015-08-13 17:28:26 +00:00
James Molloy c71f78f49f [ARM] Allow vmin/vmax of scalars to be emitted without UseNEONForFP.
This overrides the default to more closely resemble the hand-crafted matching logic in ISelLowering. It makes sense, as there is no VFP equivalent of vmin or vmax, to use them when they're available even if in general VFP ops should be preferred.

This should be NFC.

llvm-svn: 244915
2015-08-13 17:28:20 +00:00
James Molloy 6f0a9d7e1b [ARM] Rejig vmax tests a bit
They rely on global fast-math options, but soon ISel will rely only on fast-math flags on the instructions themselves. Rip the fast checks out into their own file so we can mark their instructions as fast.

llvm-svn: 244914
2015-08-13 17:28:16 +00:00
James Molloy e7695bca0f [AArch64] Small rejig of fmax tests, NFCI.
These tests relied on -enable-no-nans-fp-math, whereas soon they'll take their no-nans hint
from the FCMP instruction itself, so split the no-nans stuff out into its own test.

Also do a slight rejig of instruction order. The old FMIN/MAX backend matching had to deal with looking through casts, which it never did particularly well. Now, instcombine will recognize such patterns and canonicalize the cast outside the select. So modify the test inputs to assume that instcombine has already run.

llvm-svn: 244913
2015-08-13 17:28:10 +00:00
Ben Langmuir 7ff29148ac [Modules] Add Darwin-specific compatibility module map parsing hacks
This preserves backwards compatibility for two hacks in the Darwin
system module map files:

1. The use of 'requires excluded' to make headers non-modular, which
should really be mapped to 'textual' now that we have this feature.

2. Silently removes a bogus cplusplus requirement from IOKit.avc.

Once we start diagnosing missing requirements and headers on
auto-imports these would have broken compatibility with existing Darwin
SDKs.

llvm-svn: 244912
2015-08-13 17:13:33 +00:00
Rafael Espindola a7471795ae Take name, type and flags in consideration when concatenating sections.
This is mandated by the ELF spec.

llvm-svn: 244911
2015-08-13 17:04:50 +00:00
Reid Kleckner e4fabc9a87 Same fix as r244908 for sanitizer_win.cc instead of asan_win.cc
I forgot to audit lib/sanitizer_common for the same issue.  This fixes
writing out coverage files on exit.

llvm-svn: 244910
2015-08-13 16:40:54 +00:00
Reid Kleckner dd7b4406d1 Fix installation of the unhandled exception filter with r244767
Apparently /Zc:inline causes static globals in custom sections to be
discarded if they are unreferenced.

llvm-svn: 244908
2015-08-13 16:37:28 +00:00
Tobias Grosser 7e584168ab Manuallt simplify test case
llvm-svn: 244907
2015-08-13 16:33:32 +00:00
Michael Kruse 5a8ddd74a5 Remove unimplemented private method getTempScop
llvm-svn: 244906
2015-08-13 16:28:04 +00:00
Rafael Espindola 674b5d570f Store the offset in the output section, no in the file.
That is the value that is stable as the we layout the output sections.

llvm-svn: 244904
2015-08-13 15:54:36 +00:00
Michael Kruse 2da3872a99 Add test case for SCEV synthesizing
CodeGenerator currently tries to generate code for a parameter using
values values that are computed later.

llvm-svn: 244903
2015-08-13 15:53:53 +00:00
Martell Malone 1bc12bbea6 Driver: Fix include directories when not using libgcc under mingw
Summary:
When we want to use mingw-w64 and clang with compiler-rt we should not
need to have libgcc installed. This fixes finding includes when libgcc
is not installed

Reviewers: yaron.keren

Subscribers: cfe-commits

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

llvm-svn: 244902
2015-08-13 15:41:04 +00:00