lldb.git
6 years agoProperly provide alignment of 'byval' arguments down to llvm.
James Y Knight [Fri, 21 Aug 2015 18:19:06 +0000 (18:19 +0000)]
Properly provide alignment of 'byval' arguments down to llvm.

This is important in the case that the LLVM-inferred llvm-struct
alignment is not the same as the clang-known C-struct alignment.

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

llvm-svn: 245719

6 years agoFilter libraries that are not installed out of CMake exports (currently
Dan Liew [Fri, 21 Aug 2015 18:10:57 +0000 (18:10 +0000)]
Filter libraries that are not installed out of CMake exports (currently
gtest and gtest_main) when generating ``Makefile.llvmbuild``.

Libraries that are not installed should not be exported because they
won't be available from an install tree.  Rather than filtering out the
gtest libraries in cmake/modules/Makefile, simply teach llvm-build to
filter out libraries that will not be installed from its generated list
of exported libraries.

Note that LLVMBUILD_LIB_DEPS_* are used during our own CMake build
process so we cannot filter LLVMBUILD_LIB_DEPS_gtest* out in llvm-build.
We must leave this gtest filter logic in cmake/modules/Makefile.

llvm-svn: 245718

6 years agollvm-build: Adopt generation of LLVM_LIBS_TO_EXPORT. Patch by
Dan Liew [Fri, 21 Aug 2015 18:10:55 +0000 (18:10 +0000)]
llvm-build: Adopt generation of LLVM_LIBS_TO_EXPORT. Patch by
Brad King.

Move `LLVM_LIBS_TO_EXPORT` over to Makefile.llvmbuild and generate it
from `llvm-build` using the same logic used to export the dependencies
of these libraries.  This avoids depending on `llvm-config`.

This refactoring was originally motivated by issue #24154 due to commit
r243297 (Fix `llvm-config` to emit the linker flag for the combined
shared object, 2015-07-27) changing the output of `llvm-config --libs`
to not have the individual libraries when we configure with
`--enable-shared`.  That change was reverted by r244108 but this
refactoring makes sense on its own anyway.

llvm-svn: 245717

6 years agollvm-build: Factor out duplicate cmake export listing. Patch by
Dan Liew [Fri, 21 Aug 2015 18:10:51 +0000 (18:10 +0000)]
llvm-build: Factor out duplicate cmake export listing. Patch by
Brad King.

The write_cmake_fragment and write_cmake_exports_fragment methods share
some logic for selecting libraries that CMake needs to know about.
Factor it out into a helper to avoid duplication.

llvm-svn: 245716

6 years ago[x86] enable machine combiner reassociations for 128-bit vector min/max
Sanjay Patel [Fri, 21 Aug 2015 18:06:49 +0000 (18:06 +0000)]
[x86] enable machine combiner reassociations for 128-bit vector min/max

llvm-svn: 245715

6 years ago[CMake] Need to filter out test architectures on ubsan as well.
Chris Bieneman [Fri, 21 Aug 2015 18:06:00 +0000 (18:06 +0000)]
[CMake] Need to filter out test architectures on ubsan as well.

llvm-svn: 245714

6 years ago[CMake] Fixing haswell filtering.
Chris Bieneman [Fri, 21 Aug 2015 18:05:57 +0000 (18:05 +0000)]
[CMake] Fixing haswell filtering.

Turns out this wasn't working at all.

llvm-svn: 245713

6 years agoRemove an unnecessary use of pointee types introduced in r194220
David Blaikie [Fri, 21 Aug 2015 17:37:41 +0000 (17:37 +0000)]
Remove an unnecessary use of pointee types introduced in r194220

David Majnemer (the original author) believes this to be an impossible
condition to reach anyway, and no test cases cover this so we'll go with
that.

llvm-svn: 245712

6 years agoDisable Visual C++ 2013 Debug mode assert on null pointer in some STL algorithms,
Yaron Keren [Fri, 21 Aug 2015 17:31:03 +0000 (17:31 +0000)]
Disable Visual C++ 2013 Debug mode assert on null pointer in some STL algorithms,
such as std::equal on the third argument. This reverts previous workarounds.

Predefining _DEBUG_POINTER_IMPL disables Visual C++ 2013 headers from defining
it to a function performing the null pointer check. In practice, it's not that
bad since any function actually using the nullptr will seg fault. The other
iterator sanity checks remain enabled in the headers.

Reviewed by Aaron Ballmanþ and Duncan P. N. Exon Smith.

llvm-svn: 245711

6 years agoMIRLangRef: Describe the syntax for machine instruction names and flags.
Alex Lorenz [Fri, 21 Aug 2015 17:26:38 +0000 (17:26 +0000)]
MIRLangRef: Describe the syntax for machine instruction names and flags.

llvm-svn: 245710

6 years agosave some testing time; get rid of the non-SSE chips in this test
Sanjay Patel [Fri, 21 Aug 2015 17:16:51 +0000 (17:16 +0000)]
save some testing time; get rid of the non-SSE chips in this test

It doesn't matter what slow/fast unaligned attribute the old chips
have - they can't use anything more than 4-byte stores.

llvm-svn: 245709

6 years agoImplement handling of `library:` keys in thread stop replies.
Stephane Sezer [Fri, 21 Aug 2015 16:51:56 +0000 (16:51 +0000)]
Implement handling of `library:` keys in thread stop replies.

Summary:
When a windows remote stops because of a DLL load/unload, the debug server
sends a stop reply packet that contains a `library` key with any value (usually
just `library:1`). This indicates to the debugger that a library has been
loaded or unloaded and that the list of libraries should be refreshed (usually
with `qXfer:libraries:read`).

This change just triggers a call to `LoadModules()` which in turns will send a
remote library read command when a stop reply that requests it is received.

Reviewers: clayborg, zturner, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 245708

6 years ago[APFloat] Remove else after return and replace loop with std::equal. NFC.
Benjamin Kramer [Fri, 21 Aug 2015 16:44:52 +0000 (16:44 +0000)]
[APFloat] Remove else after return and replace loop with std::equal. NFC.

llvm-svn: 245707

6 years agoFix typo - symetric -> symmetric.
Eric Christopher [Fri, 21 Aug 2015 16:24:01 +0000 (16:24 +0000)]
Fix typo - symetric -> symmetric.

llvm-svn: 245706

6 years agoFix typo - symetric -> symmetric.
Eric Christopher [Fri, 21 Aug 2015 16:23:39 +0000 (16:23 +0000)]
Fix typo - symetric -> symmetric.

llvm-svn: 245705

6 years agoadd a test case to check the fast-unaligned-mem attribute per CPU
Sanjay Patel [Fri, 21 Aug 2015 16:08:26 +0000 (16:08 +0000)]
add a test case to check the fast-unaligned-mem attribute per CPU

This will confirm that the patch in D12154 is actually NFC.
It will also confirm that the proposed changes for the AMD chips
are behaving as expected.

llvm-svn: 245704

6 years ago[clang-tidy] Migrate UseAuto from clang-modernize to clang-tidy.
Angel Garcia Gomez [Fri, 21 Aug 2015 15:08:51 +0000 (15:08 +0000)]
[clang-tidy] Migrate UseAuto from clang-modernize to clang-tidy.

http://reviews.llvm.org/D12231

llvm-svn: 245703

6 years ago[compiler-rt] [sanitizers] Add aarch64 syscall optimization support
Adhemerval Zanella [Fri, 21 Aug 2015 14:50:36 +0000 (14:50 +0000)]
[compiler-rt] [sanitizers] Add aarch64 syscall optimization support

This patch adds the inline syscall support for aarch64 instead of relying
on the syscall runtime function.

llvm-svn: 245702

6 years agoTest commit!
Angel Garcia Gomez [Fri, 21 Aug 2015 13:55:16 +0000 (13:55 +0000)]
Test commit!

llvm-svn: 245701

6 years ago[RecordLayoutBuilder] Remove duplicated diagnostic argument. NFC.
Benjamin Kramer [Fri, 21 Aug 2015 12:51:01 +0000 (12:51 +0000)]
[RecordLayoutBuilder] Remove duplicated diagnostic argument. NFC.

llvm-svn: 245700

6 years ago[clang-tidy] Remove check_clang_tidy.sh that has been replaced with check_clang_tidy.py.
Alexander Kornienko [Fri, 21 Aug 2015 12:41:14 +0000 (12:41 +0000)]
[clang-tidy] Remove check_clang_tidy.sh that has been replaced with check_clang_tidy.py.

llvm-svn: 245699

6 years agoRemove unused diagnostic.
Benjamin Kramer [Fri, 21 Aug 2015 12:29:47 +0000 (12:29 +0000)]
Remove unused diagnostic.

llvm-svn: 245698

6 years ago[OPENMP 4.1] Add codegen for 'simdlen' clause.
Alexey Bataev [Fri, 21 Aug 2015 12:19:04 +0000 (12:19 +0000)]
[OPENMP 4.1] Add codegen for 'simdlen' clause.
Add emission of metadata for simd loops in presence of 'simdlen' clause.
If 'simdlen' clause is provided without 'safelen' clause, the vectorizer width for the loop is set to value of 'simdlen' clause + all read/write ops in loop are marked with '!llvm.mem.parallel_loop_access' metadata.
If 'simdlen' clause is provided along with 'safelen' clause, the vectorizer width for the loop is set to value of 'simdlen' clause + all read/write ops in loop are not marked with '!llvm.mem.parallel_loop_access' metadata.
If 'safelen' clause is provided without 'simdlen' clause, the vectorizer width for the loop is set to value of 'safelen' clause + all read/write ops in loop are not marked with '!llvm.mem.parallel_loop_access' metadata.

llvm-svn: 245697

6 years agoFix BuildAddressRangeTable function when no debug arranges present
Tamas Berghammer [Fri, 21 Aug 2015 12:14:50 +0000 (12:14 +0000)]
Fix BuildAddressRangeTable function when no debug arranges present

llvm-svn: 245696

6 years agoFix type of dw_form_t in dwarf.h
Tamas Berghammer [Fri, 21 Aug 2015 12:14:47 +0000 (12:14 +0000)]
Fix type of dw_form_t in dwarf.h

llvm-svn: 245695

6 years agoclang-format: Be more conservative about specially indenting blocks in C++.
Daniel Jasper [Fri, 21 Aug 2015 11:44:57 +0000 (11:44 +0000)]
clang-format: Be more conservative about specially indenting blocks in C++.

This is a bit of a step back of what we did in r222531, as there are
some corner cases in C++, where this kind of formatting is really bad.

Example:
Before:
  virtual aaaaaaaaaaaaaaaa(std::function<bool()> IsKindWeWant = [&]() {
    return true;
  }, aaaaa aaaaaaaaa);

After:
  virtual aaaaaaaaaaaaaaaa(std::function<bool()> IsKindWeWant =
                               [&]() { return true; },
                           aaaaa aaaaaaaaa);

The block formatting logic in JavaScript will probably go some other changes,
too, and we'll potentially be able to make the rules more consistent again. For
now, this seems to be the best approach for C++.

llvm-svn: 245694

6 years ago[OPENMP 4.1] Add ast-print tests for 'val', 'uval' and 'ref' modifiers.
Alexey Bataev [Fri, 21 Aug 2015 11:32:42 +0000 (11:32 +0000)]
[OPENMP 4.1] Add ast-print tests for 'val', 'uval' and 'ref' modifiers.

llvm-svn: 245693

6 years ago[OPENMP 4.1] Initial support for 'simdlen' clause.
Alexey Bataev [Fri, 21 Aug 2015 11:14:16 +0000 (11:14 +0000)]
[OPENMP 4.1] Initial support for 'simdlen' clause.
Add parsing/sema analysis for 'simdlen' clause in simd directives. Also add check that if both 'safelen' and 'simdlen' clauses are specified, the value of 'simdlen' parameter is less than the value of 'safelen' parameter.

llvm-svn: 245692

6 years agoIncrease timeout in TestExpressionInSyscall
Pavel Labath [Fri, 21 Aug 2015 10:52:02 +0000 (10:52 +0000)]
Increase timeout in TestExpressionInSyscall

test times out on the windows->android buildbot (probably due to android emulator being slow)

llvm-svn: 245691

6 years agoFix assertion failure caused by r245546
Tamas Berghammer [Fri, 21 Aug 2015 10:49:09 +0000 (10:49 +0000)]
Fix assertion failure caused by r245546

Change the way EmulateInstruction::eContextPopRegisterOffStack handled
in UnwindAssemblyInstEmulation::WriteRegister to accomodate for
additional cases when eContextPopRegisterOffStack (pop PC/FLAGS).

llvm-svn: 245690

6 years ago[DAGCombiner] Fold together mul and shl when both are by a constant
John Brawn [Fri, 21 Aug 2015 10:48:17 +0000 (10:48 +0000)]
[DAGCombiner] Fold together mul and shl when both are by a constant

This is intended to improve code generation for GEPs, as the index value is
shifted by the element size and in GEPs of multi-dimensional arrays the index
of higher dimensions is multiplied by the lower dimension size.

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

llvm-svn: 245689

6 years agoMake test EOL tolerant by moving the symbol ot the first line
Yaron Keren [Fri, 21 Aug 2015 10:46:46 +0000 (10:46 +0000)]
Make test EOL tolerant by moving the symbol ot the first line
before any EOL changes the byte offset count and enable it on Windows.

llvm-svn: 245688

6 years agoAdd repro test case for bug #24530
Pavel Labath [Fri, 21 Aug 2015 10:38:31 +0000 (10:38 +0000)]
Add repro test case for bug #24530

llvm-svn: 245687

6 years ago[CMake][Standalone] Detect Python. Python is used for Lit testing.
NAKAMURA Takumi [Fri, 21 Aug 2015 09:38:46 +0000 (09:38 +0000)]
[CMake][Standalone] Detect Python. Python is used for Lit testing.

llvm-svn: 245685

6 years agoUntabify.
NAKAMURA Takumi [Fri, 21 Aug 2015 09:37:53 +0000 (09:37 +0000)]
Untabify.

llvm-svn: 245684

6 years agoTweak clang-tidy-diff.py to recognize "filename" in the diff ourput.
Yaron Keren [Fri, 21 Aug 2015 09:27:24 +0000 (09:27 +0000)]
Tweak clang-tidy-diff.py to recognize "filename" in the diff ourput.

llvm-svn: 245683

6 years ago[NativeProcessLinux] Reduce the number of casts
Pavel Labath [Fri, 21 Aug 2015 09:13:53 +0000 (09:13 +0000)]
[NativeProcessLinux] Reduce the number of casts

Summary:
NPL used to be peppered with casts of the NativeThreadProtocol objects into NativeThreadLinux. I
move these closer to the source where we obtain these objects. This way, the rest of the code can
assume we are working with the correct type of objects.

Reviewers: ovyalov, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 245681

6 years agoManually check a loop form
Roman Gareev [Fri, 21 Aug 2015 09:08:14 +0000 (09:08 +0000)]
Manually check a loop form

Add manual check of a loop form and return non-negative number of iterations
in case of trivially vectorizable loop.

llvm-svn: 245680

6 years agoExpand mingw-long-double.c to test for long double alignment.
Yaron Keren [Fri, 21 Aug 2015 08:26:31 +0000 (08:26 +0000)]
Expand mingw-long-double.c to test for long double alignment.

llvm-svn: 245679

6 years agoRevert r245635, "[InstCombine] Transform A & (L - 1) u< L --> L != 0"
NAKAMURA Takumi [Fri, 21 Aug 2015 07:46:07 +0000 (07:46 +0000)]
Revert r245635, "[InstCombine] Transform A & (L - 1) u< L --> L != 0"

It caused miscompilation in clang.

llvm-svn: 245678

6 years agoCOFF: Improve debug helper function.
Rui Ueyama [Fri, 21 Aug 2015 07:01:10 +0000 (07:01 +0000)]
COFF: Improve debug helper function.

SectionChunk::getDebugName crashed if the symbol was a nullptr.

llvm-svn: 245677

6 years agoCOFF: Fix /lldmap option.
Rui Ueyama [Fri, 21 Aug 2015 07:01:08 +0000 (07:01 +0000)]
COFF: Fix /lldmap option.

isLive returns false if it's not COMDAT, so check for that condition.

llvm-svn: 245676

6 years ago[Sema] Don't crash when diagnosing hack in libstdc++
David Majnemer [Fri, 21 Aug 2015 06:44:10 +0000 (06:44 +0000)]
[Sema] Don't crash when diagnosing hack in libstdc++

While working around a bug in certain standard library implementations,
we would try to diagnose the issue so that library implementors would
fix their code.  However, we assumed an entity being initialized was
a non-static data member subobject when other circumstances are
possible.

This fixes PR24526.

llvm-svn: 245675

6 years ago[OPENMP 4.1] Improved codegen for 'uval' qualifier of 'linear' clause.
Alexey Bataev [Fri, 21 Aug 2015 06:41:23 +0000 (06:41 +0000)]
[OPENMP 4.1] Improved codegen for 'uval' qualifier of 'linear' clause.
According to standard the 'uval' modifier declares the address of the original list item to have an invariant value for all iterations of the associated loop(s). Patch improves codegen for this qualifier by removing usage of the original reference variable and replacing by referenced l-value.

llvm-svn: 245674

6 years agoTest Commit: Reformats 2 lines in LangRef.rst
Mohammad Shahid [Fri, 21 Aug 2015 05:31:07 +0000 (05:31 +0000)]
Test Commit: Reformats 2 lines in LangRef.rst

llvm-svn: 245673

6 years agoLinker: Remove empty destructor.
Peter Collingbourne [Fri, 21 Aug 2015 04:51:24 +0000 (04:51 +0000)]
Linker: Remove empty destructor.

llvm-svn: 245672

6 years agoLTO: Simplify ownership of LTOCodeGenerator::TargetMach.
Peter Collingbourne [Fri, 21 Aug 2015 04:45:57 +0000 (04:45 +0000)]
LTO: Simplify ownership of LTOCodeGenerator::TargetMach.

llvm-svn: 245671

6 years agoLTO: Simplify ownership of LTOCodeGenerator::CodegenOptions.
Peter Collingbourne [Fri, 21 Aug 2015 04:45:55 +0000 (04:45 +0000)]
LTO: Simplify ownership of LTOCodeGenerator::CodegenOptions.

llvm-svn: 245670

6 years agobuiltins: restrict aliases
Saleem Abdulrasool [Fri, 21 Aug 2015 04:39:52 +0000 (04:39 +0000)]
builtins: restrict aliases

MachO and COFF do not support aliases.  Restrict the alias to ELF targets.  This
should also fix the Darwin build.  Make the FNALIAS usage an error on non-ELF
targets.

llvm-svn: 245669

6 years ago[Sparc] Support user-specified stack object overalignment.
James Y Knight [Fri, 21 Aug 2015 04:17:56 +0000 (04:17 +0000)]
[Sparc] Support user-specified stack object overalignment.

Note: I do not implement a base pointer, so it's still impossible to
have dynamic realignment AND dynamic alloca in the same function.

This also moves the code for determining the frame index reference
into getFrameIndexReference, where it belongs, instead of inline in
eliminateFrameIndex.

[Begin long-winded screed]

Now, stack realignment for Sparc is actually a silly thing to support,
because the Sparc ABI has no need for it -- unlike the situation on
x86, the stack is ALWAYS aligned to the required alignment for the CPU
instructions: 8 bytes on sparcv8, and 16 bytes on sparcv9.

However, LLVM unfortunately implements user-specified overalignment
using stack realignment support, so for now, I'm going to go along
with that tradition. GCC instead treats objects which have alignment
specification greater than the maximum CPU-required alignment for the
target as a separate block of stack memory, with their own virtual
base pointer (which gets aligned). Doing it that way avoids needing to
implement per-target support for stack realignment, except for the
targets which *actually* have an ABI-specified stack alignment which
is too small for the CPU's requirements.

Further unfortunately in LLVM, the default canRealignStack for all
targets effectively returns true, despite that implementing that is
something a target needs to do specifically. So, the previous behavior
on Sparc was to silently ignore the user's specified stack
alignment. Ugh.

Yet MORE unfortunate, if a target actually does return false from
canRealignStack, that also causes the user-specified alignment to be
*silently ignored*, rather than emitting an error.

(I started looking into fixing that last, but it broke a bunch of
tests, because LLVM actually *depends* on having it silently ignored:
some architectures (e.g. non-linux i386) have smaller stack alignment
than spilled-register alignment. But, the fact that a register needs
spilling is not known until within the register allocator. And by that
point, the decision to not reserve the frame pointer has been frozen
in place. And without a frame pointer, stack realignment is not
possible. So, canRealignStack() returns false, and
needsStackRealignment() then returns false, assuming everyone can just
go on their merry way assuming the alignment requirements were
probably just suggestions after-all. Sigh...)

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

llvm-svn: 245668

6 years agoStop treating -static as overriding -fPIC: they are distinct.
James Y Knight [Fri, 21 Aug 2015 04:14:55 +0000 (04:14 +0000)]
Stop treating -static as overriding -fPIC: they are distinct.

For some reason, clang had been treating a command like:
 clang -static -fPIC foo.c
as if it should be compiled without the PIC relocation model.

This was incorrect: -static should be affecting only the linking
model, and -fPIC only the compilation.

This new behavior also matches GCC.

This is a follow-up from a review comment on r245447.

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

llvm-svn: 245667

6 years agoFix a few things with -Winfinite-recursion. NFC
Richard Trieu [Fri, 21 Aug 2015 03:43:09 +0000 (03:43 +0000)]
Fix a few things with -Winfinite-recursion.  NFC

Now that -Winfinite-recursion no longer uses recursive calls to before path
analysis, several bits of the code can be improved.  The main changes:

1) Early return when finding a path to the exit block without a recursive call
2) Moving the states vector into checkForRecursiveFunctionCall instead of
   passing it in by reference
