Commit Graph

213157 Commits

Author SHA1 Message Date
Michael Kruse e71893d580 Add testcase for r250517
llvm-svn: 250518
2015-10-16 15:17:26 +00:00
Michael Kruse aeceab770e Avoid unnecessay .s2a write access when used only in PHIs
PHI accesses will be handled separately by buildPHIAccesses,
buildScalarDependences does not need to create additional accesses.

llvm-svn: 250517
2015-10-16 15:14:40 +00:00
Filipe Cabecinhas 4585ed006a [PS4] Add missing tests for -fsanitize=...
llvm-svn: 250516
2015-10-16 15:08:01 +00:00
Filipe Cabecinhas 67d28057fa PS4: Add tests for rtti/vptr-sanitizer interaction
llvm-svn: 250515
2015-10-16 15:07:56 +00:00
Filipe Cabecinhas 82cd6af690 PS4: Make sure to add the sanitizer runtime before any linker input
llvm-svn: 250514
2015-10-16 15:07:48 +00:00
Diego Novillo 17b6f53133 Sample Profiling - Remove useless asserts. NFC.
llvm-svn: 250513
2015-10-16 13:54:52 +00:00
Zlatko Buljan 4c4f21b971 Commited two test files which are forgotten during commit of patch for http://reviews.llvm.org/D13376
llvm-svn: 250512
2015-10-16 13:03:10 +00:00
Hrvoje Varga 3c88fbd367 [mips][microMIPS] Implement LB, LBE, LBU and LBUE instructions
Differential Revision: http://reviews.llvm.org/D11633

llvm-svn: 250511
2015-10-16 12:24:58 +00:00
Benjamin Kramer 1487a3de40 Empty undefined static variable -> local variable.
Resolves a -Wundefined-internal warning from clang.

llvm-svn: 250510
2015-10-16 12:11:15 +00:00
Angel Garcia Gomez 166935764b Fix overlapping replacements in clang-tidy.
Summary: Prevent clang-tidy from applying fixes to errors that overlap with other errors' fixes, with one exception: if one fix is completely contained inside another one, then we can apply the big one.

Reviewers: bkramer, klimek

Subscribers: djasper, cfe-commits, alexfh

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

llvm-svn: 250509
2015-10-16 11:43:49 +00:00
Benjamin Kramer 02adf40a72 Fix an unfortunate yet old typo that never got attention before r250507.
Should fix the xcode libc++ build.

llvm-svn: 250508
2015-10-16 11:26:26 +00:00
Benjamin Kramer 929df471a9 Remove a long-standing __has_include hack.
This was put in to get libc++ building without libcxxabi. We now have
macros that show that we are building against libcxxabi so use that
instead. This guards against existing but broken cxxabi.h headers on the
system.

llvm-svn: 250507
2015-10-16 11:14:30 +00:00
Pawel Bylica 2fa025cdcf Fix path::home_directory() unit test.
It turns out that constructing std::string from null pointer is not the very best idea.

llvm-svn: 250506
2015-10-16 10:11:07 +00:00
NAKAMURA Takumi cc275e428d SupportTests::HomeDirectory: Don't try tests when $HOME is undefined.
Lit sanitizes env vars. $HOME is not exported in Lit tests.

llvm-svn: 250505
2015-10-16 09:40:01 +00:00
NAKAMURA Takumi 6d5d5bdfaf Reformat.
llvm-svn: 250504
2015-10-16 09:38:49 +00:00
NAKAMURA Takumi 55bf953344 [CMake] Reformat CLANG_TEST_DEPS.
llvm-svn: 250503
2015-10-16 09:38:42 +00:00
Pavel Labath 3318314722 Fix temporary directory computation on linux (pr25147)
Summary:
On linux, the environment variables for temp directories that lldb checks for are generally not
defined, and the temp directory computation failed. This caused expression evaluation to fall
back to creating "/tmp/lldb-*.expr" debugging files instead of the usual
"$TMP/lldb/pid/lldb-*.expr". Crucially, these files were not cleaned up on lldb exit, which
caused clutter in the /tmp folder, especially on long-running machines (e.g. builtbots). This
commit fixes lldb to use llvm::sys::path::system_temp_directory, which does the same environment
variable dance, but (!) also falls back to the P_tmpdir macro, which is how the temp directory is
defined on linux.

