platform/upstream/llvm.git
11 years agoinstcombine: Migrate memcpy optimizations
Meador Inge [Sun, 11 Nov 2012 05:54:34 +0000 (05:54 +0000)]
instcombine: Migrate memcpy optimizations

This patch migrates the memcpy optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167686

11 years agoUse the isTruncFree and isZExtFree API to figure out of these operations are free...
Nadav Rotem [Sun, 11 Nov 2012 05:34:45 +0000 (05:34 +0000)]
Use the isTruncFree and isZExtFree API to figure out of these operations are free. Thanks Andy!

llvm-svn: 167685

11 years agoFix a comment typo and add comments.
Nadav Rotem [Sun, 11 Nov 2012 05:15:00 +0000 (05:15 +0000)]
Fix a comment typo and add comments.

llvm-svn: 167684

11 years agoinstcombine: Migrate memcmp optimizations
Meador Inge [Sun, 11 Nov 2012 05:11:20 +0000 (05:11 +0000)]
instcombine: Migrate memcmp optimizations

This patch migrates the memcmp optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167683

11 years agoinstcombine: Migrate strstr optimizations
Meador Inge [Sun, 11 Nov 2012 03:51:48 +0000 (03:51 +0000)]
instcombine: Migrate strstr optimizations

This patch migrates the strstr optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167682

11 years agoAdd method for replacing instructions to LibCallSimplifier
Meador Inge [Sun, 11 Nov 2012 03:51:43 +0000 (03:51 +0000)]
Add method for replacing instructions to LibCallSimplifier

In some cases the library call simplifier may need to replace instructions
other than the library call being simplified.  In those cases it may be
necessary for clients of the simplifier to override how the replacements
are actually done.  As such, a new overrideable method for replacing
instructions was added to LibCallSimplifier.

A new subclass of LibCallSimplifier is also defined which overrides
the instruction replacement method.  This is because the instruction
combiner defines its own replacement method which updates the worklist
when instructions are replaced.

llvm-svn: 167681

11 years agoFileCheckize test
Nico Weber [Sun, 11 Nov 2012 01:35:05 +0000 (01:35 +0000)]
FileCheckize test

llvm-svn: 167680

11 years agoFix a typo which Matt pointed out.
Richard Smith [Sun, 11 Nov 2012 00:28:33 +0000 (00:28 +0000)]
Fix a typo which Matt pointed out.

llvm-svn: 167679

11 years agoobjective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.
Fariborz Jahanian [Sat, 10 Nov 2012 18:30:40 +0000 (18:30 +0000)]
objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.
lower 24bit is currently being used.

llvm-svn: 167678

11 years agoTest commit: clean up C++11 options in lldb (on Linux) build page
Daniel Malea [Sat, 10 Nov 2012 18:09:36 +0000 (18:09 +0000)]
Test commit: clean up C++11 options in lldb (on Linux) build page

llvm-svn: 167677

11 years agoProvide definitions for all functions.
Benjamin Kramer [Sat, 10 Nov 2012 16:10:16 +0000 (16:10 +0000)]
Provide definitions for all functions.

ICC refuses to compile a class in an anonymous namespace if some functions
aren't defined. Fixes PR13477.

llvm-svn: 167676

11 years agoinstcombine: Migrate strcspn optimizations
Meador Inge [Sat, 10 Nov 2012 15:16:48 +0000 (15:16 +0000)]
instcombine: Migrate strcspn optimizations

This patch migrates the strcspn optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 167675

11 years agoSimplify the SmallVector pretty printer for LLDB a bit and make it work with referenc...
Benjamin Kramer [Sat, 10 Nov 2012 09:45:32 +0000 (09:45 +0000)]
Simplify the SmallVector pretty printer for LLDB a bit and make it work with reference types.

llvm-svn: 167674

11 years agoRemove unnecessary subtraction and addition by 1 around a couple for loops.
Craig Topper [Sat, 10 Nov 2012 09:25:36 +0000 (09:25 +0000)]
Remove unnecessary subtraction and addition by 1 around a couple for loops.

llvm-svn: 167673

11 years agoRemove empty directory.
Duncan Sands [Sat, 10 Nov 2012 09:24:44 +0000 (09:24 +0000)]
Remove empty directory.

