Commit Graph

211124 Commits

Author SHA1 Message Date
Siva Chandra 4327d7aa12 [TestCppIncompleteTypes] Fix Makefile to handle different archs.
Reviewers: chying

Subscribers: lldb-commits

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

llvm-svn: 248416
2015-09-23 18:36:39 +00:00
Sanjay Patel 1a6534661b [x86] replace integer 'xor' ops with packed SSE FP 'xor' ops when operating on FP scalars
Turn this:

movd %xmm0, %eax
movd %xmm1, %ecx
xorl %eax, %ecx
movd %ecx, %xmm0

into this:

xorps %xmm1, %xmm0

This is related to, but does not solve:
https://llvm.org/bugs/show_bug.cgi?id=22428

This is an extension of:
http://reviews.llvm.org/rL248395

llvm-svn: 248415
2015-09-23 18:33:42 +00:00
Ed Maste c6dd651518 Handle new types in ClangASTContext::GetEncoding
And remove the switch default, so that the -Wcovered-switch-default
warning will catch new types next time they're added.

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

llvm-svn: 248414
2015-09-23 18:32:34 +00:00
Artem Belevich 8d20bd3917 Reverted r248408 "[CUDA] Added CUDA installation detector class."
because included test fails on some platforms.

llvm-svn: 248413
2015-09-23 18:28:30 +00:00
Rafael Espindola c2d211994d Create the .bss section early so that we don't have to set it after the fact.
llvm-svn: 248412
2015-09-23 18:25:05 +00:00
Ed Maste 9b597c7a1e Remove expectedFailureFreeBSD from passing test
ClassTypesTestCase::test_with_dwarf_and_constructor_name

llvm.org/pr14540

llvm-svn: 248411
2015-09-23 18:23:38 +00:00
Ed Maste 00719f5dec Remove expectedFailureFreeBSD from passing TestChangeValueAPI test
This test used fail intermittently, but now passes consistently on
FreeBSD in local runs. We'll investigate further if it's intermittent
on the FreeBSD buildbot, once it's restored.

llvm.org/pr15039

llvm-svn: 248410
2015-09-23 18:20:51 +00:00
Sanjay Patel aba37553c4 [x86] replace integer 'or' ops with packed SSE FP 'or' ops when operating on FP scalars
Turn this:

movd %xmm0, %eax
movd %xmm1, %ecx
orl %eax, %ecx
movd %ecx, %xmm0

into this:

orps %xmm1, %xmm0

This is related to, but does not solve:
https://llvm.org/bugs/show_bug.cgi?id=22428

This is an extension of:
http://reviews.llvm.org/rL248395

llvm-svn: 248409
2015-09-23 18:19:07 +00:00
Artem Belevich e75405b4ea [CUDA] Added CUDA installation detector class.
Added new option --cuda-path=<path> which allows
overriding default search paths.
If it's not specified we look for CUDA installation in
/usr/include/cuda and /usr/include/cuda-7.0.

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

llvm-svn: 248408
2015-09-23 18:13:25 +00:00
Jonathan Peyton 1acc2dbf6e Update Reference.pdf files.
This updates the Reference.pdf files to say LLVM OpenMP Runtime Library and
also updates the build documentation to show how to build with CMake.

llvm-svn: 248407
2015-09-23 18:09:47 +00:00
Adrian Prantl 4c36e2f47e Fix the order of operations.
llvm-svn: 248406
2015-09-23 18:09:01 +00:00
Evgeniy Stepanov a2002b08f7 Android support for SafeStack.
Add two new ways of accessing the unsafe stack pointer:

* At a fixed offset from the thread TLS base. This is very similar to
  StackProtector cookies, but we plan to extend it to other backends
  (ARM in particular) soon. Bionic-side implementation here:
  https://android-review.googlesource.com/170988.
* Via a function call, as a fallback for platforms that provide
  neither a fixed TLS slot, nor a reasonable TLS implementation (i.e.
  not emutls).

This is a re-commit of a change in r248357 that was reverted in
r248358.

llvm-svn: 248405
2015-09-23 18:07:56 +00:00
Sanjay Patel b14ecd34f7 move call to convertIntLogicToFPLogic up; NFCI
The BEXTR comments didn't make sense before, we may want to extend the
FP logic transform to work on vectors, and this way is more beautiful.