Since the linux temp path computation now succeeds, I needed to also modify Android path
computation to check for actual directory existence, rather then checking whether the operation
failed.

Reviewers: clayborg, tberghammer

Subscribers: tberghammer, lldb-commits, danalbert, srhines, emaste

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

llvm-svn: 250502
2015-10-16 09:32:05 +00:00
Pawel Bylica 7187e4bba9 Use Windows Vista API to get the user's home directory
Summary: This patch replaces usage of deprecated SHGetFolderPathW with SHGetKnownFolderPath. The usage of SHGetKnownFolderPath is wrapped to allow queries for other "known" folders in the near future.

Reviewers: aaron.ballman, gbedwell

Subscribers: chapuni, llvm-commits

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

llvm-svn: 250501
2015-10-16 09:08:59 +00:00
Sean Eveson 3f072ef82c Test commit
llvm-svn: 250500
2015-10-16 08:54:23 +00:00
Ewan Crawford a0f08674eb Resubmit: RenderScript command for printing allocation contents
Previous commit r250281 broke TestDataFormatterSmartArray.py
Resolved in in this patch by adding the new enum eFormatVectorOfFloat16 to FormatManager.

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

llvm-svn: 250499
2015-10-16 08:28:47 +00:00
Craig Topper e33f51fa91 [X86] Add fxsr feature name for fxsave/fxrestore builtins.
llvm-svn: 250498
2015-10-16 06:22:36 +00:00
Craig Topper 09b6598572 [X86] Add fxsr feature flag for fxsave/fxrestore instructions.
llvm-svn: 250497
2015-10-16 06:03:09 +00:00
Craig Topper 3804669996 [X86] Add sse4.2 feature name to CRC32 builtins.
llvm-svn: 250496
2015-10-16 05:25:15 +00:00
Craig Topper f924578b2b [X86] Add proper feature name to some avx512dq builtins.
llvm-svn: 250495
2015-10-16 05:25:04 +00:00
Keno Fischer 8cd7d34508 Fix build with python disabled after r249597
Summary: r249597 introduced a usage of GetTypeSummary in lldb-mi.
That function used to only be available when python is enabled.
However, there is no reason for that anymore since that is now
dealt with at a different abstraction layer.

Reviewers: ki.stfu, evgeny777, clayborg, granata.enrico

Subscribers: elehcim, brucem, lldb-commits

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

llvm-svn: 250494
2015-10-16 05:21:23 +00:00
Keno Fischer 47db4a2c50 Add a missing Mutex Locker in ResetCurrentInlinedDepth
Summary: This function reads m_frames, so it needs to lock the
mutex like all other function that access m_frames.
Found using AddressSanitizer.

Reviewers: jingham, clayborg

Subscribers: lldb-commits

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

llvm-svn: 250493
2015-10-16 05:17:25 +00:00
Dylan McKay b1d469c657 Initial migration of AVR backend
This patch adds the underlying infrastructure for an AVR backend to be included into LLVM. It is the first of a series of patches aimed at moving the out-of-tree AVR backend into the tree.

It consists of adding a new`Triple` target 'avr'.

llvm-svn: 250492
2015-10-16 03:10:30 +00:00
Sanjoy Das 58fae7cf6b [RS4GC] Dont' propagate call attrs related to patchable statepoints
The `"statepoint-id"` and `"statepoint-num-patch-bytes"` attributes are
used solely to determine properties of the `gc.statepoint` being
created.  Once the `gc.statepoint` is in place, these should be removed.

llvm-svn: 250491
2015-10-16 02:41:23 +00:00
Sanjoy Das 810a59d037 [RS4GC] Bring legalizeCallAttributes up to LLVM coding style; NFC
llvm-svn: 250490
2015-10-16 02:41:11 +00:00
Sanjoy Das 25ec1a3e60 [RS4GC] Use "deopt" operand bundles
Summary:
This is a step towards using operand bundles to carry deopt state till
RewriteStatepointsForGC.  The change adds a flag to
RewriteStatepointsForGC that teaches it to pick up deopt state from a
`"deopt"` operand bundle attached to the `call` or `invoke` it is
wrapping.

The command line flag added, `-rs4gc-use-deopt-bundles`, will only exist
for a short while.  Once we are able to pipe deopt bundle state through
the full optimization pipeline without problems, we will "constant fold"
`-rs4gc-use-deopt-bundles` to `true`.