3) Change checkForRecursiveFunctionCall to return a bool when the warning
   should be emitted.
4) Use the State vector instead of storing it in the Stack vector.

llvm-svn: 245666

6 years agounwind: fix invalid memory access
Saleem Abdulrasool [Fri, 21 Aug 2015 03:21:31 +0000 (03:21 +0000)]
unwind: fix invalid memory access

Fix out-of-bounds array access when setting arm float registers.

Patch by Leandro Graciá Gil!

llvm-svn: 245665

6 years ago[modules] When we see a definition of a function for which we already have a
Richard Smith [Fri, 21 Aug 2015 03:04:33 +0000 (03:04 +0000)]
[modules] When we see a definition of a function for which we already have a
non-visible definition, skip the new definition to avoid ending up with a
function with multiple definitions.

llvm-svn: 245664

6 years ago[compiler-rt] Add libgcc compatibility aliases for __cmp{s,d,f}f2.
Josh Gao [Fri, 21 Aug 2015 02:51:17 +0000 (02:51 +0000)]
[compiler-rt] Add libgcc compatibility aliases for __cmp{s,d,f}f2.

Reviewers: compnerd

Subscribers: asl, llvm-commits

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

llvm-svn: 245663

6 years agoTransformUtils: Introduce module splitter.
Peter Collingbourne [Fri, 21 Aug 2015 02:48:20 +0000 (02:48 +0000)]
TransformUtils: Introduce module splitter.

