platform/upstream/llvm.git
10 years ago[OPENMP] Several cosmetic fixes in comments, tests and the code for '#pragma omp...
Alexey Bataev [Tue, 15 Jul 2014 02:55:09 +0000 (02:55 +0000)]
[OPENMP] Several cosmetic fixes in comments, tests and the code for '#pragma omp single'.

llvm-svn: 213040

10 years agoRelax tests expecting to see CPI symbols
David Majnemer [Tue, 15 Jul 2014 02:44:49 +0000 (02:44 +0000)]
Relax tests expecting to see CPI symbols

WinCOFF doesn't use CPI symbols, it has a different scheme for naming
constant pool entries.  Update tests to handle either appearing.

llvm-svn: 213039

10 years agoCodeGen: Handle ConstantVector and undef in WinCOFF constant pools
David Majnemer [Tue, 15 Jul 2014 02:34:12 +0000 (02:34 +0000)]
CodeGen: Handle ConstantVector and undef in WinCOFF constant pools

The constant pool entry code for WinCOFF assumed that vector constants
would be formed using ConstantDataVector, it did not expect to see a
ConstantVector.  Furthermore, it did not expect undef as one of the
elements of the vector.

ConstantVectors should be handled like ConstantDataVectors, treat Undef
as zero.

llvm-svn: 213038

10 years ago[FastISel][X86] Remove no longer needed functions.
Juergen Ributzka [Tue, 15 Jul 2014 02:22:56 +0000 (02:22 +0000)]
[FastISel][X86] Remove no longer needed functions.

llvm-svn: 213037

10 years ago[FastISel][X86] Implement the FastLowerIntrinsicCall hook.
Juergen Ributzka [Tue, 15 Jul 2014 02:22:53 +0000 (02:22 +0000)]
[FastISel][X86] Implement the FastLowerIntrinsicCall hook.

Rename X86VisitIntrinsicCall -> FastLowerIntrinsicCall, which effectively
implements the target hook.

llvm-svn: 213036

10 years ago[FastISel][X86] Implement the FastLowerCall hook.
Juergen Ributzka [Tue, 15 Jul 2014 02:22:49 +0000 (02:22 +0000)]
[FastISel][X86] Implement the FastLowerCall hook.

This implements the FastLowerCall hook, which is based on the DoSelectCall
function. The implementation is very similar, but the target-independent call
lowering part has been factored out.

This should also enable patchpoint intrinsic lowering for FastISel on X86.

Related to <rdar://problem/17427052>.

llvm-svn: 213035

10 years ago[FastISel] Insert patchpoint instruction before the target generated call instruction.
Juergen Ributzka [Tue, 15 Jul 2014 02:22:46 +0000 (02:22 +0000)]
[FastISel] Insert patchpoint instruction before the target generated call instruction.

The patchpoint instruction should have been inserted before the target
generated call instruction to be inside the ADJSTACKDOWN/ADJSTACKUP call
sequence window.

llvm-svn: 213034

10 years ago[FastISel] Fix patchpoint lowering to set the result register.
Juergen Ributzka [Tue, 15 Jul 2014 02:22:43 +0000 (02:22 +0000)]
[FastISel] Fix patchpoint lowering to set the result register.

Always update the value map with the result register (if there is one), for the
patchpoint instruction we created to replace the target-specific call
instruction.

llvm-svn: 213033

10 years agoDon't get confused on the number of braces when braces start after the first __asm
Ehsan Akhgari [Tue, 15 Jul 2014 02:21:41 +0000 (02:21 +0000)]
Don't get confused on the number of braces when braces start after the first __asm

Summary:
Without this, we would not consume the closing brace which would cause
the parser to start consuming C++ and bad things would happen.

Reviewers: majnemer

Subscribers: cfe-commits

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

llvm-svn: 213032

10 years agoR600: Add dag combine for copy of an illegal type.
Matt Arsenault [Tue, 15 Jul 2014 02:06:31 +0000 (02:06 +0000)]
R600: Add dag combine for copy of an illegal type.

This helps avoid redundant instructions to unpack, and repack
the vectors. Ideally we could recognize that pattern and eliminate
it. Currently v4i8 and other small element type vectors are scalarized,
so this has the added bonus of avoiding that.

llvm-svn: 213031

10 years agoTeach computeKnownBits to look through addrspacecast.
Matt Arsenault [Tue, 15 Jul 2014 01:55:03 +0000 (01:55 +0000)]
Teach computeKnownBits to look through addrspacecast.

This fixes inferring alignment through an addrspacecast.

llvm-svn: 213030

10 years agoImprove test 'CodeGen/X86/combine-vec-shuffle-3.ll'.
Andrea Di Biagio [Tue, 15 Jul 2014 01:29:27 +0000 (01:29 +0000)]
Improve test 'CodeGen/X86/combine-vec-shuffle-3.ll'.
Now functions 'test4', 'test9', 'test14' and 'test19' correctly perform
a move of two packed values from the high quadword of vector %b to the low
quadword of vector %a (movhlps idiom).