Reviewers: swaroop.sridhar, reames

Subscribers: llvm-commits, sanjoy

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

llvm-svn: 250489
2015-10-16 02:41:00 +00:00
George Burgess IV a51c4077c5 Make __builtin_object_size more conservative
r246877 made __builtin_object_size substantially more aggressive with
unknown bases if Type=1 or Type=3, which causes issues when we encounter
code like this:

struct Foo {
  int a;
  char str[1];
};

const char str[] = "Hello, World!";
struct Foo *f = (struct Foo *)malloc(sizeof(*f) + strlen(str));
strcpy(&f->str, str);

__builtin_object_size(&f->str, 1) would hand back 1, which is
technically correct given the type of Foo, but the type of Foo lies to
us about how many bytes are available in this case.

This patch adds support for this "writing off the end" idiom -- we now
answer conservatively when we're given the address of the very last
member in a struct.

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

llvm-svn: 250488
2015-10-16 01:49:01 +00:00
Jason Molenda 59e847f997 I've been seeing a problem with xcodebuilds on macosx for
a few days now where compiler-rt gets an error when trying
to run its install step (related to not being able to find
an ios version of a dylib), breaking the lldb build.  I
don't know if I'm the only one seeing this or if everyone has
been doing the same hack I've been doing - removing the
compiler-rt project from the default checkout.

It's only used for the ASAN test case.  So I'm temporarily
checking in my hackaround of not checking out compiler-rt
by default, I'll try to get back and look at what's actually
happening in the compiler-rt install step that is causing
the problems when built as a part of lldb.

llvm-svn: 250487
2015-10-16 01:27:21 +00:00
George Burgess IV 2a6150d932 [Sema] Fix address-of + enable_if overloading logic
Previously, our logic when taking the address of an overloaded function
would not consider enable_if attributes, so long as all of the enable_if
conditions on a given candidate were true. So, two functions with
identical signatures (one with enable_if attributes, the other without),
would be considered equally good overloads. If we were calling the
function instead of taking its address, then the function with enable_if
attributes would be preferred.

This patch makes us prefer the candidate with enable_if regardless of if
we're calling or taking the address of an overloaded function.

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

llvm-svn: 250486
2015-10-16 01:17:38 +00:00
Eugene Zelenko 47d118e9f2 [LLDB] Fix Clang-tidy misc-use-override warnings in remaining files in include; other minor fixes.
Differential Revision: http://reviews.llvm.org/D13681

llvm-svn: 250485
2015-10-16 01:11:37 +00:00
Sanjoy Das 7360f30852 [IndVars] Rename getExtend; NFC
Rename `IndVarSimplify::getExtend` to `IndVarSimplify::createExtendInst`
to make it obvious that it creates `llvm::Instruction` s.

llvm-svn: 250484
2015-10-16 01:00:50 +00:00
Sanjoy Das 37e87c2023 [IndVars] Have `cloneArithmeticIVUser` guess better
Summary:
`cloneArithmeticIVUser` currently trips over expression like `add %iv,
-1` when `%iv` is being zero extended -- it tries to construct the
widened use as `add %iv.zext, zext(-1)` and (correctly) fails to prove
equivalence to `zext(add %iv, -1)` (here the SCEV for `%iv` is
`{1,+,1}`).

This change teaches `IndVars` to try sign extending the non-IV operand
if that makes the newly constructed IV use equivalent to the widened
narrow IV use.

Reviewers: atrick, hfinkel, reames

Subscribers: sanjoy, llvm-commits

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

llvm-svn: 250483
2015-10-16 01:00:47 +00:00
Sanjoy Das 472840a3d3 [IndVars] Extract out a few local variables; NFC
llvm-svn: 250482
2015-10-16 01:00:44 +00:00
Sanjoy Das 1fd184e5a2 [IndVars] Split `WidenIV::cloneIVUser`; NFC
Summary:
This NFC splitting is intended to make a later diff easier to follow.
It just tail duplicates `cloneIVUser` into `cloneArithmeticIVUser` and
`cloneBitwiseIVUser`.

Reviewers: atrick, hfinkel, reames

Subscribers: llvm-commits

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

llvm-svn: 250481
2015-10-16 01:00:39 +00:00
JF Bastien 1d20a5e9e8 WebAssembly: update syntax
Summary:
Follow the same syntax as for the spec repo. Both have evolved slightly
independently and need to converge again.

