Commit Graph

176863 Commits

Author SHA1 Message Date
Jordan Rose e3f310f3bd [analyzer] Check for NULL passed to CFAutorelease.
Patch by Sean McBride, tests adjusted by me.

llvm-svn: 211453
2014-06-21 23:50:40 +00:00
Sylvestre Ledru 002c25602c Simplify the code (variable bValid is not really interesting)
llvm-svn: 211452
2014-06-21 23:48:45 +00:00
Sylvestre Ledru 88e68cdc94 Remove useless declaration
llvm-svn: 211451
2014-06-21 23:47:20 +00:00
Alp Toker b5fbfa2bab Track changes from clang r211448.
llvm-svn: 211450
2014-06-21 23:33:00 +00:00
Alp Toker e492fae27d Make MS i128 suffix test from r211446 more robust
We want to catch both negative and positive failure conditions.

llvm-svn: 211449
2014-06-21 23:32:05 +00:00
Alp Toker 4db87abf0f DiagnosticRenderer: emit basic notes as real diagnostics
Fixes terminal column wrapping and vestigial 'note:' prefixes that would appear
when using emitBasicNote().

llvm-svn: 211448
2014-06-21 23:31:59 +00:00
Alp Toker a68ad10a90 TextDiagnostic: print remark level diagnostics in bold too
The purpose of bolding these is to make them visually distinct from
continuations (supplemental note diagnostics). Therefore, the bolding applies
to all severities _including_ remarks -- it's not in any way an indicator of
priority. Also simplify and comment.

No tests.

llvm-svn: 211447
2014-06-21 23:31:52 +00:00
David Majnemer 355597e99e The i128 suffix isn't always available.
This Lexer test unconditionally used the i128 integer literal suffix.
This suffix is only available to targets that have 128-bit arithmetic
support.

llvm-svn: 211446
2014-06-21 22:49:50 +00:00
Stepan Dyatkovskiy f4af855930 MergeFunctions Pass, FnSet has been replaced with FnTree.
Patch activates new implementation.
So from now, merging process should take time O(N*log(N)).
Where N size of module (we are free to measure it in
functions or in instructions). Internally FnTree represents
binary tree. So every lookup operation takes O(log(N)) time.

It is still not the last patch in series, we also have to
clean-up pass from old code, and update pass comments.

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

llvm-svn: 211445
2014-06-21 20:54:36 +00:00
Stepan Dyatkovskiy 71038cadd4 MergeFunctions Pass, removed unused methods from old implementation.
Patch removed next old FunctionComparator methods:
    * enumerate
    * isEquivalentOperation
    * isEquivalentGEP
    * isEquivalentType 
    
This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

llvm-svn: 211444
2014-06-21 20:13:24 +00:00
Stepan Dyatkovskiy 0b58801b69 MergeFunctions, doSanityCheck: fixed body comments.
llvm-svn: 211443
2014-06-21 19:07:51 +00:00
Stepan Dyatkovskiy a77f3d8587 MergeFunctions Pass, introduced sanity check, that checks order relation,
introduced among functions set.
    
This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

llvm-svn: 211442
2014-06-21 18:58:11 +00:00
David Majnemer 65a407c2ce Lex: Use the correct types for MS integer suffixes
Something went wrong with r211426, it is an older version of this code
and should not have been committed.  It was reverted with r211434.

Original commit message:
We didn't properly implement support for the sized integer suffixes.
Suffixes like i16 were essentially ignored instead of mapping them to
the appropriately sized integer type.

This fixes PR20008.

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

llvm-svn: 211441
2014-06-21 18:46:07 +00:00
Yabin Hu 30d7731032 Add "Yabin Hu" to CREDITS.txt
llvm-svn: 211440
2014-06-21 18:35:33 +00:00
Argyrios Kyrtzidis 4f1560242a [test] Add '-target' option to fix bot failure.
llvm-svn: 211439
2014-06-21 18:28:44 +00:00
Argyrios Kyrtzidis d886f1a370 [PCH] Remove the BackingIvarReferencedInAccessor field from DECL_OBJC_IVAR abbreviation record.
Patch by Yiding Jia!

llvm-svn: 211438
2014-06-21 18:16:40 +00:00
Stepan Dyatkovskiy 17ee5ac20d MergeFunctions Pass, introduced total ordering among top-level comparison
methods.
    
Patch changes return type of FunctionComparator::compare() and
FunctionComparator::compare(const BasicBlock*, const BasicBlock*)
methods from bool (equal or not) to {-1, 0, 1} (less, equal, great).
    
This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

