oota-llvm.git
9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212993 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212992 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212991 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212990 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212986 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212983 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212981 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212977 91177308-0d34-0410-b5e6-96231b3b80d8

9 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212976 91177308-0d34-0410-b5e6-96231b3b80d8

9 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212973 91177308-0d34-0410-b5e6-96231b3b80d8

9 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212971 91177308-0d34-0410-b5e6-96231b3b80d8

9 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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212970 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212967 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212966 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212963 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212962 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212961 91177308-0d34-0410-b5e6-96231b3b80d8

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212960 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212956 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212955 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212953 91177308-0d34-0410-b5e6-96231b3b80d8

9 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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212948 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212946 91177308-0d34-0410-b5e6-96231b3b80d8

9 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212945 91177308-0d34-0410-b5e6-96231b3b80d8

9 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212939 91177308-0d34-0410-b5e6-96231b3b80d8

9 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212938 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Use MFHC1 when it is available (MIPS32r2 and later) for both FP32 and FP64...
Daniel Sanders [Mon, 14 Jul 2014 12:41:31 +0000 (12:41 +0000)]
[mips] Use MFHC1 when it is available (MIPS32r2 and later) for both FP32 and FP64 moves

Summary:
This is similar to r210771 which did the same thing for MTHC1.

Also corrected MTHC1_D32 and MTHC1_D64 which used AFGR64 and FGR64 on the
wrong definitions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212936 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake][Win32.DLL] Let llvm_add_library(SHARED) link dependent libraries as PRIVATE.
NAKAMURA Takumi [Mon, 14 Jul 2014 12:26:15 +0000 (12:26 +0000)]
[CMake][Win32.DLL] Let llvm_add_library(SHARED) link dependent libraries as PRIVATE.

For example, c-index-test.exe requires just libclang.dll (its import library).
When libraries in libclang were not PRIVATE but PUBLIC, c-index-test required libraries transitive by libclang.

Note, on mingw with BUILD_SHARED_LIBS, library dependencies would become more strict.
In principle, required libraries should be "required in its source file".

This will help to detect missing dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212934 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAArch64: remove unnecessary pseudo-instruction.
Tim Northover [Mon, 14 Jul 2014 11:16:02 +0000 (11:16 +0000)]
AArch64: remove unnecessary pseudo-instruction.

Sufficiently twisted use of TableGen lets us write patterns directly for f16
(as an i16 promoted to i32) -> f32 conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212933 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Correct the AFL_FLAGS1_ODDSPREG flag in .MIPS.abiflags when no '.module oddspr...
Daniel Sanders [Mon, 14 Jul 2014 10:26:15 +0000 (10:26 +0000)]
[mips] Correct the AFL_FLAGS1_ODDSPREG flag in .MIPS.abiflags when no '.module oddspreg' is used

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212932 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[mips] Expand BuildPairF64 to a spill and reload when the O32 FPXX ABI is
Sasa Stankovic [Mon, 14 Jul 2014 09:40:29 +0000 (09:40 +0000)]
[mips] Expand BuildPairF64 to a spill and reload when the O32 FPXX ABI is
enabled and mthc1 and dmtc1 are not available (e.g. on MIPS32r1)

This prevents the upper 32-bits of a double precision value from being moved to
the FPU with mtc1 to an odd-numbered FPU register. This is necessary to ensure
that the code generated executes correctly regardless of the current FPU mode.

MIPS32r2 and above continues to use mtc1/mthc1, while MIPS-IV and above continue
to use dmtc1.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212930 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSupport lowering of empty aggregates.
Bill Wendling [Mon, 14 Jul 2014 06:22:36 +0000 (06:22 +0000)]
Support lowering of empty aggregates.

This crash was pretty common while compiling Rust for iOS (armv7). Reason -
SjLj preparation step was lowering aggregate arguments as ExtractValue +
InsertValue. ExtractValue has assertion which checks that there is some data in
value, which is not true in case of empty (no fields) structures. Rust uses
them quite extensively so this patch uses a 'select true, %val, undef'
instruction to lower the argument.