This, along with wasmate changes, allows me to do the following:

  echo "int add(int a, int b) { return a + b; }" > add.c
  ./out/bin/clang -O2 -S --target=wasm32-unknown-unknown add.c -o add.wack
  ./experimental/prototype-wasmate/wasmate.py add.wack > add.wast
  ./sexpr-wasm-prototype/out/sexpr-wasm add.wast -o add.wasm
  ./sexpr-wasm-prototype/third_party/v8-native-prototype/v8/v8/out/Release/d8 -e "print(WASM.instantiateModule(readbuffer('add.wasm'), {print:print}).add(42, 1337));"

As you'd expect, the d8 shell prints out the right value.

Reviewers: sunfish

Subscribers: jfb, llvm-commits, dschuff

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

llvm-svn: 250480
2015-10-16 00:53:49 +00:00
Lang Hames ad5e0cefa1 Add emacs c++ mode hint.
llvm-svn: 250479
2015-10-16 00:44:01 +00:00
Greg Clayton c12cc596ed More general fixes to the tree view and BoxedPanel.
llvm-svn: 250478
2015-10-16 00:34:18 +00:00
Eric Fiselier 09c1ffdc8f Add "-Wc++11-inline-namespace" so that libc++ can use -pedantic in C++03.
Summary: The title says it all.

Reviewers: rsmith

Subscribers: cfe-commits

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

llvm-svn: 250477
2015-10-16 00:31:36 +00:00
Eugene Zelenko 68347e6c07 Test commit. Part of:
[LLDB] Fix Clang-tidy misc-use-override warnings in remaining files in include; other minor fixes.

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

llvm-svn: 250476
2015-10-16 00:17:35 +00:00
Eric Christopher c276e80022 Mark this test as requiring and x86 registered target.
llvm-svn: 250475
2015-10-16 00:14:36 +00:00
Oleksiy Vyalov e98628cecb Split Socket class into Tcp/Udp/DomainSocket subclasses.
http://reviews.llvm.org/D13754

llvm-svn: 250474
2015-10-15 23:54:09 +00:00
Eric Christopher 15709991d0 Add an error when calling a builtin that requires features that don't
match the feature set of the function that they're being called from.

This ensures that we can effectively diagnose some[1] code that would
instead ICE in the backend with a failure to select message.

Example:

__m128d foo(__m128d a, __m128d b) {
  return __builtin_ia32_addsubps(b, a);
}

compiled for normal x86_64 via:

clang -target x86_64-linux-gnu -c

would fail to compile in the back end because the normal subtarget
features for x86_64 only include sse2 and the builtin requires sse3.

[1] We're still not erroring on:

__m128i bar(__m128i const *p) { return _mm_lddqu_si128(p); }

where we should fail and error on an always_inline function being
inlined into a function that doesn't support the subtarget features
required.

llvm-svn: 250473
2015-10-15 23:47:11 +00:00
Eric Fiselier a15785bb5b Re-enable linker scripts after fixing bad CMake
llvm-svn: 250472
2015-10-15 23:04:54 +00:00
Eric Fiselier 7e0344a770 Quickly fix bad commit
llvm-svn: 250471
2015-10-15 22:51:50 +00:00
Eric Christopher 4bad57c9bc Fix the subtarget features required by some x86 builtins.
Update the fma builtins to be fma/fma4 until some we can find some
documentation either way.

Update a couple of the avx intrinsics because they were in the wrong
category.

llvm-svn: 250470
2015-10-15 22:46:02 +00:00
Eric Fiselier 1ab69fc532 [libcxx] Make libc++.so a linker script by default on most platforms.
Summary:
This patch turns on `LIBCXX_ENABLE_ABI_LINKER_SCRIPT` by default whenever `LLVM_HAVE_LINK_VERSION_SCRIPT` is ON. This turns out to be whenever:

1. WIN32 is not defined.
2 UNIX is defined.
3. APPLE is not defined.

While `LLVM_HAVE_LINK_VERSION_SCRIPT` is meant to reflect exactly what we are asking I think it's close enough.

After committing this patch Linux users will no longer have to use "-lc++abi" explicitly!




Reviewers: mclow.lists, danalbert, compnerd, jroelofs

Subscribers: emaste, rengolin, cbergstrom, cfe-commits

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

llvm-svn: 250469
2015-10-15 22:41:51 +00:00