llvm-svn: 248404
2015-09-23 18:03:37 +00:00
Adrian Prantl c040893085 Temporarily make testcase more verbose to debug a msvc buildbot failure.
llvm-svn: 248403
2015-09-23 17:59:45 +00:00
Chen Li 5cd6deeae3 [Bug 24848] Use range metadata to constant fold comparisons with constant values
Summary:
This is the first part of fixing bug 24848 https://llvm.org/bugs/show_bug.cgi?id=24848.

When range metadata is provided, it should be used to constant fold comparisons with constant values.

Reviewers: sanjoy, hfinkel

Subscribers: llvm-commits

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

llvm-svn: 248402
2015-09-23 17:58:44 +00:00
Siva Chandra cebabb9fc0 DWARFASTParserClang::CompleteTypeFromDWARF: Handle incomplete baseclass or child
Summary:
With this change DWARFASTParserClang::CompleteTypeFromDWARF returns false if
DWARFASTParserClang::ParseChildMembers returns false. Similarly, it returns
false if any base class is of an incomplete type. This helps in cases like
these:

  class Foo
  {
  public:
    std::string str;
  };
  ...
  Foo f;

If a file with the above code is compiled with a modern clang but without
the -fno-limit-debug-info (or similar) option, then the DWARF has only
a forward declration for std::string. In which case, the type for
"class Foo" cannot be completed. If LLDB does not detect that a child
member has incomplete type, then it wrongly conveys to clang (the LLDB
compiler) that "class Foo" is complete, and consequently crashes due to
an assertion failure in clang when running commands like "p f" or
"frame var f".

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 248401
2015-09-23 17:47:08 +00:00
Artem Belevich 7b41f70e6c [CUDA] __global__ functions should always be visible externally.
Adjust __global__ functions with DiscardableODR linkage to use
StrongODR linkage instead, so they are visible externally.

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

llvm-svn: 248400
2015-09-23 17:44:53 +00:00
Sanjay Patel ade3abd2d9 [x86] move code for converting int logic to FP logic to a helper function; NFCI
This is a follow-on to:
http://reviews.llvm.org/rL248395

so we can add the call to the or/xor combines too.

llvm-svn: 248399
2015-09-23 17:39:41 +00:00
Adrian Prantl a112ef9e2d dsymutil: Resolve forward decls for types defined in clang modules.
This patch extends llvm-dsymutil's ODR type uniquing machinery to also
resolve forward decls for types defined in clang modules.

http://reviews.llvm.org/D13038

llvm-svn: 248398
2015-09-23 17:35:52 +00:00
Todd Fiala ea594abc78 test framework: fixed issue when using results formatter with no formatter options
I broke the formatter options-passing parsing when no formatter
options are provided.

llvm-svn: 248397
2015-09-23 17:20:09 +00:00
Adrian Prantl 209370260d dsymutil: print a warning when there is a module hash mismatch.
This also updates the module binaries in the test directory because
their module hash mismatched.

llvm-svn: 248396
2015-09-23 17:11:10 +00:00
Sanjay Patel df2495f331 [x86] replace integer 'and' ops with packed SSE FP 'and' ops when operating on FP scalars
Turn this:
   movd %xmm0, %eax
   movd %xmm1, %ecx
   andl %eax, %ecx
   movd %ecx, %xmm0

into this:
   andps %xmm1, %xmm0


This is related to, but does not solve:
https://llvm.org/bugs/show_bug.cgi?id=22428

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

llvm-svn: 248395
2015-09-23 17:00:06 +00:00
Dan Gohman 979840d31f [WebAssembly] Fix hasAddr64 being used before being initializer.
This reverts r248388 and fixes the underlying bug: hasAddr64 was initialized
in runOnMachineFunction, but runOnMachineFunction isn't ever called in
CodeGen/WebAssembly/global.ll since that testcase has no functions. The fix
here is to use AsmPrinter's getPointerSize() as needed to determine the
pointer size instead.

llvm-svn: 248394
2015-09-23 16:59:10 +00:00
Michael J. Spencer 2812aa82d0 [elf2] Pass BSSSec to the relocation handling code differently. Don't store it in the symbol.
llvm-svn: 248393
2015-09-23 16:57:31 +00:00
David Majnemer 54bbae5c0f [Lex] A source-file new-line in a raw string literal results in a new-line
Our string literal parser copied any source-file new-line characters
into the execution string-literal.  This is incorrect if the source-file
new-line character was a \r\n sequence because new-line characters are
merely \n.