Patch by Valerii Hiora.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212922 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] LINK_COMPONENTS: Add also corresponding MCTargetDesc and TargetInfo as well...
NAKAMURA Takumi [Mon, 14 Jul 2014 05:07:07 +0000 (05:07 +0000)]
[CMake] LINK_COMPONENTS: Add also corresponding MCTargetDesc and TargetInfo as well, when target names or "nativecodegen" are specified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212921 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Update libdeps.
NAKAMURA Takumi [Mon, 14 Jul 2014 05:01:53 +0000 (05:01 +0000)]
[CMake] Update libdeps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212920 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoNVPTX/LLVMBuild.txt: Add "Scalar" to required_libraries. It is really referenced.
NAKAMURA Takumi [Mon, 14 Jul 2014 02:52:19 +0000 (02:52 +0000)]
NVPTX/LLVMBuild.txt: Add "Scalar" to required_libraries. It is really referenced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212918 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoObject/LLVMBuild.txt: Sort required_libraries by alphabetical order.
NAKAMURA Takumi [Mon, 14 Jul 2014 02:52:08 +0000 (02:52 +0000)]
Object/LLVMBuild.txt: Sort required_libraries by alphabetical order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212917 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[DAGCombiner] Fix a crash caused by a missing check for legal type when trying to...
Andrea Di Biagio [Sun, 13 Jul 2014 21:02:14 +0000 (21:02 +0000)]
[DAGCombiner] Fix a crash caused by a missing check for legal type when trying to fold shuffles.

Verify that DAGCombiner does not crash when trying to fold a pair of shuffles
according to rule (added at r212539):
  (shuffle (shuffle A, Undef, M0), Undef, M1) -> (shuffle A, Undef, M2)

The DAGCombiner avoids folding shuffles if the resulting shuffle dag node
is not legal for the target. That means, the resulting shuffle must have
legal type and legal mask.

Before, the DAGCombiner only called method
'TargetLowering::isShuffleMaskLegal' to check if it was "safe" to fold according
to the above-mentioned rule. However, this caused a crash in the x86 backend
since method 'isShuffleMaskLegal' always expects to be called on a
legal vector type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212915 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMC: make MCWin64EHInstruction a POD-like struct
Saleem Abdulrasool [Sun, 13 Jul 2014 19:03:45 +0000 (19:03 +0000)]
MC: make MCWin64EHInstruction a POD-like struct

This is the first of a number of changes designed to generalise
MCWin64EHInstruction to support different target architectures.  An ordered set
(vector) of these instructions is saved per frame to permit the emission of
information for Windows NT style unwinding.  The only bit of information which
is actually target specific here is the Opcode for the unwinding bytecode.  The
remainder of the information is simply generic information that is relevant to
the Windows NT unwinding model.

Remove the accessors for the fields, making them const and public instead.  Sink
the knowledge of the alias'ed name into the single source and sink a single-use
check method into the use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212914 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMC: make helper function be more const-correct
Saleem Abdulrasool [Sun, 13 Jul 2014 19:03:40 +0000 (19:03 +0000)]
MC: make helper function be more const-correct

Introduce const-ness on parameters, they are used as read-only and should not be
modified.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212913 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMC: make DWARF and Windows unwinding handling more similar
Saleem Abdulrasool [Sun, 13 Jul 2014 19:03:36 +0000 (19:03 +0000)]
MC: make DWARF and Windows unwinding handling more similar

Rename member variables and functions for the MCStreamer for DWARF-like
unwinding management.  Rename the Windows ones as well and make the naming and
handling similar across the two.  No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212912 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd forgotten `break` statement.
Simon Atanasyan [Sun, 13 Jul 2014 16:18:56 +0000 (16:18 +0000)]
Add forgotten `break` statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212910 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[Mips] Support SHT_MIPS_ABIFLAGS section type flag in the llvm-readobj,
Simon Atanasyan [Sun, 13 Jul 2014 15:28:54 +0000 (15:28 +0000)]
[Mips] Support SHT_MIPS_ABIFLAGS section type flag in the llvm-readobj,
obj2yaml and yaml2obj tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212908 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Enable loadable modules, aka plugins, with BUILD_SHARED_LIBS on cygming.
NAKAMURA Takumi [Sun, 13 Jul 2014 13:47:37 +0000 (13:47 +0000)]
[CMake] Enable loadable modules, aka plugins, with BUILD_SHARED_LIBS on cygming.