llvm-svn: 211437
2014-06-21 17:55:51 +00:00
Benjamin Kramer 0bf086f80f LoopUnrollRuntime: Check for overflow in the trip count calculation.
Fixes PR19823.

llvm-svn: 211436
2014-06-21 13:46:25 +00:00
Benjamin Kramer b7f5fb5751 Legalizer: Add support for splitting insert_subvectors.
We handle this by spilling the whole thing to the stack and doing the
insertion as a store.

PR19492. This happens in real code because the vectorizer creates v2i128 when AVX is enabled.

llvm-svn: 211435
2014-06-21 12:56:42 +00:00
Rafael Espindola d46e4a2303 Revert "Lex: Use the correct types for MS integer suffixes"
This reverts commit r211426.

This broke the arm bots. The crash can be reproduced on X86 by running.
./bin/clang -cc1  -fsyntax-only -verify -fms-extensions ~/llvm/clang/test/Lexer/ms-extensions.c -triple arm-linux

llvm-svn: 211434
2014-06-21 12:39:25 +00:00
Benjamin Kramer 8dd637aa04 SCEVExpander: Fold constant PHIs harder. The logic below only understands proper IVs.
PR20093.

llvm-svn: 211433
2014-06-21 11:47:18 +00:00
Jeroen Ketema d253e66ec7 Fix breakage after r211259
While we are here introduce the proper headers for the error code.

Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211432
2014-06-21 09:20:31 +00:00
Simon Atanasyan fa30168395 [Mips] Remove redundant checking from the RelocationPass::isDynamic() function.
No functional changes.

llvm-svn: 211431
2014-06-21 08:36:12 +00:00
Richard Trieu c1485223a6 Add back functionality removed in r210497.
Instead of asserting, output a message stating that a null pointer was found.

llvm-svn: 211430
2014-06-21 02:43:02 +00:00
Dmitry Vyukov 9eaae3d8f6 tsan: fix code formatting
llvm-svn: 211429
2014-06-21 02:10:17 +00:00
Saleem Abdulrasool d0d1638f96 builtins: assembly routines are not static
Storage Class 3 is static storage.  These symbols need to be marked as external
(storage class 2) so that they can be referenced.  Note that this external is
not the same as ELF "external" visibility, which is indicated by DLL Storage
Class (i.e. __declspec(dllexport) or __declspec(dllimport)).

llvm-svn: 211428
2014-06-21 01:41:21 +00:00
Andrea Di Biagio e5015d8aba [X86] Add ISel patterns to select SSE3/AVX ADDSUB instructions.
This patch adds ISel patterns to select SSE3/AVX ADDSUB instructions
from a sequence of "vadd + vsub + blend".

Example:

///
typedef float float4 __attribute__((ext_vector_type(4)));

float4 foo(float4 A, float4 B) {
  float4 X = A - B;
  float4 Y = A + B;
  return (float4){X[0], Y[1], X[2], Y[3]};
}
///

Before this patch, (with flag -mcpu=corei7) llc produced the following
assembly sequence:
  movaps  %xmm0, %xmm2
  addps   %xmm1, %xmm2
  subps   %xmm1, %xmm0
  blendps $10, %xmm2, %xmm0


With this patch, we now get a single
  addsubps  %xmm1, %xmm0

llvm-svn: 211427
2014-06-21 01:31:15 +00:00
David Majnemer 252cbe25cb Lex: Use the correct types for MS integer suffixes
We didn't properly implement support for the sized integer suffixes.
Suffixes like i16 were essentially ignored instead of mapping them to
the appropriately sized integer type.

This fixes PR20008.

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

llvm-svn: 211426
2014-06-21 00:51:59 +00:00
Todd Fiala f105f588b3 Fix a gdbremote bug in _M/_m stub support detection.
When a stub reported $#00 (unsupported) for _M and _m
packets, the unsupported response was not handled and
the client then marked the _M/_m commands as definitely
supported.  However, they would always fail, preventing
lldb's fallback InferiorCallMmap-based allocation strategy
from being used to attempt to allocate memory in the inferior
process space.

llvm-svn: 211425
2014-06-21 00:48:09 +00:00
Zachary Turner d119fa028a Fix the MinGW builder. Apparently std::call_once and
std::recursive_mutex are not available on MinGW and breaks the
builder.  Revert to using a function local static and sys::Mutex
just to get the tree green until we figure out a better solution.

llvm-svn: 211424
2014-06-21 00:24:51 +00:00
Rafael Espindola b4076b290e Always use a temp symbol for CIE.
Fixes pr19185.

