Commit Graph

190933 Commits

Author SHA1 Message Date
Eric Fiselier dea770aeb3 [lit] Format JSONMetricValue strings better.
llvm-svn: 226672
2015-01-21 16:38:31 +00:00
George Burgess IV 3c898c2119 Fixed a bug with how we determine bitset indices.
llvm-svn: 226671
2015-01-21 16:37:21 +00:00
Francisco Lopes da Silva 975a9f6ece Initial support for C++ parameter completion
The improved completion in call context now works with:

 - Functions.
 - Member functions.
 - Constructors.
 - New expressions.
 - Function call expressions.
 - Template variants of the previous.

There are still rough edges to be fixed:

 - Provide support for optional parameters.         (fix known)
 - Provide support for member initializers.         (fix known)
 - Provide support for variadic template functions. (fix unknown)
 - Others?

llvm-svn: 226670
2015-01-21 16:24:11 +00:00
Yaron Keren 3f02c14cc7 Add missing include guards to WindowsSupport.h.
llvm-svn: 226669
2015-01-21 16:20:38 +00:00
Rafael Espindola 11bb53bc77 Don't assume variable name.
Should fix the test in -Asserts builds.

llvm-svn: 226668
2015-01-21 16:18:42 +00:00
Rafael Espindola e20c966cf4 Make the test a bit stricter. NFC.
llvm-svn: 226667
2015-01-21 16:13:57 +00:00
Rafael Espindola 3a0e228cca Make the test a bit stricter. NFC.
llvm-svn: 226666
2015-01-21 16:03:26 +00:00
Tim Northover cf3d80fedb Revert "DAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))"
It hadn't gone through review yet, but was still on my local copy.

This reverts commit r226663

llvm-svn: 226665
2015-01-21 15:48:52 +00:00
Tim Northover b9184f2b1a AArch64: add backend option to reserve x18 (platform register)
AAPCS64 says that it's up to the platform to specify whether x18 is
reserved, and a first step on that way is to add a flag controlling
it.

From: Andrew Turner <andrew@fubar.geek.nz>
llvm-svn: 226664
2015-01-21 15:43:31 +00:00
Tim Northover 85cd2791c9 DAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))
llvm-svn: 226663
2015-01-21 15:43:28 +00:00
Rafael Espindola 6d1178ca40 clang-format function. NFC.
llvm-svn: 226662
2015-01-21 14:55:00 +00:00
Michael Kuperstein ada9fa1ca9 [x32] Fast ISel should use LEA64_32r instead of LEA32r to adjust addresses in x32 mode.
llvm-svn: 226661
2015-01-21 14:44:05 +00:00
Alexander Potapenko 4ac461c35f Use a smaller pragma unroll threshold to reduce test execution time.
When opt is compiled with AddressSanitizer it takes more than 30 seconds
to unroll the loop in unroll_1M().

llvm-svn: 226660
2015-01-21 13:52:02 +00:00
Dmitry Vyukov 3ab6b2347e tsan: remove sleeps from tests
Even sleep(1) lead to episodical flakes on some machines.
Use an invisible by tsan barrier to enforce required execution order instead.
This makes the tests deterministic and faster.

llvm-svn: 226659
2015-01-21 13:50:02 +00:00
Evgeniy Stepanov 79ca0fd1a0 [msan] Update origin for the entire destination range on memory store.
Previously we always stored 4 bytes of origin at the destination address
even for 8-byte (and longer) stores.

This should fix rare missing, or incorrect, origin stacks in MSan reports.

llvm-svn: 226658
2015-01-21 13:21:31 +00:00
Jozef Kolek 5cfebdde2b [mips][microMIPS] MicroMIPS 16-bit unconditional branch instruction B
Implement microMIPS 16-bit unconditional branch instruction B.

Implemented 16-bit microMIPS unconditional instruction has real name B16, and
B is an alias which expands to either B16 or BEQ according to the rules:
b 256 --> b16 256 # R_MICROMIPS_PC10_S1
b 12256 --> beq $zero, $zero, 12256 # R_MICROMIPS_PC16_S1
b label --> beq $zero, $zero, label # R_MICROMIPS_PC16_S1

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