Loadable modules could be enabled without BUILD_SHARED_LIBS with tweaks in future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212907 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Add LLVM_LINK_COMPONENTS to loadable modules, LLVMHello and BugpointPasses...
NAKAMURA Takumi [Sun, 13 Jul 2014 13:36:48 +0000 (13:36 +0000)]
[CMake] Add LLVM_LINK_COMPONENTS to loadable modules, LLVMHello and BugpointPasses, on Win32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212904 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] Introduce moddir for MODULE -- corresponding to LIBRARY_OUTPUT_DIRECTORY.
NAKAMURA Takumi [Sun, 13 Jul 2014 13:33:26 +0000 (13:33 +0000)]
[CMake] Introduce moddir for MODULE -- corresponding to LIBRARY_OUTPUT_DIRECTORY.

On Win32.DLL, it points not lib but bin.

LIBRARY_OUTPUT_DIRECTORY affects add_library(MODULE), especially Win32.DLL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212903 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agobugpoint/ToolRunner.cpp: ProcessFailure(): Close ErrorFD immediately, or it couldn...
NAKAMURA Takumi [Sun, 13 Jul 2014 13:28:18 +0000 (13:28 +0000)]
bugpoint/ToolRunner.cpp: ProcessFailure(): Close ErrorFD immediately, or it couldn't be reopened on Win32.

FIXME: We may have an option in openFileForWrite(), not to use ResultFD but to close it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212902 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIR: Allow comdats to be applied to globals with internal linkage
David Majnemer [Sun, 13 Jul 2014 04:56:11 +0000 (04:56 +0000)]
IR: Allow comdats to be applied to globals with internal linkage

Our verifier check for checking if a global has local linkage was too
strict.  Forbid private linkage but permit local linkage.

Object file formats permit this and forbidding it prevents elimination
of unused, internal, vftables under the MSVC ABI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212900 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMC: Let non-temporary COFF aliases be in symtab
David Majnemer [Sun, 13 Jul 2014 04:31:19 +0000 (04:31 +0000)]
MC: Let non-temporary COFF aliases be in symtab

MC was aping a binutils bug where aliases would default their linkage to
private instead of internal.

I've sent a patch to the binutils maintainers and they've recently
applied it to the GNU assembler sources.

This fixes PR20152.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212899 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove unused include
Matt Arsenault [Sun, 13 Jul 2014 03:08:59 +0000 (03:08 +0000)]
Remove unused include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212898 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Use range for and fix missing consts.
Matt Arsenault [Sun, 13 Jul 2014 03:06:43 +0000 (03:06 +0000)]
R600: Use range for and fix missing consts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212897 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Make ShaderType private
Matt Arsenault [Sun, 13 Jul 2014 03:06:39 +0000 (03:06 +0000)]
R600: Make ShaderType private

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212896 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Run more tests with promote alloca disabled.
Matt Arsenault [Sun, 13 Jul 2014 02:46:17 +0000 (02:46 +0000)]
R600: Run more tests with promote alloca disabled.

Re-run tests changed in r211110 to test both paths.
Also fix broken check line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212895 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Run private-memory test with and without alloca promote
Matt Arsenault [Sun, 13 Jul 2014 02:18:06 +0000 (02:18 +0000)]
R600: Run private-memory test with and without alloca promote

The unpromoted path still needs to be tested since we can't
always promote to using LDS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212894 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Add option to disable promote alloca
Matt Arsenault [Sun, 13 Jul 2014 02:08:26 +0000 (02:08 +0000)]
R600: Add option to disable promote alloca

This can make writing some tests harder, so add a flag
to disable it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212893 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTry to fix MSVC warning.
Matt Arsenault [Sat, 12 Jul 2014 23:16:26 +0000 (23:16 +0000)]
Try to fix MSVC warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212889 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTry to fix MSVC build
Matt Arsenault [Sat, 12 Jul 2014 23:09:02 +0000 (23:09 +0000)]
Try to fix MSVC build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212888 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTry to fix MSVC build
Matt Arsenault [Sat, 12 Jul 2014 22:19:49 +0000 (22:19 +0000)]
Try to fix MSVC build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212886 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTemplatify DominanceFrontier.
Matt Arsenault [Sat, 12 Jul 2014 21:59:52 +0000 (21:59 +0000)]
Templatify DominanceFrontier.

Theoretically this should now work for MachineBasicBlocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212885 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAArch64: add support for llvm.aarch64.hint intrinsic
Saleem Abdulrasool [Sat, 12 Jul 2014 21:20:49 +0000 (21:20 +0000)]
AArch64: add support for llvm.aarch64.hint intrinsic

