8 years ago[X86] Only 213 FMA3 variants should be marked commutable.
Lang Hames [Tue, 4 Feb 2014 19:42:47 +0000 (19:42 +0000)]
[X86] Only 213 FMA3 variants should be marked commutable.

Commuting the 231 and 132 variants would swap addends and
multiplicands/multipliers, which isn't valid.

I'm still trying to reduce a decent test case for this.

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

8 years agocleanup: scc_iterator consumers should use isAtEnd
Duncan P. N. Exon Smith [Tue, 4 Feb 2014 19:19:07 +0000 (19:19 +0000)]
cleanup: scc_iterator consumers should use isAtEnd

No functional change.  Updated loops from:

    for (I = scc_begin(), E = scc_end(); I != E; ++I)


    for (I = scc_begin(); !I.isAtEnd(); ++I)

for teh win.

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

8 years ago[mips] Implement %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions
Petar Jovanovic [Tue, 4 Feb 2014 18:41:57 +0000 (18:41 +0000)]
[mips] Implement %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions

Patch implements %hi(sym1 - sym2) and %lo(sym1 - sym2) expressions for MIPS
by creating target expression class MipsMCExpr.

Patch by Sasa Stankovic.

Differential Revision: http://llvm-reviews.chandlerc.com/D2592

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

8 years agoEvery target uses .align. Simplify.
Rafael Espindola [Tue, 4 Feb 2014 18:39:51 +0000 (18:39 +0000)]
Every target uses .align. Simplify.

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

8 years agoUse the default values.
Rafael Espindola [Tue, 4 Feb 2014 18:34:04 +0000 (18:34 +0000)]
Use the default values.

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

8 years agoFix PR18345: ldr= pseudo instruction produces incorrect code when using in inline...
David Peixotto [Tue, 4 Feb 2014 17:22:40 +0000 (17:22 +0000)]
Fix PR18345: ldr= pseudo instruction produces incorrect code when using in inline assembly

This patch fixes the ldr-pseudo implementation to work when used in
inline assembly.  The fix is to move arm assembler constant pools
from the ARMAsmParser class to the ARMTargetStreamer class.

Previously we kept the assembler generated constant pools in the
ARMAsmParser object. This does not work for inline assembly because
a new parser object is created for each blob of inline assembly.
This patch moves the constant pools to the ARMTargetStreamer class
so that the constant pool will remain alive for the entire code
generation process.

An ARMTargetStreamer class is now required for the arm backend.
There was no existing implementation for MachO, only Asm and ELF.
Instead of creating an empty MachO subclass, we decided to make the
ARMTargetStreamer a non-abstract class and provide default
(llvm_unreachable) implementations for the non constant-pool related

Differential Revision: http://llvm-reviews.chandlerc.com/D2638

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

8 years agoR600/SI: Expand i1 BR_CC
Tom Stellard [Tue, 4 Feb 2014 17:18:43 +0000 (17:18 +0000)]
R600/SI: Expand i1 BR_CC

This fixes a crashes in the OpenCV test suite and also the scrypt
kernel in bfgminer.

I was unable to come up with a reduced test case for this.


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

8 years agoR600/SI: Don't assume copies will be coalesced in SIFixSGPRCopies
Tom Stellard [Tue, 4 Feb 2014 17:18:42 +0000 (17:18 +0000)]
R600/SI: Don't assume copies will be coalesced in SIFixSGPRCopies

There is no lit test for this, because it would be too big and
complicated, but it does fix a crash in the Arithm/Absdiff.* OpenCV test.

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

8 years agoR600/SI: Custom lower i64 ISD::SELECT
Tom Stellard [Tue, 4 Feb 2014 17:18:40 +0000 (17:18 +0000)]
R600/SI: Custom lower i64 ISD::SELECT

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

8 years agoR600: Enable vector fpow.
Tom Stellard [Tue, 4 Feb 2014 17:18:37 +0000 (17:18 +0000)]
R600: Enable vector fpow.

The OpenCL specs say: "The vector versions of the math functions operate
component-wise. The description is per-component."

Patch by: Jan Vesely

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200773 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoHowToReleaseLLVM: Add information about dot releases
Tom Stellard [Tue, 4 Feb 2014 17:18:20 +0000 (17:18 +0000)]
HowToReleaseLLVM: Add information about dot releases

Based on the following discussion:

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

8 years agoOS X: the correct function is __sincospif_stret, not __sincospi_stretf
Tim Northover [Tue, 4 Feb 2014 16:28:20 +0000 (16:28 +0000)]
OS X: the correct function is __sincospif_stret, not __sincospi_stretf


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

8 years agoARM & AArch64: merge NEON absolute compare intrinsics
Tim Northover [Tue, 4 Feb 2014 14:55:42 +0000 (14:55 +0000)]
ARM & AArch64: merge NEON absolute compare intrinsics

