Commit Graph

141141 Commits

Author SHA1 Message Date
Nadav Rotem d33ce6f100 LoopVectorizer cost model. Honor the user command line flag that selects the vectorization factor even if the target machine does not have any vector registers.
llvm-svn: 172544
2013-01-15 18:25:16 +00:00
David Greene 57ad4297a3 Disable Uninitialized Use Warnings for Broken gcc Versions
Some versions of gcc accept unsupported -W flags and run just fine if
there are no warnings, but die with an unsupported flag error if a
warning is encountered.  gcc 4.3 and gcc 4.4 both exhibit this
behavior for -Wno-maybe-uninitialized.  Therefore, if the flag check
for -Wno-maybe-uninitialized succeeds, only use
-Wno-maybe-uninitialized if we are using gcc version 4.7 or greater.
Use -Wno-uninitialized otherwise.

llvm-svn: 172543
2013-01-15 18:21:15 +00:00
Howard Hinnant 3d7eb2f806 Optimize basic_ostream::write by having it call sputn instead of sputc.
llvm-svn: 172542
2013-01-15 17:22:03 +00:00
Evgeniy Stepanov 701d2b861e [msan] Temporarily remove ICmpEQ tests.
They are failing on the bots.

llvm-svn: 172540
2013-01-15 17:12:04 +00:00
Evgeniy Stepanov d14e47b146 [msan] Fix handling of equality comparison of pointer vectors.
Also improve test coveration of the handling of relational comparisons.

llvm-svn: 172539
2013-01-15 16:44:52 +00:00
Evgeniy Stepanov c9bd35b143 Allow vectors in CreatePointerCast.
Both underlying IR operations support vectors of pointers already.

llvm-svn: 172538
2013-01-15 16:43:00 +00:00
Manuel Klimek a31e58b2df Do not traverse the break-state when we know we cannot break anyway.
This is an optimization that djasper spottet. For now, we do not format
anything after the first token that belongs to such an implicit string
literal. All our state is not made for handling that anyway, so we'll
revisit this if we find a problem.

llvm-svn: 172537
2013-01-15 16:41:02 +00:00
Manuel Klimek 99c7baa3cf Fix formatting of preprocessor directives (incluces, warnings & errors).
Treat tokens inside <> for includes and everything from the second token
of a warning / error on as an implicit string literal, e.g. do not
change its whitespace at all.

Now correctly formats:
 #include < path with space >
 #error Leave     all         white!!!!! space* alone!

Note that for #error and #warning we still format the space up to the
first token of the text, so:
   #  error   Text
will become
 #error Text

llvm-svn: 172536
2013-01-15 15:50:27 +00:00
Evgeniy Stepanov f71e7ad3cc Fix operand type conditions in one of ICmpInst constructors.
It was out of sync with the conditions in the other two constructors.

llvm-svn: 172535
2013-01-15 15:30:33 +00:00
Renato Golin 51c25b0818 Pattern-matched variables in post-inc-icmpzero.ll
Test was failing for clang-native-arm-cortex-a9 build-bot configuration.
The reason for the failure was the test was using hardcoded names.
The attached patch fixes this failure by replacing the hard-coded variables
names with pattern-matched variable names.

Patch by Manish Verma, ARM

llvm-svn: 172534
2013-01-15 15:22:45 +00:00
Daniel Jasper 7194527d9f Improve operator kind detection in presence of comments.
We used to incorrectly identify some operators (*, &, +, -, etc.) if
there were comments around them.

Example:
Before: int a = /**/ - 1;
After:  int a = /**/ -1;

llvm-svn: 172533
2013-01-15 14:27:39 +00:00
Kostya Serebryany d8b1f78296 [asan] enable asan_allocator2 by default on Linux. Will enable it on other platforms and remove the old one later, after additional testing. The new allocator is much faster and uses less memory
llvm-svn: 172531
2013-01-15 13:57:39 +00:00
Manuel Klimek e01bab587c Fixes various bugs around the keywords class, struct and union.
This switches to parsing record definitions only if we can clearly
identify them. We're specifically allowing common patterns for
visibility control through macros and attributes, but we cannot
currently fix all instances. This fixes all known bugs we have though.

Before:
static class A f() {
  return g();
} int x;

After:
static class A f() {
  return g();
}
int x;

