Commit Graph

240820 Commits

Author SHA1 Message Date
Pavel Labath b1c4b836b9 XFail new TestPyObjSynthProvider.py on linux until I can investigate the cause of the problem
llvm-svn: 280208
2016-08-31 08:43:40 +00:00
Pavel Labath b9739d4090 Revert r280137 and 280139 and subsequent build fixes
The rewrite of StringExtractor::GetHexMaxU32 changes functionality in a way which makes
lldb-server crash. The crash (assert) happens when parsing the "qRegisterInfo0" packet, because
the function tries to drop_front more bytes than the packet contains. It's not clear to me
whether we should consider this a bug in the caller or the callee, but it any case, it worked
before, so I am reverting this until we can figure out what the proper interface should be.

llvm-svn: 280207
2016-08-31 08:43:37 +00:00
George Rimar f21aade0d8 [ELF] - Introduce StripPolicy instead of Config->StripAll/StripDebug flags.
This approach is not only consistent with UnresolvedPolicy, 
but also should help to solve a problem 
of options with opposing meanings, mentioned in PR28843

Differential revision: https://reviews.llvm.org/D23869

llvm-svn: 280206
2016-08-31 08:38:11 +00:00
Eugene Leviant 20889c51b7 Allow adding start/end symbols to any section
Allows adding start and/or end symbols to special output sections,
like .eh_frame_hdr, which aren't lists of regular input sections. 

Differential revision: https://reviews.llvm.org/D23716

llvm-svn: 280205
2016-08-31 08:13:33 +00:00
Pavel Labath 1e3b086749 Revert r280200 and put it a proper fix
PeekChar returns a character, we want the whole string there.

llvm-svn: 280204
2016-08-31 07:49:37 +00:00
Eugene Leviant e4f590faeb Allow .eh_frame_hdr to be placed before .eh_frame
Differential revision: https://reviews.llvm.org/D24041

llvm-svn: 280203
2016-08-31 07:43:50 +00:00
Pavel Labath 30ff4b4851 Fix lldb build on Mac.
Summary:
e80f43fd78
greatly improved an API, but missed one more occurence of legacy usage.

This leads to:
  if (extractor.GetHexBytes(&payload_bytes[0], payload_bytes.size(), '\xdd') != payload_bytes.size())
                                ~~~~~~~~~~~~~~~~~~~~~                                          ^~~~~~
  /lldb/include/lldb/Utility/StringExtractor.h:151:5: note: 'GetHexBytes' declared here

Reviewers: zturner

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D24064
Author: Taras Tsugrii <ttsugrii@fb.com>

llvm-svn: 280202
2016-08-31 07:42:38 +00:00
Filipe Cabecinhas b16672d91d Reify ErrorDoubleFree
Summary: Keep reifying other errors.

Reviewers: kcc, samsonov

Subscribers: llvm-commits, kubabrecka

Differential Revision: https://reviews.llvm.org/D23717

llvm-svn: 280201
2016-08-31 07:38:09 +00:00
Sylvestre Ledru 2c07a069b8 Update the Linux code to reflect the changes done by zturner in r280139
llvm-svn: 280200
2016-08-31 07:16:56 +00:00
Igor Kudrin fc05ee344c [Coverage] Suppress creating a code region if the same area is covered by an expansion region.
In most cases these code regions are just redundant, but sometimes they
could be assigned to the counter of the parent code region instead of
the counter of the nested block.

Differential Revision: https://reviews.llvm.org/D23987

llvm-svn: 280199
2016-08-31 07:04:16 +00:00
Igor Kudrin f3c8a9cfbb [Coverage] Make sorting criteria for CounterMappingRegions local.
Move the comparison function into the only place there it is used,
i.e. the call to std::stable_sort in CoverageMappingWriter::write().

Add sorting by region kinds as it is required to ensure stable order
in our tests and to simplify D23987.

Differential Revision: https://reviews.llvm.org/D24034