No functional change intended.

llvm-svn: 213029

10 years agoVirtualFileSystem: Correctly generate the mapping for an empty VFS
Justin Bogner [Tue, 15 Jul 2014 01:24:35 +0000 (01:24 +0000)]
VirtualFileSystem: Correctly generate the mapping for an empty VFS

In r209332 I accidentally broke generation of empty VFS maps. This
fixes the issue and adds a test.

llvm-svn: 213028

10 years agoDocument the maximum LLVM IR alignment, which is 1 << 29 or 0.5 GiB
Reid Kleckner [Tue, 15 Jul 2014 01:16:09 +0000 (01:16 +0000)]
Document the maximum LLVM IR alignment, which is 1 << 29 or 0.5 GiB

Add verifier checks.  We already check these in the assembly parser, but
a frontend producing IR in memory wouldn't hit those checks.

llvm-svn: 213027

10 years ago[Format] Clang format IslAst.cpp
Johannes Doerfert [Tue, 15 Jul 2014 00:58:57 +0000 (00:58 +0000)]
[Format] Clang format IslAst.cpp

llvm-svn: 213026

10 years agoTeach GetUnderlyingObject / BasicAA about addrspacecast
Matt Arsenault [Tue, 15 Jul 2014 00:56:40 +0000 (00:56 +0000)]
Teach GetUnderlyingObject / BasicAA about addrspacecast

llvm-svn: 213025

10 years agoRevert r212572 "improve BasicAA CS-CS queries", it causes PR20303.
Nick Lewycky [Tue, 15 Jul 2014 00:53:38 +0000 (00:53 +0000)]
Revert r212572 "improve BasicAA CS-CS queries", it causes PR20303.

llvm-svn: 213024

10 years agoAny commands that are executed through the public interface using SBCommandInterprete...
Greg Clayton [Tue, 15 Jul 2014 00:25:59 +0000 (00:25 +0000)]
Any commands that are executed through the public interface using SBCommandInterpreter::HandleCommand() are assumed to be in non-interactive mode.

Any commands that want interactivity (stdin) will need to be executed through the normal command interpreter using the debugger's in/out/err file handles, or by using "command source".

Individual commands through the API will have their STDIN disabled. The STDOUT and STDERR will be redirected into the SBCommandReturnObject argument to SBCommandInterpreter::HandleCommand() as usual.

This helps with a deadlock situation in an IDE (Xcode) where the IDE was managing the breakpoint actions by setting a breakpoint callback and doing things manually.

<rdar://problem/17386271>

llvm-svn: 213023

10 years agoPR19751: (T())++ is not a cast-expression.
Richard Smith [Tue, 15 Jul 2014 00:11:48 +0000 (00:11 +0000)]
PR19751: (T())++ is not a cast-expression.

llvm-svn: 213022

10 years agoConvert test to FileCheck.
Matt Arsenault [Tue, 15 Jul 2014 00:07:27 +0000 (00:07 +0000)]
Convert test to FileCheck.

Check the individual test functions for more useful failure errors.

llvm-svn: 213021

10 years ago[DAGCombiner] Avoid calling method 'isShuffleMaskLegal' on illegal vector types.
Andrea Di Biagio [Tue, 15 Jul 2014 00:02:32 +0000 (00:02 +0000)]
[DAGCombiner] Avoid calling method 'isShuffleMaskLegal' on illegal vector types.

This patch fixes a crasher in method 'DAGCombiner::visitOR' due to an invalid
call to method 'isShuffleMaskLegal'. On x86, method 'isShuffleMaskLegal'
always expects a legal vector value type in input.

With this patch, we immediately check if the input OR dag node has a legal
vector type; we only try to fold a OR dag node into a single shufflevector
if we know that the resulting shuffle will have a legal type.
This is to avoid calling method 'isShuffleMaskLegal' on a potentially
illegal vector value type.

Added a new test-case to file 'CodeGen/X86/combine-or.ll' to verify that
DAGCombiner doesn't crash in the attempt to check/combine an OR between shuffles
with illegal types.

llvm-svn: 213020

10 years agoAnnotate reduction parallel loops in the IslAst textual output
Johannes Doerfert [Tue, 15 Jul 2014 00:00:35 +0000 (00:00 +0000)]
Annotate reduction parallel loops in the IslAst textual output

  + Introduced dependency type TYPE_TC_RED to represent the transitive closure
    (& the reverse) of reduction dependences. These are used when we check for
    reduction parallel loops.
  + Test cases including loop reversals and modulo schedules which compute
    reductions in a alternated order.

llvm-svn: 213019

