Commit Graph

167097 Commits

Author SHA1 Message Date
Ed Maste 8744d38ee8 Update decorator for FreeBSD failure pr18066
The test expects the inferior to have exited, but it is still stopped.

llvm.org/pr18066

llvm-svn: 201166
2014-02-11 18:28:18 +00:00
Argyrios Kyrtzidis 77ed8972fa [Sema] Revert the change in r200622 that allowed integer casts to silence -Wnon-literal-null-conversion in C code.
It is actually useful to warn in such cases, thanks to Dmitri for pushing on this and making us see the light!

Related to rdar://15925483 and rdar://15922612. The latter radar is where the usefulness of the warning is most clear.

llvm-svn: 201165
2014-02-11 17:53:22 +00:00
Greg Clayton f075824998 Don’t leak memory when reading memory and we do an early return for error conditions.
llvm-svn: 201164
2014-02-11 17:49:50 +00:00
Sylvestre Ledru 539997978e Improve the declaration when LDPO_PIE is not available.
Thanks to İsmail Dönmez for the better declaration.

llvm-svn: 201163
2014-02-11 17:30:18 +00:00
Jordan Rose c939907a5a 'nonnull(1)' on a block parameter should apply to the block's argument.
Thanks to r199467, __attribute__((nonnull)) (without arguments) can apply
directly to parameters, instead of being applied to the whole function.
However, the old form of nonnull (with an argument index) could also apply
to the arguments of function and block pointers, and both of these can be
passed as parameters.

Now, if 'nonnull' with an argument is found on a parameter, /and/ the
parameter is a function or block pointer, it is handled the old way.

PR18795

llvm-svn: 201162
2014-02-11 17:27:59 +00:00
Sylvestre Ledru 1515a48e14 If LDPO_PIE is not defined (before binutils 2.23 version),
use the hardcoded declaration 3
See r201110 for the initial change

llvm-svn: 201161
2014-02-11 17:11:32 +00:00
Mark Seaborn 6e15ee85d1 Add a note about using "Differential Revision:" in commit messages
I noticed this convention from the commit logs.  It seems like it
would be useful to document it, to encourage other committers to link
back to code reviews in their commits.

Differential Revision: http://llvm-reviews.chandlerc.com/D2678

llvm-svn: 201160
2014-02-11 16:58:03 +00:00
Benjamin Kramer 5a188549ad ScalarEvolution: Analyze trip count of loops with a switch guarding the exit.
llvm-svn: 201159
2014-02-11 15:44:32 +00:00
Robert Lougher 7d9084ffa1 Teach the DAGCombiner how to fold concat_vector nodes when the input is two
BUILD_VECTOR nodes, e.g.:

(concat_vectors (BUILD_VECTOR a1, a2, a3, a4), (BUILD_VECTOR b1, b2, b3, b4))
->
(BUILD_VECTOR a1, a2, a3, a4, b1, b2, b3, b4)

This fixes an issue with AVX, where a sequence was not recognized as a 256-bit
vbroadcast due to the concat_vectors.

llvm-svn: 201158
2014-02-11 15:42:46 +00:00
Dmitri Gribenko 2228cd3f07 Rename some PCH-related errors to have 'err_' as their prefix
llvm-svn: 201157
2014-02-11 15:40:09 +00:00
Dmitri Gribenko 852d622e5e Fix a typo in the function name that I just introduced (r201155)
llvm-svn: 201156
2014-02-11 15:02:48 +00:00
Dmitri Gribenko 256454fdaa libclang: audit all APIs that accept a CXTranslationUnit to make sure that
checks for invalid translation unit are in place.  Also, while there, add log
output for this case.

llvm-svn: 201155
2014-02-11 14:34:14 +00:00
Evgeniy Stepanov e5a447d947 [asan] Fix Windows build.
llvm-svn: 201154
2014-02-11 13:57:17 +00:00
Ed Maste 3fb0a9cc6f Add decorator for llvm.org/pr18805 until root cause is identified
llvm-svn: 201153
2014-02-11 13:50:45 +00:00
Evgeniy Stepanov 2629e575db [sanitizer] Fix build.
llvm-svn: 201152
2014-02-11 13:45:01 +00:00
Evgeniy Stepanov 769d46f373 [sanitizer] Use system unwinder in signal handlers on Android.
Because of the way Bionic sets up signal stack frames, libc unwinder is unable
to step through it, resulting in broken SEGV stack traces.

Luckily, libcorkscrew.so on Android implements an unwinder that can start with
a signal context, thus sidestepping the issue.

llvm-svn: 201151
2014-02-11 13:38:57 +00:00
Alexey Samsonov ca183eed55 [Sanitizer] External symbolizer refactoring: split protocol for communicating with
llvm-symbolizer binary and external process handling into separate classes.

No functionality change.