The module splitter splits a module into linkable partitions. It will
be used to implement parallel LTO code generation.

This initial version of the splitter does not attempt to deal with the
somewhat subtle symbol visibility issues around module splitting. These
will be dealt with in a future change.

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

llvm-svn: 245662

6 years agoSparcAsmParser.cpp: Appease msc x86.
NAKAMURA Takumi [Fri, 21 Aug 2015 01:12:19 +0000 (01:12 +0000)]
SparcAsmParser.cpp: Appease msc x86.

llvm-svn: 245661

6 years agoImplement __aeabi_c{d,f}{cmpeq,cmple,rcmple}.
Josh Gao [Fri, 21 Aug 2015 00:25:37 +0000 (00:25 +0000)]
Implement __aeabi_c{d,f}{cmpeq,cmple,rcmple}.

Summary: Implement more missing ARM EABI runtime functions.

Reviewers: rengolin, compnerd

Subscribers: pirama, srhines, danalbert, aemerson, llvm-commits

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

llvm-svn: 245648

6 years agoAArch64: Fix testcase of r245640
Matthias Braun [Fri, 21 Aug 2015 00:23:19 +0000 (00:23 +0000)]
AArch64: Fix testcase of r245640

llvm-svn: 245647

6 years ago[Static Analyzer] Add checker to catch lightweight generics related type errors in...
Gabor Horvath [Fri, 21 Aug 2015 00:18:28 +0000 (00:18 +0000)]
[Static Analyzer] Add checker to catch lightweight generics related type errors in Objective-C.

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