10 years agoR600: Add denormal handling subtarget features.
Matt Arsenault [Mon, 14 Jul 2014 23:40:49 +0000 (23:40 +0000)]
R600: Add denormal handling subtarget features.

llvm-svn: 213018

10 years agoR600/SI: Default to no single precision denormals.
Matt Arsenault [Mon, 14 Jul 2014 23:40:43 +0000 (23:40 +0000)]
R600/SI: Default to no single precision denormals.

llvm-svn: 213017

10 years agoAST: Fix __uuidof for template specializations
David Majnemer [Mon, 14 Jul 2014 23:40:24 +0000 (23:40 +0000)]
AST: Fix __uuidof for template specializations

While we previously supported __uuidof applied to a template
specialization, we would only find the uuid attribute if it was applied
to the template argument.  We would erroneously ignore the uuid
attribute on the specialization itself.

This is required to parse Windows Runtime C++ Template Library headers.

llvm-svn: 213016

10 years agoRevert "Revert "Move clang feature flags settings out of LLVM core and into cfe""
Alp Toker [Mon, 14 Jul 2014 23:30:31 +0000 (23:30 +0000)]
Revert "Revert "Move clang feature flags settings out of LLVM core and into cfe""

It turns out this commit was fine. The problem was in the legacy build system (fixed r213010).

This reverts commit r213005.

llvm-svn: 213015

10 years agoRevert "Revert "Move clang feature flags settings out of LLVM core and into cfe""
Alp Toker [Mon, 14 Jul 2014 23:28:38 +0000 (23:28 +0000)]
Revert "Revert "Move clang feature flags settings out of LLVM core and into cfe""

It turns out this commit was fine. The problem was in the legacy build system (fixed r213010).

This reverts commit r213008.

llvm-svn: 213014

10 years agoRemove dead code.
Richard Smith [Mon, 14 Jul 2014 23:25:30 +0000 (23:25 +0000)]
Remove dead code.

llvm-svn: 213013

10 years ago[RuntimeDyld] Handle endiannes differences between the host and target while
Lang Hames [Mon, 14 Jul 2014 23:19:50 +0000 (23:19 +0000)]
[RuntimeDyld] Handle endiannes differences between the host and target while
reading MachO files magic numbers in RuntimeDyld.

This is required now that we're testing cross-platform JITing (via
RuntimeDyldChecker), and should fix some issues that David Fang has seen on PPC
builds.

llvm-svn: 213012

10 years ago[X86] Specify all TSFlags bit-offsets symbolically
Adam Nemet [Mon, 14 Jul 2014 23:18:39 +0000 (23:18 +0000)]
[X86] Specify all TSFlags bit-offsets symbolically

No functional change.

The offsets for the other bitfields are specified symbolically.  I need to
increase the size for one of the earlier fields which is easier after this
cleanup.

Why these bits are relative to VEXShift is a bit strange but that is for
another cleanup.

I made sure that the values for the enums are unchanged after this change.

llvm-svn: 213011

10 years agoDefine ENABLE_CLANG_ARCMT in the legacy build system too
Alp Toker [Mon, 14 Jul 2014 23:15:48 +0000 (23:15 +0000)]
Define ENABLE_CLANG_ARCMT in the legacy build system too

llvm-svn: 213010

10 years agoAST: Cleanup __uuidof related code
David Majnemer [Mon, 14 Jul 2014 23:12:54 +0000 (23:12 +0000)]
AST: Cleanup __uuidof related code

Switch some things to use range-based for loops.
Change CXXUuidofExpr::GetUuidAttrOfType's return type to be const.
No functionality changed.

llvm-svn: 213009

10 years agoRevert "Move clang feature flags settings out of LLVM core and into cfe"
Alp Toker [Mon, 14 Jul 2014 23:10:07 +0000 (23:10 +0000)]
Revert "Move clang feature flags settings out of LLVM core and into cfe"

Prospectively revert to get one of the many build configurations back working
(presumably the side-by-side+modular CMake config).

This reverts commit r212997.

llvm-svn: 213008

10 years agoIf Process::Finalize() has been called, don't track process state changes.
Greg Clayton [Mon, 14 Jul 2014 23:09:29 +0000 (23:09 +0000)]
If Process::Finalize() has been called, don't track process state changes.

<rdar://problem/17540766>

llvm-svn: 213007

10 years agoCodeGen: Stick constant pool entries in COMDAT sections for WinCOFF
David Majnemer [Mon, 14 Jul 2014 22:57:27 +0000 (22:57 +0000)]
CodeGen: Stick constant pool entries in COMDAT sections for WinCOFF

COFF lacks a feature that other object file formats support: mergeable
sections.

To work around this, MSVC sticks constant pool entries in special COMDAT
sections so that each constant is in it's own section.  This permits
unused constants to be dropped and it also allows duplicate constants in
different translation units to get merged together.