llvm-svn: 167672

11 years agoTidy up spacing. No functional change.
Craig Topper [Sat, 10 Nov 2012 09:02:47 +0000 (09:02 +0000)]
Tidy up spacing. No functional change.

llvm-svn: 167671

11 years agoRemoved unimplemented method declaration.
Craig Topper [Sat, 10 Nov 2012 09:00:12 +0000 (09:00 +0000)]
Removed unimplemented method declaration.

llvm-svn: 167670

11 years agoSimplify custom emitter code for pcmp(e/i)str(i/m) and make the helper functions...
Craig Topper [Sat, 10 Nov 2012 08:57:41 +0000 (08:57 +0000)]
Simplify custom emitter code for pcmp(e/i)str(i/m) and make the helper functions static.

llvm-svn: 167669

11 years agoRework my implementation of circular-reference finding to not use
Douglas Gregor [Sat, 10 Nov 2012 07:24:09 +0000 (07:24 +0000)]
Rework my implementation of circular-reference finding to not use
CXXRecordDecl::forallBases, which does *not* do what I need. Fixes the
failure introduced in r167651.

llvm-svn: 167668

11 years agoAdd support for libdispatch version 4 structure layout for finding
Jason Molenda [Sat, 10 Nov 2012 06:54:30 +0000 (06:54 +0000)]
Add support for libdispatch version 4 structure layout for finding
GCD queue names of threads to
ProcessGDBRemote::GetDispatchQueueNameForThread()
May need tweaking once this version is rolled out but visual
inspection looks fine.
<rdar://problem/12333100>

llvm-svn: 167667

11 years agoDon't assume that Modules have directories. They may be in-memory-only
Jason Molenda [Sat, 10 Nov 2012 06:52:37 +0000 (06:52 +0000)]
Don't assume that Modules have directories.  They may be in-memory-only
things like our favorite "cl_kernels" and so module_directory here
can be NULL.

llvm-svn: 167666

11 years agoAdd clang support of RTM from TSX
Michael Liao [Sat, 10 Nov 2012 05:17:46 +0000 (05:17 +0000)]
Add clang support of RTM from TSX

- New options '-mrtm'/'-mno-rtm' are added to enable/disable RTM feature
- Builtin macro '__RTM__' is defined if RTM feature is enabled
- RTM intrinsic header is added and introduces 3 new intrinsics, namely
  '_xbegin', '_xend', and '_xabort'.
- 3 new builtins are added to keep compatible with gcc, namely
  '__builtin_ia32_xbegin', '__builtin_ia32_xend', and '__builtin_ia32_xabort'.
- Test cases for pre-defined macro and new intrinsic codegen are added.

llvm-svn: 167665

11 years ago-momit-leaf-frame-pointer is a -m option, not a -f option.
Richard Smith [Sat, 10 Nov 2012 04:54:44 +0000 (04:54 +0000)]
-momit-leaf-frame-pointer is a -m option, not a -f option.

llvm-svn: 167664

11 years agoConvert an improper CodeGen test to a MC test.
Evan Cheng [Sat, 10 Nov 2012 04:30:40 +0000 (04:30 +0000)]
Convert an improper CodeGen test to a MC test.

llvm-svn: 167663

11 years agoRevert "Disable -Wimplicit-fallthrough when not using C++.", pending further discussi...
Ted Kremenek [Sat, 10 Nov 2012 04:03:41 +0000 (04:03 +0000)]
Revert "Disable -Wimplicit-fallthrough when not using C++.", pending further discussion on cfe-dev.

llvm-svn: 167662

11 years agoAdd a few more test cases for verifying -fno-builtin.
Meador Inge [Sat, 10 Nov 2012 03:56:55 +0000 (03:56 +0000)]
Add a few more test cases for verifying -fno-builtin.

Some holes in testing where discovered while working on the LLVM library
call simplifiers.

llvm-svn: 167661

11 years agoinstcombine: Query target library information to gate libcall simplifications
Meador Inge [Sat, 10 Nov 2012 03:11:10 +0000 (03:11 +0000)]
instcombine: Query target library information to gate libcall simplifications

Several of the simplifiers migrated from the simplify-libcalls pass to
the instcombine pass were not correctly checking the target library
information to gate the simplifications.  This patch ensures that the
check is made.