This adds a llvm.aarch64.hint intrinsic to mirror the llvm.arm.hint in order to
support the various hint intrinsic functions in the ACLE.

Add an optional pattern field that permits the subclass to specify the pattern
that matches the selection.  The intrinsic pattern is set as mayLoad, mayStore,
so overload the value for the definition of the hint instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212883 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMC: remove use of unnecessary variable
Saleem Abdulrasool [Sat, 12 Jul 2014 20:49:13 +0000 (20:49 +0000)]
MC: remove use of unnecessary variable

Due to the fact that the windows unwinding has the concept of chained frames, we
maintain a current frame info pointer that is adjusted on any push and pop of a
unwinding context.  This just removes an unnecessary variable that was used to
mirror the DWARF unwinding code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212882 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMC: rename MCW64UnwindInfo to MCWinFrameInfo
Saleem Abdulrasool [Sat, 12 Jul 2014 20:49:09 +0000 (20:49 +0000)]
MC: rename MCW64UnwindInfo to MCWinFrameInfo

This structure contains information related to the call frame used to generate
unwinding information.  Rename this to reflect the future use to represent the
shared state between various architectures for WinCFI information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212881 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ELFYAML] Group ELF section type flags to target specific blocks.
Simon Atanasyan [Sat, 12 Jul 2014 18:25:08 +0000 (18:25 +0000)]
[ELFYAML] Group ELF section type flags to target specific blocks.
Recognize only flags which correspond to the current target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212880 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix an issue with the MergeBasicBlockIntoOnlyPred() helper function where it did
Owen Anderson [Sat, 12 Jul 2014 07:12:47 +0000 (07:12 +0000)]
Fix an issue with the MergeBasicBlockIntoOnlyPred() helper function where it did
not properly handle the case where the predecessor block was the entry block to
the function.  The only in-tree client of this is JumpThreading, which worked
around the issue in its own code.  This patch moves the solution into the helper
so that JumpThreading (and other clients) do not have to replicate the same fix
everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212875 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ASan] Collect unmangled names of global variables in Clang to print them in error...
Alexey Samsonov [Sat, 12 Jul 2014 00:42:52 +0000 (00:42 +0000)]
[ASan] Collect unmangled names of global variables in Clang to print them in error reports.

Currently ASan instrumentation pass creates a string with global name
for each instrumented global (to include global names in the error report). Global
name is already mangled at this point, and we may not be able to demangle it
at runtime (e.g. there is no __cxa_demangle on Android).

Instead, create a string with fully qualified global name in Clang, and pass it
to ASan instrumentation pass in llvm.asan.globals metadata. If there is no metadata
for some global, ASan will use the original algorithm.

This fixes https://code.google.com/p/address-sanitizer/issues/detail?id=264.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212872 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Add missing tests for some intrinsics
Matt Arsenault [Sat, 12 Jul 2014 00:36:19 +0000 (00:36 +0000)]
R600: Add missing tests for some intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212870 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBFI: Add constructor for Weight
Duncan P. N. Exon Smith [Sat, 12 Jul 2014 00:26:00 +0000 (00:26 +0000)]
BFI: Add constructor for Weight

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212868 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBFI: Clean up BlockMass
Duncan P. N. Exon Smith [Sat, 12 Jul 2014 00:21:30 +0000 (00:21 +0000)]
BFI: Clean up BlockMass

Implementation is small now -- the interesting logic was moved to
`BranchProbability` a while ago.  Move it into `bfi_detail` and get rid
of the related TODOs.

I was originally planning to define it within `BlockFrequencyInfoImpl`
(or `BFIIBase`), but it seems cleaner in a namespace.  Besides,
`isPodLike` needs to be specialized before `BlockMass` can be used in
some of the other data structures, and there isn't a clear way to do
that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212866 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoOption: Propagate flags from groups to options in each group
Reid Kleckner [Sat, 12 Jul 2014 00:18:58 +0000 (00:18 +0000)]
Option: Propagate flags from groups to options in each group

This should make it easy to set a flag for a whole group of clang driver
options.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212865 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[RuntimeDyld] Fix stub size and offset for AArch64 in RuntimeDyldMachO.h.
Lang Hames [Sat, 12 Jul 2014 00:16:47 +0000 (00:16 +0000)]
[RuntimeDyld] Fix stub size and offset for AArch64 in RuntimeDyldMachO.h.