This fixes PR20262.

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

llvm-svn: 213006

10 years agoRevert "Move clang feature flags settings out of LLVM core and into cfe"
Alp Toker [Mon, 14 Jul 2014 22:54:22 +0000 (22:54 +0000)]
Revert "Move clang feature flags settings out of LLVM core and into cfe"

This broke one of the builds, presumably side-by-side modular CMake.
Investigating.

This reverts commit r212998.

llvm-svn: 213005

10 years agolldb.LLDB_ARCH_DEFAULT now works correctly on Macs with haswell enabled kernels.
Greg Clayton [Mon, 14 Jul 2014 22:53:02 +0000 (22:53 +0000)]
lldb.LLDB_ARCH_DEFAULT now works correctly on Macs with haswell enabled kernels.

<rdar://problem/17604133>

llvm-svn: 213004

10 years agoContinue parsing an expression list even after an error is encountered.
Kaelyn Takata [Mon, 14 Jul 2014 22:48:10 +0000 (22:48 +0000)]
Continue parsing an expression list even after an error is encountered.

Otherwise, multiple errors such as having unknown identifiers for two
arguments won't be diagnosed properly (e.g. only the first one would
have a diagnostic message if typo correction fails even though both
would be diagnosed if typo correction suggests a replacement).

llvm-svn: 213003

10 years agoFix a -Wunused-local-typedefs warning
Alp Toker [Mon, 14 Jul 2014 22:46:45 +0000 (22:46 +0000)]
Fix a -Wunused-local-typedefs warning

llvm-svn: 213002

10 years ago[DAGCombiner] Add more rules to combine shuffle vector dag nodes.
Andrea Di Biagio [Mon, 14 Jul 2014 22:46:26 +0000 (22:46 +0000)]
[DAGCombiner] Add more rules to combine shuffle vector dag nodes.

This patch teaches the DAGCombiner how to fold a pair of shuffles
according to rules:
  1.  shuffle(shuffle A, B, M0), B, M1) -> shuffle(A, B, M2)
  2.  shuffle(shuffle A, B, M0), A, M1) -> shuffle(A, B, M3)

The new rules would only trigger if the resulting shuffle has legal type and
legal mask.

Added test 'combine-vec-shuffle-3.ll' to verify that DAGCombiner correctly
folds shuffles on x86 when the resulting mask is legal. Also added some negative
cases to verify that we avoid introducing illegal shuffles.

llvm-svn: 213001

10 years agoLook through addrspacecast in IsConstantOffsetFromGlobal
Matt Arsenault [Mon, 14 Jul 2014 22:39:26 +0000 (22:39 +0000)]
Look through addrspacecast in IsConstantOffsetFromGlobal

llvm-svn: 213000

10 years agoLook through addrspacecast in GetPointerBaseWithConstantOffset
Matt Arsenault [Mon, 14 Jul 2014 22:39:22 +0000 (22:39 +0000)]
Look through addrspacecast in GetPointerBaseWithConstantOffset

llvm-svn: 212999

10 years agoMove clang feature flags settings out of LLVM core and into cfe
Alp Toker [Mon, 14 Jul 2014 22:19:04 +0000 (22:19 +0000)]
Move clang feature flags settings out of LLVM core and into cfe

clang r212997 incorporated these settings into its own build system.  They no
longer need to be set from LLVM.

llvm-svn: 212998

10 years agoMove clang feature flags settings out of LLVM core and into cfe
Alp Toker [Mon, 14 Jul 2014 22:17:26 +0000 (22:17 +0000)]
Move clang feature flags settings out of LLVM core and into cfe

llvm-svn: 212997

10 years agoFix build with various feature flag combinations
Alp Toker [Mon, 14 Jul 2014 22:17:22 +0000 (22:17 +0000)]
Fix build with various feature flag combinations

llvm-svn: 212996

10 years agoFix the !CLANG_ENABLE_ARCMT build
Alp Toker [Mon, 14 Jul 2014 22:17:16 +0000 (22:17 +0000)]
Fix the !CLANG_ENABLE_ARCMT build

llvm-svn: 212995

10 years agoFix build when various clang feature flags are enabled/disabled
Alp Toker [Mon, 14 Jul 2014 22:15:29 +0000 (22:15 +0000)]
Fix build when various clang feature flags are enabled/disabled

llvm-svn: 212994

10 years agoCodeGen: Add a getSectionKind method to MachineConstantPoolEntry
David Majnemer [Mon, 14 Jul 2014 22:06:29 +0000 (22:06 +0000)]
CodeGen: Add a getSectionKind method to MachineConstantPoolEntry

This is just a helper routine, no functionality has changed.

llvm-svn: 212993

10 years agoConvert test to FileCheck
Matt Arsenault [Mon, 14 Jul 2014 21:59:26 +0000 (21:59 +0000)]
Convert test to FileCheck

