Rafael Espindola [Fri, 21 Nov 2014 18:05:55 +0000 (18:05 +0000)]
Fix formatting. NFC.
llvm-svn: 222545
Sanjay Patel [Fri, 21 Nov 2014 17:40:04 +0000 (17:40 +0000)]
Add a feature flag for slow 32-byte unaligned memory accesses [x86].
This patch adds a feature flag to avoid unaligned 32-byte load/store AVX codegen
for Sandy Bridge and Ivy Bridge. There is no functionality change intended for
those chips. Previously, the absence of AVX2 was being used as a proxy to detect
this feature. But that hindered codegen for AVX-enabled AMD chips such as btver2
that do not have the 32-byte unaligned access slowdown.
Performance measurements are included in PR21541 ( http://llvm.org/bugs/show_bug.cgi?id=21541 ).
Differential Revision: http://reviews.llvm.org/D6355
llvm-svn: 222544
Duncan P. N. Exon Smith [Fri, 21 Nov 2014 17:21:18 +0000 (17:21 +0000)]
Revert "Allow FDE references outside the +/-2GB range supported by PC relative offsets for code models other than small/medium. For JIT application, memory layout is less controlled and can result in truncations otherwise."
This reverts commit r222538.
It's causing test failures for CFI, at least on Darwin:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/1189/
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/1391/
Note that the previous incremental build was on r222537, and the CFI
tests weren't failing:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/1188/
llvm-svn: 222542
Oleksiy Vyalov [Fri, 21 Nov 2014 16:18:57 +0000 (16:18 +0000)]
Extend PipePosix with child_processes_inherit support - to control whether pipe handles should be inherited by a child process.
http://reviews.llvm.org/D6348
llvm-svn: 222541
Chandler Carruth [Fri, 21 Nov 2014 14:53:03 +0000 (14:53 +0000)]
[x86] Restructure the checking patterns for v16 and v32 avx2 vector
shuffle lowering to allow much better blend matching.
Specifically, with the new structure the code seems clearer to me and we
correctly can hit the cases where merging two 128-bit lanes is a clear
win and can be shuffled cheaply afterward.
llvm-svn: 222539
Joerg Sonnenberger [Fri, 21 Nov 2014 14:42:43 +0000 (14:42 +0000)]
Allow FDE references outside the +/-2GB range supported by PC relative
offsets for code models other than small/medium. For JIT application,
memory layout is less controlled and can result in truncations
otherwise.
Patch from Akos Kiss.
Differential Revision: http://reviews.llvm.org/D6079
llvm-svn: 222538
Chandler Carruth [Fri, 21 Nov 2014 14:33:24 +0000 (14:33 +0000)]
[x86] Make the previous logic significantly less conservative and get
a bunch more improvements.
Non-lane-crossing is fine, the key is that lane merging only makes sense
for single-input shuffles. Not sure why I got so turned around here. The
code all works, I was just using the wrong model for it.
This only updates v4 and v8 lowering. The v16 and v32 lowering requires
restructuring the entire check sequence.
llvm-svn: 222537
Andrea Di Biagio [Fri, 21 Nov 2014 14:32:06 +0000 (14:32 +0000)]
[DAG] Teach how to turn a build_vector into a shuffle if some of the operands are zero.
Before this patch, the DAGCombiner only tried to convert build_vector dag nodes
into shuffles if all operands were either extract_vector_elt or undef.
This patch improves that logic and teaches the DAGCombiner how to deal with
build_vector dag nodes where one or more operands are zero. A build_vector
dag node with some zero operands is turned into a shuffle only if the resulting
shuffle mask is legal for the target.
llvm-svn: 222536
Alexander Potapenko [Fri, 21 Nov 2014 14:12:00 +0000 (14:12 +0000)]
[ASan] Allow the users of SymbolizationLoop to make use of the --dsym_hint option in llvm-symbolizer
Let the users of SymbolizationLoop define a function that produces the list of .dSYM hints (possible path to the .dSYM bundle) for the given binary.
Because the hints can't be added to an existing llvm-symbolizer process, we spawn a new symbolizer process ones each time a new hint appears.
Those can only appear for binaries that we haven't seen before.
llvm-svn: 222535
Daniel Jasper [Fri, 21 Nov 2014 14:08:38 +0000 (14:08 +0000)]
clang-format: Understand more lambda return types.
Before:
auto a = [&b, c ](D * d) -> D * {}
After:
auto a = [&b, c](D* d) -> D* {}
llvm-svn: 222534
Chandler Carruth [Fri, 21 Nov 2014 13:56:05 +0000 (13:56 +0000)]
[x86] Teach the x86 vector shuffle lowering to detect mergable 128-bit
lanes.
By special casing these we can often either reduce the total number of
shuffles significantly or reduce the number of (high latency on Haswell)
AVX2 shuffles that potentially cross 128-bit lanes. Even when these
don't actually cross lanes, they have much higher latency to support
that. Doing two of them and a blend is worse than doing a single insert
across the 128-bit lanes to blend and then doing a single interleaved
shuffle.
While this seems like a narrow case, it kept cropping up on me and the
difference is *huge* as you can see in many of the test cases. I first
hit this trying to perfectly fix the interleaving shuffle patterns used
by Halide for AVX2.
llvm-svn: 222533
Dmitry Vyukov [Fri, 21 Nov 2014 13:55:19 +0000 (13:55 +0000)]
sanitizer_common: fix function w/o return
When SANITIZER_USES_CANONICAL_LINUX_SYSCALLS the function misses return statement.
llvm-svn: 222532
Daniel Jasper [Fri, 21 Nov 2014 13:38:53 +0000 (13:38 +0000)]
clang-format: Use nested block special case for all languages.
Previously this was only used for JavaScript.
Before:
functionCall({
int i;
int j;
},
aaaa, bbbb, cccc);
After:
functionCall({
int i;
int j;
}, aaaa, bbbb, cccc);
llvm-svn: 222531
Dmitry Vyukov [Fri, 21 Nov 2014 12:48:43 +0000 (12:48 +0000)]
Fix test after r222526.
llvm-svn: 222530
Daniel Jasper [Fri, 21 Nov 2014 12:36:25 +0000 (12:36 +0000)]
clang-format: Handle comments in short case labels.
With AllowShortCaseLabelsOnASingleLine set to true:
This gets now left unchanged:
case 1:
// comment
return;
Whereas before it was changed into:
case 1: // comment return;
This fixes llvm.org/PR21630.
llvm-svn: 222529
Chandler Carruth [Fri, 21 Nov 2014 12:33:46 +0000 (12:33 +0000)]
[x86] Remove more windows line endings that slipped into this file...
llvm-svn: 222528
Daniel Jasper [Fri, 21 Nov 2014 12:19:07 +0000 (12:19 +0000)]
clang-format: [Java] Support more Java keywords.
Before:
public final<X> Foo foo() {
}
public abstract<X> Foo foo();
After:
public final <X> Foo foo() {
}
public abstract <X> Foo foo();
Patch by Harry Terkelsen. Thank you.
llvm-svn: 222527
Dmitry Vyukov [Fri, 21 Nov 2014 12:19:01 +0000 (12:19 +0000)]
clang: do not add -pie for tsan
Revision 220571 removes the requirement to use -pie for tsan binaries. So remove -pie from driver.
Also s/hasZeroBaseShadow/requiresPIE/ because that is what it is used for. Msan does not have zero-based shadow, but requires pie. And in general the relation between zero-based shadow and pie is unclear.
http://reviews.llvm.org/D6318
llvm-svn: 222526
Chandler Carruth [Fri, 21 Nov 2014 12:17:50 +0000 (12:17 +0000)]
[x86] Add a bunch of test cases to 256-bit shuffles that exercise
merging 128-bit subvectors and also shuffling all the elements of those
subvectors. Currently we generate pretty bad code for many of these, but
I'm testing a patch that should dramatically improve this in addition to
making the shuffle lowering robust to other changes.
llvm-svn: 222525
Daniel Jasper [Fri, 21 Nov 2014 12:14:12 +0000 (12:14 +0000)]
clang-format: [Java] Basic lambda support.
llvm-svn: 222524
Alexey Bataev [Fri, 21 Nov 2014 11:33:46 +0000 (11:33 +0000)]
[OPENMP] Disable CapturedStmt generation for standalone directives.
No functional changes, just code improvement.
llvm-svn: 222523
Andrea Di Biagio [Fri, 21 Nov 2014 11:33:07 +0000 (11:33 +0000)]
[DAG] Refactor the shuffle combining logic in DAGCombiner. NFC.
This patch simplifies the logic that combines a pair of shuffle nodes into
a single shuffle if there is a legal mask. Also added comments to better
describe the algorithm. No functional change intended.
llvm-svn: 222522
Alexey Volkov [Fri, 21 Nov 2014 11:19:34 +0000 (11:19 +0000)]
[X86] For Silvermont CPU use 16-bit division instead of 64-bit for small positive numbers
Differential Revision: http://reviews.llvm.org/D5938
llvm-svn: 222521
Yury Gribov [Fri, 21 Nov 2014 10:32:05 +0000 (10:32 +0000)]
[asan] Runtime support for asan-instrument-allocas which enables instrumentation of variable-sized dynamic allocas. Patch by Max Ostapenko.
Reviewed at http://reviews.llvm.org/D6055
llvm-svn: 222520
Yury Gribov [Fri, 21 Nov 2014 10:29:50 +0000 (10:29 +0000)]
[asan] Add new hidden compile-time flag asan-instrument-allocas to sanitize variable-sized dynamic allocas. Patch by Max Ostapenko.
Reviewed at http://reviews.llvm.org/D6055
llvm-svn: 222519
NAKAMURA Takumi [Fri, 21 Nov 2014 09:14:45 +0000 (09:14 +0000)]
Add LLVMScalarOpts to LLVMPowerPCCodeGen.
llvm-svn: 222516
David Majnemer [Fri, 21 Nov 2014 09:06:49 +0000 (09:06 +0000)]
MS ABI: Mangle char16_t and char32_t types
These mangling make clang more compatible with MSVC 2015.
Correctly mangling char16_t and char32_t will take a little more work.
llvm-svn: 222515
Eric Fiselier [Fri, 21 Nov 2014 08:54:35 +0000 (08:54 +0000)]
Handle extra whitespace in linux distribution name.
llvm-svn: 222514
Eric Fiselier [Fri, 21 Nov 2014 08:02:38 +0000 (08:02 +0000)]
Mark some locale tests as XFAIL on debian and opensuse.
llvm-svn: 222513
Bob Wilson [Fri, 21 Nov 2014 06:52:52 +0000 (06:52 +0000)]
Fix missing diagnostic for unsupported TLS for some thread_local variables.
Clang r181627 moved a check for block-scope variables into this code for
handling thread storage class specifiers, but in the process, it broke the
logic for checking if the target supports TLS. Fix this with some simple
restructuring of the code. rdar://problem/
18796883
llvm-svn: 222512
Shawn Best [Fri, 21 Nov 2014 06:49:39 +0000 (06:49 +0000)]
fix Bug21211 : reworked test/api/multithreaded/test_listener_event_description.cpp to work properly on Linux/FreeBSD
Issue D5632 fixed an issue where linux would dump spurious output to tty on startup (due to a broadcast stop event). After the checkin, it was noticed on FreeBSD a unit test was now failing. On closer investigation I found the test was using the C++ API to launch an inferior while using an SBListener to monitor the public state changes. As on OSx, it was expecting to see:
eStateRunning
eStateStopped
On Linux/FreeBSD, there is an extra state change
eStateLaunching
eStateRunning
eStateStopped
I reworked the test to work for both cases and re-enabled the test of FreeBSD.
Differential Revision: http://reviews.llvm.org/D5837
llvm-svn: 222511
Hao Liu [Fri, 21 Nov 2014 06:39:58 +0000 (06:39 +0000)]
DAGCombiner: Allow the DAGCombiner to combine multiple FDIVs with the same divisor info FMULs by the reciprocal.
E.g., ( a / D; b / D ) -> ( recip = 1.0 / D; a * recip; b * recip)
A hook is added to allow the target to control whether it needs to do such combine.
Reviewed in http://reviews.llvm.org/D6334
llvm-svn: 222510
Craig Topper [Fri, 21 Nov 2014 05:58:21 +0000 (05:58 +0000)]
Remove a bunch of unnecessary typecasts to 'const TargetRegisterClass *'
llvm-svn: 222509
Craig Topper [Fri, 21 Nov 2014 05:58:14 +0000 (05:58 +0000)]
Add extra new line and remove some trailing whitespace from tablegen RegisterInfo output file.
llvm-svn: 222508
Richard Smith [Fri, 21 Nov 2014 05:37:20 +0000 (05:37 +0000)]
[modules] When explicitly importing a module, it's fine for the imported module
to be newer than we were expecting. That happens if .pcm's get moved between
file systems during a distributed build. (It's still not OK for them to actually
be different, though, so we still check the size and signature matches.)
llvm-svn: 222507
Richard Smith [Fri, 21 Nov 2014 05:16:13 +0000 (05:16 +0000)]
PR21323: Fix iterator invalidation issue when looking for redeclarations of a
special member function.
No test yet: the only testcases we have for this issue are extremely complex.
Testcase will be added once I get a reasonable reduction.
llvm-svn: 222506
Rafael Espindola [Fri, 21 Nov 2014 05:15:41 +0000 (05:15 +0000)]
Fix a silly bug in StreamingMemoryObject.cpp.
The logic for detecting EOF was wrong and would fail if we ever requested
more than 16k past the last read position.
llvm-svn: 222505
Hal Finkel [Fri, 21 Nov 2014 04:35:51 +0000 (04:35 +0000)]
[PPC] Use SeparateConstOffsetFromGEP
This mirrors r222331, which enabled SeparateConstOffsetFromGEP on AArch64, in
the PowerPC backend. Yields, on a POWER7 machine, a 30% speedup on
SingleSource/Benchmarks/Shootout/nestedloop (this might just be from LICM,
there is a store moved out of the inner loop) and a potential speedup on
MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/mpeg2decode. Regardless, it
makes some code look cleaner, and synchronizing the backends in this regard
seems like a generally good thing.
llvm-svn: 222504
Richard Trieu [Fri, 21 Nov 2014 03:10:30 +0000 (03:10 +0000)]
Extend -Wuninitialized to warn when accessing uninitialized base classes in a
constructor.
llvm-svn: 222503
Richard Trieu [Fri, 21 Nov 2014 02:42:08 +0000 (02:42 +0000)]
Add accessor marcos to ConstantPlaceHolder, similar to those in the base class.
llvm-svn: 222502
Ed Maste [Fri, 21 Nov 2014 02:41:25 +0000 (02:41 +0000)]
Rework parallel test process count logic
The default value for opt.thread_count was multiprocessing.cpu_count(),
which meant the LLDB_TEST_THREADS environment variable was never used.
It's not easy to pass the -t option to the test run when invoking it
from e.g. 'ninja check-lldb', so having the environment variable as an
option is useful.
Change the logic so that the thread count is set by the first one of:
1. The -t option to test/dosep.py
2. The LLDB_TEST_THREADS environment variable
3. The machine's CPU count from multiprocessing.cpu_count()
llvm-svn: 222501
David Majnemer [Fri, 21 Nov 2014 02:37:38 +0000 (02:37 +0000)]
This Reassociate change unintentionally slipped in r222499
llvm-svn: 222500
David Majnemer [Fri, 21 Nov 2014 02:34:55 +0000 (02:34 +0000)]
SROA: The alloca type isn't a candidate promotion type for vectors
The alloca's type is irrelevant, only those types which are used in a
load or store of the exact size of the slice should be considered.
This manifested as an assertion failure when we compared the various
types: we had a size mismatch.
This fixes PR21480.
llvm-svn: 222499
Jason Molenda [Fri, 21 Nov 2014 02:25:15 +0000 (02:25 +0000)]
Change CommandObjectTargetModulesLoad so that the filename argument
is treated as a string instead of a FileSpec.
OptionValueFileSpec::SetValueFromCString() passes the c string to
FileSpec::SetFile(str, true /* resolve */) - and with Zachary's
changes to FileSpec we're using llvm::sys::fs::make_absolute() to
do that "resolve" action now, where we used to use realpath().
One important difference between llvm::sys::fs::make_absolute and
realpath is that when they're handed a filename (no directory),
realpath prepends the current working directory *and if the file exists*,
returns that full path. If that file doesn't exist, the caller
uses the basename only.
llvm::sys::fs::make_absolute prepends the current working directory
regardless of whether it exists or not.
I considered having FileSpec::SetFile save the initial pathname,
call FileSpec::Resolve, and then check to see if the Resolve return
path exists - and if not, go back to the original one.
But instead I just went with changing 'target modules load' to treat its
filename argument as a string instead of a FileSpec. This brings it
in line with how 'target modules list' works.
<rdar://problem/
18955416>
llvm-svn: 222498
Hal Finkel [Fri, 21 Nov 2014 02:22:46 +0000 (02:22 +0000)]
Clarify the description of the noalias attribute
The previous description of the noalias attribute did not accurately specify
the implemented semantics, and the terminology used differed unnecessarily
from that used by the C specification to define the semantics of restrict. For
the argument attribute, the semantics can be precisely specified in terms of
objects accessed through pointers based on the arguments, and this is now what
is done.
Saying that the semantics are 'slightly weaker' than that provided by C99
restrict is not really useful without further elaboration, so that has been
removed from the sentence.
noalias on a return value is really used to mean that the function is
malloc-like (and, in fact, we use this attribute to represent
__attribute__((malloc)) in Clang), and this is a stronger guarantee than that
provided by restrict (because it is a property of the pointed-to memory region,
not just a guarantee on object access). Clarifying this is relevant to fixing
(and was motivated by the discussion on) PR21556.
llvm-svn: 222497
Eric Fiselier [Fri, 21 Nov 2014 02:16:19 +0000 (02:16 +0000)]
Ensure llvm-sanitizer is found by the tests when using sanitizers.
llvm-svn: 222496
Zachary Turner [Fri, 21 Nov 2014 02:00:21 +0000 (02:00 +0000)]
Rename lldb registers to contain lldb_ prefix.
LLDB supports many different register numbering schemes, and these
are typically prefixed with an indicator that lets the user know
what numbering scheme is used. The gcc numbering scheme is
prefixed with gcc, and there are similar ones for dwarf, gdb,
and gcc_dwarf.
LLDB also contains its own internal numbering scheme, but the enum
for LLDB's numbering scheme was prefixed differently. This patch
changes the names of these enums to use the same naming scheme for
the enum values as the rest of the register kinds by removing gpr_
and fpu_ prefixes, and instead using lldb_ prefixes for all enum
values.
Differential Revision: http://reviews.llvm.org/D6351
Reviewed by: Greg Clayton
llvm-svn: 222495
Lang Hames [Fri, 21 Nov 2014 01:57:09 +0000 (01:57 +0000)]
[MCJIT] Remove JITEventListener::NotifyFreeingMachineCode. This method is dead
now that the old JIT has been removed.
llvm-svn: 222494
Eric Fiselier [Fri, 21 Nov 2014 01:53:51 +0000 (01:53 +0000)]
[libcxxabi] Cleanup memory in tests to placate ASAN.
Summary: ASAN fires on these tests because they don't clean up their memory.
Reviewers: danalbert, jroelofs, mclow.lists
Reviewed By: jroelofs
Subscribers: dblaikie, cfe-commits
Differential Revision: http://reviews.llvm.org/D6281
llvm-svn: 222493
Dan Albert [Fri, 21 Nov 2014 01:23:04 +0000 (01:23 +0000)]
Add more REQUIRES: LOCALE.* to tests.
llvm-svn: 222492
Zachary Turner [Fri, 21 Nov 2014 01:19:09 +0000 (01:19 +0000)]
Add curly braces to workaround an MSVC bug.
MSVC can't parse this pattern for range-based for loops.
llvm-svn: 222491
Adrian Prantl [Fri, 21 Nov 2014 00:48:22 +0000 (00:48 +0000)]
relax this testcase to not depend on a specific alignment.
llvm-svn: 222490
Quentin Colombet [Fri, 21 Nov 2014 00:47:19 +0000 (00:47 +0000)]
[X86] Do not custom lower UINT_TO_FP when the target type does not
match the custom lowering.
<rdar://problem/
19026326>
llvm-svn: 222489
Adrian Prantl [Fri, 21 Nov 2014 00:39:43 +0000 (00:39 +0000)]
Verifier: Check that all instructions have their parent pointers set up
correctly. This helps with catching problems caused by IRBuilder abuse
such as the one fixed in CFE r222487.
llvm-svn: 222488
Adrian Prantl [Fri, 21 Nov 2014 00:35:25 +0000 (00:35 +0000)]
Debug info for blocks: Fix a bug caught by the Verifier.
When emitting nested block definitions, the insert-at-point variant of
DIBuilder::insertDeclare() could be called with the insertion point set
to the end-of-BasicBlock sentinel, causing the parent pointer of the
CallInst to be set to the intentionally bogus value of the sentinel.
Fixed by conditionally invoking the correct version of insertDeclare().
rdar://problem/
19034882
llvm-svn: 222487
Kuba Brecka [Fri, 21 Nov 2014 00:21:43 +0000 (00:21 +0000)]
Move ASan non-Linux-specific tests out of the Linux/ directory
Reviewed at http://reviews.llvm.org/D6244
llvm-svn: 222486
David Blaikie [Fri, 21 Nov 2014 00:20:58 +0000 (00:20 +0000)]
DebugInfo: Fix another case of r222377 when we do have a definition of the variable, but we might not be emitting it (such as templates)
llvm-svn: 222485
Jim Ingham [Fri, 21 Nov 2014 00:14:57 +0000 (00:14 +0000)]
Add a test for the driver's "-k" option.
llvm-svn: 222484
Rui Ueyama [Thu, 20 Nov 2014 23:59:40 +0000 (23:59 +0000)]
[PECOFF] Enable dead-stripping even if /debug option is given.
/debug makes MSVC link.exe to not remove unused sections from
the resulting executable. We did the same thing before. However,
I realized that the removal of associative section depends on
the dead-stripping pass in LLD, so we cannot disable that. Or
LLD may produce slightly broken executables that have too much
data in it (which could result in nasty subtle bugs).
This patch is a temporary measure to create correct executable.
Currently /debug does not have any real effect for LLD anyway.
I'll improve associative section handling in another patch, so that
they are removed from output without depending on the dead-stripping
pass.
llvm-svn: 222483
Richard Smith [Thu, 20 Nov 2014 23:53:14 +0000 (23:53 +0000)]
Remove code that tries to avoid transforming non-dependent call operator types
for lambda expressions. That can't ever work; we need to transform the
parameters in order to create new ones in the new call operator context.
Fixes a rejects-valid when transforming a context containing a
lambda-expression that uses its function parameters in C++14 mode.
llvm-svn: 222482
Reid Kleckner [Thu, 20 Nov 2014 23:51:47 +0000 (23:51 +0000)]
Fix more instances of -Wsentinel on Windows with s/NULL/nullptr/
Follow up to r221940, where I must not have caught em all. NFC
llvm-svn: 222481
Reid Kleckner [Thu, 20 Nov 2014 23:37:18 +0000 (23:37 +0000)]
Add out of line virtual destructors to all LLVMTargetMachine subclasses
These recently all grew a unique_ptr<TargetLoweringObjectFile> member in
r221878. When anyone calls a virtual method of a class, clang-cl
requires all virtual methods to be semantically valid. This includes the
implicit virtual destructor, which triggers instantiation of the
unique_ptr destructor, which fails because the type being deleted is
incomplete.
This is just part of the ongoing saga of PR20337, which is affecting
Blink as well. Because the MSVC ABI doesn't have key functions, we end
up referencing the vtable and implicit destructor on any virtual call
through a class. We don't actually end up emitting the dtor, so it'd be
good if we could avoid this unneeded type completion work.
llvm-svn: 222480
Jim Ingham [Thu, 20 Nov 2014 23:37:13 +0000 (23:37 +0000)]
Make the option parsing of -k & -K match the help strings.
llvm-svn: 222479
Zachary Turner [Thu, 20 Nov 2014 23:19:40 +0000 (23:19 +0000)]
Remove duplicated enum, use the authoritative one.
Running a diff against lldb-x86-register-enums.h and the file
modified in this patch, the two enums were completely identical.
Deleting one of them to reduce code noise.
llvm-svn: 222478
Richard Smith [Thu, 20 Nov 2014 23:00:25 +0000 (23:00 +0000)]
Move test from r222476 to a better place; this was reduced to the point that it
no longer contained a generic lambda.
llvm-svn: 222477
Richard Smith [Thu, 20 Nov 2014 22:56:34 +0000 (22:56 +0000)]
Fix crash-on-valid if a lambda-expression appears lexically directly within a
local class inside a template.
llvm-svn: 222476
Mehdi Amini [Thu, 20 Nov 2014 22:48:24 +0000 (22:48 +0000)]
Update Makefile following directory removal in r222466
llvm-svn: 222475
Zachary Turner [Thu, 20 Nov 2014 22:47:32 +0000 (22:47 +0000)]
[ProcessWindows] Implement a RegisterContextWindows for x86.
This implements the skeleton of a RegisterContext for Windows.
In particular, this implements support only for x86 general purpose
registers.
After this patch, LLDB on Windows can perform basic debugging
operations in a single-threaded inferior process (breakpoint,
register inspection, frame select, unwinding, etc).
Differential Revision: http://reviews.llvm.org/D6322
Reviewed by: Greg Clayton
llvm-svn: 222474
Reid Kleckner [Thu, 20 Nov 2014 22:44:03 +0000 (22:44 +0000)]
Intercept __crt_va_* used by MSVC "14"
Moving further into the implementor's namespace is good, but now we have
one more name to intercept.
llvm-svn: 222473
Mehdi Amini [Thu, 20 Nov 2014 22:40:25 +0000 (22:40 +0000)]
SimplifyCFG: Refactor GatherConstantCompares() result in a struct
Code seems cleaner and easier to understand this way
This is basically r222416, after fixes for MSVC lack of standard
support, and a few cleaning (got rid of a warning).
Thanks Nakamura Takumi and Nico Weber for the MSVC fixes.
llvm-svn: 222472
Richard Smith [Thu, 20 Nov 2014 22:32:11 +0000 (22:32 +0000)]
PR21565: Further refine the conditions for enabling eager parsing of
std::X::swap exception specifications (allowing parsing of non-conforming code
in libstdc++). The old conditions also matched the functions in MSVC's STL,
which were relying on deferred parsing here.
llvm-svn: 222471
Simon Atanasyan [Thu, 20 Nov 2014 22:29:55 +0000 (22:29 +0000)]
[Mips] Simplify the code calculates HI16/LO16 relocations
No functional changes.
llvm-svn: 222470
Simon Atanasyan [Thu, 20 Nov 2014 22:29:49 +0000 (22:29 +0000)]
[Mips] Remove duplicated relocation calculation routines
No functional changes.
llvm-svn: 222469
Simon Atanasyan [Thu, 20 Nov 2014 22:29:43 +0000 (22:29 +0000)]
[Mips] Remove unused function argument
No functional changes.
llvm-svn: 222468
Simon Atanasyan [Thu, 20 Nov 2014 22:29:37 +0000 (22:29 +0000)]
[Mips] Use endian::read/write function to load/save MIPS32 instructions
No functional changes.
llvm-svn: 222467
Colin LeMahieu [Thu, 20 Nov 2014 22:20:40 +0000 (22:20 +0000)]
[Hexagon] [NFC] Deleting empty directory.
llvm-svn: 222466
Kaelyn Takata [Thu, 20 Nov 2014 22:06:44 +0000 (22:06 +0000)]
Ensure all TypoExprs are diagnosed by the tree transform.
If there is more than one TypoExpr within the expr being transformed and
any but the last TypoExpr seen don't have any viable candidates, the
tree transform will be aborted early and the remaining TypoExprs are
never seen and hence never diagnosed. This adds a simple
RecursiveASTVisitor to find all of the TypoExprs to be diagnosed in the
case where typo correction of the entire expr fails (and the result of
the tree transform is an ExprError).
llvm-svn: 222465
Kaelyn Takata [Thu, 20 Nov 2014 22:06:40 +0000 (22:06 +0000)]
Wire up delayed typo correction to DiagnoseEmptyLookup and set up
Sema::ActOnIdExpression to use the new functionality.
Among other things, this allows recovery in several cases where it
wasn't possible before (e.g. correcting a mistyped static_cast<>).
llvm-svn: 222464
Kaelyn Takata [Thu, 20 Nov 2014 22:06:33 +0000 (22:06 +0000)]
Add a flag to BuildDeclarationNameExpr to not reject invalid decls.
llvm-svn: 222463
Kaelyn Takata [Thu, 20 Nov 2014 22:06:30 +0000 (22:06 +0000)]
Factor out the default recovery handling.
The default handling is extended to properly create member expressions
and Objective-C ivar references.
Also detect and reject cases where multiple corrections have identical
correction distances and are valid, instead of suggesting the first one
that is found.
llvm-svn: 222462
Kaelyn Takata [Thu, 20 Nov 2014 22:06:29 +0000 (22:06 +0000)]
Add a few small helper methods to the TypoCorrectionConsumer.
llvm-svn: 222461
Kaelyn Takata [Thu, 20 Nov 2014 22:06:26 +0000 (22:06 +0000)]
Correctly set the SourceRange a TypoCorrection will replace.
Also clean up TypoCorrection::setCorrectionRange while we're at it.
llvm-svn: 222460
Jim Ingham [Thu, 20 Nov 2014 22:04:45 +0000 (22:04 +0000)]
"nexti" should not step over inlined functions.
<rdar://problem/
16705325>
llvm-svn: 222459
Colin LeMahieu [Thu, 20 Nov 2014 21:56:35 +0000 (21:56 +0000)]
[Hexagon] [NFC] Merging InstPrinter directory in to MCTargetDesc since they have a circular dependency.
llvm-svn: 222458
Nick Kledzik [Thu, 20 Nov 2014 21:41:53 +0000 (21:41 +0000)]
[mach-o] fix whitespace
llvm-svn: 222457
Aaron Ballman [Thu, 20 Nov 2014 21:34:56 +0000 (21:34 +0000)]
The Syntax enumeration requires at least three bits to store all of its values. Increase the number of bits for SyntaxUsed. Decrease the number of expression arguments allowed by a single bit so that the bit fields continue to add up to 32-bits evenly.
There is no test for this fix because I could find no reasonable way to trigger a visible failure from it.
Thanks to Doug Gregor for spotting this!
llvm-svn: 222456
Nick Kledzik [Thu, 20 Nov 2014 21:19:58 +0000 (21:19 +0000)]
[mach-o] use reference with "auto" to prevent copies
Patch by Jean-Daniel Dupas
llvm-svn: 222455
Lang Hames [Thu, 20 Nov 2014 21:16:16 +0000 (21:16 +0000)]
[MCJIT] Remove JITEventListener::NotifyFunctionEmitted - this method is dead
now that the legacy JIT has been removed.
llvm-svn: 222453
Rui Ueyama [Thu, 20 Nov 2014 21:05:05 +0000 (21:05 +0000)]
[PECOFF] Sort export table properly.
Export table entries need to be sorted in ASCII-betical order,
so that the loader can find an entry for a function by binary search.
We sorted the entries by its mangled names. That can be different
from their exported names. As a result, LLD produces incorrect export
table, from which the loader complains that a function that actually
exists in a DLL cannot be found.
This patch fixes that issue.
llvm-svn: 222452
Michael Zolotukhin [Thu, 20 Nov 2014 20:19:55 +0000 (20:19 +0000)]
Fix a trip-count overflow issue in LoopUnroll.
Currently LoopUnroll generates a prologue loop before the main loop
body to execute first N%UnrollFactor iterations. Also, this loop is
used if trip-count can overflow - it's determined by a runtime check.
However, we've been mistakenly optimizing this loop to a linear code for
UnrollFactor = 2, not taking into account that it also serves as a safe
version of the loop if its trip-count overflows.
llvm-svn: 222451
Ed Maste [Thu, 20 Nov 2014 19:43:33 +0000 (19:43 +0000)]
Remove decorator for FreeBSD test that now passes
llvm-svn: 222449
Michael Ilseman [Thu, 20 Nov 2014 19:33:33 +0000 (19:33 +0000)]
Compilation test for PostOrderIterator.
If the template specialization for externally managed sets in
PostOrderIterator call too far out of sync with each other, this unit
test will fail to build. This is especially useful for developers who
may not build Clang (the only in-tree user) every time.
llvm-svn: 222447
Michael Ilseman [Thu, 20 Nov 2014 19:33:30 +0000 (19:33 +0000)]
Update template specialization to reflect API changes.
po_iterator_storage's insertEdge was updated to reflect the API
changes from many of our insert methods in r222334, however the
template specialization for external storage was not updated. This
updates the specialization.
llvm-svn: 222446
Michael Ilseman [Thu, 20 Nov 2014 19:32:48 +0000 (19:32 +0000)]
Bring PostOrderCFGView's insert API up to date with other API changes.
r222334 updates LLVM data structure's insert API to return a
pair. This change updates PostOrderCFGView accordingly, so that it can
be used interchangably with other sets.
llvm-svn: 222445
Anastasia Stulova [Thu, 20 Nov 2014 19:25:00 +0000 (19:25 +0000)]
Extended list of valid frontend options with '-cl-std=CL2.0'.
This option sets language mode for the compilation of a source file to be OpenCL v2.0.
Example: clang -cc1 -cl-std=CL2.0 myfile.cl
llvm-svn: 222444
Ed Maste [Thu, 20 Nov 2014 18:56:11 +0000 (18:56 +0000)]
Add decorator for FreeBSD failure
llvm.org/pr21620
llvm-svn: 222442
Stephane Sezer [Thu, 20 Nov 2014 18:50:46 +0000 (18:50 +0000)]
Properly specify a few checksum values for llgs tests.
Summary: In noack mode, these checksums are ignored by llgs, but some implementations need them still. Specify these checksums to ease integration.
Test Plan: Run the tests before and after the change and make sure nothing breaks.
Reviewers: clayborg, tfiala
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D6343
llvm-svn: 222441
Stephane Sezer [Thu, 20 Nov 2014 18:50:16 +0000 (18:50 +0000)]
Fix a typo in lldb-gdb-remote.txt.
Test Plan: None.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D6342
llvm-svn: 222440
Saleem Abdulrasool [Thu, 20 Nov 2014 18:01:26 +0000 (18:01 +0000)]
X86: use the correct alloca symbol for Windows Itanium
Windows itanium targets the MSVCRT, and the stack probe symbol is provided by
MSVCRT. This corrects the emission of stack probes on i686-windows-itanium.
llvm-svn: 222439
Anastasia Stulova [Thu, 20 Nov 2014 17:57:27 +0000 (17:57 +0000)]
Testing commit access.
llvm-svn: 222438