llvm-svn: 245646

6 years agoThe llvm Triple for an armv6m now comes back as llvm::Triple::thumb.
Jason Molenda [Fri, 21 Aug 2015 00:13:37 +0000 (00:13 +0000)]
The llvm Triple for an armv6m now comes back as llvm::Triple::thumb.
This was breaking disassembly for arm machines that we force to be
thumb mode all the time because we were only checking for llvm::Triple::arm.
i.e.

armv6m (ARM Cortex-M0)
armv7m (ARM Cortex-M3)
armv7em (ARM Cortex-M4)

<rdar://problem/22334522>

llvm-svn: 245645

6 years ago[SLP] Add one more test case for propagating 'nontemporal' attributes.
Michael Zolotukhin [Fri, 21 Aug 2015 00:08:39 +0000 (00:08 +0000)]
[SLP] Add one more test case for propagating 'nontemporal' attributes.

llvm-svn: 245644

6 years agodelete more dead code from this testcase.
Adrian Prantl [Fri, 21 Aug 2015 00:02:04 +0000 (00:02 +0000)]
delete more dead code from this testcase.

llvm-svn: 245643

6 years agoFurther reduce the IR in this testcase based on a further reduction
Adrian Prantl [Thu, 20 Aug 2015 23:59:39 +0000 (23:59 +0000)]
Further reduce the IR in this testcase based on a further reduction
of the original source by David Blaikie (thanks!).