There was an extremely confusing proliferation of LLVM intrinsics to implement
the vacge & vacgt instructions. This combines them all into two polymorphic
intrinsics, shared across both backends.

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

8 years agoImplemented support for Process::GetRandomNumber on Windows.
Aaron Ballman [Tue, 4 Feb 2014 14:49:21 +0000 (14:49 +0000)]
Implemented support for Process::GetRandomNumber on Windows.

Patch thanks to Stephan Tolksdorf!

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

8 years ago[CMake] Get rid of llvm_config() to expand dependencies.
NAKAMURA Takumi [Tue, 4 Feb 2014 14:42:14 +0000 (14:42 +0000)]
[CMake] Get rid of llvm_config() to expand dependencies.

CMake's target_link_libraries() will manage dependencies.

Configuration time may be reduced by a few seconds.

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

8 years ago[CMake] LLVM-Config.cmake: Split explicit_map_components_to_libraries and introduce...
NAKAMURA Takumi [Tue, 4 Feb 2014 14:42:04 +0000 (14:42 +0000)]
[CMake] LLVM-Config.cmake: Split explicit_map_components_to_libraries and introduce llvm_map_components_to_libnames and llvm_expand_dependencies.

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

8 years ago[CMake] add_llvm_loadable_module: Fixup r200762, I mis-eliminated wrong line. :(
NAKAMURA Takumi [Tue, 4 Feb 2014 13:40:31 +0000 (13:40 +0000)]
[CMake] add_llvm_loadable_module: Fixup r200762, I mis-eliminated wrong line. :(

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

8 years agoRevert r122395, "Fixes file extension for loadable modules on OS X."
NAKAMURA Takumi [Tue, 4 Feb 2014 13:33:13 +0000 (13:33 +0000)]
Revert r122395, "Fixes file extension for loadable modules on OS X."

In trunk, every users assume add_llvm_loadable_module as "loadable module" and no one sets neither SHARED, ... nor also MODULE!
Unfortunately, all loadable modules were linked as not "MODULE" but "SHARED".

If this change caused any regressions, I wish guys to fix it properly. ;)

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

8 years agoAdd a note to documentation that Clang + libstdc++ 4.7.2 can not be used to build...
Dmitri Gribenko [Tue, 4 Feb 2014 12:02:13 +0000 (12:02 +0000)]
Add a note to documentation that Clang + libstdc++ 4.7.2 can not be used to build LLD.

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

8 years agollvm-cov: Implement the preserve-paths flag
Justin Bogner [Tue, 4 Feb 2014 10:45:02 +0000 (10:45 +0000)]
llvm-cov: Implement the preserve-paths flag

Until now, when a path in a gcno file included a directory, we would
emit our .gcov file in that directory, whereas gcov always emits the
file in the current directory. In doing so, this implements gcov's
strange name-mangling -p flag, which is needed to avoid clobbering
files when two with the same name exist in different directories.

The path mangling is a bit ugly and only handles unix-like paths, but
it's simple, and it doesn't make any guesses as to how it should
behave outside of what gcov documents. If we decide this should be
cross platform later, we can consider the compatibility implications

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

8 years agoARM: fix fast-isel assertion failure
Tim Northover [Tue, 4 Feb 2014 10:38:46 +0000 (10:38 +0000)]
ARM: fix fast-isel assertion failure

Missing braces on if meant we inserted both ARM and Thumb load for a litpool
entry. This didn't end well.


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

8 years ago[CMake] Revert r200695 and fix the problem with missing -fno-function-sections in...
Alexey Samsonov [Tue, 4 Feb 2014 08:15:46 +0000 (08:15 +0000)]
[CMake] Revert r200695 and fix the problem with missing -fno-function-sections in a different way.

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

8 years ago[CMake] Add -stdlib=libc++ to host Clang build flags before performing any header...
Alexey Samsonov [Tue, 4 Feb 2014 07:55:18 +0000 (07:55 +0000)]
[CMake] Add -stdlib=libc++ to host Clang build flags before performing any header search

If LLVM_ENABLE_LIBCXX is specified, we should append -stdlib=libc++ to build
flags as early as possible, in particular, before we check for header presence
(as -stdlib=libc++ modifies header lookup rules). Otherwise we can find a header
at configure time (w/o -stdlib=libc++) but fail to find it at build time
(with -stdlib=libc++). See PR18569 for more details.

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

8 years agoR600/SI: Fix fneg for 0.0
Michel Danzer [Tue, 4 Feb 2014 07:12:38 +0000 (07:12 +0000)]
R600/SI: Fix fneg for 0.0

V_ADD_F32 with source modifier does not produce -0.0 for this. Just
manipulate the sign bit directly instead.

Also add a pattern for (fneg (fabs ...)).

Fixes a bunch of bit encoding piglit tests with radeonsi.

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

8 years agollvm-cov: Implement the object-directory flag
Justin Bogner [Tue, 4 Feb 2014 06:41:43 +0000 (06:41 +0000)]
llvm-cov: Implement the object-directory flag

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

8 years agollvm-cov: Ignore missing .gcda files
Justin Bogner [Tue, 4 Feb 2014 06:41:39 +0000 (06:41 +0000)]
llvm-cov: Ignore missing .gcda files

When gcov is run without gcda data, it acts as if the counts are all
zero and labels the file as - to indicate that there was no data. We
should do the same.

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

8 years agollvm-cov: Document the llvm-cov tests
Justin Bogner [Tue, 4 Feb 2014 06:41:33 +0000 (06:41 +0000)]
llvm-cov: Document the llvm-cov tests

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

8 years agoRegAllocGreedy.cpp: Use more simple value as Hysteresis, to suppress -mfpmath-depende...
NAKAMURA Takumi [Tue, 4 Feb 2014 06:29:38 +0000 (06:29 +0000)]
RegAllocGreedy.cpp: Use more simple value as Hysteresis, to suppress -mfpmath-dependent behavior.

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

8 years agoRevert: ARM: Enable use of relocation type tlsldo in debug info for tls data.
Kai Nacke [Tue, 4 Feb 2014 06:07:00 +0000 (06:07 +0000)]
Revert: ARM: Enable use of relocation type tlsldo in debug info for tls data.

There seems to be a new problem with the debug info in the test case.
I'll have to investigate this.

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

8 years agoAdd strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls
Kai Nacke [Tue, 4 Feb 2014 05:55:16 +0000 (05:55 +0000)]
Add strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls

Add the missing transformation strchr(p, 0) -> p + strlen(p) to SimplifyLibCalls
and remove the ToDo comment.

Reviewer: Duncan P.N. Exan Smith

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

8 years agoARM: Enable use of relocation type tlsldo in debug info for tls data.
Kai Nacke [Tue, 4 Feb 2014 05:43:09 +0000 (05:43 +0000)]
ARM: Enable use of relocation type tlsldo in debug info for tls data.

This fixes PR18554.

Reviewers: Renato Golin, Keith Walker

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

8 years agoDebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero...
David Blaikie [Tue, 4 Feb 2014 01:23:52 +0000 (01:23 +0000)]
DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0}