<rdar://problem/17648000>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212864 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAvoid a warning from MSVC on "*/" in this code by inserting a space
Reid Kleckner [Sat, 12 Jul 2014 00:06:46 +0000 (00:06 +0000)]
Avoid a warning from MSVC on "*/" in this code by inserting a space

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212862 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoBFI: Mark the end of namespaces
Duncan P. N. Exon Smith [Fri, 11 Jul 2014 23:56:50 +0000 (23:56 +0000)]
BFI: Mark the end of namespaces

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212861 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[RuntimeDyld] Add GOT support for AArch64 to RuntimeDyldMachO.
Lang Hames [Fri, 11 Jul 2014 23:52:07 +0000 (23:52 +0000)]
[RuntimeDyld] Add GOT support for AArch64 to RuntimeDyldMachO.

Test cases to follow once RuntimeDyldChecker supports introspection of stubs.

Fixes <rdar://problem/17648000>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212859 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[FastISel][X86] Implement the FastLowerIntrinsicCall hook."
Juergen Ributzka [Fri, 11 Jul 2014 23:10:08 +0000 (23:10 +0000)]
Revert "[FastISel][X86] Implement the FastLowerIntrinsicCall hook."

This reverts commit r212851, because it broke the memset lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212855 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[FastISel][X86] Implement the FastLowerIntrinsicCall hook.
Juergen Ributzka [Fri, 11 Jul 2014 22:37:43 +0000 (22:37 +0000)]
[FastISel][X86] Implement the FastLowerIntrinsicCall hook.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212851 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ASan] Introduce a struct representing the layout of metadata entry in llvm.asan...
Alexey Samsonov [Fri, 11 Jul 2014 22:36:02 +0000 (22:36 +0000)]
[ASan] Introduce a struct representing the layout of metadata entry in llvm.asan.globals.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212850 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[FastISel] Add target-independent patchpoint intrinsic support. WIP.
Juergen Ributzka [Fri, 11 Jul 2014 22:19:02 +0000 (22:19 +0000)]
[FastISel] Add target-independent patchpoint intrinsic support. WIP.

This implements the target-independent lowering for the patchpoint
intrinsic. Targets have to implement the FastLowerCall
hook to support this intrinsic.

Related to <rdar://problem/17427052>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212849 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[FastISel] Add basic infrastructure to support a target-independent call lowering...
Juergen Ributzka [Fri, 11 Jul 2014 22:01:42 +0000 (22:01 +0000)]
[FastISel] Add basic infrastructure to support a target-independent call lowering hook in FastISel. WIP

The infrastructure mimics the call lowering we have already in place for
SelectionDAG, but with limitations. For example structure return demotion and
non-simple types are not supported (yet).

Currently every backend has its own implementation and duplicated code for call
lowering. There is also no specified interface that could be called from
target-independent code. The target-hook is opt-in and doesn't affect current
implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212848 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWhen we sink an instruction, this can open up opportunity for the operands to be...
Aditya Nandakumar [Fri, 11 Jul 2014 21:49:39 +0000 (21:49 +0000)]
When we sink an instruction, this can open up opportunity for the operands to be sunk - add them to the worklist

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212847 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMove the API and implementation of clang::driver::getARMCPUForMArch() to llvm::Triple...
Argyrios Kyrtzidis [Fri, 11 Jul 2014 21:44:54 +0000 (21:44 +0000)]
Move the API and implementation of clang::driver::getARMCPUForMArch() to llvm::Triple::getARMCPUForArch().

Suggested by Eric Christopher.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212846 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[FastISel] Make isInTailCallPosition independent of SelectionDAG.
Juergen Ributzka [Fri, 11 Jul 2014 20:50:47 +0000 (20:50 +0000)]
[FastISel] Make isInTailCallPosition independent of SelectionDAG.

Break out the arguemnts required from SelectionDAG, so that this function can
also be used by FastISel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212844 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[FastISel] Breakout intrinsic lowering into a separate function and add a target...
Juergen Ributzka [Fri, 11 Jul 2014 20:42:12 +0000 (20:42 +0000)]
[FastISel] Breakout intrinsic lowering into a separate function and add a target-hook.