llvm-svn: 201150
2014-02-11 13:03:09 +00:00
Bradley Smith 9d80849714 [AArch64] Add missing PCRel relocations for AArch64 in RuntimeDyldELF
llvm-svn: 201149
2014-02-11 12:59:09 +00:00
Chandler Carruth fc25854b09 [LPM] Switch LICM to actively use LCSSA in addition to preserving it.
Fixes PR18753 and PR18782.

This is necessary for LICM to preserve LCSSA correctly and efficiently.
There is still some active discussion about whether we should be using
LCSSA, but we can't just immediately stop using it and we *need* LICM to
preserve it while we are using it. We can restore the old SSAUpdater
driven code if and when there is a serious effort to remove the reliance
on LCSSA from all of the loop passes.

However, this also serves as a great example of why LCSSA is very nice
to have. This change significantly simplifies the process of sinking
instructions for LICM, and makes it quite a bit less expensive.

It wouldn't even be as complex as it is except that I had to start the
process of removing the big recursive LCSSA formation hammer in order to
switch even this much of the re-forming code to asserting that LCSSA was
preserved. I'll fully remove that next just to tidy things up until the
LCSSA debate settles one way or the other.

llvm-svn: 201148
2014-02-11 12:52:27 +00:00
Alexey Samsonov 2f1209f851 Remove unused config.llvm_symbolizer_path
llvm-svn: 201147
2014-02-11 12:52:26 +00:00
Dmitri Gribenko ceeba78f9e libclang: use namespace qualifiers in the macro, so that it does not require
'using namespace clang::cxindex'.

llvm-svn: 201146
2014-02-11 12:25:31 +00:00
Tim Northover 02b438754c AArch64: share slgihtly more NEON implementation with ARM.
The s64/u64 vcvt conversion operations are actually pretty much identical to
the s32/u32 ones in implementation, and can be shared with just one extra
variable.

llvm-svn: 201145
2014-02-11 11:27:44 +00:00
Robert Lytton 70b5ba49c3 XCore target: fix const section handling
Xcore target ABI requires const data that is externally visible
to be handled differently if it has C-language linkage rather than
C++ language linkage.

Clang now emits ".cp.rodata" section information.

All other externally visible constant data will be placed in the DP section.

llvm-svn: 201144
2014-02-11 10:36:26 +00:00
Robert Lytton 9b6bb461b1 XCore target: Lower ATOMIC_LOAD & ATOMIC_STORE
llvm-svn: 201143
2014-02-11 10:36:18 +00:00
Robert Lytton 15abd1881f XCore target: add section information.
Xcore target ABI requires const data that is externally visible
to be handled differently if it has C-language linkage rather than
C++ language linkage.

llvm-svn: 201142
2014-02-11 10:34:51 +00:00
Robert Lytton 8e95d4e075 XCore target: Pass through "-fverbose-asm" flag to xcc assembler.
llvm-svn: 201141
2014-02-11 10:34:45 +00:00
Elena Demikhovsky 1f32c313f1 AVX: fixed a bug in LowerVECTOR_SHUFFLE
llvm-svn: 201140
2014-02-11 10:21:53 +00:00
Daniel Jasper 1067ab0a1a clang-format: Support lambdas with namespace-qualified return types.
E.g.:
  Foo([]()->std::vector<int> { return { 2 }; }());

llvm-svn: 201139
2014-02-11 10:16:55 +00:00
Daniel Jasper a0407740c3 clang-format: Fix alignment of comments inside statements.
Before:
  auto result = SomeObject
                // Calling someFunction on SomeObject
                    .someFunction();

After:
  auto result = SomeObject
                    // Calling someFunction on SomeObject
                    .someFunction();

llvm-svn: 201138
2014-02-11 10:08:11 +00:00
Oliver Stannard 405bdeddd1 AAPCS: Do not split structs after CPRC allocated on stack
According to the AAPCS, we can split structs between GPRs and the stack,
except for when an argument has already been allocated on the stack. This
can occur when a large number of floating-point arguments fill up the VFP
registers, and are alllocated on the stack before the general-purpose argument
registers are full.

llvm-svn: 201137
2014-02-11 09:25:50 +00:00
Dmitri Gribenko 70e6585f0c Remove TimeValue::toPosixTime() -- it is buggy, semantics are unclear, and its
only current user should be using toEpochTime() instead.

llvm-svn: 201136
2014-02-11 09:11:18 +00:00
Alexey Samsonov c30e0c1728 Fix self-hosted -Werror build: delete comma at the end of enumerator list
llvm-svn: 201135
2014-02-11 08:07:54 +00:00
Elena Demikhovsky 2aafc22ed9 AVX-512: Optimized BUILD_VECTOR pattern;
fixed encoding of VEXTRACTPS instruction.

llvm-svn: 201134
2014-02-11 07:25:59 +00:00
Simon Atanasyan b72ea717d0 [Mips] Use the 'CHECK-NEXT' where we need to check a test output exactly
line by line.

llvm-svn: 201133
2014-02-11 07:17:09 +00:00
Quentin Colombet 64ca544d95 [CodeGenPrepare] Test case for the promotions that bypass the
profitability check due to some other checks in the addressing
mode matcher. I.e., test case for commit r201121.