llvm-svn: 211423
2014-06-20 23:54:32 +00:00
Dmitry Vyukov 0eb1c6f2fb tsan: fix windows build script
llvm-svn: 211422
2014-06-20 23:22:31 +00:00
Justin Bogner a88f0122e3 Driver: In crashdumps with -fmodule, dump the module dependencies
llvm-svn: 211421
2014-06-20 22:59:50 +00:00
Saleem Abdulrasool 9d45e77dca Driver: enhance MSC version compatibility
The version information for Visual Studio is spread over multiple variables.
The newer Windows SDK has started making use of some of the extended versioning
variables that were previously undefined.  Enhance our compatibility definitions
for these cases.

_MSC_VER is defined to be the Major * 100 + Minor.  _MSC_FULL_VER is defined to
be Major * 10000000 + Minor * 100000 + Build.  And _MSC_BUILD is the build
revision of the compiler.

Extend the -fmsc-version option in a compatible manner.  If the value is the
previous form of MMmm, then we assume that the build number is 0.  Otherwise, a
specific build number may be passed by using the form MMmmbbbbb.  Due to
bitwidth limitations of the option, it is currently not possible to define a
revision value.

The version information can be passed as either the decimal encoded value
(_MSC_FULL_VER or _MSC_VER) or as a dot-delimited value.

The change to the TextDiagnostic is to deal with the updated encoding of the
version information.

llvm-svn: 211420
2014-06-20 22:58:35 +00:00
Dmitry Vyukov 73e1804c21 tsan: add Go build script for freebsd
llvm-svn: 211419
2014-06-20 22:53:43 +00:00
Dmitry Vyukov b820599a3a tsan: port to freebsd
llvm-svn: 211418
2014-06-20 22:51:18 +00:00
Dmitry Vyukov f9c22916d5 tsan: fix freebsd build
freebsd does not have /proc/self/environ

llvm-svn: 211417
2014-06-20 22:49:41 +00:00
Rafael Espindola c3510c74f7 Use compact unwind for the iOS simulator.
Another step in fixing pr19185.

llvm-svn: 211416
2014-06-20 22:40:55 +00:00
Rafael Espindola becdf63f7d Use a helper function and clang-format.
No functionality change.

llvm-svn: 211415
2014-06-20 22:37:01 +00:00
Duncan P. N. Exon Smith 03c2bfc2ef Support: ScaledNumber: Fix inconsistent test names
llvm-svn: 211414
2014-06-20 22:36:09 +00:00
Duncan P. N. Exon Smith 818a8176ea Support: Write ScaledNumbers::getLg{,Floor,Ceiling}()
llvm-svn: 211413
2014-06-20 22:33:40 +00:00
Rafael Espindola df100c337c Delete dead code.
The compact unwind info is only used by code that knows it is supported.

llvm-svn: 211412
2014-06-20 22:30:31 +00:00
Justin Bogner 332a5e526e Driver: Record that we're in crashdump and push flags to ConstructJob
It's more flexible and arguably better layering to set flags to modify
compiling for diagnostics in the CC1 job themselves, rather than
tweaking the driver flags and letting them propagate.

There is one visible change this causes: crash report files will now
get preprocessed names (.i and friends).

llvm-svn: 211411
2014-06-20 22:16:00 +00:00
David Majnemer 0dc1e80a32 CodeGen: Fix test to work with assertions as well
llvm-svn: 211410
2014-06-20 22:08:59 +00:00
Duncan P. N. Exon Smith 411840d963 Support: Write ScaledNumber::getQuotient() and getProduct()
llvm-svn: 211409
2014-06-20 21:47:47 +00:00
David Majnemer 160000c64c CodeGen: typeid/dynamic_cast tests don't need asserts
These tests relied on information that was only available for clang
builds that included asserts.  Fix these tests to lift that restriction.

llvm-svn: 211408
2014-06-20 21:44:39 +00:00
Duncan P. N. Exon Smith 0a594f8cbd Support: Cleanup ScaledNumber::getAdjusted() doc
llvm-svn: 211407
2014-06-20 21:44:36 +00:00
Duncan P. N. Exon Smith d4ea631fec Support: Mark end of namespaces
This convinces clang-format to leave a newline.

llvm-svn: 211406
2014-06-20 21:43:20 +00:00
Kevin Enderby 26646108c9 Fix some double printing of filenames for archives in llvm-nm when
the tool is given multiple files.  Also fix the same issue with Mach-O
universal files. And fix the newline spacing to separate the output
in these cases.

llvm-svn: 211405
2014-06-20 21:29:27 +00:00
Rafael Espindola b4357fc293 Don't produce eh_frame relocations when targeting the IOS simulator.
First step for fixing pr19185.

llvm-svn: 211404
2014-06-20 21:15:27 +00:00