Create a separate helper function for target-independent intrinsic lowering. Also
add an target-hook that allows to directly call into a target-sepcific intrinsic
lowering method. Currently the implementation is opt-in and doesn't affect
existing target implementations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212843 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd the "-s" flag to llvm-nm for Mach-O files that prints symbols only in
Kevin Enderby [Fri, 11 Jul 2014 20:30:00 +0000 (20:30 +0000)]
Add the "-s" flag to llvm-nm for Mach-O files that prints symbols only in
the specified section.  This is same functionality as darwin’s nm(1) "-s" flag.

There is one FIXME in the code and I’m all ears to anyone that can help me
with that.  This option takes exactly two strings and should be allowed
anywhere on the command line.  Such that "llvm-nm -s __TEXT __text foo.o"
would work. But that does not as the CommandLine Library does not have a
way to make this work as far as I can tell.  For now the "-s __TEXT __text"
has to be last on the command line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212842 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSimplify the raw_svector_ostream tweak from r212816
Alp Toker [Fri, 11 Jul 2014 18:23:08 +0000 (18:23 +0000)]
Simplify the raw_svector_ostream tweak from r212816

The memcpy() and overlap helps didn't help much with timings, so clean up the change.

The difference at this point is that we now leave growth of the storage buffer
up to SmallVector's implementation:

 -   OS.reserve(OS.capacity() * 2);
 +   OS.reserve(OS.size() + 64);

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212837 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[MC] Constify MCELF::GetVisibility and MCELF::getOther
Ulrich Weigand [Fri, 11 Jul 2014 17:34:44 +0000 (17:34 +0000)]
[MC] Constify MCELF::GetVisibility and MCELF::getOther

These two routines didn't take a "const MCSymbolData &SD"
like the other MCELF::Get routines for some reason ...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212834 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PowerPC] Fix invalid displacement created by LocalStackAlloc
Ulrich Weigand [Fri, 11 Jul 2014 17:19:31 +0000 (17:19 +0000)]
[PowerPC] Fix invalid displacement created by LocalStackAlloc

This commit fixes a bug in PPCRegisterInfo::isFrameOffsetLegal that
could result in the LocalStackAlloc pass creating an MI instruction
out-of-range displacement:
        %vreg17<def> = LD 33184, %vreg31; mem:LD8[%g](align=32)
        %G8RC:%vreg17 G8RC_and_G8RC_NOX0:%vreg31
(In final assembler output the top bits are stripped off, resulting
in a negative offset loading from below the stack pointer.)

Common code expects the isFrameOffsetLegal routine to verify whether
adding a given offset to the offset already present in the instruction
results in a valid displacement.  However, on PowerPC the routine
did not take the already present instruction offset into account.

This commit fixes isFrameOffsetLegal to add the instruction offset,
and updates a local caller (needsFrameBaseReg) to no longer add the
instruction offset itself before calling isFrameOffsetLegal.

Reviewed by Hal Finkel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212832 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: Use i32 vectors for resources and samplers
Marek Olsak [Fri, 11 Jul 2014 17:11:52 +0000 (17:11 +0000)]
R600/SI: Use i32 vectors for resources and samplers

This affects new intrinsics only.

What surprises me is that v32i8 still works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212831 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: add sample and image intrinsics exposing all instruction fields
Marek Olsak [Fri, 11 Jul 2014 17:11:46 +0000 (17:11 +0000)]
R600/SI: add sample and image intrinsics exposing all instruction fields

We need the intrinsics with offsets, so why not just add them all.
The R128 parameter will also be useful for reducing SGPR usage.
GL_ARB_image_load_store also adds some image GLSL modifiers like "coherent",
so Mesa will probably translate those to slc, glc, etc.

When LLVM 3.5 is released, I'll switch Mesa to these new intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212830 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600/SI: fix shadow mapping for 1D and 2D array textures
Marek Olsak [Fri, 11 Jul 2014 17:11:39 +0000 (17:11 +0000)]
R600/SI: fix shadow mapping for 1D and 2D array textures