<rdar://problem/16020230>

llvm-svn: 201132
2014-02-11 06:55:43 +00:00
Simon Atanasyan 06f8ea4c07 [Mips] Simplify the code. Replace redundant 'switch' operator by the single 'if' one.
llvm-svn: 201131
2014-02-11 06:36:16 +00:00
Ted Kremenek a683f639c7 Fix PCH deserialization bug with local static symbols being treated as local extern.
This triggered a miscompilation of code using Boost's function_template.hpp
when it was included inside a PCH file.  A local static within
that header would be treated as local extern, resulting in the wrong
mangling.  This only occurred during PCH deserialization.

Fixes <rdar://problem/15975816> and <rdar://problem/15926311>.

llvm-svn: 201130
2014-02-11 06:29:29 +00:00
Simon Atanasyan bf987c2dae [Mips] Handle R_MIPS_COPY relocation.
llvm-svn: 201129
2014-02-11 05:34:02 +00:00
Simon Atanasyan ceb0b86822 [Mips] Add "data" symbols to the test input file. No functional changes.
llvm-svn: 201128
2014-02-11 05:33:53 +00:00
Lang Hames d41001706a In RuntimeDyldImpl::emitSection, make Allocate (section size to be allocated) a
uintptr_t. An unsigned could overflow for large sections.

No test case - anything big enough to overflow an unsigned is going to take an
appreciable time to zero when the test passes.

The choice of uintptr_t was made to match the RTDyldMemoryManager APIs, but
these should probably be hardcoded to uint64_ts: It is legitimate to JIT for
64-bit targets from a 32-bit host/compiler.

llvm-svn: 201127
2014-02-11 05:28:24 +00:00
Craig Topper 3f6954ffd0 Changed attributes of all gather intrinsics from IntrReadMem to IntrReadArgMem as they access only memory based on argument. Patch by Robert Khasanov.
llvm-svn: 201126
2014-02-11 04:05:33 +00:00
Aaron Ballman 07e7618e95 Using the helper API for random number generation.
llvm-svn: 201125
2014-02-11 03:40:14 +00:00
Aaron Ballman 3f5e8b8dc1 Hopefully fixing the MinGW 32 build, which was broken by r200767. Not using rand_s() since MinGW does not have an implementation for it, but instead using the underlying CryptGenRandom APIs.
llvm-svn: 201124
2014-02-11 02:47:33 +00:00
Jordan Rose 8b808d64af [analyzer] Inline C++ operator new when c++-inline-allocators is turned on.
This will let us stage in the modeling of operator new. The -analyzer-config
opton 'c++-inline-allocators' is currently off by default.

Patch by Karthik Bhat!

llvm-svn: 201122
2014-02-11 02:21:06 +00:00
Quentin Colombet 5a69dda9b0 [CodeGenPrepare] Undo changes that happened for the profitability check.
The addressing mode matcher checks at some point the profitability of folding an
instruction into the addressing mode. When the instruction to be folded has
several uses, it checks that the instruction can be folded in each use.
To do so, it creates a new matcher for each use and check if the instruction is
in the list of the matched instructions of this new matcher.

The new matchers may promote some instructions and this has to be undone to keep
the state of the original matcher consistent.

A test case will follow.

<rdar://problem/16020230>

llvm-svn: 201121
2014-02-11 01:59:02 +00:00
Josh Magee e0fc1a80cb [stackprotector] Add command line option -fstack-protector-strong
This option has the following effects:
 * It adds the sspstrong IR attribute to each function within the CU.
 * It defines the macro __SSP_STRONG__ with the value of 2.

Differential Revision: http://llvm-reviews.chandlerc.com/D2717

llvm-svn: 201120
2014-02-11 01:35:14 +00:00
David Blaikie a47009dbd3 DebugInfo: Use existing symbol rather than creating it again.
llvm-svn: 201119
2014-02-11 01:23:52 +00:00
Jason Molenda e54a0bfcd3 Change RNBRemote::HandlePacket_m() to store the packet on the heap
instead of on the stack.  Handles larger packet read requests better.

llvm-svn: 201118
2014-02-11 00:48:29 +00:00
Jason Molenda da276f9013 Adjust the calls to __introspection_dispatch_thread_get_item_info to
use a system-wide unique thread ID instead of a pthread_t to identify
the thread we want debug info for.  Also, free some more memory regions
that needed to be freed.

llvm-svn: 201117
2014-02-11 00:36:18 +00:00
Eli Bendersky b60f83878c Move the *PassPrinter into their own module.
These are self-contained in functionality so it makes sense to separate them,
as opt.cpp has grown quite big already.

Following Eric's suggestions, if this code is ever deemed useful outside of
tools/opt, it will make sense to move it to one of the LLVM libraries like IR.

llvm-svn: 201116
2014-02-10 23:34:23 +00:00