llvm-svn: 212992

10 years agoADT: Surface LowerCase argument for utohexstr
David Majnemer [Mon, 14 Jul 2014 21:56:54 +0000 (21:56 +0000)]
ADT: Surface LowerCase argument for utohexstr

The underlying function. utohex_buffer, already supports an argument for
deciding if the hex characters should be upper or lower case.  Expose an
identical argument for utohexstr.

llvm-svn: 212991

10 years agoremoved circular definitions in comments
Sanjay Patel [Mon, 14 Jul 2014 21:51:59 +0000 (21:51 +0000)]
removed circular definitions in comments

llvm-svn: 212990

10 years agoTry harder to supress the test from r212975 on Windows
Ben Langmuir [Mon, 14 Jul 2014 21:14:28 +0000 (21:14 +0000)]
Try harder to supress the test from r212975 on Windows

The attempt in r212980 was broken because we might not fail if
LLVM_ON_UNIX is enabled for cross compiling to Windows, and it didn't
consider mingw either.

llvm-svn: 212989

10 years agoDrop separate UIntMaxType and just derive it from IntMaxType.
Joerg Sonnenberger [Mon, 14 Jul 2014 21:00:38 +0000 (21:00 +0000)]
Drop separate UIntMaxType and just derive it from IntMaxType.

llvm-svn: 212987

10 years agoSupport: Fix option handling when using cl::Required with aliasopt
Justin Bogner [Mon, 14 Jul 2014 20:53:57 +0000 (20:53 +0000)]
Support: Fix option handling when using cl::Required with aliasopt

Until now, attempting to create an alias of a required option would
complain if the user supplied the alias, because the required option
didn't have a value. Similarly, if you said the alias was required,
then using the base option would complain that the alias wasn't
supplied. Lastly, if you put required on both, *neither* option would
work.

By changning alias to overload addOccurrence and setting cl::Required
on the original option, we can get this to behave in a more useful
way. I've also added a test and updated a user that was getting this
wrong.

llvm-svn: 212986

10 years agoFix a test broken in r212981
David Majnemer [Mon, 14 Jul 2014 20:46:04 +0000 (20:46 +0000)]
Fix a test broken in r212981

@icmp_sdiv_neg1 should have referred to %a instead of %call, it was
renamed at the last second.

llvm-svn: 212983

10 years agoIntroduce getCorrespondingUnsignedType() in TargetInfo to work like the
Joerg Sonnenberger [Mon, 14 Jul 2014 20:40:56 +0000 (20:40 +0000)]
Introduce getCorrespondingUnsignedType() in TargetInfo to work like the
corresponding AST context function, only restricted to basic integer
types. Use this to ensure getUIntPtrType() gives types consistent with
getIntPtrType(). Fix NVPTX backend to give signed intptr_t.

llvm-svn: 212982

10 years agoInstSimplify: Correct sdiv x / -1
David Majnemer [Mon, 14 Jul 2014 20:38:45 +0000 (20:38 +0000)]
InstSimplify: Correct sdiv x / -1

Determining the bounds of x/ -1 would start off with us dividing it by
INT_MIN.  Suffice to say, this would not work very well.