llvm-svn: 245642

6 years agoAArch64: Fix cmp;ccmp ordering
Matthias Braun [Thu, 20 Aug 2015 23:33:34 +0000 (23:33 +0000)]
AArch64: Fix cmp;ccmp ordering

When producing conditional compare sequences for or operations we need
to negate the operands and the finally tested flags. The thing is if we negate
the finally tested flags this equals a logical negation of all previously
emitted expressions. There was a case missing where we have to order OR
expressions so they get emitted first.

This fixes http://llvm.org/PR24459

llvm-svn: 245641

6 years agoAArch64: Do not create CCMP on multiple users.
Matthias Braun [Thu, 20 Aug 2015 23:33:31 +0000 (23:33 +0000)]
AArch64: Do not create CCMP on multiple users.

Create CMP;CCMP sequences from and/or trees does not gain us anything if
the and/or tree is materialized to a GP register anyway. While most of
the code already checked for hasOneUse() there was one important case
missing.

llvm-svn: 245640

6 years agoMake UriParser to support [$HOSTNAME] notation.
Oleksiy Vyalov [Thu, 20 Aug 2015 23:09:34 +0000 (23:09 +0000)]
Make UriParser to support [$HOSTNAME] notation.

http://reviews.llvm.org/D12025

llvm-svn: 245639