llvm-svn: 226657
2015-01-21 12:39:30 +00:00
Jozef Kolek 2c6d73207e [mips][microMIPS] Implement ADDIUPC instruction
Differential Revision: http://reviews.llvm.org/D6582

llvm-svn: 226656
2015-01-21 12:10:11 +00:00
Chandler Carruth df5747a900 [PM] Refactor the InstCombiner interface to use an external worklist.
Because in its primary function pass the combiner is run repeatedly over
the same function until doing so produces no changes, it is essentially
to not re-allocate the worklist. However, as a utility, the more common
pattern would be to put a limited set of instructions in the worklist
rather than the entire function body. That is also the more likely
pattern when used by the new pass manager.

The result is a very light weight combiner that does the visiting with
a separable worklist. This can then be wrapped up in a helper function
for users that want a combiner utility, or as I have here it can be
wrapped up in a pass which manages the iterations used when combining an
entire function's instructions.

Hopefully this removes some of the worst of the interface warts that
became apparant with the last patch here. However, there is clearly more
work. I've again left some FIXMEs for the most egregious. The ones that
stick out to me are the exposure of the worklist and IR builder as
public members, and the use of pointers rather than references. However,
fixing these is likely to be much more mechanical and less interesting
so I didn't want to touch them in this patch.

llvm-svn: 226655
2015-01-21 11:38:17 +00:00
Chandler Carruth ba4c5179a0 [PM] Simplify (ha! ha!) the way that instcombine calls the
SimplifyLibCalls utility by sinking it into the specific call part of
the combiner.

This will avoid us needing to do any contortions to build this object in
a subsequent refactoring I'm doing and seems generally better factored.
We don't need this utility everywhere and it carries no interesting
state so we might as well build it on demand.

llvm-svn: 226654
2015-01-21 11:23:40 +00:00
David Majnemer 475b25eefa AST: Don't ignore alignas on EnumDecls when calculating alignment
We didn't consider any alignment attributes on an EnumDecl when
calculating alignment.

While we are here, ignore alignment specifications on typedef types if
one is used as the underlying type.  Otherwise, weird things happen:

enum Y : int;
Y y;

typedef int __attribute__((aligned(64))) u;
enum Y : u {};

What is the alignment of 'Y'?  It would be more consistent with the
overall design of enums with fixed underlying types to consider the
underlying type's UnqualifiedDesugaredType.

This fixes PR22279.

llvm-svn: 226653
2015-01-21 10:54:38 +00:00
Vladimir Medic 435cf8a415 [Mips][Disassembler]When disassembler meets load/store from coprocessor 2 instructions for mips r6 it crashes as the access to operands array is out of range. This patch adds dedicated decoder method that properly handles decoding of these instructions.
llvm-svn: 226652
2015-01-21 10:47:36 +00:00
Alexander Potapenko cb273921de [ASan] Fix the test expectations for dyld_insert_libraries_reexec.cc
llvm-svn: 226651
2015-01-21 10:04:41 +00:00
Viktor Kutuzov d518cb76ad [Msan] Fix the accept unit test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7083

llvm-svn: 226650
2015-01-21 09:46:21 +00:00
Viktor Kutuzov f6894e9c2c [Sanitizers] Intercept confstr() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 226649
2015-01-21 08:56:40 +00:00
Viktor Kutuzov 1f01782e5c [Sanitizers] Intercept opendir()
Differential Revision: http://reviews.llvm.org/D6968

llvm-svn: 226648
2015-01-21 08:54:01 +00:00
Craig Topper 42b326ea12 [x86] Remove some unnecessary and slightly confusing typecasts from some patterns. I think it actually went i32->iPtr->i32 in some of these cases.
llvm-svn: 226647
2015-01-21 08:43:57 +00:00
Craig Topper 7ff6ab30a9 [X86] Convert all the i8imm used by AVX512 and MMX instructions to u8imm.
llvm-svn: 226646
2015-01-21 08:43:49 +00:00
Craig Topper 620b50cc23 [X86] Convert all the i8imm used by SSE and AVX instructions to u8imm.
This makes the assembler check their size and removes a hack from the disassembler to avoid sign extending the immediate.