llvm-svn: 172530
2013-01-15 13:38:33 +00:00
Dmitry Vyukov 9ab63f68fc asan: fix standalone malloc implementation
llvm-svn: 172529
2013-01-15 12:57:02 +00:00
Alexander Kornienko 00911f1d55 Resolved merge error with r172323 (llvm::X -> X)
llvm-svn: 172528
2013-01-15 12:20:21 +00:00
Dmitry Vyukov 0d46b2b95e asan: fix the constant for new allocator cache
llvm-svn: 172526
2013-01-15 10:45:18 +00:00
Michael J. Spencer 3f32c1e860 Update CODE_OWNERS.TXT.
llvm-svn: 172525
2013-01-15 09:37:45 +00:00
Kostya Serebryany c4bb752e3b [sanitizer] hide PR_SET_NAME under an ifdef (for older kernels)
llvm-svn: 172523
2013-01-15 09:03:23 +00:00
Dmitry Vyukov 2854326db6 asan: correct non-temporal prefetch for memory allocator
llvm-svn: 172522
2013-01-15 09:03:20 +00:00
Dmitry Vyukov 45a698eb58 asan: faster thead-local cache for memory allocator
llvm-svn: 172521
2013-01-15 09:02:20 +00:00
Dmitry Vyukov 1f48c1a9a1 asan: fix lint warnings
llvm-svn: 172520
2013-01-15 08:51:10 +00:00
Dmitry Vyukov 74764617d7 asan: fix bugs in the testlib
llvm-svn: 172519
2013-01-15 08:33:41 +00:00
Dmitry Vyukov 1e4b54d196 asan: rename the file (it's not 64-bit specific anymore)
llvm-svn: 172518
2013-01-15 08:04:27 +00:00
Richard Smith 03d9393b4a Don't crash when binding a reference to a temporary pointer created from
resolving an overloaded function reference within an initializer list.
Previously we would try to resolve the overloaded function reference without
first stripping off the InitListExpr wrapper.

llvm-svn: 172517
2013-01-15 07:58:29 +00:00
Michael J. Spencer b03f6c489a [ELF] Update for LLVM Object/ELF changes.
llvm-svn: 172516
2013-01-15 07:53:22 +00:00
Michael J. Spencer 1a79161fe3 [Object][ELF] Simplify ELFObjectFile by using ELFType.
This simplifies the usage and implementation of ELFObjectFile by using ELFType
to replace:

<endianness target_endianness, std::size_t max_alignment, bool is64Bits>

This does complicate the base ELF types as they must now use template template
parameters to partially specialize for the 32 and 64bit cases. However these
are only defined once.

llvm-svn: 172515
2013-01-15 07:44:25 +00:00
Richard Smith 550de45861 PR14950: Fix out-of-bounds function parameter access in literal operator lookup.
llvm-svn: 172514
2013-01-15 07:12:59 +00:00
Michael J. Spencer bb78a04088 [ELF] Replace [...] x_{begin,end}() with range<[...]> x().
llvm-svn: 172513
2013-01-15 06:55:37 +00:00
Michael J. Spencer aa3aa570dc [Core] Add iterator ranges.
This is based on code by Jeffrey Yasskin. It has been modified to compile
with MSVC and reformated to LLVM style.

llvm-svn: 172512
2013-01-15 06:55:25 +00:00
Michael J. Spencer 7fe77f8c61 [ELF] Fix use of LLVM RTTI.
llvm-svn: 172511
2013-01-15 06:55:11 +00:00
Richard Smith da1f933e12 PR14918: Don't confuse braced-init-lists after template variable declarations
with function definitions.

We really should remove Parser::isDeclarationAfterDeclarator entirely, since
it's meaningless in C++11 (an open brace could be either a function definition
or an initializer, which is what it's trying to differentiate between). The
other caller of it happens to be correct right now...

llvm-svn: 172510
2013-01-15 06:49:38 +00:00
Douglas Gregor 1517128912 Add -fopenmp -cc1 option and wire it up to define _OPENMP, from Alexey Bataev!
llvm-svn: 172509
2013-01-15 06:45:29 +00:00
Michael J. Spencer daa46eb736 [Support] Add LLVM_CONSTEXPR.
Marks a decl as constexpr if the compiler supports it.

llvm-svn: 172508
2013-01-15 05:01:39 +00:00
Shankar Easwaran f6dc082f91 remove const from FindByName
llvm-svn: 172507
2013-01-15 03:02:33 +00:00
Greg Clayton 0ed3e447dc <rdar://problem/13010909>
Don't accidentally sign extend unsigned bitfields.

llvm-svn: 172506
2013-01-15 02:59:24 +00:00
Jim Ingham 4e117582d5 Fix for the separation between -i and -u in expression.
llvm-svn: 172505
2013-01-15 02:57:33 +00:00
Richard Smith 0faa2b1ae4 Fix behavior of [[gnu::]] function attributes. Per g++'s behavior, these
attributes appertain to a declaration, even though they would be much more
naturally modelled as appertaining to a function type. Previously, we would
try to distribute them from the declarator to the function type, then
reject them for being at an incorrect location. Now, we just distribute them
as far as the declarator; the existing attribute handling code can actually
apply them there just fine.

llvm-svn: 172504
2013-01-15 02:48:13 +00:00
Jim Ingham 184e981111 Separated the "expr --unwind-on-error" behavior into two parts, actual errors (i.e. crashes) which continue to be
controlled by the --unwind-on-error flag, and --ignore-breakpoint which separately controls behavior when a called
function hits a breakpoint.  For breakpoints, we don't unwind, we either stop, or ignore the breakpoint, which makes
more sense.  
Also make both these behaviors globally settable through "settings set".
Also handle the case where a breakpoint command calls code that ends up re-hitting the breakpoint.  We were recursing
and crashing.  Now we just stop without calling the second command.

<rdar://problem/12986644>
<rdar://problem/9119325>

llvm-svn: 172503
2013-01-15 02:47:48 +00:00
Michael J. Spencer ed1950719b [docs] Add driver documentation.
This gives an overview of the driver and explains how to add options and driver flavors.

llvm-svn: 172502
2013-01-15 02:00:59 +00:00
Michael J. Spencer 31dffbb659 [docs] Update status.
llvm-svn: 172501
2013-01-15 02:00:48 +00:00
Argyrios Kyrtzidis 5312f07a89 [ADT/StringMap] Follow-up to r172455, use the correct constructor for setting the InitialSize,
previously it was calling the "StringMapImpl(unsigned itemSize)" constructor.

llvm-svn: 172500
2013-01-15 01:58:45 +00:00
Nadav Rotem d2d57b72d6 LTO: Also init TTI for codegen passes.
llvm-svn: 172499
2013-01-15 01:53:57 +00:00
Daniel Dunbar 25c4b5718b [IR] Add verifier support for llvm.module.flags.
- Also, update the LangRef documentation on module flags to match the
   implementation.

llvm-svn: 172498
2013-01-15 01:22:53 +00:00
Chad Rosier 5f15a35114 [driver] Warnings for warning options are handled by the frontend. The driver needs to process the
warning options to setup diagnostic state, but should not be emitting warnings as these would be
rudndant with what the frontend emits.
rdar://13001556

llvm-svn: 172497
2013-01-15 01:21:53 +00:00
Jack Carter f238510c43 This patch fixes a Mips specific bug where
we need to generate a N64 compound relocation
R_MIPS_GPREL_32/R_MIPS_64/R_MIPS_NONE.

The bug was exposed by the SingleSourcetest case 
DuffsDevice.c.

Contributer: Jack Carter
llvm-svn: 172496
2013-01-15 01:08:02 +00:00
Nick Kledzik 233f537799 Add new merge-by-content Merge attribute for use by anonymous
constants and string literals which the linker should coalesce.

llvm-svn: 172495
2013-01-15 00:17:57 +00:00
Jason Molenda cb8a9a61f4 Add a few other missing LOG_ types to set_logging() in RNBRemote.cpp;
document some simple bourne shell to re-generate these from the DNBDefs.h
header file in case this needs to be done again in the future.

llvm-svn: 172494
2013-01-15 00:08:49 +00:00
Enrico Granata df17b4dada Adding a test case for expression parser's support for Unicode strings. This is an expected failure for now
llvm-svn: 172493
2013-01-15 00:03:03 +00:00
Enrico Granata 93d5966513 <rdar://problem/12790664>
Single-character Unicode data formatters

llvm-svn: 172492
2013-01-14 23:53:26 +00:00
Eli Bendersky e6f4c68373 Now GenericAsmParser and AsmParser are no longer friends, GenericAsmParser can
simply use the getParser method from MCAsmParserExtension, working through the
MCAsmParser interface. There's no longer a need to overload that method to
cast it to the concrete AsmParser.

llvm-svn: 172491
2013-01-14 23:43:18 +00:00