6 years ago[InstSimplify] add nuw %x, C2 must be at least C2
David Majnemer [Thu, 20 Aug 2015 23:01:41 +0000 (23:01 +0000)]
[InstSimplify] add nuw %x, C2 must be at least C2

Use the fact that add nuw always creates a larger bit pattern when
trying to simplify comparisons.

llvm-svn: 245638

6 years ago[Static Analyzer] Made it easier to test new checkers using the test suite.
Gabor Horvath [Thu, 20 Aug 2015 22:59:49 +0000 (22:59 +0000)]
[Static Analyzer] Made it easier to test new checkers using the test suite.

llvm-svn: 245637

6 years ago[WebAssembly] Mark more operators as Expand.
Dan Gohman [Thu, 20 Aug 2015 22:57:13 +0000 (22:57 +0000)]
[WebAssembly] Mark more operators as Expand.

llvm-svn: 245636

6 years ago[InstCombine] Transform A & (L - 1) u< L --> L != 0
Sanjoy Das [Thu, 20 Aug 2015 22:31:55 +0000 (22:31 +0000)]
[InstCombine] Transform A & (L - 1) u< L --> L != 0

Summary:
This transform is never a pessimization at the IR level (since it
replaces an `icmp` with another), and has potentiall payoffs:

 1. It may make the `icmp` fold away or become loop invariant.
 2. It may make the `A & (L - 1)` computation dead.

This shows up in Java, in range checks generated by array accesses of
the form `a[i & (a.length - 1)]`.

Reviewers: reames, majnemer

Subscribers: llvm-commits

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

llvm-svn: 245635

6 years agoRun clang-format on DynamicLoaderWindowsDYLD.
Stephane Sezer [Thu, 20 Aug 2015 22:30:20 +0000 (22:30 +0000)]
Run clang-format on DynamicLoaderWindowsDYLD.

Summary:
This uses the .clang-format at the root of the LLDB repo and is just a
mechanical change that precedes more work in this file.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 245634

6 years ago[SLP] Propagate 'nontemporal' attribute into vectorized instructions.
Michael Zolotukhin [Thu, 20 Aug 2015 22:28:15 +0000 (22:28 +0000)]
[SLP] Propagate 'nontemporal' attribute into vectorized instructions.

llvm-svn: 245633

6 years ago[LoopVectorize] Propagate 'nontemporal' attribute into vectorized instructions.
Michael Zolotukhin [Thu, 20 Aug 2015 22:27:38 +0000 (22:27 +0000)]
[LoopVectorize] Propagate 'nontemporal' attribute into vectorized instructions.

llvm-svn: 245632

6 years agoChange TestBSDArchives to expectedFailureWindows.
Zachary Turner [Thu, 20 Aug 2015 22:25:45 +0000 (22:25 +0000)]
Change TestBSDArchives to expectedFailureWindows.

llvm-svn: 245631

6 years ago[Windows] XFAIL tests that require calling a function in target.
Zachary Turner [Thu, 20 Aug 2015 22:09:35 +0000 (22:09 +0000)]
[Windows] XFAIL tests that require calling a function in target.

