Jason Molenda [Tue, 8 Jul 2014 23:46:39 +0000 (23:46 +0000)]
Tweak for lldb coding style consistency.
llvm-svn: 212575
Nico Weber [Tue, 8 Jul 2014 23:46:20 +0000 (23:46 +0000)]
rewrap to 80 cols, no behavior change
llvm-svn: 212574
Jim Grosbach [Tue, 8 Jul 2014 23:28:48 +0000 (23:28 +0000)]
AArch64: Better codegen for loading from __fp16.
Loading will generally extend to an f32 or an 64, so make sure
to match those patterns directly to load into the FPR16 register
class directly rather than going through the integer GPRs.
This also eliminates an extra step in the convert-to-f64 path
which was first converting to f32 and then to f64 from there.
rdar://
17594379
llvm-svn: 212573
Hal Finkel [Tue, 8 Jul 2014 23:16:49 +0000 (23:16 +0000)]
Improve BasicAA CS-CS queries
BasicAA contains knowledge of certain intrinsics, such as memcpy and memset,
and uses that information to form more-accurate answers to CallSite vs. Loc
ModRef queries. Unfortunately, it did not use this information when answering
CallSite vs. CallSite queries.
Generically, when an intrinsic takes one or more pointers and the intrinsic is
marked only to read/write from its arguments, the offset/size is unknown. As a
result, the generic code that answers CallSite vs. CallSite (and CallSite vs.
Loc) queries in AA uses UnknownSize when forming Locs from an intrinsic's
arguments. While BasicAA's CallSite vs. Loc override could use more-accurate
size information for some intrinsics, it did not do the same for CallSite vs.
CallSite queries.
This change refactors the intrinsic-specific logic in BasicAA into a generic AA
query function: getArgLocation, which is overridden by BasicAA to supply the
intrinsic-specific knowledge, and used by AA's generic implementation. This
allows the intrinsic-specific knowledge to be used by both CallSite vs. Loc and
CallSite vs. CallSite queries, and simplifies the BasicAA implementation.
Currently, only one function, Mac's memset_pattern16, is handled by BasicAA
(all the rest are intrinsics). As a side-effect of this refactoring, BasicAA's
getModRefBehavior override now also returns OnlyAccessesArgumentPointees for
this function (which is an improvement).
llvm-svn: 212572
Rui Ueyama [Tue, 8 Jul 2014 23:11:01 +0000 (23:11 +0000)]
[PECOFF] Fix .bss section alignment
Previously the alignment of the .bss section was not
properly set because of a bug in AtomizeDefinedSymbolsInSection.
We set the alignment of the section at the end of the function,
but we use an eraly return for the .bss section, so the code had
been skipped.
llvm-svn: 212571
Tobias Grosser [Tue, 8 Jul 2014 22:51:03 +0000 (22:51 +0000)]
DominanceInfo is strongly preferred over RegionInfo
This is and always was strong community consensus. Make this clear in the header
in case newcomers may not be aware.
llvm-svn: 212570
Marshall Clow [Tue, 8 Jul 2014 22:38:11 +0000 (22:38 +0000)]
string_view enhancements. Move to the correct namespace. Better constexpr support (thanks to Richard for the suggestions). Update the tests to match this. Add <experimental/__config for experimental macros/etc to live.
llvm-svn: 212569
Kevin Enderby [Tue, 8 Jul 2014 22:10:02 +0000 (22:10 +0000)]
Add support for BSD format Archive map symbols (aka the table of contents
from a __.SYMDEF or "__.SYMDEF SORTED" archive member).
llvm-svn: 212568
Greg Clayton [Tue, 8 Jul 2014 21:45:21 +0000 (21:45 +0000)]
Make sure that qProcessInfo packet returns correct cpu type/subtype for processes on Haswell machines with a Haswell enabled kernel.
<rdar://problem/
17332107>
llvm-svn: 212567
Reid Kleckner [Tue, 8 Jul 2014 21:35:03 +0000 (21:35 +0000)]
MS compat: Allow lookup of types from dependent bases in functions
If we want to resolve the remaining FIXMEs here, we probably want to
extend the main lookup mechanism to perform lookup into dependent bases,
but we would have to tread lightly. Adding more name lookup has major
impact on compile time.
If we did extend the main mechanism, we would add a flag to LookupResult
that allows us to find names from dependent base classes where the base
is a specialization of a known template. The final LookupResult would
still return LookupResult::NotFoundInCurrentInstantiation, but it would
have a collection of Decls. If we find a real lookup result, we would
clear the flag and the existing lookup results and begin accumulating
only real lookup results.
We would structure the lookup as a secondary lookup between normal
lookup and typo correction for normal compilation, but for MSVC
compatibility mode, we would always enable this extra lookup into
dependent bases.
llvm-svn: 212566
Dmitry Vyukov [Tue, 8 Jul 2014 20:37:16 +0000 (20:37 +0000)]
tsan: reapply 212531 and 212532 with a fix
don't reset s->addr as well
llvm-svn: 212565
Alexey Samsonov [Tue, 8 Jul 2014 20:23:18 +0000 (20:23 +0000)]
Remove unnecessary check for NULL
llvm-svn: 212564
Saleem Abdulrasool [Tue, 8 Jul 2014 20:21:29 +0000 (20:21 +0000)]
test: merge arm-intrin into ms-intrin, fix invocation
This merges the two tests into one since there is no real reason to separate
them. It also fixes the test invocation to specify -fms-compatibility without
which we would end up without an Intrin.h header.
llvm-svn: 212563
Alexey Samsonov [Tue, 8 Jul 2014 20:17:19 +0000 (20:17 +0000)]
[TSan] Revert r212531 and r212532.
They cause "check-tsan" command to hang. Details in r212532 review thread.
llvm-svn: 212562
Reid Kleckner [Tue, 8 Jul 2014 20:05:48 +0000 (20:05 +0000)]
Allow more lookup of types in dependent base classes
MSVC appears to perform name lookup into dependent base classes when the
dependent base class has a known primary template. This allows them to
know whether some unqualified ids are types or not, which allows them to
parse more class templates without typename keywords.
We can do the same thing when type name lookup fails, and if we find a
single type decl in one of our dependent base classes, recover as though
the user wrote 'typename MyClass::TypeFromBase'.
This allows us to parse some COM smart pointer classes in wrl/client.h
from the Windows 8 SDK.
Reviewers: rsmith
Differential Revision: http://reviews.llvm.org/D4237
llvm-svn: 212561
Dmitry Vyukov [Tue, 8 Jul 2014 20:01:12 +0000 (20:01 +0000)]
tsan: allow memory overlap in __tsan_java_move
JVM actually moves memory between overlapping ranges.
llvm-svn: 212560
Jim Ingham [Tue, 8 Jul 2014 19:28:57 +0000 (19:28 +0000)]
Add the ability to provide a "count" option to the various "thread step-*" operations. Only
step-inst and step-inst are currently supported, the rest just warn that they are not supported
if you try to provide a count.
llvm-svn: 212559
Jim Ingham [Tue, 8 Jul 2014 19:27:35 +0000 (19:27 +0000)]
Document the "thread.completed-expression" feature in the "expression" command help.
llvm-svn: 212558
Nico Weber [Tue, 8 Jul 2014 18:34:46 +0000 (18:34 +0000)]
Don't pull in setjmp.h in -ffreestanding compiles.
Also provide _setjmpex(). r200243 put in _setjmp() and _setjmpex() behind a
comment since jmp_buf wasn't available. r200344 added jmp_buf and put in
_setjmp(), but missed _setjmpex().
llvm-svn: 212557
Nico Weber [Tue, 8 Jul 2014 18:29:27 +0000 (18:29 +0000)]
Replace a few // comments with /**/ comments in headers, for consistency.
llvm-svn: 212556
David Majnemer [Tue, 8 Jul 2014 18:18:04 +0000 (18:18 +0000)]
Sema: Don't allow CVR qualifiers before structors
We would silently accept volatile ~S() when the user probably intended
to write virtual ~S().
This fixes PR20238.
llvm-svn: 212555
Bruce Mitchener [Tue, 8 Jul 2014 18:09:58 +0000 (18:09 +0000)]
Revert accidental change to Xcode project.
llvm-svn: 212554
Bruce Mitchener [Tue, 8 Jul 2014 18:05:41 +0000 (18:05 +0000)]
Fix typos.
llvm-svn: 212553
Jean-Daniel Dupas [Tue, 8 Jul 2014 17:42:17 +0000 (17:42 +0000)]
Simplify Host::GetOSVersion() on macosx.
It removes usage of the deprecated function CFURLCreateDataAndPropertiesFromResource().
llvm-svn: 212552
Richard Smith [Tue, 8 Jul 2014 17:25:14 +0000 (17:25 +0000)]
PR20227: materialize a temporary when dynamic_casting a class prvalue to a
reference type.
llvm-svn: 212551
Pete Cooper [Tue, 8 Jul 2014 17:06:03 +0000 (17:06 +0000)]
Revert "GlobalDCE: Delete available_externally initializers if it allows removing the value the initializer is referring to."
This reverts commit
5b55a47e94e28fbb56d0cd5d72c3db9105c15b4c.
A test case was found to crash after this was applied. I'll file a bug to track fixing this with the test case needed.
llvm-svn: 212550
Benjamin Kramer [Tue, 8 Jul 2014 16:42:54 +0000 (16:42 +0000)]
As funny as it might look, this wasn't what I intended to test.
llvm-svn: 212549
Todd Fiala [Tue, 8 Jul 2014 16:29:54 +0000 (16:29 +0000)]
Remove hack from dotest.py to fix extra output on -P command, and fix MacOSX multi-threaded test run collisions on crashlog.dylib.
On MacOSX, we need to adjust the way we clean up the crashlog dylib in deleteCrashInfoDylib().
Right now it is only geared to run one test at a time. For now I'm just skipping the delete.
I'll work with Apple on a fix that handles this. It seems to only cause one dylib total to
hang around that might otherwise have been deleted. Fixes MacOSX multiple tests running
at the same time. (I didn't hit this on Yosemite, might be an issue that only shows up
on Mavericks?)
llvm-svn: 212548
Ulrich Weigand [Tue, 8 Jul 2014 16:16:02 +0000 (16:16 +0000)]
[PowerPC] Implement atomic NAND operations as actual NAND
This changes the implementation of atomic NAND operations
from "a & ~b" (compatible with GCC < 4.4) to actual "~(a & b)"
(compatible with GCC >= 4.4).
This is in line with the common-code and ARM back-end change
implemented in r212433.
llvm-svn: 212547
Benjamin Kramer [Tue, 8 Jul 2014 16:15:48 +0000 (16:15 +0000)]
Use explicit if and restore lost FileCheck error code checking.
llvm-svn: 212546
Benjamin Kramer [Tue, 8 Jul 2014 16:07:39 +0000 (16:07 +0000)]
Update unit test for signature change.
llvm-svn: 212545
Benjamin Kramer [Tue, 8 Jul 2014 16:07:36 +0000 (16:07 +0000)]
Turn some Twine locals into const char * variables.
No functionality change, just stylistic cleanup. Change made by clang-tidy
and clang-format.
llvm-svn: 212544
Todd Fiala [Tue, 8 Jul 2014 15:55:32 +0000 (15:55 +0000)]
Fix broken tests due to new error output.
This reverses out the options validators changes. We'll get these
back in once the changes to the output can be resolved.
Restores broken tests on FreeBSD, Linux, MacOSX.
Changes reverted: r212500, r212317, r212290.
llvm-svn: 212543
Simon Atanasyan [Tue, 8 Jul 2014 15:47:55 +0000 (15:47 +0000)]
[Mips] Make rel-dynamic-07.test test case independent from external input files.
llvm-svn: 212542
David Blaikie [Tue, 8 Jul 2014 15:46:02 +0000 (15:46 +0000)]
Improve memory ownership of vfs::Files in the FileSystemStatCache by using std::unique_ptr
Spotted after a memory leak (due to the complexities of manual memory
management) was fixed in 212466.
llvm-svn: 212541
Benjamin Kramer [Tue, 8 Jul 2014 15:41:20 +0000 (15:41 +0000)]
[clang-tidy] Address review comments for the Twine checker.
- Remove unused includes.
- Minor wording fix.
- Added support to check for clang-tidy messages to check_clang_tidy_fix.sh
= Updated test case.
llvm-svn: 212540
Andrea Di Biagio [Tue, 8 Jul 2014 15:22:29 +0000 (15:22 +0000)]
[DAG] Teach how to combine a pair of shuffles into a single shuffle if the resulting mask is legal.
This patch teaches how to fold a shuffle according to rule:
shuffle (shuffle (x, undef, M0), undef, M1) -> shuffle(x, undef, M2)
We do this only if the resulting mask M2 is legal; this is to avoid introducing
illegal shuffles that are potentially expanded into a sub-optimal sequence
of target specific dag nodes.
This patch has the advantage of being target independent, since it works on ISD
nodes. Therefore, all targets (not only x86) can take advantage of this rule.
The idea behind this patch is that most shuffle pairs can be safely combined
before we run the legalizer on vector operations. This allows us to
combine/simplify dag nodes earlier in the process and not only immediately
before instruction selection stage.
That said. This patch is not meant to replace any existing target specific
combine rules; backends might still introduce new shuffles during legalization
stage. Also, this rule is very simple and avoids to aggressively optimize
shuffles.
llvm-svn: 212539
Marshall Clow [Tue, 8 Jul 2014 15:19:40 +0000 (15:19 +0000)]
Fix some failing tests for the standard containers. The tests were failing in 32-bit mode because they assumed that std::size_type and make_unsigned<ptrdiff_t>::type were always the same type. No change to libc++, just the tests.
llvm-svn: 212538
Benjamin Kramer [Tue, 8 Jul 2014 14:55:06 +0000 (14:55 +0000)]
Fix some Twine locals.
Two of those are use after frees. Found by clang-tidy, fixed by me.
llvm-svn: 212537
Todd Fiala [Tue, 8 Jul 2014 14:52:11 +0000 (14:52 +0000)]
Fix broken MacOSX Xcode build for CommandOptionValidators.cpp.
llvm-svn: 212536
Benjamin Kramer [Tue, 8 Jul 2014 14:32:17 +0000 (14:32 +0000)]
[clang-tidy] Add a little checker for Twine locals in LLVM.
Those often cause use after free bugs and should be generally avoided.
Technically it is safe to have a Twine with >=2 components in a variable
but I don't think it is a good pattern to follow. The almost trivial checker
comes with elaborated fix-it hints that turn the Twine into a std::string
if necessary and otherwise fall back to the original type if the Twine
is created from a single value.
llvm-svn: 212535
Evgeniy Stepanov [Tue, 8 Jul 2014 14:15:23 +0000 (14:15 +0000)]
[msan] Fix out of bounds access in origin copying.
llvm-svn: 212534
Kostya Serebryany [Tue, 8 Jul 2014 13:40:08 +0000 (13:40 +0000)]
[tsan] Enable tsan's deadlock detector by default.
The tsan's deadlock detector has been used in Chromium for a while;
it found a few real bugs and reported no false positives.
So, it's time to give it a bit more exposure.
llvm-svn: 212533
Dmitry Vyukov [Tue, 8 Jul 2014 13:36:59 +0000 (13:36 +0000)]
tsan: fix a potential hang
idx0 is not updated in the branch,
so if we take that branch idx0 will stay updated forever
llvm-svn: 212532
Dmitry Vyukov [Tue, 8 Jul 2014 13:28:01 +0000 (13:28 +0000)]
tsan: fix a bug in metamap
The bug happens in the following case:
Mutex is located at heap block beginning,
when we call MutexDestroy, s->next is set to 0,
so free can't find the MBlock related to the block.
llvm-svn: 212531
Timur Iskhodzhanov [Tue, 8 Jul 2014 13:18:58 +0000 (13:18 +0000)]
[ASan/Win] Don't instrument private COMDAT globals until PR20244 is properly fixed
llvm-svn: 212530
Kostya Serebryany [Tue, 8 Jul 2014 13:16:03 +0000 (13:16 +0000)]
[tsan] fix deadlock detector's interoperation with java locks (https://code.google.com/p/thread-sanitizer/issues/detail?id=67)
llvm-svn: 212529
Daniel Sanders [Tue, 8 Jul 2014 13:13:42 +0000 (13:13 +0000)]
[mips] Fixed struct/class mismatch introduced in r212522.
Clang emits a warning about this.
llvm-svn: 212528
Dmitry Vyukov [Tue, 8 Jul 2014 13:07:23 +0000 (13:07 +0000)]
tsan: remove unnecessary line split
llvm-svn: 212527
Kostya Serebryany [Tue, 8 Jul 2014 12:46:30 +0000 (12:46 +0000)]
[tsan] fix pthread_rwlock_tryrdlock interceptor, don't try to detect deadlocks when reporting bad unlock
llvm-svn: 212526
Alexander Musman [Tue, 8 Jul 2014 11:33:21 +0000 (11:33 +0000)]
[OPENMP] Allow ‘reduction’ clause on ‘omp simd’ directive.
llvm-svn: 212525
Richard Sandiford [Tue, 8 Jul 2014 11:10:34 +0000 (11:10 +0000)]
Move misplaced x86_32 ABI code
r184166 added an X86_32 function in the middle of the SystemZ code.
The SystemZ port had been added only a couple of weeks earlier and
the original patch probably predated that.
No behavioral change intended.
llvm-svn: 212524
Daniel Sanders [Tue, 8 Jul 2014 10:35:52 +0000 (10:35 +0000)]
Fix r212522 - [mips] Improve encapsulation of the .MIPS.abiflags implementation and limit scope of related enums
Added two lines that should have been in r212522.
llvm-svn: 212523
Daniel Sanders [Tue, 8 Jul 2014 10:11:38 +0000 (10:11 +0000)]
[mips] Improve encapsulation of the .MIPS.abiflags implementation and limit scope of related enums
Summary:
Follow on to r212519 to improve the encapsulation and limit the scope of the enums.
Also merged two very similar parser functions, fixed a bug where ASE's
were not being reported, and marked CPR1's as being 128-bit when MSA is
enabled.
Differential Revision: http://reviews.llvm.org/D4384
llvm-svn: 212522
Renato Golin [Tue, 8 Jul 2014 10:06:16 +0000 (10:06 +0000)]
Revert "Refactor ARM subarchitecture parsing"
This reverts commit
7b4a6882467e7fef4516a0cbc418cbfce0fc6f6d.
llvm-svn: 212521
Arnaud A. de Grandmaison [Tue, 8 Jul 2014 09:53:04 +0000 (09:53 +0000)]
Truncate the immediate in logical operation to the register width
And continue to produce an error if the 32 most significant bits are not all ones or zeros.
llvm-svn: 212520
Vladimir Medic [Tue, 8 Jul 2014 08:59:22 +0000 (08:59 +0000)]
Mips.abiflags is a new implicitly generated section that will be present on all new modules. The section contains a versioned data structure which represents essentially information to allow a program loader to determine the requirements of the application. This patch implements mips.abiflags section and provides test cases for it.
llvm-svn: 212519
Viktor Kutuzov [Tue, 8 Jul 2014 08:52:57 +0000 (08:52 +0000)]
Support building floating-point facilities on FreeBSD 9.2 in 32-bit mode
Differential Revision: http://reviews.llvm.org/D3909
llvm-svn: 212518
Chandler Carruth [Tue, 8 Jul 2014 08:45:38 +0000 (08:45 +0000)]
[x86,SDAG] Sink the logic for folding shuffles of splats more
aggressively from the x86 shuffle lowering to the generic SDAG vector
shuffle formation code.
This code already tried to fold away shuffles of splats! It just had
lots of bugs and couldn't handle the case my new x86 shuffle lowering
needed.
First, it failed to correctly compute whether N2 was undef because it
pre-computed this, then did transformations which could *make* N2 undef,
then failed to ever re-consider the precomputed state.
Second, it didn't look through bitcasts at all, even in the safe cases
where they are just element-type bitcasts with no change to the number
of elements.
Third, it didn't handle all-zero bit casts nicely the way my code in the
x86 side of things did, which is essential to getting good zext-shuffle
lowerings.
But all of these are generic. I just ported the code down to this layer
and fixed the surrounding bugs. Tests exercising this in the x86 backend
still pass and some silly code in widen_cast-6.ll gets better. I updated
that test to be a bit more precise but it's still pretty unclear what
the value of the test is in this day and age.
llvm-svn: 212517
Alexey Bataev [Tue, 8 Jul 2014 08:12:03 +0000 (08:12 +0000)]
[OPENMP] Parsing and sema analysis for 'omp parallel sections' directive.
llvm-svn: 212516
Chandler Carruth [Tue, 8 Jul 2014 07:44:15 +0000 (07:44 +0000)]
[SDAG] Actually check for a non-constant splat and clarify comments
around the handling of UNDEF lanes in boolean vector content analysis.
The code before my changes here also failed to check for non-constant
splats in a buildvector. I have no idea how to trigger this, I just
spotted by inspection when trying to understand the code. It seems
extremely unlikely to be worth the trouble to teach the only caller of
this code (DAG combining setcc patterns) how to cleverly handle undef
lanes, so I've just commented more thoroughly that we're giving up
there.
llvm-svn: 212515
Chandler Carruth [Tue, 8 Jul 2014 07:19:55 +0000 (07:19 +0000)]
[SDAG] Build up a more rich set of APIs for querying build-vector SDAG
nodes about whether they are splats. This is factored out and improved
from r212324 which got reverted as it was far too aggressive. The new
API should help more conservatively handle buildvectors that are
a mixture of splatted and undef values.
No functionality change at this point. The hope is to slowly
re-introduce the undef-tolerant optimization of splats, but each time
being forced to make a concious decision about how to handle the undefs
in a way that doesn't lead to contradicting assumptions about the
collapsed value.
Hal has pointed out in discussions that this may not end up being the
desired API and instead it may be more convenient to get a mask of the
undef elements or something similar. I'm starting simple and will expand
the API as I adapt actual callers and see exactly what they need.
llvm-svn: 212514
Todd Fiala [Tue, 8 Jul 2014 06:42:37 +0000 (06:42 +0000)]
Enable multi-process testing for MacOSX.
This change modifies the way the multi-threaded test runner works.
It uses the Python multiprocessing library rather than the threading
library. Investigation showed that all MacOSX threads were waiting on
the global python lock when using the threading approach. Not sure
why that differed from the Linux/FreeBSD implementations.
The new approach uses the multiprocessing library's Pool class. It's
mildly cleaner than the other version, runs multithreaded on MacOSX,
and seems to have caused no performance regression on Linux. The
worker thread logic is simpler with the Pool managing the worker
processes.
This also includes a minor change to the test runner's python
lldb dir logic using the -P option. It now looks at the last line
of output rather than the first line. This covers part of the issue
of extra options validation logic getting spit out. The test runner
will now pick up the right python library directory. It does not
fix all the issues, though, as a ton of tests (50+ on Linux) are
failing due to unexpected output when running lldb.
llvm-svn: 212513
Saleem Abdulrasool [Tue, 8 Jul 2014 05:46:04 +0000 (05:46 +0000)]
Headers: conditionalise more declarations
Protect MMX specific declarations under a __MMX__ guard. This header can be
included on non-x86 architectures (e.g. ARM) which do not support the MMX ISA.
Use the preprocessor to prevent these declarations from being processed.
llvm-svn: 212512
Saleem Abdulrasool [Tue, 8 Jul 2014 05:46:00 +0000 (05:46 +0000)]
Headers: mark arm_acle.h with extern "C"
Although the functions are marked as always_inline, the compiler with which they
are used may not honour the extended attributes and emit them as functions. In
such a case, indicate that they should have extern "C" linkage and should not be
mangled in C++ style if used within C++.
llvm-svn: 212511
Zachary Turner [Tue, 8 Jul 2014 04:52:15 +0000 (04:52 +0000)]
Implment "platform process list" for Windows.
This patch implements basic functionality of the "platform process
list" command for Windows. Currently this has the following
limitations.
* Certain types of filtering are not enabled (e.g. filtering by
architecture with -a), although most filters work.
* The username of the process is not yet obtained.
* Using -v to list verbose information generates an error.
* The architecture column displays the entire triple, leading to
misaligned formatting of the printed table.
Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D4413
llvm-svn: 212510
Zachary Turner [Tue, 8 Jul 2014 04:28:07 +0000 (04:28 +0000)]
Fix a compilation failure caused by a non-const reference.
llvm-svn: 212509
Reid Kleckner [Tue, 8 Jul 2014 02:24:27 +0000 (02:24 +0000)]
MS ABI: "Fix" passing non-POD structs by value to variadic functions
Of course, such code is horribly broken and will explode on impact.
That said, ATL does it, and we have to support them, at least a little
bit.
Fixes PR20191.
llvm-svn: 212508
Jim Ingham [Tue, 8 Jul 2014 01:10:49 +0000 (01:10 +0000)]
Add docs for the "thread.completed-expression" format entry.
llvm-svn: 212507
Jim Ingham [Tue, 8 Jul 2014 01:07:32 +0000 (01:07 +0000)]
If a hand-called function is interrupted by hitting a breakpoint, then
when you continue to finish off the function call, the expression result
will be included as part of the thread stop info.
llvm-svn: 212506
Alexey Samsonov [Tue, 8 Jul 2014 00:50:49 +0000 (00:50 +0000)]
[ASan] Completely remove sanitizer blacklist file from instrumentation pass.
All blacklisting logic is now moved to the frontend (Clang).
If a function (or source file it is in) is blacklisted, it doesn't
get sanitize_address attribute and is therefore not instrumented.
If a global variable (or source file it is in) is blacklisted, it is
reported to be blacklisted by the entry in llvm.asan.globals metadata,
and is not modified by the instrumentation.
The latter may lead to certain false positives - not all the globals
created by Clang are described in llvm.asan.globals metadata (e.g,
RTTI descriptors are not), so we may start reporting errors on them
even if "module" they appear in is blacklisted. We assume it's fine
to take such risk:
1) errors on these globals are rare and usually indicate wild memory access
2) we can lazily add descriptors for these globals into llvm.asan.globals
lazily.
llvm-svn: 212505
Adam Nemet [Tue, 8 Jul 2014 00:22:32 +0000 (00:22 +0000)]
[X86] AVX512: Only allow k1-k7 as predicates to vpcmp*
As destination k0 is allowed but not as predicate/writemask.
I also modified the test to allow checking of error messages by the assembler.
I applied a similar approach to the test ret.s in the same directory.
llvm-svn: 212504
Alexey Samsonov [Tue, 8 Jul 2014 00:03:11 +0000 (00:03 +0000)]
Kill unnecessary include
llvm-svn: 212503
Alp Toker [Tue, 8 Jul 2014 00:02:05 +0000 (00:02 +0000)]
Rename static function to better describe its purpose
llvm-svn: 212502
Alexey Samsonov [Mon, 7 Jul 2014 23:59:57 +0000 (23:59 +0000)]
[Sanitizer] Remove brittle cache variable and slightly simplify blacklisting code.
Now CodeGenFunction is responsible for looking at sanitizer blacklist
(in CodeGenFunction::StartFunction) and turning off instrumentation,
if necessary.
No functionality change.
llvm-svn: 212501
Zachary Turner [Mon, 7 Jul 2014 23:54:51 +0000 (23:54 +0000)]
Invalidate process UID/GID-related command options on Windows.
Windows uses a different process security model and does not have
a concept of process UID or GID. This patch makes these options
invalid on Windows. Attempting to specify these options when the
current platform is Windows will generate an error.
Reviewed by: Jim Ingham
Differential Revision: http://reviews.llvm.org/D4373
llvm-svn: 212500
Alexey Samsonov [Mon, 7 Jul 2014 23:34:34 +0000 (23:34 +0000)]
[Sanitizer] Reduce the usage of sanitizer blacklist in CodeGenModule
Get rid of cached CodeGenModule::SanOpts, which was used to turn off
sanitizer codegen options if current LLVM Module is blacklisted, and use
plain LangOpts.Sanitize instead.
1) Some codegen decisions (turning TBAA or writable strings on/off)
shouldn't depend on the contents of blacklist.
2) llvm.asan.globals should *always* be created, even if the module
is blacklisted - soon Clang's CodeGen where we read sanitizer
blacklist files, so we should properly report which globals are
blacklisted to the backend.
llvm-svn: 212499
Andrea Di Biagio [Mon, 7 Jul 2014 23:25:23 +0000 (23:25 +0000)]
[x86] Fix assertion failure caused by a wrong combine of PSHUFD nodes with different types.
When combining a sequence of two PSHUFD dag nodes into a single PSHUFD,
make sure that we assign the correct type to the resulting PSHUFD.
X86ISD::PSHUFD dag nodes can be either MVT::v4i32 or MVT::v4f32.
Before this change, an assertion failure was triggered in method
'DAGCombinerInfo::CombineTo' when trying to combine the shuffles from the test
below into a single PSHUFD.
define <4 x float> @test1(<4 x float> %V) {
%1 = shufflevector <4 x float> %V, <4 x float> undef, <4 x i32> <i32 3, i32 0, i32 2, i32 1>
%2 = shufflevector <4 x float> %1, <4 x float> undef, <4 x i32> <i32 3, i32 0, i32 2, i32 1>
ret <4 x float> %2
}
llvm-svn: 212498
Alp Toker [Mon, 7 Jul 2014 22:42:03 +0000 (22:42 +0000)]
libclang: pass return code out argument by reference
r212427 formalized the message-passing pattern by making these argument
structures const. This commit changes output arguments to get passed by
reference so we can eliminate mutable fields.
llvm-svn: 212497
Joe Groff [Mon, 7 Jul 2014 22:25:15 +0000 (22:25 +0000)]
ASTContext: Factor 'getObjCEncodingForPropertyType' as its own method.
It is useful to get the property encoding for an ObjC type without a full
ObjCPropertyDecl.
llvm-svn: 212496
Sanjay Patel [Mon, 7 Jul 2014 22:13:58 +0000 (22:13 +0000)]
fixed some typos
llvm-svn: 212495
Alp Toker [Mon, 7 Jul 2014 21:57:42 +0000 (21:57 +0000)]
PlistSupport: make utility functions non-static inline to encourage linker dedup
llvm-svn: 212494
Juergen Ributzka [Mon, 7 Jul 2014 21:52:21 +0000 (21:52 +0000)]
[FastISel][X86] Fix smul.with.overflow.i8 lowering.
Add custom lowering code for signed multiply instruction selection, because the
default FastISel instruction selection for ISD::MUL will use unsigned multiply
for the i8 type and signed multiply for all other types. This would set the
incorrect flags for the overflow check.
This fixes <rdar://problem/
17549300>
llvm-svn: 212493
Louis Gerbarg [Mon, 7 Jul 2014 21:37:51 +0000 (21:37 +0000)]
Allow AArch64FastISel to degrade graceully in the presence of an MVT::i128
Currently AArch64FastISel crashes if it tries to extend an integer into an
MVT::i128. This can happen by creating 128 bit integers like so:
typedef unsigned int uint128_t __attribute__((mode(TI)));
typedef int sint128_t __attribute__((mode(TI)));
This patch makes EmitIntExt check for their presence and then falls back to
SelectionDAG.
Tests included.
rdar://
17516686
llvm-svn: 212492
Todd Fiala [Mon, 7 Jul 2014 21:28:37 +0000 (21:28 +0000)]
Mark test_watchpoint_multiple_threads_with_dwarf as XFAIL on Linux/clang.
See http://llvm.org/bugs/show_bug.cgi?id=20233 for details.
llvm-svn: 212491
Sanjay Patel [Mon, 7 Jul 2014 21:19:00 +0000 (21:19 +0000)]
Fix for PR17073 ( llvm.org/pr17073 ), simplifycfg illegally hoists an operation in a phi node that can trap.
This patch adds to an existing loop over phi nodes in SimplifyCondBranchToCondBranch() to check for trapping ops and bails out of the optimization if we find one of those.
The test cases verify that trapping ops are not hoisted and non-trapping ops are still optimized as expected.
llvm-svn: 212490
Todd Fiala [Mon, 7 Jul 2014 21:13:39 +0000 (21:13 +0000)]
Mark Radar9974002DataFormatterTestCase test XFAIL on Linux.
See http://llvm.org/bugs/show_bug.cgi?id=20232 for details.
llvm-svn: 212489
Todd Fiala [Mon, 7 Jul 2014 21:07:41 +0000 (21:07 +0000)]
Marked TestLongjmp.py tests XFAIL for Linux.
See http://llvm.org/bugs/show_bug.cgi?id=20231
llvm-svn: 212488
Alexey Samsonov [Mon, 7 Jul 2014 20:59:10 +0000 (20:59 +0000)]
[MSan] Make one more test standalone
llvm-svn: 212487
Todd Fiala [Mon, 7 Jul 2014 20:58:38 +0000 (20:58 +0000)]
Marked TestFormatters.py XFAIL on Linux per pr20230.
See http://www.llvm.org/bugs/show_bug.cgi?id=20230 for details.
llvm-svn: 212486
Todd Fiala [Mon, 7 Jul 2014 20:47:24 +0000 (20:47 +0000)]
Allow specification of no source display on stop.
See http://llvm.org/bugs/show_bug.cgi?id=20149 for details.
Change by Randy Smith.
llvm-svn: 212485
Alexey Samsonov [Mon, 7 Jul 2014 20:37:12 +0000 (20:37 +0000)]
[MSan] Use a single file for dso-origin test
llvm-svn: 212484
Rafael Espindola [Mon, 7 Jul 2014 20:34:51 +0000 (20:34 +0000)]
Use raw_fd_ostream instead of std::ofstream.
llvm-svn: 212483
David Majnemer [Mon, 7 Jul 2014 20:29:00 +0000 (20:29 +0000)]
CMake: Let LLDB build with CMake 3
Teach add_lldb_library to correctly use the CMake 2.8.12
PUBLIC/PRIVATE/INTERFACE keywords. LLDB's CMake configuration would
inconsistently apply these keywords; this was previously a warning in
CMake 2.x but became an error in CMake 3.
llvm-svn: 212482
Reid Kleckner [Mon, 7 Jul 2014 20:23:27 +0000 (20:23 +0000)]
Driver: Produce crash diagnostics more often on Windows
Assertion failures call abort(), which return an exit code of 3 on
Windows. The 'not' utility has the same check.
Unfortunately, the crash-report.c test requires a shell, so it does not
run for me locally, so I can only test this manually.
There's still more work to be done here: we should generate a batch
script instead of a shell script on Windows.
llvm-svn: 212481
Simon Atanasyan [Mon, 7 Jul 2014 20:14:49 +0000 (20:14 +0000)]
[Mips] Make rel-dynamic-05.test test case independent from external input files.
llvm-svn: 212480
Renato Golin [Mon, 7 Jul 2014 20:01:11 +0000 (20:01 +0000)]
Refactor ARM subarchitecture parsing
According to a FIXME in ARMMCTargetDesc.cpp the ARM version parsing should be
in the Triple helper class.
Patch by: Gabor Ballabas
llvm-svn: 212479
Ulrich Weigand [Mon, 7 Jul 2014 19:41:54 +0000 (19:41 +0000)]
[PowerPC] Fix testcase regression
Use -mcpu to avoid different codegen depending on host platform.
llvm-svn: 212478
Ulrich Weigand [Mon, 7 Jul 2014 19:39:44 +0000 (19:39 +0000)]
[PowerPC] Fix no-assert build
r212476 caused a compile failure (unused variable) in a non-assertion
build ...
llvm-svn: 212477
Ulrich Weigand [Mon, 7 Jul 2014 19:26:41 +0000 (19:26 +0000)]
[PowerPC] Fix "byval align" arguments
Arguments passed as "byval align" should get the specified alignment
in the parameter save area. There was some code in PPCISelLowering.cpp
that attempted to implement this, but this didn't work correctly:
while code did update the ArgOffset value, it neglected to update
the PtrOff value (which was already computed from the old ArgOffset),
and it also neglected to update GPR_idx -- fields skipped due to
alignment in the save area must likewise be skipped in GPRs.
This patch fixes and simplifies this logic by:
- handling argument offset alignment right at the beginning
of argument processing, using a new helper routine
CalculateStackSlotAlignment (this avoids having to update
PtrOff and other derived values later on)
- not tracking GPR_idx separately, but always computing the
correct GPR_idx for each argument *from* its ArgOffset
- removing some redundant computation in LowerFormalArguments:
MinReservedArea must equal ArgOffset after argument processing,
so there's no use in computing it twice.
[This doesn't change the behavior of the current clang front-end,
since that never creates "byval align" arguments at the moment.
This will change with a follow-on patch, however.]
llvm-svn: 212476