llvm-svn: 280198
2016-08-31 07:01:17 +00:00
Craig Topper a815f488d5 [AVX-512] Implement masked floating point logical operations with native IR and remove the builtins.
llvm-svn: 280197
2016-08-31 05:38:58 +00:00
Craig Topper d0681d528d [X86] Use v2i64 vectors to implement _mm_and/andn/or/xor_pd.
These will be reused when removing some builtins from avx512vldqintrin.h and this will make the tests for that change show a better number of vector elements.

llvm-svn: 280196
2016-08-31 05:38:55 +00:00
Craig Topper 8f6827c945 [AVX-512] Add patterns to select masked logical operations if the select has a floating point type.
This is needed in order to replace the masked floating point logical op intrinsics with native IR.

llvm-svn: 280195
2016-08-31 05:37:52 +00:00
Craig Topper 0f8fb47637 [AVX-512] Add test cases for masked floating point logic operations with bitcasts between the logic ops and the select. We don't currently select masked operations for these cases.
Test cases taken from optimized clang output after trying to convert the masked floating point logical op intrinsics to native IR.

llvm-svn: 280194
2016-08-31 05:37:50 +00:00
Craig Topper de8b1a0012 [X86] Regenerate a test using update_llc_test_checks.py.
llvm-svn: 280193
2016-08-31 05:37:47 +00:00
Dean Michael Berris 047669f18c [XRay] Support multiple return instructions in a single basic block
Add a .mir test to catch this case, and fix the xray-instrumentation
pass to handle it appropriately.

llvm-svn: 280192
2016-08-31 05:20:08 +00:00
David Majnemer a90e51e106 [Loads] Properly populate the visited set in isDereferenceableAndAlignedPointer
There were paths where we wouldn't populate the visited set, causing us
to recurse forever if an SSA variable was defined in terms of itself.

This fixes PR30210.

llvm-svn: 280191
2016-08-31 03:22:32 +00:00
Richard Smith 54f18e8a85 PR12298 et al: don't recursively instantiate a template specialization from
within the instantiation of that same specialization. This could previously
happen for eagerly-instantiated function templates, variable templates,
exception specifications, default arguments, and a handful of other cases.

We still have an issue here for default template arguments that recursively
make use of themselves and likewise for substitution into the type of a
non-type template parameter, but in those cases we're producing a different
entity each time, so they should instead be caught by the instantiation depth
limit. However, currently we will typically run out of stack before we reach
it. :(

llvm-svn: 280190
2016-08-31 02:15:21 +00:00
Richard Trieu 5ed6fe739f Concatenate two FileCheck lines in a test.
'cc1' is a valid sequence of hexadecimal and sometimes can occur in the path
when testing.  This can lead to FileCheck matching the incorrect occurance
of the 'cc1' string and causing a test failure.  Join two adjacent flags
together into one check to prevent this.

llvm-svn: 280189
2016-08-31 01:57:12 +00:00
Hal Finkel 97a189c716 [PowerPC] Don't spill the frame pointer twice
When a function contains something, such as inline asm, which explicitly
clobbers the register used as the frame pointer, don't spill it twice. If we
need a frame pointer, it will be saved/restored in the prologue/epilogue code.
Explicitly spilling it again will reuse the same spill slot used by the
prologue/epilogue code, thus clobbering the saved value. The same applies
to the base-pointer or PIC-base register.

Partially fixes PR26856. Thanks to Ulrich for his analysis and the small
inline-asm reproducer.

llvm-svn: 280188
2016-08-31 00:52:03 +00:00
NAKAMURA Takumi 3766d106c8 clangTooling: Update libdeps: LLVMOptions, since r280118.
llvm-svn: 280187
2016-08-31 00:46:32 +00:00
NAKAMURA Takumi 6110c9aa02 clangTooling depends on ClangDriverOptions since r280118.
llvm-svn: 280186
2016-08-31 00:46:25 +00:00
Kostya Serebryany 4fd30769c1 [sanitizer] remove kBatchClassID that is not used any more; NFC
llvm-svn: 280185
2016-08-31 00:37:33 +00:00
Gor Nishanov 50d7fb974f [Coroutines] Part 10: Add coroutine promise support.
Summary:
1) CoroEarly now lowers llvm.coro.promise intrinsic that allows to obtain
a coroutine promise pointer from a coroutine frame and vice versa.