This has known issues on Windows.  Fixing this is tracked by
http://llvm.org/pr21765

llvm-svn: 245630

6 years agoXFAIL breakpoint tests on Windows
Zachary Turner [Thu, 20 Aug 2015 22:09:08 +0000 (22:09 +0000)]
XFAIL breakpoint tests on Windows

llvm.org/pr24528 tracks fixing this test.

llvm-svn: 245629

6 years agoXFAIL TestBSDArchives.py on Windows
Zachary Turner [Thu, 20 Aug 2015 22:08:57 +0000 (22:08 +0000)]
XFAIL TestBSDArchives.py on Windows

llvm.org/pr24527 tracks this bug.  Makefile.rules does not know
how to build static libraries on Windows.

llvm-svn: 245628

6 years agoXFAIL TestAnonymous.test_expr_null_with_dwarf on Windows.
Zachary Turner [Thu, 20 Aug 2015 22:08:48 +0000 (22:08 +0000)]
XFAIL TestAnonymous.test_expr_null_with_dwarf on Windows.

This bug is tracked in llvm.org/pr21550, and also reproduces on
FreeBSD apparently.

llvm-svn: 245627

6 years ago[ProcessWindows] Fix rare crash on shutdown.
Zachary Turner [Thu, 20 Aug 2015 22:08:38 +0000 (22:08 +0000)]
[ProcessWindows] Fix rare crash on shutdown.

There might be an underlying race condition here that should be
figured out, but this at least prevents the crash for the time
being and doesn't appear to have any adverse effects.

llvm-svn: 245626

6 years agoUnderstand absolute base addresses in ProcessGDBRemote::GetLoadedModuleList.
Stephane Sezer [Thu, 20 Aug 2015 22:07:48 +0000 (22:07 +0000)]
Understand absolute base addresses in ProcessGDBRemote::GetLoadedModuleList.

Summary:
This is useful when dealing with Windows remote that use only the
qXfer:libraries command which returns absolute base addresses, as
opposed to qXfer:libraries-svr4 which returns relative offsets for
module bases.

Reviewers: clayborg, zturner, ADodds

Subscribers: lldb-commits

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

llvm-svn: 245625

6 years ago[CMake] Turns out CMake was passing the space as part of the argument instead of...
Chris Bieneman [Thu, 20 Aug 2015 22:06:46 +0000 (22:06 +0000)]
[CMake] Turns out CMake was passing the space as part of the argument instead of separating two arguments.

llvm-svn: 245624

6 years agoRename Instruction::dropUnknownMetadata() to dropUnknownNonDebugMetadata()
Adrian Prantl [Thu, 20 Aug 2015 22:00:30 +0000 (22:00 +0000)]
Rename Instruction::dropUnknownMetadata() to dropUnknownNonDebugMetadata()
and make it always preserve debug locations, since all callers wanted this
behavior anyway.

This is addressing a post-commit review feedback for r245589.

NFC (inside the LLVM tree).

llvm-svn: 245622