A bunch of test cases needed to be cleaned up for this, many my fault -
when implementid imported modules I updated test cases by simply
duplicating the prior metadata field - which wasn't always the empty
metadata entry.

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

8 years agoRevert r200150, "[CMake] tablegen(): Use -I <dir> according to the list by include_di...
NAKAMURA Takumi [Tue, 4 Feb 2014 01:17:12 +0000 (01:17 +0000)]
Revert r200150, "[CMake] tablegen(): Use -I <dir> according to the list by include_directories()."

It missed include/llvm/Target. Could I avoid GLOB_RECURSE anyways? :(
FYI, I intended to prune ${LLVM_MAIN_INCLUDE_DIR} in TableGen.cmake in r200150.

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

8 years agoMove error handling down to getSymbolNMTypeChar.
Rafael Espindola [Tue, 4 Feb 2014 00:21:18 +0000 (00:21 +0000)]
Move error handling down to getSymbolNMTypeChar.

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

8 years agoSelf-memcpy-elision and memcpy of constant byte to memset transforms don't care how...
Nick Lewycky [Tue, 4 Feb 2014 00:18:54 +0000 (00:18 +0000)]
Self-memcpy-elision and memcpy of constant byte to memset transforms don't care how many bytes you were trying to transfer. Sink that safety test after those transforms. Noticed by inspection.

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

8 years agoDIBuilder: simplify array generation to produce true zero-length arrays
David Blaikie [Mon, 3 Feb 2014 23:08:54 +0000 (23:08 +0000)]
DIBuilder: simplify array generation to produce true zero-length arrays

For some anachronistic reason we were producing {i32 0} for zero-length
debug info arrays.

(this change is paired with a Clang change and may cause temporary
buildbot noise)

Let's not.

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

8 years agoAdd DEBUG_TYPE to SIAnnotateControlFlow
Matt Arsenault [Mon, 3 Feb 2014 22:58:05 +0000 (22:58 +0000)]
Add DEBUG_TYPE to SIAnnotateControlFlow

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

8 years agoinalloca: Don't remove dead arguments in the presence of inalloca args
Reid Kleckner [Mon, 3 Feb 2014 20:42:49 +0000 (20:42 +0000)]
inalloca: Don't remove dead arguments in the presence of inalloca args

It disturbs the layout of the parameters in memory and registers,
leading to problems in the backend.

The plan for optimizing internal inalloca functions going forward is to
essentially SROA the argument memory and demote any captured arguments
(things that aren't trivially written by a load or store) to an indirect
pointer to a static alloca.

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

8 years agoAArch64 & ARM: refactor crypto intrinsics to take scalars
Tim Northover [Mon, 3 Feb 2014 17:27:49 +0000 (17:27 +0000)]
AArch64 & ARM: refactor crypto intrinsics to take scalars

Some of the SHA instructions take a scalar i32 as one argument (largely because
they work on 160-bit hash fragments). This wasn't reflected in the IR
previously, with ARM and AArch64 choosing different types (<4 x i32> and <1 x
i32> respectively) which was ugly.

This makes all the affected intrinsics take a uniform "i32", allowing them to
become non-polymorphic at the same time.

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

8 years agoExpand vector bswap in LegalizeVectorOps
Hal Finkel [Mon, 3 Feb 2014 17:27:25 +0000 (17:27 +0000)]
Expand vector bswap in LegalizeVectorOps

ISD::BSWAP was missing from the list of node types that should be expanded

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

8 years agoUndef'ing _WIN32_IE to silence an MSVC warning about redefining a macro value.
Aaron Ballman [Mon, 3 Feb 2014 17:20:26 +0000 (17:20 +0000)]
Undef'ing _WIN32_IE to silence an MSVC warning about redefining a macro value.

No functional change intended.

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

8 years agoAdd a note about Clang+LLVM on Sparc64.
Venkatraman Govindaraju [Mon, 3 Feb 2014 15:28:26 +0000 (15:28 +0000)]
Add a note about Clang+LLVM on Sparc64.

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

8 years agoRemove outdated & incorrect part of comment.
Eli Bendersky [Mon, 3 Feb 2014 14:33:51 +0000 (14:33 +0000)]
Remove outdated & incorrect part of comment.

This comment was copied over from another class in r34170, where it made sense.

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

8 years agoDon't use -ffunction-sections if -fno-function-sections is not supported in the compiler.
Evgeniy Stepanov [Mon, 3 Feb 2014 13:57:09 +0000 (13:57 +0000)]
Don't use -ffunction-sections if -fno-function-sections is not supported in the compiler.

This will disable -ffunction-sections in older versions of Clang where it
breaks build of sanitizer runtime library.

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

8 years agoIntroduce SmallPtrSetImpl<T *> which allows insert, erase, count, and
Chandler Carruth [Mon, 3 Feb 2014 11:24:21 +0000 (11:24 +0000)]
Introduce SmallPtrSetImpl<T *> which allows insert, erase, count, and
iteration. This alows the majority of operations to be performed without
encoding a specific small size. It follows the model of

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

8 years agoRename the non-templated base class of SmallPtrSet to
Chandler Carruth [Mon, 3 Feb 2014 11:24:18 +0000 (11:24 +0000)]
Rename the non-templated base class of SmallPtrSet to
'SmallPtrSetImplBase'. This more closely matches the organization of
SmallVector and should allow introducing a SmallPtrSetImpl which serves
the same purpose as SmallVectorImpl: isolating the element type from the
particular small size chosen. This in turn allows a lot of
simplification of APIs by not coding them against a specific small size
which is rarely needed.

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

8 years agoRemove unnecessary include of AArch64GenInstrInfo.inc from AArch64Disassembler.cpp...
Craig Topper [Mon, 3 Feb 2014 06:33:17 +0000 (06:33 +0000)]
Remove unnecessary include of AArch64GenInstrInfo.inc from AArch64Disassembler.cpp. None of the GET_ defines were set that would make the include do anything.

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

8 years agoLower llvm.expect intrinsic correctly for i1
Duncan P. N. Exon Smith [Sun, 2 Feb 2014 22:43:55 +0000 (22:43 +0000)]
Lower llvm.expect intrinsic correctly for i1

LowerExpectIntrinsic previously only understood the idiom of an expect
intrinsic followed by a comparison with zero. For llvm.expect.i1, the
comparison would be stripped by the early-cse pass.

Patch by Daniel Micay.

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

8 years agoUnaligned access is supported on ARMv6 and ARMv7 for the NetBSD target.
Joerg Sonnenberger [Sun, 2 Feb 2014 21:18:36 +0000 (21:18 +0000)]
Unaligned access is supported on ARMv6 and ARMv7 for the NetBSD target.
Patch from Matt Thomas.

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

8 years ago[CMake] Move cmake_minimum_required(2.8.8) at the top.
NAKAMURA Takumi [Sun, 2 Feb 2014 16:59:36 +0000 (16:59 +0000)]
[CMake] Move cmake_minimum_required(2.8.8) at the top.

Suggested by Stephen Kelly.

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

8 years ago[CMake] Untabify.
NAKAMURA Takumi [Sun, 2 Feb 2014 16:46:35 +0000 (16:46 +0000)]
[CMake] Untabify.

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

8 years agoTableGen/X86RecognizableInstr.h: Prune out-of-date "@param isSSE". [-Wdocumentation]
NAKAMURA Takumi [Sun, 2 Feb 2014 10:53:36 +0000 (10:53 +0000)]
TableGen/X86RecognizableInstr.h: Prune out-of-date "@param isSSE". [-Wdocumentation]

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

8 years agoMerge x86 HasOpSizePrefix/HasOpSize16Prefix into a 2-bit OpSize field with 0 meaning...
Craig Topper [Sun, 2 Feb 2014 09:25:09 +0000 (09:25 +0000)]
Merge x86 HasOpSizePrefix/HasOpSize16Prefix into a 2-bit OpSize field with 0 meaning no 0x66 prefix in any mode. Rename Opsize16->OpSize32 and OpSize->OpSize16. The classes now refer to their operand size rather than the mode in which they need a 0x66 prefix. Hopefully can merge REX_W into this as OpSize64.

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

8 years agoSimplify some code since VEX and EVEX instructions never have HasOpSizePrefix.
Craig Topper [Sun, 2 Feb 2014 07:46:05 +0000 (07:46 +0000)]
Simplify some code since VEX and EVEX instructions never have HasOpSizePrefix.

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

8 years agoMerge HasVEXPrefix/HasEVEXPrefix/HasXOPPrefix into a 2-bit 'encoding' field in TSFlags.
Craig Topper [Sun, 2 Feb 2014 07:08:01 +0000 (07:08 +0000)]
Merge HasVEXPrefix/HasEVEXPrefix/HasXOPPrefix into a 2-bit 'encoding' field in TSFlags.

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

8 years agoReplace PPC instruction-size code with MCInstrDesc getSize
Hal Finkel [Sun, 2 Feb 2014 06:12:27 +0000 (06:12 +0000)]
Replace PPC instruction-size code with MCInstrDesc getSize

As part of the cleanup done to enable the disassembler, the PPC instructions
now have a valid Size description field. This can now be used to replace some
custom logic in a few places to compute instruction sizes.

Patch by David Wiberg!

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

8 years agoLoopVectorizer: Enable unrolling of conditional stores and the load/store
Arnold Schwaighofer [Sun, 2 Feb 2014 03:12:34 +0000 (03:12 +0000)]
LoopVectorizer: Enable unrolling of conditional stores and the load/store
unrolling heuristic per default

Benchmarking on x86_64 (thanks Chandler!) and ARM has shown those options speed
up some benchmarks while not causing any interesting regressions.

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

8 years agoAdd some xfailed R600 tests for 64-bit private accesses.
Matt Arsenault [Sun, 2 Feb 2014 00:13:12 +0000 (00:13 +0000)]
Add some xfailed R600 tests for 64-bit private accesses.

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

8 years agoR600/SI: Fix insertelement with dynamic indices.
Matt Arsenault [Sun, 2 Feb 2014 00:05:35 +0000 (00:05 +0000)]
R600/SI: Fix insertelement with dynamic indices.

This didn't work for any integer vectors, and didn't
work with some sizes of float vectors. This should now
work with all sizes of float and i32 vectors.

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

8 years ago[Sparc] Set %o7 as the return address register instead of %i7 in MCRegisterInfo....
Venkatraman Govindaraju [Sat, 1 Feb 2014 18:54:16 +0000 (18:54 +0000)]
[Sparc] Set %o7 as the return address register instead of %i7 in MCRegisterInfo. Also, add CFI instructions to initialize the frame correctly.

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

8 years agoARMTTI: We don't have 16 allocatable scalar registers
Arnold Schwaighofer [Sat, 1 Feb 2014 18:00:25 +0000 (18:00 +0000)]
ARMTTI: We don't have 16 allocatable scalar registers

This caused an regression on libquantum after enabling the new loop vectorizer
unroll heuristics.

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

8 years agoMC: Fix .octa output for APInts with BitWidth > 128
David Woodhouse [Sat, 1 Feb 2014 16:52:33 +0000 (16:52 +0000)]
MC: Fix .octa output for APInts with BitWidth > 128

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

8 years agoMC: Add support for .octa
David Woodhouse [Sat, 1 Feb 2014 16:20:59 +0000 (16:20 +0000)]
MC: Add support for .octa

This is a minimal implementation which accepts only constants rather than
full expressions, but that should be perfectly sufficient for all known
users for now.

Patch from PaX Team <pageexec@freemail.hu>

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

8 years agoMC: Add AsmLexer::BigNum token for integers greater than 64 bits
David Woodhouse [Sat, 1 Feb 2014 16:20:54 +0000 (16:20 +0000)]
MC: Add AsmLexer::BigNum token for integers greater than 64 bits

This will be needed for .octa support, but we don't want to just use the
existing AsmLexer::Integer for it and then have to litter all its users
with explicit checks for the size, and make them use the new get APIntVal()

So let the lexer produce an AsmLexer::Integer as before for numbers which
are small enough — which appears to cover what was previously a nasty
special case handling of numbers which don't fit in int64_t but *do* fit
in uint64_t.

Where the number is too large even for that, produce an AsmLexer::BigNum
instead. We do nothing with these except complain about them for now,
but that will be changed shortly...

Based on a patch from PaX Team <pageexec@freemail.hu>

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

8 years ago[LPM] Apply a really big hammer to fix PR18688 by recursively reforming
Chandler Carruth [Sat, 1 Feb 2014 13:35:14 +0000 (13:35 +0000)]
[LPM] Apply a really big hammer to fix PR18688 by recursively reforming
LCSSA when we promote to SSA registers inside of LICM.

Currently, this is actually necessary. The promotion logic in LICM uses
SSAUpdater which doesn't understand how to place LCSSA PHI nodes.
Teaching it to do so would be a very significant undertaking. It may be
worthwhile and I've left a FIXME about this in the code as well as
starting a thread on llvmdev to try to figure out the right long-term

For now, the PR needs to be fixed. Short of using the promition
SSAUpdater to place both the LCSSA PHI nodes and the promoted PHI nodes,
I don't see a cleaner or cheaper way of achieving this. Fortunately,
LCSSA is relatively lazy and sparse -- it should only update
instructions which need it. We can also skip the recursive variant when
we don't promote to SSA values.

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

8 years agoRemove some unused #includes
Eli Bendersky [Sat, 1 Feb 2014 13:12:54 +0000 (13:12 +0000)]
Remove some unused #includes

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

8 years agoSilence GCC warnings.
Benjamin Kramer [Sat, 1 Feb 2014 11:26:18 +0000 (11:26 +0000)]
Silence GCC warnings.

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

8 years ago[inliner] Skip debug intrinsics even earlier in computing the inline
Chandler Carruth [Sat, 1 Feb 2014 10:38:17 +0000 (10:38 +0000)]
[inliner] Skip debug intrinsics even earlier in computing the inline
cost so that they don't impact the vector bonus. Fundamentally, counting
unsimplified instructions is just *wrong*; it will continue to introduce
instability as things which do not generate code bizarrely impact
inlining. For example, sufficiently nested inlined functions could turn
off the vector bonus with lifetime markers just like the debug
intrinsics do. =/

This is a short-term tactical fix. Long term, I think we need to remove
the vector bonus entirely. That's a separate patch and discussion

The patch to fix this provided by Dario Domizioli. I've added some
comments about the planned direction and used a heavily pruned form of
debug info intrinsics for the test case. While this debug info doesn't
work or "do" anything useful, it lets us easily test all manner of
interference easily, and I suspect this will not be the last time we
want to craft a pattern where debug info interferes with the inliner in
a problematic way.

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

8 years agoSimplify some x86 format classes and remove some ambiguities in their application.
Craig Topper [Sat, 1 Feb 2014 08:17:56 +0000 (08:17 +0000)]
Simplify some x86 format classes and remove some ambiguities in their application.

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

8 years agoUpdate a .fill test to use the updated semantics.
David Majnemer [Sat, 1 Feb 2014 07:36:52 +0000 (07:36 +0000)]
Update a .fill test to use the updated semantics.

Something funny happened, this should've been part of r200606.

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

8 years agoMC: Improve the .fill directive's compatibility with GAS
David Majnemer [Sat, 1 Feb 2014 07:19:38 +0000 (07:19 +0000)]
MC: Improve the .fill directive's compatibility with GAS

Per the GAS documentation, .fill should permit pattern widths that
aren't a power of two. While I was in the neighborhood, I added some
sanity checking. This change was motivated by a use of this construct
in the Linux Kernel.

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

8 years agoHopefully fix mingw32 bots.
Peter Collingbourne [Sat, 1 Feb 2014 02:42:20 +0000 (02:42 +0000)]
Hopefully fix mingw32 bots.

For some reason this symbolic constant isn't defined in some versions of mingw32.

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

8 years agoRevert "[SLPV] Recognize vectorizable intrinsics during SLP vectorization ..."
Reid Kleckner [Sat, 1 Feb 2014 01:37:30 +0000 (01:37 +0000)]
Revert "[SLPV] Recognize vectorizable intrinsics during SLP vectorization ..."

This reverts commit r200576.  It broke 32-bit self-host builds by
vectorizing two calls to @llvm.bswap.i64, which we then fail to expand.

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

8 years ago[stackprotector] Implement the sspstrong rules for stack layout.
Josh Magee [Sat, 1 Feb 2014 01:36:16 +0000 (01:36 +0000)]
[stackprotector] Implement the sspstrong rules for stack layout.

This changes the PrologueEpilogInserter and LocalStackSlotAllocation passes to
follow the extended stack layout rules for sspstrong and sspreq.

The sspstrong layout rules are:
 1. Large arrays and structures containing large arrays (>= ssp-buffer-size)
are closest to the stack protector.
 2. Small arrays and structures containing small arrays (< ssp-buffer-size) are
2nd closest to the protector.
 3. Variables that have had their address taken are 3rd closest to the

Differential Revision: http://llvm-reviews.chandlerc.com/D2546

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

8 years agoImplement inalloca codegen for x86 with the new inalloca design
Reid Kleckner [Fri, 31 Jan 2014 23:50:57 +0000 (23:50 +0000)]
Implement inalloca codegen for x86 with the new inalloca design

Calls with inalloca are lowered by skipping all stores for arguments
passed in memory and the initial stack adjustment to allocate argument

Now the frontend is responsible for the memory layout, and the backend
doesn't have to do any work.  As a result these changes are pretty

Reviewers: echristo

Differential Revision: http://llvm-reviews.chandlerc.com/D2637

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

8 years agoIntroduce line editor library.
Peter Collingbourne [Fri, 31 Jan 2014 23:46:14 +0000 (23:46 +0000)]
Introduce line editor library.

This library will be used by clang-query. I can imagine LLDB becoming another
client of this library, so I think LLVM is a sensible place for it to live.
It wraps libedit, and adds tab completion support.

The code is loosely based on the line editor bits in LLDB, with a few

 - Polymorphism for retrieving the list of tab completions, based on
   the concept pattern from the new pass manager.

 - Tab completion doesn't corrupt terminal output if the input covers
   multiple lines. Unfortunately this can only be done in a truly horrible
   way, as far as I can tell. But since the alternative is to implement our
   own line editor (which I don't think LLVM should be in the business of
   doing, at least for now) I think it may be acceptable.

 - Includes a fallback for the case where the user doesn't have libedit

Note that this uses C stdio, mainly because libedit also uses C stdio.

Differential Revision: http://llvm-reviews.chandlerc.com/D2200

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

8 years agoIntroduce llvm::sys::path::home_directory.
Peter Collingbourne [Fri, 31 Jan 2014 23:46:06 +0000 (23:46 +0000)]
Introduce llvm::sys::path::home_directory.

This will be used by the line editor library to derive a default path to
the history file.

Differential Revision: http://llvm-reviews.chandlerc.com/D2199

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

8 years agoDon't put non-static allocas in the static alloca map
Reid Kleckner [Fri, 31 Jan 2014 23:45:12 +0000 (23:45 +0000)]
Don't put non-static allocas in the static alloca map

Allocas marked inalloca are never static, but we were trying to put them
into the static alloca map if they were in the entry block.  Also add an
assertion in x86 fastisel.

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

8 years agoSplit out small-code-model MCJIT testcase in order to xfail for AArch64, where
Lang Hames [Fri, 31 Jan 2014 23:36:25 +0000 (23:36 +0000)]
Split out small-code-model MCJIT testcase in order to xfail for AArch64, where
PC-rel relocations aren't yet fully implemented.

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

8 years agoRemove a redundant call to hasRawTextSupport.
Rafael Espindola [Fri, 31 Jan 2014 23:14:01 +0000 (23:14 +0000)]
Remove a redundant call to hasRawTextSupport.

The code path it was guarding was already using emitRawComment.

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

8 years agoRemove another hasRawTextSupport.
Rafael Espindola [Fri, 31 Jan 2014 23:10:26 +0000 (23:10 +0000)]
Remove another hasRawTextSupport.

To remove this one simply move the end of file logic from the asm printer to
the target mc streamer.

This removes the last call to hasRawTextSupport from lib/Target.

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

8 years agoSet -mcpu to make this test pass on atom bots
Reid Kleckner [Fri, 31 Jan 2014 22:58:10 +0000 (22:58 +0000)]
Set -mcpu to make this test pass on atom bots

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

8 years ago[inliner] Print out extra stats about the cost, threshold, and vector
Chandler Carruth [Fri, 31 Jan 2014 22:32:32 +0000 (22:32 +0000)]
[inliner] Print out extra stats about the cost, threshold, and vector
bonus in the inline cost analysis.

Split out of a patch by Dario Domizioli to commit separately.

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

8 years agoRemove the last hasRawTextSupport call from R600.
Rafael Espindola [Fri, 31 Jan 2014 22:14:06 +0000 (22:14 +0000)]
Remove the last hasRawTextSupport call from R600.

There is nothing wrong with printing the disassembly section when printing
text. An hypothetical assembler would then produce a .o just like our
direct object emission produces.

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

8 years agoReplace another use with hasRawTextSupport+EmitRawText with emitRawComment.
Rafael Espindola [Fri, 31 Jan 2014 22:08:19 +0000 (22:08 +0000)]
Replace another use with hasRawTextSupport+EmitRawText with emitRawComment.

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

8 years agoUse emitRawComment to avoid a call to hasRawTextSupport.
Rafael Espindola [Fri, 31 Jan 2014 21:54:49 +0000 (21:54 +0000)]
Use emitRawComment to avoid a call to hasRawTextSupport.

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

8 years agoFix file header for APFloat.h
Duncan P. N. Exon Smith [Fri, 31 Jan 2014 21:45:54 +0000 (21:45 +0000)]
Fix file header for APFloat.h

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

8 years agoClean up whitespace
Duncan P. N. Exon Smith [Fri, 31 Jan 2014 21:45:51 +0000 (21:45 +0000)]
Clean up whitespace

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

8 years agoMark the first dynamic elf symbol as SF_FormatSpecific.
Rafael Espindola [Fri, 31 Jan 2014 21:40:13 +0000 (21:40 +0000)]
Mark the first dynamic elf symbol as SF_FormatSpecific.

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

8 years agoReplace X86 FMA intrinsic pseduo-instructions with def pats.
Lang Hames [Fri, 31 Jan 2014 21:29:19 +0000 (21:29 +0000)]
Replace X86 FMA intrinsic pseduo-instructions with def pats.

It looks like these pseudos were only used for pattern matching. Def pats are
the appropriate way to do that. As a bonus, these intrinsics will now have
memory operands folded properly, and better FMA3 variants selected where
appropriate (see r199933).


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

8 years ago[SLPV] Recognize vectorizable intrinsics during SLP vectorization and
Chandler Carruth [Fri, 31 Jan 2014 21:14:40 +0000 (21:14 +0000)]
[SLPV] Recognize vectorizable intrinsics during SLP vectorization and
transform accordingly. Based on similar code from Loop vectorization.
Subsequent commits will include vectorization of function calls to
vector intrinsics and form function calls to vector library calls.

Patch by Raul Silvera! (Much delayed due to my not running dcommit)

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

8 years agoSimplify getSymbolFlags.
Rafael Espindola [Fri, 31 Jan 2014 20:57:12 +0000 (20:57 +0000)]
Simplify getSymbolFlags.

None of the object formats require extra parsing to compute these flags,
so the method cannot fail.

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

8 years agoIf we're not producing DWARF accel tables, don't waste memory
Paul Robinson [Fri, 31 Jan 2014 20:39:19 +0000 (20:39 +0000)]
If we're not producing DWARF accel tables, don't waste memory
keeping track of those entries.

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

8 years agoAdd support for DW_FORM_flag and DW_FORM_flag_present to the DIE hashing
Eric Christopher [Fri, 31 Jan 2014 20:02:58 +0000 (20:02 +0000)]
Add support for DW_FORM_flag and DW_FORM_flag_present to the DIE hashing
algorithm. Sink the 'A' + Attribute hash into each form so we don't
have to check valid forms before deciding whether or not we're going
to hash which will let the default be to return without doing anything.

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

8 years agoFix name of nested type in comment to match code.
Eric Christopher [Fri, 31 Jan 2014 20:02:55 +0000 (20:02 +0000)]
Fix name of nested type in comment to match code.

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

8 years agoDebugInfo: Flag type unit references as declarations
David Blaikie [Fri, 31 Jan 2014 19:52:26 +0000 (19:52 +0000)]
DebugInfo: Flag type unit references as declarations

This ensures DWARF consumers don't confuse these references for
definitions. I'd argue it might be nice to improve debuggers so we don't
need this, but it's just one field in an abbreviation anyway - so it
doesn't seem worth the fight.

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

8 years agox86: Rename NumBytesForCalleeToPush to ...Pop for accuracy
Reid Kleckner [Fri, 31 Jan 2014 19:07:18 +0000 (19:07 +0000)]
x86: Rename NumBytesForCalleeToPush to ...Pop for accuracy

If we have a callee cleanup convention, the callee is going to pop the
arguments off the stack, not push them on.

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

8 years agoRevert r200560, "LTO itself hasn't depended on MCDisassembler any more."
NAKAMURA Takumi [Fri, 31 Jan 2014 17:57:50 +0000 (17:57 +0000)]
Revert r200560, "LTO itself hasn't depended on MCDisassembler any more."

Oh sorry, I missed LTO.exports, ... I checked just only *.cpp(s).

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

8 years ago[ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret'
Reid Kleckner [Fri, 31 Jan 2014 17:41:22 +0000 (17:41 +0000)]
[ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret'

MSVC always places the 'this' parameter for a method first.  The
implicit 'sret' pointer for methods always comes second.  We already
implement this for __thiscall by putting sret parameters on the stack,
but __cdecl methods require putting both parameters on the stack in
opposite order.

Using a special calling convention allows frontends to keep the sret
parameter first, which avoids breaking lots of assumptions in LLVM and

Fixes PR15768 with the corresponding change in Clang.

Reviewers: ributzka, majnemer

Differential Revision: http://llvm-reviews.chandlerc.com/D2663

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

8 years agoLTO itself hasn't depended on MCDisassembler any more.
NAKAMURA Takumi [Fri, 31 Jan 2014 17:40:11 +0000 (17:40 +0000)]
LTO itself hasn't depended on MCDisassembler any more.

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