llvm-svn: 167660

11 years agoAdd more functions to the target library information.
Meador Inge [Sat, 10 Nov 2012 03:11:06 +0000 (03:11 +0000)]
Add more functions to the target library information.

In the process of migrating optimizations from the simplify-libcalls pass
to the instcombine pass I noticed that a few functions are missing from
the target library information.  These functions need to be available for
querying in the instcombine library call simplifiers.  More functions will
probably be added in the future as more simplifiers are migrated to
instcombine.

llvm-svn: 167659

11 years agoxfail a bad test. This is a MC test but it's dependent on a codegen optimization...
Evan Cheng [Sat, 10 Nov 2012 02:34:36 +0000 (02:34 +0000)]
xfail a bad test. This is a MC test but it's dependent on a codegen optimization which is now disabled.

llvm-svn: 167658

11 years agoDisable the Thumb no-return call optimization:
Evan Cheng [Sat, 10 Nov 2012 02:09:05 +0000 (02:09 +0000)]
Disable the Thumb no-return call optimization:
mov lr, pc
b.w _foo

The "mov" instruction doesn't set bit zero to one, it's putting incorrect
value in lr. It messes up backtraces.

rdar://12663632

llvm-svn: 167657

11 years agohow to do it correctly.
Jim Ingham [Sat, 10 Nov 2012 02:08:14 +0000 (02:08 +0000)]
how to do it correctly.

llvm-svn: 167656

11 years agoDisable -Wimplicit-fallthrough when not using C++.
Ted Kremenek [Sat, 10 Nov 2012 01:47:40 +0000 (01:47 +0000)]
Disable -Wimplicit-fallthrough when not using C++.

The rationale is that there is no good workflow to silence the warning
for specific cases, other than using pragmas.  This is because the
attribute to decorate an explicit fall through is only available
in C++11.

By that argument, this should probably also be disabled unless one
is using C++11, but apparently there is an explicit test case for
this warning when using C++98.  This will require further discussion
on cfe-commits.

Fixes:  <rdar://problem/12584746>
llvm-svn: 167655

11 years ago[analyzer] When invalidating symbolic offset regions, take fields into account.
Jordan Rose [Sat, 10 Nov 2012 01:40:08 +0000 (01:40 +0000)]
[analyzer] When invalidating symbolic offset regions, take fields into account.

Previously, RegionStore was being VERY conservative in saying that because
p[i].x and p[i].y have a concrete base region of 'p', they might overlap.
Now, we check the chain of fields back up to the base object and check if
they match.

This only kicks in when dealing with symbolic offset regions because
RegionStore's "base+offset" representation of concrete offset regions loses
all information about fields. In cases where all offsets are concrete
(s.x and s.y), RegionStore will already do the right thing, but mixing
concrete and symbolic offsets can cause bindings to be invalidated that
are known to not overlap (e.g. p[0].x and p[i].y).
This additional refinement is tracked by <rdar://problem/12676180>.

<rdar://problem/12530149>

llvm-svn: 167654

11 years agoHandle redeclarations of catch variables in catch blocks.
David Blaikie [Sat, 10 Nov 2012 01:38:24 +0000 (01:38 +0000)]
Handle redeclarations of catch variables in catch blocks.

Fix to regression caused by r167650, caught by Richard Smith in code review.

llvm-svn: 167653

11 years agoCleanup pcmp(e/i)str(m/i) instruction definitions and load folding support.
Craig Topper [Sat, 10 Nov 2012 01:23:36 +0000 (01:23 +0000)]
Cleanup pcmp(e/i)str(m/i) instruction definitions and load folding support.

llvm-svn: 167652

11 years agoDiagnostic circular inheritance involving dependent base classes. We
Douglas Gregor [Sat, 10 Nov 2012 01:18:17 +0000 (01:18 +0000)]
Diagnostic circular inheritance involving dependent base classes. We
would have diagnosed this at instantiation time anyway, if only we
didn't hang on all of these test cases. Fixes <rdar://problem/12629723>

llvm-svn: 167651

11 years agoPR14296: function parameter name collisions in function try/catch
David Blaikie [Sat, 10 Nov 2012 01:04:23 +0000 (01:04 +0000)]
PR14296: function parameter name collisions in function try/catch