It was conflicting with def TEX_SHADOW_ARRAY, which also handles them.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212829 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd a test case for r212596
Timur Iskhodzhanov [Fri, 11 Jul 2014 16:32:53 +0000 (16:32 +0000)]
Add a test case for r212596

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212828 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm/test/BugPoint/compile-custom.ll: Use explicit %python to invoke a test script...
NAKAMURA Takumi [Fri, 11 Jul 2014 14:44:10 +0000 (14:44 +0000)]
llvm/test/BugPoint/compile-custom.ll: Use explicit %python to invoke a test script, compile-custom.ll.py, for shebang-incapable hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212820 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agollvm/test/lit.cfg: Let %python available.
NAKAMURA Takumi [Fri, 11 Jul 2014 14:36:39 +0000 (14:36 +0000)]
llvm/test/lit.cfg: Let %python available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212819 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[CMake] add_llvm_library: Add "RUNTIME DESTINATION bin" to install(). It affects...
NAKAMURA Takumi [Fri, 11 Jul 2014 14:36:28 +0000 (14:36 +0000)]
[CMake] add_llvm_library: Add "RUNTIME DESTINATION bin" to install(). It affects add_library(SHARED) for Win32.DLL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212818 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoraw_svector_ostream: grow and reserve atomically
Alp Toker [Fri, 11 Jul 2014 14:02:04 +0000 (14:02 +0000)]
raw_svector_ostream: grow and reserve atomically

Including the scratch buffer size in the initial reservation eliminates the
subsequent malloc+move operation and offers a healthier constant growth with
less memory wastage.

When doing this, take care to avoid invalidating the source buffer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212816 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoARM: Allow __fp16 as a function arg or return type for AArch64
Oliver Stannard [Fri, 11 Jul 2014 13:33:46 +0000 (13:33 +0000)]
ARM: Allow __fp16 as a function arg or return type for AArch64

ACLE 2.0 allows __fp16 to be used as a function argument or return
type. This enables this for AArch64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212812 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd FileCheck -implicit-check-not option to allow stricter tests without adding too...
Alexander Kornienko [Fri, 11 Jul 2014 12:39:32 +0000 (12:39 +0000)]
Add FileCheck -implicit-check-not option to allow stricter tests without adding too many CHECK-NOTs manually.

Summary:
Add FileCheck -implicit-check-not option which allows specifying a
pattern that should only occur in the input when explicitly matched by a
positive check. This feature allows checking tool diagnostics in a way
clang -verify does it for compiler diagnostics.

The option has been tested on a number of clang-tidy checks, I'll post a link to
the clang-tidy patch to this thread.

Once there's an agreement on the general direction, I can add tests and
documentation.

Reviewers: djasper, bkramer

Reviewed By: bkramer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212810 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Fix the inversion of low and high bits for the lowering of MUL_LOHI.
Quentin Colombet [Fri, 11 Jul 2014 12:08:23 +0000 (12:08 +0000)]
[X86] Fix the inversion of low and high bits for the lowering of MUL_LOHI.
Also add a few comments.

<rdar://problem/17581756>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212808 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdded test for commit r212802 that was missing
Marcello Maggioni [Fri, 11 Jul 2014 10:36:00 +0000 (10:36 +0000)]
Added test for commit r212802 that was missing

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212803 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFixup PHIs in LowerSwitch when a Leaf node is not emitted.
Marcello Maggioni [Fri, 11 Jul 2014 10:34:36 +0000 (10:34 +0000)]
Fixup PHIs in LowerSwitch when a Leaf node is not emitted.

This commit fixes bug http://llvm.org/bugs/show_bug.cgi?id=20103.

Thanks to Qwertyuiop for the report and the proposed fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212802 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] AVX512: Improve readability of isCDisp8
Adam Nemet [Fri, 11 Jul 2014 05:23:25 +0000 (05:23 +0000)]
[X86] AVX512: Improve readability of isCDisp8

No functional change.  As I was trying to understand this function, I found
that variables were reused with confusing names and the broadcast case was a
bit too implicit.  Hopefully, this is an improvement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212795 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] AVX512: Simplify logic in isCDisp8
Adam Nemet [Fri, 11 Jul 2014 05:23:12 +0000 (05:23 +0000)]
[X86] AVX512: Simplify logic in isCDisp8

It was computing the VL/n case as:
  MemObjSize = VectorByteSize / ElemByteSize / Divider * ElemByteSize

ElemByteSize not only falls out but VectorByteSize/Divider now actually
matches the definition of VL/n.

Also some formatting fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212794 91177308-0d34-0410-b5e6-96231b3b80d8