llvm-svn: 226645
2015-01-21 08:15:54 +00:00
Dmitry Vyukov 8070ac6bd6 tsan: don't unroll memory access loop in debug mode
MemoryAccess function consumes ~4K of stack in debug mode,
in significant part due to the unrolled loop.
And gtest gives only 4K of stack to death test
threads, which causes stack overflows in debug mode.

llvm-svn: 226644
2015-01-21 08:09:13 +00:00
Greg Fitzgerald 8a1887f1f1 [ELF] Minimal implementation for ARM static linking
The code is able to statically link the simplest case of:

  int main() { return 0; }

* Only works with ARM code - no Thumb code, no interwork (-marm -mno-thumb-interwork)
* musl libc built with no interwork and no Thumb code

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

From: Denis Protivensky <dprotivensky@accesssoftek.com>
llvm-svn: 226643
2015-01-21 07:35:48 +00:00
Craig Topper f38dea1cfa [x86] Add assembly parser bounds checking to the immediate value for cmpss/cmpsd/cmpps/cmppd.
llvm-svn: 226642
2015-01-21 06:07:53 +00:00
Duncan P. N. Exon Smith 53afae49ee tuple: Make operator<() linear instead of exponential
Patch by Matthew Dempsky!

llvm-svn: 226641
2015-01-21 02:51:17 +00:00
Chandler Carruth 9280382ac6 [PM] Replace an abuse of inheritance to override a single function with
a more direct approach: a type-erased glorified function pointer. Now we
can pass a function pointer into this for the easy case and we can even
pass a lambda into it in the interesting case in the instruction
combiner.

I'll be using this shortly to simplify the interfaces to InstCombiner,
but this helps pave the way and seems like a better design for the
libcall simplifier utility.

llvm-svn: 226640
2015-01-21 02:11:59 +00:00
Kostya Serebryany 82b58712c1 [sanitizer] First step toward supporting 42-bit AS on aarch64
aarch64-linux kernel has configurable 39, 42 or 47 bit virtual address
space.  Most distros AFAIK use 42-bit VA right now, but there are also
39-bit VA users too.  The ppc64 handling can be used for this just fine
and support all the 3 sizes.

There are other issues, like allocator32 not really being able to support
the larger addres spaces, and hardcoded 39-bit address space size in other
macros.

Patch by Jakub Jelinek.

llvm-svn: 226639
2015-01-21 02:11:05 +00:00
Nico Weber 896984c251 Much spelling. Wow.
llvm-svn: 226638
2015-01-21 02:09:16 +00:00
Kostya Serebryany d4a032f6c6 [sanitizer] Fix aarch64 sanitizer build with recent glibc
glibc recently changed ABI on aarch64-linux:
https://sourceware.org/git/?p=glibc.git;a=commit;h=5c40c3bab2fddaca8cfe12d75944d1fef8adf1a4
Instead of having unsigned short mode; unsigned short __pad1; it now has
unsigned int mode; field in ipc_perm structure.

This patch allows to build against the recent glibc and disables the
ipc_perm.mode verification for older versions of glibc.

I think it shouldn't be a big deal even for older glibcs, I couldn't find
any place which would actually care about the exact mode field, rather than
the whole structure, appart from the CHECK_SIZE_AND_OFFSET macro.

Patch by Jakub Jelinek

llvm-svn: 226637
2015-01-21 02:08:42 +00:00
Kostya Serebryany c6338ac943 [asan] use MADV_NOHUGEPAGE for shadow to reduce the actual memory usage
llvm-svn: 226636
2015-01-21 02:05:31 +00:00
Enrico Granata ed3228aa5f Allow individual ValueObjects to pick their preferred display language
Most of the time, we can use context information just fine to choose a language (i.e. the language of the frame that the root object was defined in, if any); but in some cases, synthetic children may be fabricated as root frame-less entities, and then we wouldn't know any better