2) CoroFrame now interprets Promise argument of llvm.coro.begin to
place CoroutinPromise alloca at a deterministic offset from the coroutine frame.

Now, the coroutine promise example from docs\Coroutines.rst compiles and produces expected result (see test/Transform/Coroutines/ex4.ll).

Reviewers: majnemer

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23993

llvm-svn: 280184
2016-08-31 00:35:41 +00:00
Sanjay Patel 7d9ebaf337 [InstCombine] clean up InsertRangeTest; NFCI
It's much less code and easier to read if we don't duplicate
everything between the 'Inside' and not 'Inside' cases.

As noted with the FIXME, the goal is to make this vector-friendly
in a follow-up patch.

llvm-svn: 280183
2016-08-31 00:19:35 +00:00
Jason Henline ba65d4412e [StreamExecutor] Add Stream::blockHostUntilDone
Summary: Add the type-safe wrapper to the platform-specific implementation.

Reviewers: jlebar

Subscribers: jprice, parallel_libs-commits

Differential Revision: https://reviews.llvm.org/D24063

llvm-svn: 280182
2016-08-31 00:11:14 +00:00
Vedant Kumar 8938f92a5e [llvm-cov] Drop redundant "No." suffix in a column title
llvm-svn: 280181
2016-08-31 00:09:44 +00:00
Piotr Padlewski d57be707b8 [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix
Summary:
Bugfix for 27321. When the constructor of stored pointer
type is private then it is invalid to change it to
make_shared or make_unique.

Reviewers: alexfh, aaron.ballman, hokein

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D23343

llvm-svn: 280180
2016-08-31 00:06:55 +00:00
Alina Sbirlea 3f8f7840bf [LoadStoreVectorizer] Change VectorSet to Vector to match head and tail positions. Resolves PR29148.
Summary:
LSV was using two vector sets (heads and tails) to track pairs of adjiacent position to vectorize.
A recent optimization is trying to obtain the longest chain to vectorize and assumes the positions
in heads(H) and tails(T) match, which is not the case is there are multiple tails for the same head.

e.g.:
i1: store a[0]
i2: store a[1]
i3: store a[1]
Leads to:
H: i1
T: i2 i3
Instead of:
H: i1 i1
T: i2 i3
So the positions for instructions that follow i3 will have different indexes in H/T.
This patch resolves PR29148.

This issue also surfaced the fact that if the chain is too long, and TLI
returns a "not-fast" answer, the whole chain will be abandoned for
vectorization, even though a smaller one would be beneficial.
Added a testcase and FIXME for this.

Reviewers: tstellarAMD, arsenm, jlebar

Subscribers: mzolotukhin, wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D24057

llvm-svn: 280179
2016-08-30 23:53:59 +00:00
Richard Smith fdb32d566a Don't try to run a test that generates code for x86 if it's not a registered target.
llvm-svn: 280178
2016-08-30 23:53:34 +00:00
Jason Henline 90ce6e1e64 [StreamExecutor] Simplify Kernel classes
Summary:
Make the Kernel class follow the pattern of the other classes. It now
has a type-safe user wrapper and a typeless, platform-specific handle.

Reviewers: jlebar

Subscribers: jprice, parallel_libs-commits

Differential Revision: https://reviews.llvm.org/D24043

llvm-svn: 280176
2016-08-30 23:35:24 +00:00
Sanjay Patel ddb53dd080 [InstCombine] add tests to show type limitations of InsertRangeTest and callers
llvm-svn: 280175
2016-08-30 23:16:59 +00:00
Devin Coughlin 184996bbb4 [analyzer] Use lazily created buffer in EmptyLocalizationContextChecker
Fix a crash when relexing the underlying memory buffer to find incorrect
arguments to NSLocalizedString(). With precompiled headers, the raw
buffer may be NULL. Instead, use the source manager to get the buffer,
which will lazily create the buffer for precompiled headers.

rdar://problem/27429091

llvm-svn: 280174
2016-08-30 23:07:14 +00:00
Enrico Granata f6275a08ef Rename the test class
llvm-svn: 280173
2016-08-30 23:00:52 +00:00
Enrico Granata 42ff957e25 Add an helper class lldb.formatters.synth.PythonObjectSyntheticChildProvider
This class enables one to easily write a synthetic child provider by writing a class that returns pairs of names and primitive Python values - the base class then converts those into LLDB SBValues

Comes with a test case

llvm-svn: 280172
2016-08-30 23:00:02 +00:00
Saleem Abdulrasool d01704b149 Driver: use the canonical static library naming
On Windows, static libraries are named lib<name>.lib while import libraries are
named <name>.lib.  Use the appropriate naming on itanium and msvc environments.
This is setup properly so that if a dynamic builtins is used on Windows, it
would do the right thing, although this is not currently wired through the
driver (i.e. there is no equivalent to -{shared,static}-gcc).

llvm-svn: 280169
2016-08-30 22:10:27 +00:00
Reid Kleckner dbaa61cbe3 [codeview] Remove redundant TypeTable lookup
As written, the code should assert if this lookup would have ever
succeeded.  Without looking through composite types, the type graph
should be acyclic.

llvm-svn: 280168
2016-08-30 21:48:14 +00:00
Kevin Enderby 36865d6abf Add a test file, macho-invalid-dysymtab-extreloff-nextrel,
I forgot to do an svn add on.

llvm-svn: 280167
2016-08-30 21:48:06 +00:00
Enrico Granata b9bddc4c7f Teach ValueObject::ReadPointedString how to read char[] in host memory
llvm-svn: 280166
2016-08-30 21:33:47 +00:00
Daniel Jasper d6a0078039 clang-format: Correctly calculate affected ranges when sorting #includes.
affectedRanges takes a start and an end offset, not offset and length.

llvm-svn: 280165
2016-08-30 21:33:41 +00:00
Enrico Granata befba52f89 Fix a typo/thinko - this was generating the wrong kind of array
llvm-svn: 280164
2016-08-30 21:33:29 +00:00
Lang Hames a9c929e18f [ORC][RPC] Fix some bugs in the callB primitive.
Still no unit test due to synchronization bugs on s390. These issues were
discovered in an out-of-tree utility.

llvm-svn: 280163
2016-08-30 21:29:48 +00:00
Chris Bieneman 6d54d55648 [CMake] Ensure that compiler-rt is added first
This will enable other runtime projects to detect the presence of sanitizer runtimes by referring to the sanitizer targets directly.

llvm-svn: 280162
2016-08-30 21:29:21 +00:00
Kevin Enderby dcbc504c47 Next set of additional error checks for invalid Mach-O files for bad LC_DYSYMTAB’s.
This contains the missing checks for LC_DYSYMTAB load command fields.

llvm-svn: 280161
2016-08-30 21:28:30 +00:00
Bruno Cardoso Lopes 6736e199c7 [Modules] Add 'gnuinlineasm' to the 'requires-declaration' feature-list.
This adds support for modules that require (no-)gnu-inline-asm
environment, such as the compiler builtin cpuid submodule.

This is the gnu-inline-asm variant of https://reviews.llvm.org/D23871

Differential Revision: https://reviews.llvm.org/D23905

rdar://problem/26931199

llvm-svn: 280159
2016-08-30 21:25:42 +00:00
Saleem Abdulrasool c08f5de7bc llvm-readobj: speculative fix for MSVC
Use the typedef rather than using to type alias the typename.

llvm-svn: 280158
2016-08-30 21:21:07 +00:00
Richard Trieu 070937a1d4 Fix memory leak by storing returned pointer in std::unique_ptr
llvm-svn: 280157
2016-08-30 21:12:48 +00:00
Rafael Espindola cceb92a075 Pass Binding instead of IsWeak to addBitcode.
We were computing the binding on both the caller and callee.

llvm-svn: 280156
2016-08-30 20:53:26 +00:00
Tim Northover 991b12bf09 GlobalISel: combine extracts & sequences created for legalization
Legalization ends up creating many G_SEQUENCE/G_EXTRACT pairs which leads to
inefficient codegen (even for -O0), so add a quick pass over the function to
remove them again.

llvm-svn: 280155
2016-08-30 20:51:25 +00:00