Matt Arsenault [Wed, 21 Jan 2015 22:43:19 +0000 (22:43 +0000)]
R600: Add missing tests for i64 srem
llvm-svn: 226713
Vince Harron [Wed, 21 Jan 2015 22:42:49 +0000 (22:42 +0000)]
This patch gets remote-linux platform able to run processes
Make sure the selected platform is always used
Make sure that the host uses the connect://hostname to connect to both
the lldb-platform and the lldb-gdbserver rather than what the platform
reports as the hostname of the lldb-gdbserver
Make sure that lldb-platform uses the IP address on it's connection
back to the host instead of the hostname that the host sends to it
when launching lldb-gdbserver with the remote host information
Tested on OSX and Linux
llvm-svn: 226712
Jonathan Roelofs [Wed, 21 Jan 2015 22:39:43 +0000 (22:39 +0000)]
Fix load-store optimizer on thumbv4t
Thumbv4t does not have lo->lo copies other than MOVS,
and that can't be predicated. So emit MOVS when needed
and bail if there's a predicate.
http://reviews.llvm.org/D6592
llvm-svn: 226711
George Burgess IV [Wed, 21 Jan 2015 22:39:35 +0000 (22:39 +0000)]
Added test to cover the CFLAA bitset indexing bug.
llvm-svn: 226710
Rafael Espindola [Wed, 21 Jan 2015 22:38:24 +0000 (22:38 +0000)]
Use a CHECK-LABEL. NFC
llvm-svn: 226709
David Majnemer [Wed, 21 Jan 2015 22:32:04 +0000 (22:32 +0000)]
InstCombine: Don't strip bitcasts off of callsites marked 'thunk'
The return type of a thunk is meaningless, we just want the arguments
and return value to be forwarded.
llvm-svn: 226708
Reid Kleckner [Wed, 21 Jan 2015 22:18:17 +0000 (22:18 +0000)]
Add the "thunk" attribute to MS ABI virtual member pointers
This attribute implies indicates that the function musttail calls
another function and returns whatever it returns. The return type of the
thunk is meaningless, as the thunk can dynamically call different
functions with different return types. So long as the callers bitcast
the thunk with the correct type, behavior is well defined.
This attribute was necessary to fix PR20944, where the indirect call
combiner noticed that the thunk returned void and replaced the results
of the indirect call instruction with undef.
Over-the-shoulder reviewed by David Majnemer.
llvm-svn: 226707
Rui Ueyama [Wed, 21 Jan 2015 22:16:17 +0000 (22:16 +0000)]
Fix runtime error on Windows.
I believe the original code is valid, but on Windows it failed with an
assertion error saying "Expression: vector iterator is not decrementable."
Don't use rbegin and rend to workaround that error.
llvm-svn: 226706
Simon Pilgrim [Wed, 21 Jan 2015 22:02:30 +0000 (22:02 +0000)]
[X86][SSE] movddup shuffle mask decodes
Patch to provide shuffle decodes and asm comments for the SSE3/AVX1 movddup double duplication instructions.
llvm-svn: 226705
Greg Clayton [Wed, 21 Jan 2015 21:51:02 +0000 (21:51 +0000)]
Abstract the details from regex.h a bit more by not allowing people to specify compile and execute flags for regular expressions. Also enable better regular expressions if they are available by check if the REG_ENHANCED is available and using it if it is.
Since REG_ENHANCED is available on MacOSX, this allow the use of \d (digits) \b (word boundaries) and much more without affecting other systems.
<rdar://problem/
12082562>
llvm-svn: 226704
Francisco Lopes da Silva [Wed, 21 Jan 2015 21:38:05 +0000 (21:38 +0000)]
Add back a FIXME note to lit.cfg.
llvm-svn: 226703
Greg Fitzgerald [Wed, 21 Jan 2015 21:26:27 +0000 (21:26 +0000)]
add_lld_library -> add_llvm_library
* Works better for shared libraries (sets PRIVATE instead of INTERFACE)
* Fixes http://llvm.org/bugs/show_bug.cgi?id=22269
* Also, use build-target names instead of component names
Differential Revision: http://reviews.llvm.org/D7074
From: Greg Fitzgerald <garious@gmail.com>
llvm-svn: 226702
Adrian Prantl [Wed, 21 Jan 2015 21:23:35 +0000 (21:23 +0000)]
simplify expression
llvm-svn: 226701
Daniel Jasper [Wed, 21 Jan 2015 19:50:35 +0000 (19:50 +0000)]
clang-format: Fix crasher when splitting incomplete escape sequences.
llvm-svn: 226698
Saleem Abdulrasool [Wed, 21 Jan 2015 19:39:10 +0000 (19:39 +0000)]
Fix isTriviallyCopyableType for arrays
Fix isTriviallyCopyableType for arrays. An array of type T is trivially copyable
if T is trivially copyable.
Patch by Agustín Bergé!
llvm-svn: 226696
Kate Stone [Wed, 21 Jan 2015 19:30:00 +0000 (19:30 +0000)]
Fixed a makefile rule used by several tests
Now quotes dsymutil path, required when running tests where the toolchain is in a path that contains a space
llvm-svn: 226695
Adrian Prantl [Wed, 21 Jan 2015 19:25:35 +0000 (19:25 +0000)]
Fix a compile issue on MSVC and call finalize().
llvm-svn: 226694
Rui Ueyama [Wed, 21 Jan 2015 19:15:56 +0000 (19:15 +0000)]
Fix slow test.
yaml2obj command ran by this test took more than 15 seconds to finish
because of extremely large .bss section. Other tests only takes 3 seconds.
Reduce the size to make it faster.
llvm-svn: 226693
Jonathan Roelofs [Wed, 21 Jan 2015 19:05:37 +0000 (19:05 +0000)]
Rename all of the tests in preparation for merging lit configs with libcxx
http://reviews.llvm.org/D7101
llvm-svn: 226691
Matthias Braun [Wed, 21 Jan 2015 19:02:30 +0000 (19:02 +0000)]
LiveIntervalAnalysis: Factor out code to update liveness on vreg def removal
This cleans up code and is more in line with the general philosophy of
modifying LiveIntervals through LiveIntervalAnalysis instead of changing
them directly.
This also fixes a case where SplitEditor::removeBackCopies() would miss
the subregister ranges.
llvm-svn: 226690
Matthias Braun [Wed, 21 Jan 2015 19:02:26 +0000 (19:02 +0000)]
LiveIntervalAnalysis: document removePhysRegDefAt() function.
llvm-svn: 226689
Rui Ueyama [Wed, 21 Jan 2015 18:54:26 +0000 (18:54 +0000)]
Simplify.
What we are trying to do here is to skip object files in group if
group is repeated. This code is simpler than before.
llvm-svn: 226688
Matthias Braun [Wed, 21 Jan 2015 18:50:21 +0000 (18:50 +0000)]
LiveIntervalAnalysis: Factor out code to update liveness on physreg def removal
This cleans up code and is more in line with the general philosophy of
modifying LiveIntervals through LiveIntervalAnalysis instead of changing
them directly.
llvm-svn: 226687
Matthias Braun [Wed, 21 Jan 2015 18:45:57 +0000 (18:45 +0000)]
LiveIntervalAnalysis: Remove unused pruneValue() variant.
llvm-svn: 226686
Daniel Jasper [Wed, 21 Jan 2015 18:35:47 +0000 (18:35 +0000)]
clang-format: Fix crasher caused by incorrect resetting of token info.
llvm-svn: 226685
Adrian Prantl [Wed, 21 Jan 2015 18:32:56 +0000 (18:32 +0000)]
Let subprograms with instructions without parent scopes fail the
verification. Tested via a unit test.
Follow-up to r226616.
llvm-svn: 226684
Zachary Turner [Wed, 21 Jan 2015 18:30:40 +0000 (18:30 +0000)]
Revert "Some fixes for linking Python on Windows."
This reverts commit r226679. For some reason it was
not generating the same behavior as manually specifying
the include dir, library path, and exe path, and it was
causing the test suite to fail to run.
llvm-svn: 226683
Matt Arsenault [Wed, 21 Jan 2015 18:18:25 +0000 (18:18 +0000)]
R600/SI: Custom lower fround
This fixes it for SI. It also removes the pattern
used previously for Evergreen for f32. I'm not sure
if the the new R600 output is better or not, but it uses
1 fewer instructions if BFI is available.
llvm-svn: 226682
Colin LeMahieu [Wed, 21 Jan 2015 18:13:15 +0000 (18:13 +0000)]
[Hexagon] Converting multiply and accumulate with immediate intrinsics to patterns.
llvm-svn: 226681
Daniel Jasper [Wed, 21 Jan 2015 18:04:02 +0000 (18:04 +0000)]
clang-format: Fix bad memory access.
llvm-svn: 226680
Zachary Turner [Wed, 21 Jan 2015 17:53:10 +0000 (17:53 +0000)]
Some fixes for linking Python on Windows.
CMake FindPythonLibs will look for multiple versions of Python
including both debug and release, and build up a list such as
(debug <debugpath> optimized <optimizedpath>). This confuses
the logic we have in CMake to copy the correct python dll to
the output directory so that it need not be in your system's PATH.
To alleviate this, we manually split this list and extract out
the debug and release versions of the python library, and copy
only the correct one to the output directory.
llvm-svn: 226679
Daniel Jasper [Wed, 21 Jan 2015 17:35:29 +0000 (17:35 +0000)]
clang-format: Fix use-heap-after-free bug.
Discovered by the awesome test case and ASAN.
llvm-svn: 226678
Rafael Espindola [Wed, 21 Jan 2015 17:12:04 +0000 (17:12 +0000)]
Used CHECK-DAG since the order is not important.
llvm-svn: 226677
Ahmed Bougacha [Wed, 21 Jan 2015 17:07:06 +0000 (17:07 +0000)]
[X86] Declare SSE4.1/AVX2 vector extloads covered by PMOV[SZ]X legal.
Now that we can fully specify extload legality, we can declare them
legal for the PMOVSX/PMOVZX instructions. This for instance enables
a DAGCombine to fire on code such as
(and (<zextload-equivalent> ...), <redundant mask>)
to turn it into:
(zextload ...)
as seen in the testcase changes.
There is one regression, in widen_load-2.ll: we're no longer able
to do store-to-load forwarding with illegal extload memory types.
This will be addressed separately.
Differential Revision: http://reviews.llvm.org/D6533
llvm-svn: 226676
Rafael Espindola [Wed, 21 Jan 2015 16:56:43 +0000 (16:56 +0000)]
Used CHECK-DAG since the order is not important.
llvm-svn: 226675
Evgeniy Stepanov [Wed, 21 Jan 2015 16:48:29 +0000 (16:48 +0000)]
[msan] Fix origins in realloc.
Fixes 2 issues in origins arising from realloc() calls:
* In the in-place grow case origin for the new memory is not set at all.
* In the copy-realloc case __msan_memcpy is used, which unwinds stack from
inside the MSan runtime. This does not generally work (as we may be built
w/o frame pointers), and produces "bad" stack trace anyway, with several
uninteresting (internal) frames on top.
This change also makes realloc() honor "zeroise" and "poison_in_malloc" flags.
See https://code.google.com/p/memory-sanitizer/issues/detail?id=73.
llvm-svn: 226674
Evgeniy Stepanov [Wed, 21 Jan 2015 16:42:30 +0000 (16:42 +0000)]
[msan] Refactor shadow operations.
Move a bunch of functions to a new source file and rename some of them for
consistency. No functional changes.
llvm-svn: 226673
Eric Fiselier [Wed, 21 Jan 2015 16:38:31 +0000 (16:38 +0000)]
[lit] Format JSONMetricValue strings better.
llvm-svn: 226672
George Burgess IV [Wed, 21 Jan 2015 16:37:21 +0000 (16:37 +0000)]
Fixed a bug with how we determine bitset indices.
llvm-svn: 226671
Francisco Lopes da Silva [Wed, 21 Jan 2015 16:24:11 +0000 (16:24 +0000)]
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
Yaron Keren [Wed, 21 Jan 2015 16:20:38 +0000 (16:20 +0000)]
Add missing include guards to WindowsSupport.h.
llvm-svn: 226669
Rafael Espindola [Wed, 21 Jan 2015 16:18:42 +0000 (16:18 +0000)]
Don't assume variable name.
Should fix the test in -Asserts builds.
llvm-svn: 226668
Rafael Espindola [Wed, 21 Jan 2015 16:13:57 +0000 (16:13 +0000)]
Make the test a bit stricter. NFC.
llvm-svn: 226667
Rafael Espindola [Wed, 21 Jan 2015 16:03:26 +0000 (16:03 +0000)]
Make the test a bit stricter. NFC.
llvm-svn: 226666
Tim Northover [Wed, 21 Jan 2015 15:48:52 +0000 (15:48 +0000)]
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
Tim Northover [Wed, 21 Jan 2015 15:43:31 +0000 (15:43 +0000)]
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
Tim Northover [Wed, 21 Jan 2015 15:43:28 +0000 (15:43 +0000)]
DAGCombine: fold (or (and X, M), (and X, N)) -> (and X, (or M, N))
llvm-svn: 226663
Rafael Espindola [Wed, 21 Jan 2015 14:55:00 +0000 (14:55 +0000)]
clang-format function. NFC.
llvm-svn: 226662
Michael Kuperstein [Wed, 21 Jan 2015 14:44:05 +0000 (14:44 +0000)]
[x32] Fast ISel should use LEA64_32r instead of LEA32r to adjust addresses in x32 mode.
llvm-svn: 226661
Alexander Potapenko [Wed, 21 Jan 2015 13:52:02 +0000 (13:52 +0000)]
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
Dmitry Vyukov [Wed, 21 Jan 2015 13:50:02 +0000 (13:50 +0000)]
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
Evgeniy Stepanov [Wed, 21 Jan 2015 13:21:31 +0000 (13:21 +0000)]
[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
Jozef Kolek [Wed, 21 Jan 2015 12:39:30 +0000 (12:39 +0000)]
[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
Jozef Kolek [Wed, 21 Jan 2015 12:10:11 +0000 (12:10 +0000)]
[mips][microMIPS] Implement ADDIUPC instruction
Differential Revision: http://reviews.llvm.org/D6582
llvm-svn: 226656
Chandler Carruth [Wed, 21 Jan 2015 11:38:17 +0000 (11:38 +0000)]
[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
Chandler Carruth [Wed, 21 Jan 2015 11:23:40 +0000 (11:23 +0000)]
[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
David Majnemer [Wed, 21 Jan 2015 10:54:38 +0000 (10:54 +0000)]
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
Vladimir Medic [Wed, 21 Jan 2015 10:47:36 +0000 (10:47 +0000)]
[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
Alexander Potapenko [Wed, 21 Jan 2015 10:04:41 +0000 (10:04 +0000)]
[ASan] Fix the test expectations for dyld_insert_libraries_reexec.cc
llvm-svn: 226651
Viktor Kutuzov [Wed, 21 Jan 2015 09:46:21 +0000 (09:46 +0000)]
[Msan] Fix the accept unit test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7083
llvm-svn: 226650
Viktor Kutuzov [Wed, 21 Jan 2015 08:56:40 +0000 (08:56 +0000)]
[Sanitizers] Intercept confstr() on FreeBSD
Committed unreviewed with permission.
llvm-svn: 226649
Viktor Kutuzov [Wed, 21 Jan 2015 08:54:01 +0000 (08:54 +0000)]
[Sanitizers] Intercept opendir()
Differential Revision: http://reviews.llvm.org/D6968
llvm-svn: 226648
Craig Topper [Wed, 21 Jan 2015 08:43:57 +0000 (08:43 +0000)]
[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
Craig Topper [Wed, 21 Jan 2015 08:43:49 +0000 (08:43 +0000)]
[X86] Convert all the i8imm used by AVX512 and MMX instructions to u8imm.
llvm-svn: 226646
Craig Topper [Wed, 21 Jan 2015 08:15:54 +0000 (08:15 +0000)]
[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
Dmitry Vyukov [Wed, 21 Jan 2015 08:09:13 +0000 (08:09 +0000)]
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
Greg Fitzgerald [Wed, 21 Jan 2015 07:35:48 +0000 (07:35 +0000)]
[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
Craig Topper [Wed, 21 Jan 2015 06:07:53 +0000 (06:07 +0000)]
[x86] Add assembly parser bounds checking to the immediate value for cmpss/cmpsd/cmpps/cmppd.
llvm-svn: 226642
Duncan P. N. Exon Smith [Wed, 21 Jan 2015 02:51:17 +0000 (02:51 +0000)]
tuple: Make operator<() linear instead of exponential
Patch by Matthew Dempsky!
llvm-svn: 226641
Chandler Carruth [Wed, 21 Jan 2015 02:11:59 +0000 (02:11 +0000)]
[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
Kostya Serebryany [Wed, 21 Jan 2015 02:11:05 +0000 (02:11 +0000)]
[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
Nico Weber [Wed, 21 Jan 2015 02:09:16 +0000 (02:09 +0000)]
Much spelling. Wow.
llvm-svn: 226638
Kostya Serebryany [Wed, 21 Jan 2015 02:08:42 +0000 (02:08 +0000)]
[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
Kostya Serebryany [Wed, 21 Jan 2015 02:05:31 +0000 (02:05 +0000)]
[asan] use MADV_NOHUGEPAGE for shadow to reduce the actual memory usage
llvm-svn: 226636
Enrico Granata [Wed, 21 Jan 2015 01:47:13 +0000 (01:47 +0000)]
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
David Majnemer [Wed, 21 Jan 2015 01:30:40 +0000 (01:30 +0000)]
Revert "Sema: err_after_alias is unreachable, remove it"
This reverts commit r226626. err_after_alias is, in fact, reachable.
llvm-svn: 226633
Rui Ueyama [Wed, 21 Jan 2015 01:26:43 +0000 (01:26 +0000)]
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
Jason Molenda [Wed, 21 Jan 2015 01:26:28 +0000 (01:26 +0000)]
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
David Majnemer [Wed, 21 Jan 2015 01:21:31 +0000 (01:21 +0000)]
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
David Majnemer [Wed, 21 Jan 2015 01:04:30 +0000 (01:04 +0000)]
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
David Majnemer [Wed, 21 Jan 2015 01:04:28 +0000 (01:04 +0000)]
CodeGen: Compiler generated __declspec(uuid) objects should be COMDAT'd
llvm-svn: 226628
Adrian Prantl [Wed, 21 Jan 2015 00:59:20 +0000 (00:59 +0000)]
Make DIExpression::Verify() stricter by checking that the number of
elements and the ordering is sane and cleanup the accessors.
llvm-svn: 226627
David Majnemer [Wed, 21 Jan 2015 00:52:17 +0000 (00:52 +0000)]
Sema: err_after_alias is unreachable, remove it
Examples this would have catched are now handled by the attribute
verification code.
llvm-svn: 226626
Zachary Turner [Wed, 21 Jan 2015 00:40:27 +0000 (00:40 +0000)]
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
Kaelyn Takata [Wed, 21 Jan 2015 00:04:19 +0000 (00:04 +0000)]
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
Simon Pilgrim [Wed, 21 Jan 2015 00:02:13 +0000 (00:02 +0000)]
[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
Simon Pilgrim [Tue, 20 Jan 2015 23:54:17 +0000 (23:54 +0000)]
[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
Simon Pilgrim [Tue, 20 Jan 2015 23:50:18 +0000 (23:50 +0000)]
[X86][SSE] Added SSE fp stack folding tests.
Some folding patterns + tests are missing (marked as TODO) - these will be added in a future patch for review.
llvm-svn: 226621
Simon Pilgrim [Tue, 20 Jan 2015 23:45:50 +0000 (23:45 +0000)]
[X86][AVX] Renamed AVX1 fp stack folding tests. NFC.
The SSE42 version of the AVX1 float stack folding tests will be added shortly, this renames the AVX1 file so that the files will be near each other in a directory listing to help ensure they are kept in sync.
llvm-svn: 226620
Chandler Carruth [Tue, 20 Jan 2015 22:44:35 +0000 (22:44 +0000)]
[PM] Separate the InstCombiner from its pass.
This creates a small internal pass which runs the InstCombiner over
a function. This is the hard part of porting InstCombine to the new pass
manager, as at this point none of the code in InstCombine has access to
a Pass object any longer.
The resulting interface for the InstCombiner is pretty terrible. I'm not
planning on leaving it that way. The key thing missing is that we need
to separate the worklist from the combiner a touch more. Once that's
done, it should be possible for *any* part of LLVM to just create
a worklist with instructions, populate it, and then combine it until
empty. The pass will just be the (obvious and important) special case of
doing that for an entire function body.
For now, this is the first increment of factoring to make all of this
work.
llvm-svn: 226618
Greg Clayton [Tue, 20 Jan 2015 22:41:14 +0000 (22:41 +0000)]
Add missing case statement to quiet a compiler warning.
llvm-svn: 226617
Adrian Prantl [Tue, 20 Jan 2015 22:37:25 +0000 (22:37 +0000)]
DebugLocs without a scope should fail the verification.
Follow-up to r226588.
llvm-svn: 226616
Eric Fiselier [Tue, 20 Jan 2015 22:37:25 +0000 (22:37 +0000)]
Only use -target flag when target_triple is manually specified
llvm-svn: 226615
Zachary Turner [Tue, 20 Jan 2015 22:36:03 +0000 (22:36 +0000)]
XFAIL pexpect tests on Windows.
At some point we will need to either provide a pexpect equivalent
on Windows, or provide some other method of doing out-of-process
tests.
Even with a pexpect replacement, it may be worth re-evaluating
some of these tests to see if they would be better served as
in-process tests. The larger issue of coming up with a pexpect
replacement on Windows is tracked in http://llvm.org/pr22274.
llvm-svn: 226614
Rafael Espindola [Tue, 20 Jan 2015 22:08:20 +0000 (22:08 +0000)]
Don't pass -Wl,z,defs for now.
It broke the msan build.
llvm-svn: 226613
Kevin Enderby [Tue, 20 Jan 2015 21:47:46 +0000 (21:47 +0000)]
For llvm-objdump, hook up existing options to work when using -macho (the Mach-O parser).
llvm-svn: 226612
Rafael Espindola [Tue, 20 Jan 2015 21:23:15 +0000 (21:23 +0000)]
Use -Wl,defs when linking.
ELF linkers by default allow shared libraries to contain undefined references
and it is up to the dynamic linker to look for them.
On COFF and MachO, that is not the case.
This creates a situation where a .so might build on an ELF system, but the build
of the corresponding .dylib or .dll will fail.
This patch changes the cmake build to use -Wl,-z,defs when linking and updates
the dependencies so that -DBUILD_SHARED_LIBS=ON build still works.
llvm-svn: 226611
Chandler Carruth [Tue, 20 Jan 2015 21:10:35 +0000 (21:10 +0000)]
[PM] Reformat this code with clang-format so that subsequent changes
don't get muddied up by formatting changes.
Some of these don't really seem like improvements to me, but they also
don't seem any worse and I care much more about not formatting them
manually than I do about the particular formatting. =]
llvm-svn: 226610
Rafael Espindola [Tue, 20 Jan 2015 21:10:35 +0000 (21:10 +0000)]
Link libclang with dl if available.
This is in preparation for changing the link to use -Wl,-z,defs.
llvm-svn: 226609
Greg Clayton [Tue, 20 Jan 2015 21:05:21 +0000 (21:05 +0000)]
Remove unused function:
lldb::pid_t
Host::LaunchApplication (const FileSpec &app_file_spec);
This had use of a function FSPathMakeRef(const UInt8*, FSRef *, ...) that was deprecated in 10.8.
Removing this fucntion since it wasn't used and was causing warnings.
llvm-svn: 226608