C++11 3.3.3/2 "A parameter name shall not be redeclared in the outermost block
of the function definition nor in the outermost block of any handler associated
with a function-try-block."

It's not totally clear to me whether the "FIXME" case is covered by this, but
Richard Smith thinks it probably should be. It's just a bit more involved to
fix that case.

llvm-svn: 167650

11 years agoMake __LDBL_MAX__ etc. have the correct type on targets where long double/double...
Eli Friedman [Sat, 10 Nov 2012 00:20:38 +0000 (00:20 +0000)]
Make __LDBL_MAX__ etc. have the correct type on targets where long double/double/etc. have the same format.  PR14285.

Based on patch by Jeroen Dobbelaere.

llvm-svn: 167649

11 years ago-Wobjc-literal-compare: look through implicit casts.
Jordan Rose [Fri, 9 Nov 2012 23:55:21 +0000 (23:55 +0000)]
-Wobjc-literal-compare: look through implicit casts.

This warning was failing to fire under ARC because of the implicit
lifetime casts added around the object literal expression.

<rdar://problem/11300873>, again.

llvm-svn: 167648

11 years ago[NVPTX] Add __nvvm_* intrinsics as Clang builtins
Justin Holewinski [Fri, 9 Nov 2012 23:50:51 +0000 (23:50 +0000)]
[NVPTX] Add __nvvm_* intrinsics as Clang builtins

Fixes bug 13354.

llvm-svn: 167647

11 years ago[NVPTX] Use ABI alignment for parameters when alignment is not specified.
Justin Holewinski [Fri, 9 Nov 2012 23:50:24 +0000 (23:50 +0000)]
[NVPTX] Use ABI alignment for parameters when alignment is not specified.

Affects SM 2.0+.  Fixes bug 13324.

llvm-svn: 167646