6 years ago[analyzer] Fix for PR24112 (scan-build doesn't work with --use-analyzer="path to...
Anton Yartsev [Thu, 20 Aug 2015 21:52:39 +0000 (21:52 +0000)]
[analyzer] Fix for PR24112 (scan-build doesn't work with --use-analyzer="path to clang++.exe").

Don't derive the path_to_clang++ from the path_to_clang if the path_to_clang is really the path_to_clang++.

llvm-svn: 245621

6 years ago Revert the 64bit part of r245084; long double values were not changed by
Yaron Keren [Thu, 20 Aug 2015 21:51:46 +0000 (21:51 +0000)]
 Revert the 64bit part of r245084; long double values were not changed by
 it as they are already set correctly by X86_64TargetInfo and X86TargetInfo.

llvm-svn: 245620

6 years agoRevert r245344.
Evgeniy Stepanov [Thu, 20 Aug 2015 21:47:16 +0000 (21:47 +0000)]
Revert r245344.

That change is causing strange test failures on Fedora 22 (PR24503),
and it does not have any effect with Gold linker anyway (PR15823,
https://sourceware.org/bugzilla/show_bug.cgi?id=18859).

llvm-svn: 245619

6 years agoRevert the 32bit part of r245084; mingw values were correct before it.
Yaron Keren [Thu, 20 Aug 2015 21:36:14 +0000 (21:36 +0000)]
Revert the 32bit part of r245084; mingw values were correct before it.

llvm-svn: 245618

6 years agoDo not intersect with AssumedContext in calculateMinMaxAccess
Tobias Grosser [Thu, 20 Aug 2015 21:29:26 +0000 (21:29 +0000)]
Do not intersect with AssumedContext in calculateMinMaxAccess

Originally, we intersected the iteration space with the AssumedContext before
computing the minimal/maximal memory offset in our run-time alias checks. With
this patch we drop this intersection as the AssumedContext can - for larger or
more complex scops - become very complicated (contain many disjuncts). When
intersecting an object with many disjuncts with other objects, the number of
disjuncts in these other objects also increases quickly. As a result, the
compile time is unnecessarily increased. This patch now drops the intersection
with the assumed context to ensure we do not pay unnecessary compile time
costs.

With this patch we see -3.17% reduction in compile time for 3mm with default
flags and -17.87% when compiling 3mm with -DPOLYBENCH_USE_C99_PROTO flag. We
did not observe any regressions in LNT.

Contributed-by: Pratik Bhatu <cs12b1010@iith.ac.in>
Reviewers: grosser

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

llvm-svn: 245617

6 years agoDo not crash when static analysis encounters a FunctionDecl that has a delayed templa...
Aaron Ballman [Thu, 20 Aug 2015 21:27:35 +0000 (21:27 +0000)]
Do not crash when static analysis encounters a FunctionDecl that has a delayed template parse of its body.

llvm-svn: 245616

6 years ago[asan] Fix build issue from r245596
Adhemerval Zanella [Thu, 20 Aug 2015 21:06:26 +0000 (21:06 +0000)]
[asan] Fix build issue from r245596

This patch fixes the build issue for:

sanitizer_platform.h:88:4: error: #error "invalid SANITIZER_AARCH64_VMA size"

llvm-svn: 245614

6 years ago[X86] Look for scalar through one bitcast when lowering to VBROADCAST.
Ahmed Bougacha [Thu, 20 Aug 2015 21:02:39 +0000 (21:02 +0000)]
[X86] Look for scalar through one bitcast when lowering to VBROADCAST.

Fixes PR23464: one way to use the broadcast intrinsics is:

  _mm256_broadcastw_epi16(_mm_cvtsi32_si128(*(int*)src));

We don't currently fold this, but now that we use native IR for
the intrinsics (r245605), we can look through one bitcast to find
the broadcast scalar.

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

llvm-svn: 245613

6 years ago[X86] Add some broadcast-from-memory tests.
Ahmed Bougacha [Thu, 20 Aug 2015 20:59:41 +0000 (20:59 +0000)]
[X86] Add some broadcast-from-memory tests.

llvm-svn: 245612

6 years ago[NVPTX] truncating 64-bit to 32-bit is free
Jingyue Wu [Thu, 20 Aug 2015 20:59:02 +0000 (20:59 +0000)]
[NVPTX] truncating 64-bit to 32-bit is free

Summary:
Add an LSR test that exercises isTruncateFree. Without this change, LSR creates
another indvar representing the truncated value.

Reviewers: jholewinski, eliben

Subscribers: jholewinski, llvm-commits

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

llvm-svn: 245611

6 years agoInline fake snprintf to avoid linkage issues on Windows.
Chaoren Lin [Thu, 20 Aug 2015 20:53:15 +0000 (20:53 +0000)]
Inline fake snprintf to avoid linkage issues on Windows.

Summary:
dllexport doesn't work if linking against a static library with its own
copy of snprintf.

Reviewers: zturner

Subscribers: zturner, lldb-commits

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

llvm-svn: 245610

6 years agoPR24483: Delete some dead/incorrect code that triggered assertions.
Richard Smith [Thu, 20 Aug 2015 20:45:25 +0000 (20:45 +0000)]
PR24483: Delete some dead/incorrect code that triggered assertions.

llvm-svn: 245609

6 years agoFix some format strings in ProcessGDBRemote.cpp.
Stephane Sezer [Thu, 20 Aug 2015 20:43:29 +0000 (20:43 +0000)]
Fix some format strings in ProcessGDBRemote.cpp.

Summary: Size specifier should come after `%` not before.

Reviewers: clayborg, ADodds

Subscribers: lldb-commits

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

llvm-svn: 245608

6 years agoFix test on Windows to accept both gcc and gcc.exe.
Yaron Keren [Thu, 20 Aug 2015 20:37:58 +0000 (20:37 +0000)]
Fix test on Windows to accept both gcc and gcc.exe.

llvm-svn: 245607

6 years ago[X86] Replace avx2 broadcast intrinsics with native IR.
Ahmed Bougacha [Thu, 20 Aug 2015 20:36:19 +0000 (20:36 +0000)]
[X86] Replace avx2 broadcast intrinsics with native IR.

Since r245605, the clang headers don't use these anymore.
r245165 updated some of the tests already; update the others, add
an autoupgrade, remove the intrinsics, and cleanup the definitions.

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

llvm-svn: 245606

6 years ago[Headers][X86] Use __builtin_shufflevector in AVX2 broadcasts.
Ahmed Bougacha [Thu, 20 Aug 2015 20:27:21 +0000 (20:27 +0000)]
[Headers][X86] Use __builtin_shufflevector in AVX2 broadcasts.

This lets us optimize them better. We agreed to remove the intrinsics,
instead of combining them later, as, at -O0, we generate the expected
instructions. Plus, it's a nice cleanup.

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

llvm-svn: 245605

6 years ago[CMake] Simplifying logic for USES_TERMINAL on bootstrap targets.
Chris Bieneman [Thu, 20 Aug 2015 20:12:20 +0000 (20:12 +0000)]
[CMake] Simplifying logic for USES_TERMINAL on bootstrap targets.

In CMake variables that haven't been set are evaluated to empty strings, so we don't need to set the variables to empty strings.

llvm-svn: 245604