Instead, handle it upfront by checking for -1 and mapping it to the
range: [INT_MIN + 1, INT_MAX.  This means that the result of our
division can be any value other than INT_MIN.

llvm-svn: 212981

10 years agoXFAIL test that doesn't work on Windows yet
Ben Langmuir [Mon, 14 Jul 2014 20:36:40 +0000 (20:36 +0000)]
XFAIL test that doesn't work on Windows yet

llvm-svn: 212980

10 years agoAdd support for intercepting thunks of the form
Ehsan Akhgari [Mon, 14 Jul 2014 20:28:21 +0000 (20:28 +0000)]
Add support for intercepting thunks of the form

llvm-svn: 212979

10 years agoIn C++98, if an rvalue reference binds to a function lvalue (or an xvalue or an
Richard Smith [Mon, 14 Jul 2014 19:54:05 +0000 (19:54 +0000)]
In C++98, if an rvalue reference binds to a function lvalue (or an xvalue or an
array prvalue), treat that as a direct binding. Only the class prvalue case
needs to be excluded here; the rest are extensions anyway, so we can treat them
as we would in C++11.

llvm-svn: 212978

10 years agofixed link
Sanjay Patel [Mon, 14 Jul 2014 19:52:36 +0000 (19:52 +0000)]
fixed link

llvm-svn: 212977

10 years agoInstSimplify: The upper bound of X / C was missing a rounding step
David Majnemer [Mon, 14 Jul 2014 19:49:57 +0000 (19:49 +0000)]
InstSimplify: The upper bound of X / C was missing a rounding step

Summary:
When calculating the upper bound of X / -8589934592, we would perform
the following calculation: Floor[INT_MAX / 8589934592]

However, flooring the result would make us wrongly come to the
conclusion that 1073741824 was not in the set of possible values.
Instead, use the ceiling of the result.

Reviewers: nicholas

Subscribers: llvm-commits

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

llvm-svn: 212976

10 years agoFix case-sensitivity of inferred framework modules
Ben Langmuir [Mon, 14 Jul 2014 19:45:12 +0000 (19:45 +0000)]
Fix case-sensitivity of inferred framework modules

Just because we can open a directory named "COcoa.framework" doesn't
mean we should provide a "COcoa" module on a case-insensitive filesystem.

llvm-svn: 212975

10 years agoFix typos
Alp Toker [Mon, 14 Jul 2014 19:42:55 +0000 (19:42 +0000)]
Fix typos

Also consolidate 'backward compatibility'

llvm-svn: 212974

10 years agoSupport: Use a range-based for
Justin Bogner [Mon, 14 Jul 2014 19:24:13 +0000 (19:24 +0000)]
Support: Use a range-based for

llvm-svn: 212973

10 years agoAvoid non-attributive uses of 'unsupported' in diagnostics
Alp Toker [Mon, 14 Jul 2014 19:16:22 +0000 (19:16 +0000)]
Avoid non-attributive uses of 'unsupported' in diagnostics

We don't have a style guide for diagnostic messages, but convention strongly
favours the forms:

  'attribute is not supported', 'unsupported attribute'

We generally avoid:

  'attribute is unsupported', 'non-supported attribute'

llvm-svn: 212972

10 years agoLook through addrspacecast when checking isDereferenceablePointer
Matt Arsenault [Mon, 14 Jul 2014 18:54:12 +0000 (18:54 +0000)]
Look through addrspacecast when checking isDereferenceablePointer

llvm-svn: 212971

10 years agoDon't eliminate memcpy's when the address of the pointer may itself be relevant....
Nick Lewycky [Mon, 14 Jul 2014 18:52:02 +0000 (18:52 +0000)]
Don't eliminate memcpy's when the address of the pointer may itself be relevant. Fixes PR18304. Patch by David Wiberg!

llvm-svn: 212970

10 years agoDocument the forward of the -u option (r211756)
Sylvestre Ledru [Mon, 14 Jul 2014 18:34:37 +0000 (18:34 +0000)]
Document the forward of the -u option (r211756)

llvm-svn: 212969

10 years agoDocument the warning triggered by the unsupported gcc optimization flags (r212805)
Sylvestre Ledru [Mon, 14 Jul 2014 18:30:23 +0000 (18:30 +0000)]
Document the warning triggered by the unsupported gcc optimization flags (r212805)

llvm-svn: 212968

10 years agoUnify the lowering of arguments during SjLj prepare.
Bill Wendling [Mon, 14 Jul 2014 18:21:11 +0000 (18:21 +0000)]
Unify the lowering of arguments during SjLj prepare.

The 'select true, %arg, undef' instruction can be used for both aggregate and
non-aggregate arguments.

llvm-svn: 212967

10 years agofixed typo
Sanjay Patel [Mon, 14 Jul 2014 18:21:07 +0000 (18:21 +0000)]
fixed typo

llvm-svn: 212966

10 years agoRevert "Improve error recovery around colon."
Reid Kleckner [Mon, 14 Jul 2014 18:19:58 +0000 (18:19 +0000)]
Revert "Improve error recovery around colon."

This reverts commit r212957.  It broke the self-host on code like this
from LLVM's option library:
  for (auto Arg: filtered(Id0, Id1, Id2))

llvm-svn: 212965

10 years agoChange the diagnostic group for unsupported gcc optimizations added r212805
Alp Toker [Mon, 14 Jul 2014 18:11:38 +0000 (18:11 +0000)]
Change the diagnostic group for unsupported gcc optimizations added r212805

Use -Winvalid-command-line-argument here to align with existing gcc opt
diagnostics. Meanwhile -Wunused-command-line-argument is for flags that we
support but were, say, fed into the wrong invocation.

Also tweak wording to make sense with -Werror.

llvm-svn: 212964

10 years agoUse pointer type cast helpers.
Matt Arsenault [Mon, 14 Jul 2014 17:24:38 +0000 (17:24 +0000)]
Use pointer type cast helpers.

llvm-svn: 212963

10 years agoAdd CreatePointerBitCastOrAddrSpaceCast to IRBuilder and co.
Matt Arsenault [Mon, 14 Jul 2014 17:24:35 +0000 (17:24 +0000)]
Add CreatePointerBitCastOrAddrSpaceCast to IRBuilder and co.

llvm-svn: 212962

10 years agoUpdate comments to include addrspacecast
Matt Arsenault [Mon, 14 Jul 2014 17:24:31 +0000 (17:24 +0000)]
Update comments to include addrspacecast

llvm-svn: 212961

10 years agoRemove GCC 3.3 workaround
Matt Arsenault [Mon, 14 Jul 2014 17:11:20 +0000 (17:11 +0000)]
Remove GCC 3.3 workaround

llvm-svn: 212960

10 years ago[ASan/Win] Add a test for the case when dll_thunk is linked twice to the same DLL
Timur Iskhodzhanov [Mon, 14 Jul 2014 17:04:03 +0000 (17:04 +0000)]
[ASan/Win] Add a test for the case when dll_thunk is linked twice to the same DLL

This is a test case for r212815.

llvm-svn: 212959

10 years agoFix for libc++abi when using -Wl,--as-needed.
Dan Albert [Mon, 14 Jul 2014 17:00:29 +0000 (17:00 +0000)]
Fix for libc++abi when using -Wl,--as-needed.

The cmake files for libc++abi and the unwinder weren't linking against
libpthread or an unwind library. If the tests were linked with
-Wl,--as-needed, these libraries wouldn't be linked, causing them to
fail.

Patch contributed by İsmail Dönmez.

llvm-svn: 212958

10 years agoImprove error recovery around colon.
Serge Pavlov [Mon, 14 Jul 2014 16:42:20 +0000 (16:42 +0000)]
Improve error recovery around colon.

Recognize additional cases, when '::' is mistyped as ':'.
This is a fix to RP18587 - colons have too much protection in member-declarations.

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

llvm-svn: 212957

10 years agoX86: correct 64-bit atomics on 32-bit
Saleem Abdulrasool [Mon, 14 Jul 2014 16:28:13 +0000 (16:28 +0000)]
X86: correct 64-bit atomics on 32-bit

We would emit a libcall for a 64-bit atomic on x86 after SVN r212119.  This was
due to the misuse of hasCmpxchg16 to indicate if cmpxchg8b was supported on a
32-bit target.  They were added at different times and would result in the
border condition being mishandled.

This fixes the border case to emit the cmpxchg8b instruction for 64-bit atomic
operations on x86 at the cost of restoring a long-standing bug in the codegen.
We emit a cmpxchg8b on all x86 targets even where the CPU does not support this
instruction (pre-Pentium CPUs).  Although this bug should be fixed, this was
present prior to SVN r212119 and this change, so this is not really introducing
a regression.

llvm-svn: 212956

10 years agoCodeGen: add missing include
Saleem Abdulrasool [Mon, 14 Jul 2014 16:28:09 +0000 (16:28 +0000)]
CodeGen: add missing include

Found during windows unwinding work.  This header is indirectly included through
a chain leading through Support/Win64EH.h.  Explicitly include the header.  NFC.

llvm-svn: 212955

10 years agoCodeGen: Let arrays be inputs to inline asm
David Majnemer [Mon, 14 Jul 2014 16:27:53 +0000 (16:27 +0000)]
CodeGen: Let arrays be inputs to inline asm

An array showing up in an inline assembly input is accepted in ICC and
GCC 4.8

This fixes PR20201.

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

llvm-svn: 212954

10 years agollvm-objdump: Handle BSS sections larger than the object file
David Majnemer [Mon, 14 Jul 2014 16:20:14 +0000 (16:20 +0000)]
llvm-objdump: Handle BSS sections larger than the object file

The size of the uninitialized sections, like BSS, can exceed the size of
the object file.

Do not attempt to grab the contents of such sections.

llvm-svn: 212953

10 years ago[tsan] honour XFAIL in tsan/test_output.sh
Kostya Serebryany [Mon, 14 Jul 2014 16:03:13 +0000 (16:03 +0000)]
[tsan] honour XFAIL in tsan/test_output.sh

llvm-svn: 212952

10 years ago[tsan] add a printf to a test
Kostya Serebryany [Mon, 14 Jul 2014 15:52:33 +0000 (15:52 +0000)]
[tsan] add a printf to a test

llvm-svn: 212951

10 years agoARM: Add NOP intrinsic mapping in arm_acle.h
Yi Kong [Mon, 14 Jul 2014 15:32:29 +0000 (15:32 +0000)]
ARM: Add NOP intrinsic mapping in arm_acle.h

llvm-svn: 212950

10 years ago[Mips] Fix test case expectations due the latest changes in the LLVM.
Simon Atanasyan [Mon, 14 Jul 2014 15:31:47 +0000 (15:31 +0000)]
[Mips] Fix test case expectations due the latest changes in the LLVM.

llvm-svn: 212949

10 years agoX86: remove temporary atomicrmw used during lowering.
Tim Northover [Mon, 14 Jul 2014 15:31:13 +0000 (15:31 +0000)]
X86: remove temporary atomicrmw used during lowering.

We construct a temporary "atomicrmw xchg" instruction when lowering atomic
stores for widths that aren't supported natively. This isn't on the top-level
worklist though, so it won't be removed automatically and we have to do it
ourselves once that itself has been lowered.

Thanks Saleem for pointing this out!

llvm-svn: 212948

10 years agoARM: Implement __builtin_arm_nop intrinsic
Yi Kong [Mon, 14 Jul 2014 15:20:09 +0000 (15:20 +0000)]
ARM: Implement __builtin_arm_nop intrinsic

This patch implements __builtin_arm_nop intrinsic for AArch32 and AArch64,
which generates hint 0x0, the alias of NOP instruction.

This intrinsic is necessary to implement ACLE __nop intrinsic.

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

llvm-svn: 212947

10 years agoRe-commit: [mips] Correct section alignments and EntrySizes for .bss, .text, .data...
Daniel Sanders [Mon, 14 Jul 2014 15:05:51 +0000 (15:05 +0000)]
Re-commit: [mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo, .MIPS.options, and .MIPS.abiflags

The lld tests will temporarily fail again but Simon Atanasyan will commit a fix for those shortly.

llvm-svn: 212946

10 years agoRevert: [mips] Correct section alignments and EntrySizes for .bss, .text, .data,...
Daniel Sanders [Mon, 14 Jul 2014 14:43:45 +0000 (14:43 +0000)]
Revert: [mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo, .MIPS.options, and .MIPS.abiflags

This commit causes multiple lld tests to fail. Reverting while I investigate the issue.

llvm-svn: 212945

10 years ago[tsan] add a currently-failing test with a must-deadlock
Kostya Serebryany [Mon, 14 Jul 2014 14:27:21 +0000 (14:27 +0000)]
[tsan] add a currently-failing test with a must-deadlock

llvm-svn: 212944

10 years ago[ASan] Fix a couple of nits in NULL deref tests
Timur Iskhodzhanov [Mon, 14 Jul 2014 14:26:35 +0000 (14:26 +0000)]
[ASan] Fix a couple of nits in NULL deref tests

This is a follow-up to r212807

llvm-svn: 212943

10 years ago[clang-tidy] Add a checker for swapped arguments.
Benjamin Kramer [Mon, 14 Jul 2014 14:24:30 +0000 (14:24 +0000)]
[clang-tidy] Add a checker for swapped arguments.

This looks for swapped arguments by looking at implicit conversions of arguments

void Foo(int, double);
Foo(1.0, 3); // Most likely a bug

llvm-svn: 212942

10 years agoSet up clang-tidy diagnostic consumer to print types etc.
Alexander Kornienko [Mon, 14 Jul 2014 14:10:03 +0000 (14:10 +0000)]
Set up clang-tidy diagnostic consumer to print types etc.

Reviewers: bkramer

Reviewed By: bkramer

Subscribers: cfe-commits

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

llvm-svn: 212941

10 years ago[ASTMatchers] Make hasOverloadedOperatorName also match freestanding overloads.
Benjamin Kramer [Mon, 14 Jul 2014 14:05:02 +0000 (14:05 +0000)]
[ASTMatchers] Make hasOverloadedOperatorName also match freestanding overloads.

Freestanding overloads are represented as FunctionDecls in the AST, make
the matcher also match them.

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

llvm-svn: 212940

10 years ago[mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo...
Daniel Sanders [Mon, 14 Jul 2014 14:02:14 +0000 (14:02 +0000)]
[mips] Correct section alignments and EntrySizes for .bss, .text, .data, .reginfo, .MIPS.options, and .MIPS.abiflags

Summary:
.bss, .text, and .data are at least 16-byte aligned.
.reginfo is 4-byte aligned and has a 24-byte EntrySize.
.MIPS.abiflags has an 24-byte EntrySize.
.MIPS.options is 8-byte aligned and has 1-byte EntrySize.

Using a 1-byte EntrySize for .MIPS.options seems strange because the
records are neither 1-byte long nor fixed-length but this matches the value
that GAS emits.

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

llvm-svn: 212939

10 years ago[mips] For the FP64A ABI, odd-numbered double-precision moves must not use mtc1/mfc1.
Daniel Sanders [Mon, 14 Jul 2014 13:08:14 +0000 (13:08 +0000)]
[mips] For the FP64A ABI, odd-numbered double-precision moves must not use mtc1/mfc1.

Summary:
This is because the FP64A the hardware will redirect 32-bit reads/writes
from/to odd-numbered registers to the upper 32-bits of the corresponding
even register. In effect, simulating FR=0 mode when FR=0 mode is not
available.

Unfortunately, we have to make the decision to avoid mfc1/mtc1 before
register allocation so we currently do this for even registers too.

FPXX has a similar requirement on 32-bit architectures that lack
mfhc1/mthc1 so this patch also handles the affected moves from the FPU for
FPXX too. Moves to the FPU were supported by an earlier commit.

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

llvm-svn: 212938