11 years agoDocument -W in clang --help. Also make the help text more consistent (don't end descr...
Richard Smith [Fri, 9 Nov 2012 23:30:30 +0000 (23:30 +0000)]
Document -W in clang --help. Also make the help text more consistent (don't end descriptions in periods, use | to separate possible values).

llvm-svn: 167645

11 years agoDon't include the help for -mips* in clang --help. These are just aliases for other...
Richard Smith [Fri, 9 Nov 2012 23:26:04 +0000 (23:26 +0000)]
Don't include the help for -mips* in clang --help. These are just aliases for other options, and not common enough to be worth including here.

llvm-svn: 167644

11 years ago-Wlarge-by-value-copy may be awesome, but it really shouldn't be the one and
Richard Smith [Fri, 9 Nov 2012 23:18:31 +0000 (23:18 +0000)]
-Wlarge-by-value-copy may be awesome, but it really shouldn't be the one and
only -W flag which clang --help lists.

llvm-svn: 167643

11 years agoPR13788: Don't perform checks on the initializer of a dependently-typed
Richard Smith [Fri, 9 Nov 2012 23:03:14 +0000 (23:03 +0000)]
PR13788: Don't perform checks on the initializer of a dependently-typed
variable. Previously we didn't notice the type was dependent if the only
dependence came from an array bound.

Patch by Brian Brooks!

llvm-svn: 167642

11 years agoRemove leftover code.
Argyrios Kyrtzidis [Fri, 9 Nov 2012 23:02:10 +0000 (23:02 +0000)]
Remove leftover code.

llvm-svn: 167641

11 years agoAdd lldb data formatters for clang classes, starting with SourceLocation.
Argyrios Kyrtzidis [Fri, 9 Nov 2012 22:59:01 +0000 (22:59 +0000)]
Add lldb data formatters for clang classes, starting with SourceLocation.

When installed, instead of getting this:

(lldb) p Tok.Loc
(clang::SourceLocation) $0 = {
  (unsigned int) ID = 123582
}

you'll get:

(lldb) p Tok.Loc
(clang::SourceLocation) $4 = "/usr/include/i386/_types.h:37:1" (offset: 123582, file)

This depends on r167629.

llvm-svn: 167640

11 years agoRemove --help text for deprecated sanitizer options, add --help text for -fsanitize=.
Richard Smith [Fri, 9 Nov 2012 22:50:51 +0000 (22:50 +0000)]
Remove --help text for deprecated sanitizer options, add --help text for -fsanitize=.

llvm-svn: 167639

11 years agoPR14303: Add a NoDriverOption flag to those options which are not accepted by
Richard Smith [Fri, 9 Nov 2012 22:36:44 +0000 (22:36 +0000)]
PR14303: Add a NoDriverOption flag to those options which are not accepted by
the driver (the options defined in CC1Options.td) and exclude their help from
"clang --help".

llvm-svn: 167638

11 years agoRemove a debugging printf that was left in the code.
Greg Clayton [Fri, 9 Nov 2012 22:24:38 +0000 (22:24 +0000)]
Remove a debugging printf that was left in the code.

llvm-svn: 167637

11 years agoRemoved use of non-standard escape character '\%'
Filipe Cabecinhas [Fri, 9 Nov 2012 21:39:05 +0000 (21:39 +0000)]
Removed use of non-standard escape character '\%'

llvm-svn: 167636

11 years agoFix issue with invalid flat operand number
Evandro Menezes [Fri, 9 Nov 2012 21:27:03 +0000 (21:27 +0000)]
Fix issue with invalid flat operand number

Avoid iterating over list of operands beyond the number of operands in it.

PS: this fixes issue with revision #167634.
llvm-svn: 167635

11 years agoFix issue with invalid flat operand number
Evandro Menezes [Fri, 9 Nov 2012 20:29:37 +0000 (20:29 +0000)]
Fix issue with invalid flat operand number

Avoid iterating over list of operands beyond the number of operands in it.

llvm-svn: 167634

11 years agoAdd ARM TARGET2 relocation. The testcase will follow with actualy use-case.
Anton Korobeynikov [Fri, 9 Nov 2012 20:20:12 +0000 (20:20 +0000)]
Add ARM TARGET2 relocation. The testcase will follow with actualy use-case.
Based on the patch by Logan Chien!

llvm-svn: 167633

11 years agoSwitch FreeBSD/i386 back to 4byte stack alignment. This partially
Roman Divacky [Fri, 9 Nov 2012 20:10:44 +0000 (20:10 +0000)]
Switch FreeBSD/i386 back to 4byte stack alignment. This partially
reverts r126226.

llvm-svn: 167632

11 years agoAdd string to try and fix build from r167629.
Chad Rosier [Fri, 9 Nov 2012 20:00:52 +0000 (20:00 +0000)]
Add string to try and fix build from r167629.

llvm-svn: 167631

11 years agotsan: intercept gettimeofday()
Dmitry Vyukov [Fri, 9 Nov 2012 19:55:06 +0000 (19:55 +0000)]
tsan: intercept gettimeofday()

llvm-svn: 167630

11 years agoAdd a SourceLocation::printToString() that returns in a std::string what dump()
Argyrios Kyrtzidis [Fri, 9 Nov 2012 19:40:48 +0000 (19:40 +0000)]
Add a SourceLocation::printToString() that returns in a std::string what dump()
writes to stderr; for debugging purposes.

llvm-svn: 167629

11 years agoAdd a FileCharacteristic parameter to SourceManager::createFileIDForMemBuffer
Argyrios Kyrtzidis [Fri, 9 Nov 2012 19:40:45 +0000 (19:40 +0000)]
Add a FileCharacteristic parameter to SourceManager::createFileIDForMemBuffer
for completeness and use it in CompilerInstance::InitializeSourceManager if
the input is a memory buffer.

llvm-svn: 167628

11 years agoTurn FrontendInputFile into an immutable class and have it also accept
Argyrios Kyrtzidis [Fri, 9 Nov 2012 19:40:39 +0000 (19:40 +0000)]
Turn FrontendInputFile into an immutable class and have it also accept
a memory buffer instead of only a filename.

llvm-svn: 167627

11 years agoMake CompilerInstance::InitializeSourceManager accept a FrontendInputFile,
Argyrios Kyrtzidis [Fri, 9 Nov 2012 19:40:33 +0000 (19:40 +0000)]
Make CompilerInstance::InitializeSourceManager accept a FrontendInputFile,
no functionality change.

llvm-svn: 167626

11 years agoFix assertions in updateRegMaskSlots().
Jakob Stoklund Olesen [Fri, 9 Nov 2012 19:18:49 +0000 (19:18 +0000)]
Fix assertions in updateRegMaskSlots().

The RegMaskSlots contains 'r' slots while NewIdx and OldIdx are 'B'
slots. This broke the checks in the assertions.

This fixes PR14302.

llvm-svn: 167625

11 years agoDon't use so many bits.
Rafael Espindola [Fri, 9 Nov 2012 19:03:35 +0000 (19:03 +0000)]
Don't use so many bits.

llvm-svn: 167624

11 years agoImplement -mstrict-align using '-backend-option -arm-strict-align' as this saves
Chad Rosier [Fri, 9 Nov 2012 18:27:01 +0000 (18:27 +0000)]
Implement -mstrict-align using '-backend-option -arm-strict-align' as this saves
us from having to make any backend changes.

llvm-svn: 167623

11 years agoRevert r167620; this can be implemented using an existing CL option.
Chad Rosier [Fri, 9 Nov 2012 18:25:27 +0000 (18:25 +0000)]
Revert r167620; this can be implemented using an existing CL option.

llvm-svn: 167622

11 years agoAdd test case for r167619.
Chad Rosier [Fri, 9 Nov 2012 17:39:51 +0000 (17:39 +0000)]
Add test case for r167619.

llvm-svn: 167621

11 years agoAdd support for -mstrict-align compiler option for ARM targets.
Chad Rosier [Fri, 9 Nov 2012 17:29:38 +0000 (17:29 +0000)]
Add support for -mstrict-align compiler option for ARM targets.
rdar://12340498

llvm-svn: 167620

11 years ago[driver] Add a -mstrict-align compiler option for ARM targets.
Chad Rosier [Fri, 9 Nov 2012 17:29:19 +0000 (17:29 +0000)]
[driver] Add a -mstrict-align compiler option for ARM targets.
rdar://12340498

llvm-svn: 167619

11 years agoSilence GCC warning about falling off the end of a non-void function.
Benjamin Kramer [Fri, 9 Nov 2012 15:45:22 +0000 (15:45 +0000)]
Silence GCC warning about falling off the end of a non-void function.

llvm-svn: 167618

11 years ago[Sanitizer] add sanity checks for communication with external symbolizer
Alexey Samsonov [Fri, 9 Nov 2012 14:45:30 +0000 (14:45 +0000)]
[Sanitizer] add sanity checks for communication with external symbolizer

llvm-svn: 167617

11 years agotsan: switch to new memory_order constants (ABI compatible)
Dmitry Vyukov [Fri, 9 Nov 2012 14:12:16 +0000 (14:12 +0000)]
tsan: switch to new memory_order constants (ABI compatible)

llvm-svn: 167615

11 years agotsan: switch to new memory_order constants (ABI compatible)
Dmitry Vyukov [Fri, 9 Nov 2012 14:11:51 +0000 (14:11 +0000)]
tsan: switch to new memory_order constants (ABI compatible)

llvm-svn: 167614

11 years agoImproved support for removing the comma preceding __VA_ARGS__ where __VA_ARGS__
Andy Gibbs [Fri, 9 Nov 2012 13:24:30 +0000 (13:24 +0000)]
Improved support for removing the comma preceding __VA_ARGS__ where __VA_ARGS__
is empty in a variadic macro expansion.  This fixes a divergence in support for
the ", ## __VA_ARGS__" GCC extension which differed in behaviour when in strict
C99 mode (note: there is no change in behaviour has been made in the gnu99 mode
that clang uses by default).  In addition, there is improved support for the
Microsoft alternative extension ", __VA_ARGS__".

llvm-svn: 167613

11 years agotsan: instrument all atomics (including fetch_add, exchange, cas, etc)
Dmitry Vyukov [Fri, 9 Nov 2012 12:55:36 +0000 (12:55 +0000)]
tsan: instrument all atomics (including fetch_add, exchange, cas, etc)

llvm-svn: 167612

11 years agotsan: add __tsan_atomicX_compare_exchange_val() function
Dmitry Vyukov [Fri, 9 Nov 2012 12:54:37 +0000 (12:54 +0000)]
tsan: add __tsan_atomicX_compare_exchange_val() function
It's easier to call from compiler module.

llvm-svn: 167611

11 years agoAdd a possible underscore before the wrappers to the output expectations for Darwin
Alexander Potapenko [Fri, 9 Nov 2012 11:55:33 +0000 (11:55 +0000)]
Add a possible underscore before the wrappers to the output expectations for Darwin

llvm-svn: 167610

11 years agoUse isInvalidDecl() instead of isStatic() as suggested by dblaikie.
Nico Weber [Fri, 9 Nov 2012 08:38:04 +0000 (08:38 +0000)]
Use isInvalidDecl() instead of isStatic() as suggested by dblaikie.

I couldn't think of a way to make an operator() invalid without returning
earlier from this function other than making it static, so no new test.

llvm-svn: 167609

11 years agoAdd support for memory runtime check. When we can, we calculate array bounds.
Nadav Rotem [Fri, 9 Nov 2012 07:09:44 +0000 (07:09 +0000)]
Add support for memory runtime check. When we can, we calculate array bounds.
If the arrays are found to be disjoint then we run the vectorized version of
the loop. If they are not, we run the scalar code.

llvm-svn: 167608

11 years agoindent
Nadav Rotem [Fri, 9 Nov 2012 07:02:24 +0000 (07:02 +0000)]
indent

llvm-svn: 167607

11 years agoMark Objective-C 2.0 status as "Not applicable" on Linux.
Jason Molenda [Fri, 9 Nov 2012 06:16:12 +0000 (06:16 +0000)]
Mark Objective-C 2.0 status as "Not applicable" on Linux.
The objc 2 runtime doesn't run on Linux.

llvm-svn: 167606

11 years agoUpdate the status page to include Linux status information,
Jason Molenda [Fri, 9 Nov 2012 06:14:39 +0000 (06:14 +0000)]
Update the status page to include Linux status information,
patch from Dan Malea, daniel.malea@intel.com.

llvm-svn: 167605

11 years agoDon't crash on calling static member overloaded operator, PR14120
Nico Weber [Fri, 9 Nov 2012 06:06:14 +0000 (06:06 +0000)]
Don't crash on calling static member overloaded operator, PR14120

Patch from Brian Brooks!

llvm-svn: 167604

11 years agoRemove old driver code to grab the iOS simulator version from the -D option.
Bob Wilson [Fri, 9 Nov 2012 01:59:30 +0000 (01:59 +0000)]
Remove old driver code to grab the iOS simulator version from the -D option.

We can now rely on the -mios-simulator-version-min command line option
and remove the awful hack. <rdar://problem/10304510>

llvm-svn: 167603

11 years ago[ms] Implement int64_t version of mangleNumber() in terms of the APSInt version.
Nico Weber [Fri, 9 Nov 2012 00:05:56 +0000 (00:05 +0000)]
[ms] Implement int64_t version of mangleNumber() in terms of the APSInt version.

No intended functionality change.

llvm-svn: 167602

11 years agoFix typeo in example help text for type filter add.
Jason Molenda [Thu, 8 Nov 2012 23:57:44 +0000 (23:57 +0000)]
Fix typeo in example help text for type filter add.
<rdar://problem/12090979>

llvm-svn: 167601

11 years agoPatch from Dan Malea daniel.malea@gmail.com to add some required
Jason Molenda [Thu, 8 Nov 2012 23:50:33 +0000 (23:50 +0000)]
Patch from Dan Malea daniel.malea@gmail.com to add some required
flags to the Linux makefiles to get the tests to run.

llvm-svn: 167600

11 years ago[Windows] Fix mangling of number literal '0'
Nico Weber [Thu, 8 Nov 2012 23:38:59 +0000 (23:38 +0000)]
[Windows] Fix mangling of number literal '0'

Do this by making the mangleNumber(APSInt) overload look like
the int64_t version. (The latter should probably just delegate
to the former).

Test from Evgeny Eltsin!

llvm-svn: 167599

11 years agoRemove more code related to invoking llvm-gcc. <rdar://problem/11991320>
Bob Wilson [Thu, 8 Nov 2012 23:21:22 +0000 (23:21 +0000)]
Remove more code related to invoking llvm-gcc. <rdar://problem/11991320>

llvm-svn: 167598

11 years agoFix a source range regression in C++ new expressions with call initializers.
David Blaikie [Thu, 8 Nov 2012 22:53:48 +0000 (22:53 +0000)]
Fix a source range regression in C++ new expressions with call initializers.

Introduced in r167507, discovered in review by Abramo Bagnara.

llvm-svn: 167597

11 years agoFix a bug I found while preparing my devmtg talk: When passing NULL to a
Matt Beaumont-Gay [Thu, 8 Nov 2012 20:50:02 +0000 (20:50 +0000)]
Fix a bug I found while preparing my devmtg talk: When passing NULL to a
function that takes a const Foo&, where Foo is convertible from a large number
of pointer types, we print ALL the overloads, no matter the setting of
-fshow-overloads.

There is potential follow-on work in unifying the "print candidates, but not
too many" logic between OverloadCandidateSet::NoteCandidates and
ImplicitConversionSequence::DiagnoseAmbiguousConversion.

llvm-svn: 167596

11 years agollvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstP...
NAKAMURA Takumi [Thu, 8 Nov 2012 20:34:25 +0000 (20:34 +0000)]
llvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstPtr() Big-endian-aware.

llvm-svn: 167595

11 years agoLiteralSupport: Don't overflow the temporary buffer when decoding invalid string...
Benjamin Kramer [Thu, 8 Nov 2012 19:22:31 +0000 (19:22 +0000)]
LiteralSupport: Don't overflow the temporary buffer when decoding invalid string parts.

Instead just use a dummy buffer, we're not going to use the decoded string anyways.
Fixes PR14292.

llvm-svn: 167594

11 years agoLiteralSupport: Clean up style violations. No functionality change.
Benjamin Kramer [Thu, 8 Nov 2012 19:22:26 +0000 (19:22 +0000)]
LiteralSupport: Clean up style violations. No functionality change.

llvm-svn: 167593

11 years agoMinor cleanups to the new ModuleList notification APIs: passing in the ModuleList...
Enrico Granata [Thu, 8 Nov 2012 19:16:03 +0000 (19:16 +0000)]
Minor cleanups to the new ModuleList notification APIs: passing in the ModuleList as part of the callbacks, and not copying the notifier as part of copy constructing and assigning

llvm-svn: 167592

11 years agoAllow to pass from syntactic form of InitListExpr to semantic form (just as viceversa...
Abramo Bagnara [Thu, 8 Nov 2012 18:41:43 +0000 (18:41 +0000)]
Allow to pass from syntactic form of InitListExpr to semantic form (just as viceversa). No functionality change.

llvm-svn: 167591

11 years agoAvoid to write function name in comment. Thanks to Dmitri Gribenko.
Abramo Bagnara [Thu, 8 Nov 2012 16:27:30 +0000 (16:27 +0000)]
Avoid to write function name in comment. Thanks to Dmitri Gribenko.

llvm-svn: 167588

11 years agoReadded line removed by mistake.
Abramo Bagnara [Thu, 8 Nov 2012 16:01:51 +0000 (16:01 +0000)]
Readded line removed by mistake.

llvm-svn: 167587

11 years ago[Sanitizer] Build all sanitizer runtime libraries with debug info (with -gline-tables...
Alexey Samsonov [Thu, 8 Nov 2012 14:49:28 +0000 (14:49 +0000)]
[Sanitizer] Build all sanitizer runtime libraries with debug info (with -gline-tables-only, if it's available)

llvm-svn: 167584

11 years agoFixed converted ConstantArrayTypeLoc range. Added a missing testcase for ConstructorD...
Abramo Bagnara [Thu, 8 Nov 2012 14:44:42 +0000 (14:44 +0000)]
Fixed converted ConstantArrayTypeLoc range. Added a missing testcase for ConstructorDecl source range.

llvm-svn: 167583

11 years agoDrop the limitation to IEEE floating point types from the fdiv of pow2 -> fmul transform.
Benjamin Kramer [Thu, 8 Nov 2012 13:58:10 +0000 (13:58 +0000)]
Drop the limitation to IEEE floating point types from the fdiv of pow2 -> fmul transform.

This is safe for x87 long doubles and ppc double doubles too.

llvm-svn: 167582