llvm-svn: 248392
2015-09-23 16:04:47 +00:00
Benjamin Kramer c4284e3aad [Sema] Don't create an invalid source range for overlong initializer lists.
We took both source locations from the end of the initializer list what
the code below doesn't expect. This can lead to a crash when rendering
the diagnostic (PR24816). Assert that we have more than one element in
a scalar initializer with too many elements.

llvm-svn: 248391
2015-09-23 16:03:53 +00:00
Vedant Kumar ff08e926ba [Inline] Use AssumptionCache from the right Function
This changes the behavior of AddAligntmentAssumptions to match its
comment. I.e, prove the asserted alignment in the context of the caller,
not the callee.

Thanks to Mehdi Amini for seeing the issue here! Also to Artur Pilipenko
who also saw a fix for the issue.

rdar://22521387

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

llvm-svn: 248390
2015-09-23 15:49:08 +00:00
Davide Italiano aab93b59d4 [ELF2] - added ignored command line options for compatibility.
Patch by George Grimar.

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

llvm-svn: 248389
2015-09-23 15:46:44 +00:00
Alexander Kornienko a3eaa204e6 Fix CodeGen/WebAssembly/global.ll test under ASAN.
llvm-svn: 248388
2015-09-23 15:41:25 +00:00
David Majnemer fa36bde2f6 [DeadArgElim] Split the invoke successor edge
Invoking a function which returns an aggregate can sometimes be
transformed to return a scalar value.  However, this means that we need
to create an insertvalue instruction(s) to recreate the correct
aggregate type.  We achieved this by inserting an insertvalue
instruction at the invoke's normal successor.  However, this is not
feasible if the normal successor uses the invoke's return value inside a
PHI node.

Instead, split the edge between the invoke and the unwind successor and
create the insertvalue instruction in the new basic block.  The new
basic block's successor will be the old invoke successor which leaves
us with IR which is well behaved.

This fixes PR24906.

llvm-svn: 248387
2015-09-23 15:41:09 +00:00
Chris Bieneman 2a6c13274c [CMake] [builtins] Only include the atomic builtins if(APPLE).
There are lingering issues building the atomic builtins with various versions of gcc. To unblock people we can only include them on Apple platforms where they are more tested.

llvm-svn: 248386
2015-09-23 15:28:44 +00:00
Chris Bieneman 9c46be2d2f Code cleanup based on post-commit review from Aaron Ballman.
llvm-svn: 248385
2015-09-23 15:28:35 +00:00
Todd Fiala ea73624e5f Cleaned up results formatter options hand-off.
* --results-formatter-options renamed to --results-formatter-option,
  with short version of -O

* Multiple --results-formatter-option=OPTION can be specified.  The
  comma-separating mechanism has been removed.

* XunitFormatter options modified: -n and -r are now short forms of
  --ignore-skip-name and --ignore-skip-reason.  Those long option
  names were tweaked lightly.  They also can be specified multiple
  times on the command line.  The comma-separating, multiple-pattern-
  per-option mechanism has been removed.

One can now specify:

  dotest.py --results-file stdout -O-ndsym -O-nlldb-mi

for example, to ignore reporting skips for dsym-related or lldb-mi-related
tests in the xUnit report.

llvm-svn: 248384
2015-09-23 15:21:28 +00:00
Chris Bieneman 0d427986f5 [CMake] [Darwin] Bug 21562 - Add a CMake equivalent for make/platform/clang_darwin.mk in compiler_rt
Summary:
Building the builtins on Darwin platforms is a bit complicated. This is a first-pass implementation of the functionality from clang_darwin.mk into CMake.

When building the builtins on Darwin we have layers of blacklists that we apply based on platform, architecture, and minimum supported OS version.

Reviewers: bogner, filcab, bob.wilson, samsonov

Subscribers: llvm-commits

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

llvm-svn: 248383
2015-09-23 15:18:17 +00:00
Rafael Espindola 6173f848b9 Print more information about undefined symbols.
llvm-svn: 248382
2015-09-23 14:37:01 +00:00
Rafael Espindola 8e5560d894 Don't complain about symbols showing up in multible shared libraries.
llvm-svn: 248381
2015-09-23 14:23:59 +00:00
Rafael Espindola 1a49e58181 Print more information about duplicated symbols.
llvm-svn: 248380
2015-09-23 14:10:24 +00:00
Joerg Sonnenberger 95a90134ac Refactor library decision for -fopenmp support from Darwin into a
function for sharing with other platforms.