This patch allows (internal) synthetic child providers to set a display language on the children they generate, should they so choose

llvm-svn: 226634
2015-01-21 01:47:13 +00:00
David Majnemer 290d347471 Revert "Sema: err_after_alias is unreachable, remove it"
This reverts commit r226626.  err_after_alias is, in fact, reachable.

llvm-svn: 226633
2015-01-21 01:30:40 +00:00
Rui Ueyama e6556a9cea Fix --start-group/end-group.
We used to manage the state whether we are in a group or not
using a counter. The counter is incremented by one if we jump from
end-group to start-group, and decremented by one if we don't.
The counter was assumed to be either zero or one, but obviously it
could be negative (if there's a group which is not repeated at all).
This is a fix for that issue.

llvm-svn: 226632
2015-01-21 01:26:43 +00:00
Jason Molenda e527c5810c Adding compact unwind as a source of unwind information
introduced subtle bugs in two places in 
RegisterContextLLDB::GetFullUnwindPlanForFrame where 
it specifically wanted to get an eh_frame unwind plan
and was using "Get CallSite UnwindPlan" as synonymous
with that.  But now we have two different types of 
unwind plan that can be returned in that case, and
compact unwind won't behaves as needed.

<rdar://problem/19528559> 

llvm-svn: 226631
2015-01-21 01:26:28 +00:00
David Majnemer 8c9cdb6573 MS ABI: Virtual member pointer thunks should be in COMDAT groups
They can be emitted by multiple translation units and thus belong in a
COMDAT group.

llvm-svn: 226630
2015-01-21 01:21:31 +00:00
David Majnemer 3072fc885e MS ABI: Let guard variables be present in COMDATs
A guard variable in a COMDAT'd function should also be in a COMDAT.

llvm-svn: 226629
2015-01-21 01:04:30 +00:00
David Majnemer 740d59ec49 CodeGen: Compiler generated __declspec(uuid) objects should be COMDAT'd
llvm-svn: 226628
2015-01-21 01:04:28 +00:00
Adrian Prantl 34bcbeed03 Make DIExpression::Verify() stricter by checking that the number of
elements and the ordering is sane and cleanup the accessors.

llvm-svn: 226627
2015-01-21 00:59:20 +00:00
David Majnemer 1efd55ff21 Sema: err_after_alias is unreachable, remove it
Examples this would have catched are now handled by the attribute
verification code.

llvm-svn: 226626
2015-01-21 00:52:17 +00:00
Zachary Turner 83887fb7dc Fix some platform specific paths in TestSettings.py.
We were referring to hardcoded paths /bin/ls and /bin/cat.  For
the purposes of this test, the actual value it's set to doesn't
matter, and it might as well be a non-existent path.  All that
matters is that the before and after values have to match, and
that trailing whitespace is stripped.  On Windows FileSpec
(correctly) converts /bin/ls to D:\bin\ls though, so the before
and after values won't match.  So this patch just correctly builds
up a valid path in a platform-agnostic manner, and verifies that
it matches before and after the set.

llvm-svn: 226625
2015-01-21 00:40:27 +00:00
Kaelyn Takata 21a886936b Correct all typos in the initialization arguments, even if one could not
be corrected.

This fixes PR22250, which exposed the bug where if there's more than one
TypoExpr in the arguments, once one failed to be corrected none of the
TypoExprs after it would be handled at all thanks to an early return.

llvm-svn: 226624
2015-01-21 00:04:19 +00:00
Simon Pilgrim f5dcc1cbe6 [X86][AVX] Simplified diff between AVX1 and SSE42 fp stack folding tests. NFC.
Changed the AVX1 tests register spill tail call to return a xmm like the SSE42 version - makes doing diffs between them a lot easier without affecting the spills themselves.

llvm-svn: 226623
2015-01-21 00:02:13 +00:00
Simon Pilgrim 0177fa3d8c [X86][SSE] Added SSE/AVX1 integer stack folding tests.
Some folding patterns + tests are missing (marked as TODO) - these will be added in a future patch for review.

llvm-svn: 226622
2015-01-20 23:54:17 +00:00