llvm-svn: 248379
2015-09-23 14:06:52 +00:00
John Brawn ad31ace8c8 Add -fplugin=name.so option to the driver
This translates to -load name.so in the cc1 command. We can't name the driver
option -load, as that means "link against oad", so instead we follow GCC's lead
and name the option -fplugin.

llvm-svn: 248378
2015-09-23 13:55:40 +00:00
Chad Rosier 2dfd35499e [AArch64] Refactor pre- and post-index merge fuctions into a single function. NFC.
llvm-svn: 248377
2015-09-23 13:51:44 +00:00
Benjamin Kramer 36d514e687 [DeclPrinter] Don't crash when printing a using decl with a special name
Fixes PR24872.

llvm-svn: 248376
2015-09-23 13:43:16 +00:00
Daniel Jasper a3e553a22c Fix bad iterator access.
llvm-svn: 248375
2015-09-23 12:47:50 +00:00
Igor Laevsky 029bd93c5d [DeadStoreElimination] Remove dead zero store to calloc initialized memory
This change allows dead store elimination to remove zero and null stores into memory freshly allocated with calloc-like function.

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

llvm-svn: 248374
2015-09-23 11:38:44 +00:00
Tamas Berghammer edf1465a56 Fix xcode build after r248366
llvm-svn: 248373
2015-09-23 11:00:35 +00:00
Benjamin Kramer 008f4be499 [dsymutil] Plug a memory leak.
llvm-svn: 248372
2015-09-23 10:38:59 +00:00
Pavel Labath 84f6f277ac Fix race condition during process detach
Summary:
The following situation occured in TestAttachResume:

The inferior was stoped at a breakpoint and we did a continue, immediately followed by a detach.
Since there was a trap instruction under the IP, the continue did a step-over-breakpoint before
resuming the inferior for real. In some cases, the detach command was executed between these two
events (after the step-over stop, but before continue). Here, public state was running, but
private state was stopped. This caused a problem because HaltForDestroyOrDetach was checking the
public state to see whether it needs to stop the process (call Halt()), but Halt() was checking
the private state and concluded that there is nothing for it to do.

Solution: Instead of Halt() call SendAsyncInterrupt(), which will then cause Halt() to be
executed in the context of the private state thread. I also rename HaltForDestroyOrDetach to
reflect it does not call halt directly.

Reviewers: jingham, clayborg

Subscribers: lldb-commits

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

llvm-svn: 248371
2015-09-23 10:16:57 +00:00
Vladimir Sukharev 64f68248cd [ARM] Fix crash "-target arm -mcpu=generic", without "-march="
An assertion hit has been fixed for cmdlines like

$ clang --target=arm-linux-gnueabi -mcpu=generic hello.c

Related to: http://reviews.llvm.org/rL245445

Reviewers: rengolin

Subscribers: cfe-commits

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

llvm-svn: 248370
2015-09-23 09:29:32 +00:00
Oliver Stannard f2ed5c68d2 [ARM] Add option to force fast-isel
The ARM backend has some logic that only allows the fast-isel to be enabled for
subtargets where it is known to be stable. This adds a backend option to
override this and force the fast-isel to be used for any target, to allow it to
be tested.

This is an ARM-specific option, because no other backend disables the fast-isel
on a per-subtarget basis.

llvm-svn: 248369
2015-09-23 09:19:54 +00:00
Simon Pilgrim 9cb018b6b6 [X86][SSE] Replace 128-bit SSE41 PMOVSX intrinsics with native IR
This patches removes the x86.sse41.pmovsx* intrinsics, provides a suitable upgrade path and updates relevant tests to sign extend a subvector instead.

LLVM counterpart to D12835

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

llvm-svn: 248368
2015-09-23 08:48:33 +00:00
Daniel Jasper d89ae9d3ac clang-format: Add initial #include sorting capabilities.
To implement this nicely, add a function that merges two sets of
replacements that are meant to be done in sequence. This functionality
will also be useful for other applications, e.g. formatting the result
of clang-tidy fixes.

llvm-svn: 248367
2015-09-23 08:30:47 +00:00