Joerg Sonnenberger [Mon, 28 Jul 2014 21:06:22 +0000 (21:06 +0000)]
Change __INTx_TYPE__ to be always signed. This changes the value for
char-based types from "char" to "signed char". Adjust stdint.h to use
__INTx_TYPE__ directly without prefixing it with signed and to use
__UINTx_TYPE__ for unsigned ones.
The value of __INTx_TYPE__ now matches GCC.
llvm-svn: 214119
Lang Hames [Mon, 28 Jul 2014 21:00:48 +0000 (21:00 +0000)]
[MCJIT] Remove extraneous parentheses in test case.
llvm-svn: 214117
Rafael Espindola [Mon, 28 Jul 2014 20:42:29 +0000 (20:42 +0000)]
Test the linker plugin handling of llvm.used.
llvm-svn: 214116
Manman Ren [Mon, 28 Jul 2014 19:33:20 +0000 (19:33 +0000)]
[Debug Info] add a template class DITypedArray.
Typedef DIArray to DITypedArray<DIDescriptor>. Also typedef DITypeArray as
DITypedArray<DITypeRef>.
This is the third of a series of patches to handle type uniqueing of the
type array for a subroutine type.
This commit should have no functionality change.
llvm-svn: 214115
Alexey Samsonov [Mon, 28 Jul 2014 19:25:44 +0000 (19:25 +0000)]
Fix linking with just-built libc++abi (added in r214037).
Pass target name ("cxxabi") to target_link_libraries(cxx ...) to ensure
that linker is able to locate just-built libc++abi in the build tree,
instead of relying on "-lc++abi" linker flag.
llvm-svn: 214114
Manman Ren [Mon, 28 Jul 2014 19:14:41 +0000 (19:14 +0000)]
[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.
This is the paired commit with llvm r214112.
llvm-svn: 214113
Manman Ren [Mon, 28 Jul 2014 19:14:13 +0000 (19:14 +0000)]
[Debug Info] rename getTypeArray to getElements, setTypeArray to setArrays.
This is the second of a series of patches to handle type uniqueing of the
type array for a subroutine type.
For vector and array types, getElements returns the array of subranges, so it
is a better name than getTypeArray. Even for class, struct and enum types,
getElements returns the members, which can be subprograms.
setArrays can set up to two arrays, the second is the templates.
This commit should have no functionality change.
llvm-svn: 214112
Manman Ren [Mon, 28 Jul 2014 18:52:30 +0000 (18:52 +0000)]
[Debug Info] replace DIUnspecifiedParameter with DITrivialType.
This is the first of a series of patches to handle type uniqueing of the
type array for a subroutine type.
This commit makes sure unspecified_parameter is a DIType to enable converting
the type array for a subroutine type to an array of DITypes.
This commit should have no functionality change. With this commit, we may
change unspecified type to be a DITrivialType instead of a DIType.
llvm-svn: 214111
Kaelyn Takata [Mon, 28 Jul 2014 18:14:02 +0000 (18:14 +0000)]
Add another keyword-selection flag to CorrectionCandidateCallback.
The new flag, WantFunctionLikeCasts, covers a subset of the keywords
covered by WantTypeSpecifiers that can be used in casts that look like
function calls, e.g. "return long(5);", while excluding the keywords
like "enum" and "const" that would be included when WantTypeSpecifiers
is true but cannot be used in something that looks like a function call.
llvm-svn: 214109
Matt Arsenault [Mon, 28 Jul 2014 18:06:08 +0000 (18:06 +0000)]
R600: Modernize test
llvm-svn: 214108
Alex Lorenz [Mon, 28 Jul 2014 18:03:51 +0000 (18:03 +0000)]
llvm-cov: move the gcov code into a separate file.
The gcov compatible code is moved to its own file and
llvm-cov is updated to be a wrapper that always calls
the gcov main function.
llvm-svn: 214107
Matt Arsenault [Mon, 28 Jul 2014 17:59:38 +0000 (17:59 +0000)]
R600/SI: Fix return type for isMIMG / isSMRD
All the others use bool, so these should too.
llvm-svn: 214106
Chandler Carruth [Mon, 28 Jul 2014 17:55:07 +0000 (17:55 +0000)]
[SDAG] Add DEBUG logging to the legalizer, fixing a "bug" found by
inspection in the proccess, and shuffle the logging in the DAG combiner
around a bit.
With this it is much easier to follow what the legalizer is doing. It
should even accurately present most of the strange legalization
operations where a single node is replaced by multiple nodes, etc. There
is still some information lost (we log SDNodes not SDValues so we don't
log which result is used for which thing), but I think this is much
closer to a usable system. Notably, this will make it *much* more
apparant when legalization is actually happening inside the combiner, or
when there is a cycle caused by interactions of the legalizer and the
combiner.
The "bug" I fixed here I'm not sure is remotely possible to trigger. We
were only adding one of the nodes in a replacement to the updated set
rather than all of the nodes in the replacement. Realistically, the
worst result of this are nodes not getting back onto the worklist in the
DAG combiner. I doubt it is possible to trigger this today, and
I certainly don't have any ideas about how, but this at least brings the
code into alignment with the principled operation of the routine.
llvm-svn: 214105
Matt Arsenault [Mon, 28 Jul 2014 17:49:26 +0000 (17:49 +0000)]
R600/SI: Implement getOptimalMemOpType
The default guess uses i32. This needs an address space argument
to really do the right thing in all cases.
llvm-svn: 214104
Reid Kleckner [Mon, 28 Jul 2014 17:48:12 +0000 (17:48 +0000)]
Fix MSVC warnings about falling off the end of a non-void function
llvm-svn: 214103
Rafael Espindola [Mon, 28 Jul 2014 17:37:25 +0000 (17:37 +0000)]
Add tests for the various emit-llvm plugin options.
llvm-svn: 214102
Matt Arsenault [Mon, 28 Jul 2014 17:31:39 +0000 (17:31 +0000)]
R600/SI: Make argument loads invariant
llvm-svn: 214101
Matt Arsenault [Mon, 28 Jul 2014 17:31:37 +0000 (17:31 +0000)]
Update comment
llvm-svn: 214100
Adam Nemet [Mon, 28 Jul 2014 17:14:45 +0000 (17:14 +0000)]
[AVX512] Add non-masking FP store intrinsics
Part of <rdar://problem/
17688758>
llvm-svn: 214099
Adam Nemet [Mon, 28 Jul 2014 17:14:42 +0000 (17:14 +0000)]
[AVX512] Add FP add/sub/mul intrinsics
Part of <rdar://problem/
17688758>
llvm-svn: 214098
Adam Nemet [Mon, 28 Jul 2014 17:14:40 +0000 (17:14 +0000)]
[AVX512] Reorder functions in avx512fintrin.h
There is no functional change here.
The idea is to have a similar order and categories of functions that we have
in avxintrin.h.
llvm-svn: 214097
Adam Nemet [Mon, 28 Jul 2014 17:14:38 +0000 (17:14 +0000)]
[AVX512] Bring the formatting of avx512fintrin.h closer to avxintrin.h
llvm-svn: 214096
Adam Nemet [Mon, 28 Jul 2014 17:14:36 +0000 (17:14 +0000)]
[AVX512] Add CHECK-LABELs to test/CodeGen/avx512f-builtins.c
llvm-svn: 214095
Zachary Turner [Mon, 28 Jul 2014 16:45:18 +0000 (16:45 +0000)]
Teach LLDB about Windows processes.
This patch creates a simple ProcessWindows process plugin.
The only thing it knows how to do currently is create processes.
Differential Revision: http://reviews.llvm.org/D4681
llvm-svn: 214094
Zachary Turner [Mon, 28 Jul 2014 16:45:05 +0000 (16:45 +0000)]
Use llvm Support functions to get the user's home directory.
Assuming that the user's home directory is at ~ is incorrect on
Windows. This patch delegates the request to LLVM's support
library, which already provides a cross-platform implementation
of this function.
Differential Revision: http://reviews.llvm.org/D4674
llvm-svn: 214093
Zachary Turner [Mon, 28 Jul 2014 16:44:49 +0000 (16:44 +0000)]
Fix supported architectures on PlatformWindows.
i386, i486, i486sx, and i686 are all indistinguishable as far as
PE/COFF files are concerned. This patch adds support for all of
these architectures to PlatformWindows.
Differential Revision: http://reviews.llvm.org/D4658
llvm-svn: 214092
Zachary Turner [Mon, 28 Jul 2014 16:44:28 +0000 (16:44 +0000)]
Fix the MSVC build. MSVC does not support constexpr.
llvm-svn: 214091
Fariborz Jahanian [Mon, 28 Jul 2014 16:35:45 +0000 (16:35 +0000)]
Objective-C. Improve diagnostic when property is
not auto synthesized in current implementation.
rdar://
17774815
llvm-svn: 214090
DeLesley Hutchins [Mon, 28 Jul 2014 15:57:27 +0000 (15:57 +0000)]
Thread Safety Analysis: Replace the old and broken SExpr with the new
til::SExpr. This is a large patch, with many small changes to pretty printing
and expression lowering to make the new SExpr representation equivalent in
functionality to the old.
llvm-svn: 214089
Marshall Clow [Mon, 28 Jul 2014 15:02:42 +0000 (15:02 +0000)]
Fix PR#20471. Add a cast in __align_it to ensure that the bit twiddling is done at the correct size. A better solution, IMHO, would be to declare vector<bool>::__bits_per_word as 'size_type', rather than 'unsigned', but that's a possible ABI change.
llvm-svn: 214088
Rafael Espindola [Mon, 28 Jul 2014 14:44:33 +0000 (14:44 +0000)]
Test the mcpu option.
llvm-svn: 214087
Dario Domizioli [Mon, 28 Jul 2014 14:33:17 +0000 (14:33 +0000)]
[TEST] Improve tests for #pragma clang optimize off/on
Added coverage for:
* More than one "off region" in the same file
* An "off region" falling off the end of an included file
llvm-svn: 214086
Simon Atanasyan [Mon, 28 Jul 2014 14:19:18 +0000 (14:19 +0000)]
[Mips] Remove redundant REQUIRES clause.
The exe-got.test test case is target independent.
llvm-svn: 214085
Daniel Jasper [Mon, 28 Jul 2014 14:08:09 +0000 (14:08 +0000)]
clang-format: [proto] Improve formatting of text-proto options.
Initial patch and tests by Kaushik Sridharan, thank you!
llvm-svn: 214084
Dmitry Vyukov [Mon, 28 Jul 2014 13:54:18 +0000 (13:54 +0000)]
tsan: add a useful debug check
llvm-svn: 214082
Robert Khasanov [Mon, 28 Jul 2014 13:46:45 +0000 (13:46 +0000)]
[SKX] Enabling mask logic instructions: encoding, lowering
Instructions: KAND{BWDQ}, KANDN{BWDQ}, KOR{BWDQ}, KXOR{BWDQ}, KXNOR{BWDQ}
Reviewed by Elena Demikhovsky <elena.demikhovsky@intel.com>
llvm-svn: 214081
Dan Liew [Mon, 28 Jul 2014 13:36:50 +0000 (13:36 +0000)]
Emit a warning if llvm_map_components_to_libraries() is used noting that its
use is deprecated in favour of llvm_map_components_to_libnames()
Although message(DEPRECATION "msg") would probably be a better fit this
does nothing if CMAKE_ERROR_DEPRECATED and CMAKE_WARNING_DEPRECATED are
both off, which is the default.
llvm-svn: 214078
Dan Liew [Mon, 28 Jul 2014 13:36:37 +0000 (13:36 +0000)]
Document the new LLVM CMake interface for building against LLVM
libraries. With many contributions from Brad King.
llvm-svn: 214077
Dan Liew [Mon, 28 Jul 2014 13:33:51 +0000 (13:33 +0000)]
Fixed sphinx warning.
llvm-svn: 214076
Daniel Jasper [Mon, 28 Jul 2014 13:19:58 +0000 (13:19 +0000)]
clang-format: Improve operator and template recognition.
Before:
static_assert(is_convertible < A &&, B > ::value, "AAA");
After:
static_assert(is_convertible<A &&, B>::value, "AAA");
llvm-svn: 214075
Ulrich Weigand [Mon, 28 Jul 2014 13:17:52 +0000 (13:17 +0000)]
[PowerPC] Support ELFv1/ELFv2 ABI selection via -mabi= option
While Clang now supports both ELFv1 and ELFv2 ABIs, their use is currently
hard-coded via the target triple: powerpc64-linux is always ELFv1, while
powerpc64le-linux is always ELFv2.
These are of course the most common scenarios, but in principle it is
possible to support the ELFv2 ABI on big-endian or the ELFv1 ABI on
little-endian systems (and GCC does support that), and there are some
special use cases for that (e.g. certain Linux kernel versions could
only be built using ELFv1 on LE).
This patch implements the Clang side of supporting this, based on the
LLVM commit 214072. The command line options -mabi=elfv1 or -mabi=elfv2
select the desired ABI if present. (If not, Clang uses the same default
rules as now.)
Specifically, the patch implements the following changes based on the
presence of the -mabi= option:
In the driver:
- Pass the appropiate -target-abi flag to the back-end
- Select the correct dynamic loader version (/lib64/ld64.so.[12])
In the preprocessor:
- Define _CALL_ELF to the appropriate value (1 or 2)
In the compiler back-end:
- Select the correct ABI in TargetInfo.cpp
- Select the desired ABI for LLVM via feature (elfv1/elfv2)
llvm-svn: 214074
Ulrich Weigand [Mon, 28 Jul 2014 13:10:25 +0000 (13:10 +0000)]
[PowerPC] Add testcase forgotten in the 214072 commit.
llvm-svn: 214073
Ulrich Weigand [Mon, 28 Jul 2014 13:09:28 +0000 (13:09 +0000)]
[PowerPC] Support ELFv1/ELFv2 ABI selection via features
While LLVM now supports both ELFv1 and ELFv2 ABIs, their use is currently
hard-coded via the target triple: powerpc64-linux is always ELFv1, while
powerpc64le-linux is always ELFv2.
These are of course the most common scenarios, but in principle it is
possible to support the ELFv2 ABI on big-endian or the ELFv1 ABI on
little-endian systems (and GCC does support that), and there are some
special use cases for that (e.g. certain Linux kernel versions could
only be built using ELFv1 on LE).
This patch implements the LLVM side of supporting this. As precedent
on other platforms suggests, ABI options are passed to the back-end as
features. Thus, this patch implements two features "elfv1" and "elfv2"
that select the desired ABI if present. (If not, the LLVM uses the
same default rules as now.)
llvm-svn: 214072
Daniel Jasper [Mon, 28 Jul 2014 12:24:21 +0000 (12:24 +0000)]
clang-format: Improve pointer/reference detection.
Before (with left pointer alignment):
void f(int i = 0, SomeType* *temps = NULL);
After:
void f(int i = 0, SomeType** temps = NULL);
llvm-svn: 214071
Daniel Jasper [Mon, 28 Jul 2014 12:08:16 +0000 (12:08 +0000)]
clang-format: Fix unary operator recognition.
Before:
int x = ~ * p;
After:
int x = ~*p;
llvm-svn: 214070
Daniel Jasper [Mon, 28 Jul 2014 12:08:06 +0000 (12:08 +0000)]
clang-format: Fix formatting of lock annotations in lambda definitions.
Before:
SomeFunction([](int i)LOCKS_EXCLUDED(a) {});
After:
SomeFunction([](int i) LOCKS_EXCLUDED(a) {});
llvm-svn: 214069
NAKAMURA Takumi [Mon, 28 Jul 2014 11:33:49 +0000 (11:33 +0000)]
DataflowWorklist.h: Appease msc17 -- Split a private constructor to DataflowWorklistBase.
MSC17 isn't capable to invoke other constructors in its scope.
llvm-svn: 214067
Artyom Skrobov [Mon, 28 Jul 2014 08:47:38 +0000 (08:47 +0000)]
Factoring DataflowWorklist out of LiveVariables and UninitializedValues analyses
llvm-svn: 214064
Daniel Jasper [Mon, 28 Jul 2014 07:29:29 +0000 (07:29 +0000)]
clang-tidy: [use-override] Tweak messages.
It doesn't make sense to suggest 'virtual' as clang-tidy would complain
about that on the next iteration (we are never issuing warnings for the
base function).
llvm-svn: 214063
Matthew Gardiner [Mon, 28 Jul 2014 06:21:40 +0000 (06:21 +0000)]
Test commit, please ignore
llvm-svn: 214062
Johannes Doerfert [Mon, 28 Jul 2014 03:46:28 +0000 (03:46 +0000)]
Replace the dependences parallelism check by the IslAst one
llvm-svn: 214061
Brad Smith [Mon, 28 Jul 2014 01:57:32 +0000 (01:57 +0000)]
Add missing override keyword to OpenBSD IsIntegratedAssemblerDefault().
llvm-svn: 214060
Nico Weber [Mon, 28 Jul 2014 00:02:09 +0000 (00:02 +0000)]
Wrap to 80 columns. No behavior change.
llvm-svn: 214059
Rafael Espindola [Sun, 27 Jul 2014 23:11:06 +0000 (23:11 +0000)]
Start adding some tests for the gold plugin.
These are only used when the 'ld' in the path is gold and the plugin has
been built, but it is already a start to make sure we don't regress features
that cannot be tested with llvm-lto.
llvm-svn: 214058
Saleem Abdulrasool [Sun, 27 Jul 2014 19:07:09 +0000 (19:07 +0000)]
ARM: correct handling of features in arch_extension
The subtarget information is the ultimate source of truth for the feature set
that is enabled at this point. We would previously not propagate the feature
information to the subtarget. While this worked for the most part (features
would be enabled/disabled as requested), if another operation that changed the
feature bits was encountered (such as a mode switch via a .arm or .thumb
directive), we would end up resetting the behaviour of the architectural
extensions.
Handling this properly requires a slightly more complicated handling. We need
to check if the feature is now being toggled. If so, only then do we toggle the
features. In return, we no longer have to calculate the feature bits ourselves.
The test changes are mostly to the diagnosis, which is now more uniform (a nice
side effect!). Add an additional test to ensure that we handle this case
properly.
Thanks to Nico Weber for alerting me to this issue!
llvm-svn: 214057
Saleem Abdulrasool [Sun, 27 Jul 2014 19:07:05 +0000 (19:07 +0000)]
ARM: convert loop to range based
Convert a loop to use range based iteration. Rename structure members to help
naming, and make structure definition anonymous. NFC.
llvm-svn: 214056
Matt Arsenault [Sun, 27 Jul 2014 17:46:40 +0000 (17:46 +0000)]
Add alignment value to allowsUnalignedMemoryAccess
Rename to allowsMisalignedMemoryAccess.
On R600, 8 and 16 byte accesses are mostly OK with 4-byte alignment,
and don't need to be split into multiple accesses. Vector loads with
an alignment of the element type are not uncommon in OpenCL code.
llvm-svn: 214055
Simon Atanasyan [Sun, 27 Jul 2014 12:23:34 +0000 (12:23 +0000)]
Remove unused empty folder `unittest`.
llvm-svn: 214054
Tim Northover [Sun, 27 Jul 2014 07:10:29 +0000 (07:10 +0000)]
AArch64: fix conversion of 'J' inline asm constraints.
'J' represents a negative number suitable for an add/sub alias
instruction, but while preparing it to become an int64_t we were
mangling the sign extension. So "i32 -1" became 0xffffffffLL, for
example.
Should fix one half of PR20456.
llvm-svn: 214052
Richard Smith [Sun, 27 Jul 2014 05:38:12 +0000 (05:38 +0000)]
Fix default argument comma disambiguation bug following the 'template' keyword.
llvm-svn: 214051
Richard Smith [Sun, 27 Jul 2014 05:12:49 +0000 (05:12 +0000)]
When looking for temporary dtors while building the CFG, do not walk into
lambda expressions (other than their capture initializers) nor blocks. Do walk
into default argument expressions and default initializer expressions.
These bugs were causing us to produce broken CFGs whenever a lambda expression
was used to initialize a libstdc++ std::function object!
llvm-svn: 214050
Richard Smith [Sun, 27 Jul 2014 04:29:04 +0000 (04:29 +0000)]
[modules] Add some missing record names. We really should be generating this from a .def file or similar...
llvm-svn: 214049
Richard Smith [Sun, 27 Jul 2014 04:19:32 +0000 (04:19 +0000)]
[modules] Add abbreviation for ImplicitCastExpr. This is the most common
record type in LLVM's IR module.
llvm-svn: 214048
Nico Weber [Sun, 27 Jul 2014 04:09:29 +0000 (04:09 +0000)]
Wrap to 80 columns. No behavior change.
llvm-svn: 214047
Saleem Abdulrasool [Sun, 27 Jul 2014 02:01:24 +0000 (02:01 +0000)]
builtins: make ARM compilation with GAS work again
The LLVM IAS seems to accept wide instructions for add and sub in ARM mode even
though it is not permitted. This uses a macro to ensure that the wide modifier
is only applied when building in THUMB mode.
This repairs building with GCC/GAS in ARM mode.
llvm-svn: 214046
Saleem Abdulrasool [Sun, 27 Jul 2014 02:01:20 +0000 (02:01 +0000)]
builtins: move macro definitions into assembly.h
The macro definitions are shared across multiple files. Define them once in the
assembly.h header rather than redefining it in each file.
llvm-svn: 214045
Saleem Abdulrasool [Sun, 27 Jul 2014 02:01:15 +0000 (02:01 +0000)]
builtins: whitespace
llvm-svn: 214044
Chandler Carruth [Sun, 27 Jul 2014 01:45:49 +0000 (01:45 +0000)]
[x86] Sink a variable only used by asserts into the asserts. Should fix
some -Werror bots, sorry for the noise.
llvm-svn: 214043
Chandler Carruth [Sun, 27 Jul 2014 01:15:58 +0000 (01:15 +0000)]
[x86] Add a much more powerful framework for combining x86 shuffle
instructions in the legalized DAG, and leverage it to combine long
sequences of instructions to PSHUFB.
Eventually, the other x86-instruction-specific shuffle combines will
probably all be driven out of this routine. But the real motivation is
to detect after we have fully legalized and optimized a shuffle to the
minimal number of x86 instructions whether it is profitable to replace
the chain with a fully generic PSHUFB instruction even though doing so
requires either a load from a constant pool or tying up a register with
the mask.
While the Intel manuals claim it should be used when it replaces 5 or
more instructions (!!!!) my experience is that it is actually very fast
on modern chips, and so I've gon with a much more aggressive model of
replacing any sequence of 3 or more instructions.
I've also taught it to do some basic canonicalization to special-purpose
instructions which have smaller encodings than their generic
counterparts.
There are still quite a few FIXMEs here, and I've not yet implemented
support for lowering blends with PSHUFB (where its power really shines
due to being able to zero out lanes), but this starts implementing real
PSHUFB support even when using the new, fancy shuffle lowering. =]
llvm-svn: 214042
Chandler Carruth [Sun, 27 Jul 2014 01:11:19 +0000 (01:11 +0000)]
[ADT] Add a remarkbly useful little helper routine to ArrayRef for
checking whether the ArrayRef is equal to an explicit list of arguments.
This is particularly easy to implement even without variadic templates
because ArrayRef happens to be homogeneously typed. As a consequence we
can use a "clever" wrapper type and default arguments to capture in
a single method many arguments as well as *how many* arguments the user
specified.
Thanks to Dave Blaikie for helping me pull together this little helper.
Suggestions for how to improve or generalize it are of course welcome.
I'll be using it immediately in my follow-up patch. =D
llvm-svn: 214041
Saleem Abdulrasool [Sat, 26 Jul 2014 23:44:22 +0000 (23:44 +0000)]
builtins: avoid multiple definitions of symbols
The architecture specific implementation of routines would be built and included
along with the generic implementation. This would result in multiple
definitions of those symbols.
The linker is free to select either of the two. Most of the time, this
shouldn't be too terrible as the forward iteration should catch the architecture
version due to the ordering. Rather than relying on the linker and build
infrastructure ordering things in a specific manner, only provide the
architecture version when available.
This reduces the size of compiler-rt, simplifies inspection of the library
implementations, and guarantees that the desired version is selected at a
slightly complex build system.
llvm-svn: 214040
Saleem Abdulrasool [Sat, 26 Jul 2014 23:44:18 +0000 (23:44 +0000)]
builtins: add missed files from previous commits
This adds missed files in SVN r214033 for alignment and corrects a change from
SVN r214034 for fixing compilation with GCC.
llvm-svn: 214039
Nico Weber [Sat, 26 Jul 2014 23:20:08 +0000 (23:20 +0000)]
Wrap to 80 columns. No behavior change.
llvm-svn: 214038
Dan Albert [Sat, 26 Jul 2014 23:08:33 +0000 (23:08 +0000)]
Better defaults for in-tree libc++ with cmake.
This will detect if you are building libcxx in-tree and libcxxabi is
available. If so, it will default to using the in-tree libcxxabi by
setting LIBCXX_CXX_ABI to "libcxxabi", LIBCXX_LIBCXXABI_INCLUDE_PATHS to
"${CMAKE_SOURCE_DIR}/projects/libcxxabi/include" and will add "cxxabi"
as a proper dependency.
Patch by Russell Harmon.
llvm-svn: 214037
Nico Weber [Sat, 26 Jul 2014 22:15:25 +0000 (22:15 +0000)]
Wrap to 80 columns, no functionality change.
llvm-svn: 214036
Matt Arsenault [Sat, 26 Jul 2014 21:21:42 +0000 (21:21 +0000)]
R600/SI: Fix broken test.
There was no check prefix for the instruction lines.
Match what is emitted though, although I'm pretty sure it is
incorrect.
llvm-svn: 214035
Saleem Abdulrasool [Sat, 26 Jul 2014 21:08:41 +0000 (21:08 +0000)]
builtins: move the readonly constants into rodata
Place the floating point constants into the read-only data section. This was
already being done for x86_64, this simply mirrors the behaviour for i686.
llvm-svn: 214034
Saleem Abdulrasool [Sat, 26 Jul 2014 21:08:34 +0000 (21:08 +0000)]
builtins: correct constant alignments
MMX/SSE instructions expect 128-bit alignment (16-byte) for constants that they
reference. Correct the alignment on the constant values. Although it is quite
possible for the data to end up aligned, there is no guarantee that this will
occur unless it is explicitly aligned to the desired location. If the data ends
up being unaligned, the resultant binary would fault at runtime due to the
unaligned access.
As an example, the follow would fault previously:
cc -c lib/builtins/x86_64/floatundidf.S -o floatundidf.o
cc -c test/builtins/Unit/floatundidf_test.c -o floatundidf_test.c
ld -m elf_x86_64 floatundidf.o floatundidf_test.o -lc -o floatundidf
However, if the object files were reversed, the data would end up aligned and
the problem would go unnoticed.
llvm-svn: 214033
Fariborz Jahanian [Sat, 26 Jul 2014 20:52:26 +0000 (20:52 +0000)]
Objective-C. Issue more warning diagnostic when certain
properties are not synthesized in property auto-synthesis,
as it can potentiall lead to runtime errors.
rdar://
17774815
llvm-svn: 214032
Todd Fiala [Sat, 26 Jul 2014 20:39:17 +0000 (20:39 +0000)]
llgs: add --reverse-connect support.
Also includes --reverse-connect tests for llgs and debugserver.
llvm-svn: 214031
Dmitry Vyukov [Sat, 26 Jul 2014 17:41:10 +0000 (17:41 +0000)]
tsan: advise shadow for 0x7f region to not use huge pages
see the comment for justification
llvm-svn: 214030
Dmitry Vyukov [Sat, 26 Jul 2014 16:40:33 +0000 (16:40 +0000)]
tsan: improve shadow flush benchmark
allow to specify access stride
llvm-svn: 214029
Joey Gouly [Sat, 26 Jul 2014 10:58:14 +0000 (10:58 +0000)]
Fix the failing test 'vector-idiv.ll'.
On Darwin the comment character is ##.
llvm-svn: 214028
Dmitry Vyukov [Sat, 26 Jul 2014 10:17:26 +0000 (10:17 +0000)]
tsan: reduce internal allocator region from 16M to 1M
16M regions can waste almost 1G for nothing.
Since region size is used only during initial heap growth,
it's unclear why we even need such huge regions.
llvm-svn: 214027
Dmitry Vyukov [Sat, 26 Jul 2014 10:06:11 +0000 (10:06 +0000)]
tsan: remove meta from internal allocator
I am puzzled why it is even there.
llvm-svn: 214026
Simon Atanasyan [Sat, 26 Jul 2014 09:52:21 +0000 (09:52 +0000)]
[Driver][Mips] Check output of -dynamic-linker arguments by the Clang driver
for a couple of MIPS toolchains.
No functional changes.
llvm-svn: 214025
Richard Smith [Sat, 26 Jul 2014 06:37:51 +0000 (06:37 +0000)]
[modules] Improve abbreviations for C++:
* Add abbreviation for CXXMethodDecl and for FunctionProtoType. These come up
a *lot* in C++ modules.
* Allow typedef declarations to use the abbreviation if they're class members,
or if they're used.
In passing, add more record name records for Clang AST node kinds.
The downside is that we had already used up our allotment of 12 abbreviations,
so this pushes us to an extra bit on each record to support the extra abbrev
kinds, which increases file size by ~1%. This patch *barely* pays for that
through the other improvements, but we've got room for another 18 abbrevs,
so we should be able to make it much more profitable with future changes.
llvm-svn: 214024
Matt Arsenault [Sat, 26 Jul 2014 06:23:37 +0000 (06:23 +0000)]
R600: Move intrinsic lowering to separate functions
llvm-svn: 214023
Chandler Carruth [Sat, 26 Jul 2014 05:53:16 +0000 (05:53 +0000)]
[SDAG] Add an assert that we don't mess up the number of values when
replacing nodes in the legalizer.
This caught a number of bugs for me during development.
llvm-svn: 214022
Chandler Carruth [Sat, 26 Jul 2014 05:52:51 +0000 (05:52 +0000)]
[SDAG] Simplify the code for handling single-value nodes and add
a missing transfer of debug information (without which tests fail).
llvm-svn: 214021
Chandler Carruth [Sat, 26 Jul 2014 05:49:40 +0000 (05:49 +0000)]
[SDAG] When performing post-legalize DAG combining, run the legalizer
over each node in the worklist prior to combining.
This allows the combiner to produce new nodes which need to go back
through legalization. This is particularly useful when generating
operands to target specific nodes in a post-legalize DAG combine where
the operands are significantly easier to express as pre-legalized
operations. My immediate use case will be PSHUFB formation where we need
to build a constant shuffle mask with a build_vector node.
This also refactors the relevant functionality in the legalizer to
support this, and updates relevant tests. I've spoken to the R600 folks
and these changes look like improvements to them. The avx512 change
needs to be investigated, I suspect there is a disagreement between the
legalizer and the DAG combiner there, but it seems a minor issue so
leaving it to be re-evaluated after this patch.
Differential Revision: http://reviews.llvm.org/D4564
llvm-svn: 214020
Nick Lewycky [Sat, 26 Jul 2014 05:44:15 +0000 (05:44 +0000)]
Fix broken assert.
llvm-svn: 214019
David Majnemer [Sat, 26 Jul 2014 05:41:31 +0000 (05:41 +0000)]
Parse: Don't crash on trailing whitespace before EOF
Parser::ParseDeclarationSpecifiers eagerly updates the source range of
the DeclSpec with the current token position. However, it might not
consume any more tokens.
Fix this by only setting the start of the range, not the end. This way
the SourceRange will be invalid if we don't consume any more tokens.
This fixes PR20413.
Differential Revision: http://reviews.llvm.org/D4646
llvm-svn: 214018
Nick Lewycky [Sat, 26 Jul 2014 05:07:41 +0000 (05:07 +0000)]
Satisfy -Wparentheses.
llvm-svn: 214017
NAKAMURA Takumi [Sat, 26 Jul 2014 04:53:05 +0000 (04:53 +0000)]
X86ShuffleDecode.cpp: Silence a warning. [-Wunused-variable]
llvm-svn: 214016
NAKAMURA Takumi [Sat, 26 Jul 2014 04:47:01 +0000 (04:47 +0000)]
llvm/test/CodeGen/X86/vector-idiv.ll: Fix for -Asserts.
llvm-svn: 214015
NAKAMURA Takumi [Sat, 26 Jul 2014 04:12:34 +0000 (04:12 +0000)]
clang/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp: Fix for -Asserts, like CHECK64 does.
llvm-svn: 214014
Saleem Abdulrasool [Sat, 26 Jul 2014 04:04:02 +0000 (04:04 +0000)]
builtins: re-enable building assembly sources
Re-apply SVN r213684 which was reverted in SVN r213724 since it broke the
build bots. Add a tweak to enable inclusion of the assembly sources in
standalone build as well.
Original commit message:
This patch address the PR20360. The CMake assembler build system
ignores the .S assembly files in builtins library build. This patch
fixes the issue.
llvm-svn: 214013
Saleem Abdulrasool [Sat, 26 Jul 2014 04:03:59 +0000 (04:03 +0000)]
builtins: make the x86_64 compatible with GAS
The .rodata directive was added on the IA-64 (Itanium) platform. The LLVM IAS
supports the .rodata on i386 and x86_64 as well. There is no reason to really
restrict compilation of the builtins to just clang. By explicitly indicating
that the data is meant to be pushed into the .rodata section via the .section
.rodata, the assembly is made compatible with clang and gcc (with GAS).
This will enable building these routines on the Linux buildbots via CMake.
llvm-svn: 214012
Chandler Carruth [Sat, 26 Jul 2014 03:46:57 +0000 (03:46 +0000)]
[x86] Fix PR20355 (for real). There are many layers to this bug.
The tale starts with r212808 which attempted to fix inversion of the low
and high bits when lowering MUL_LOHI. Sadly, that commit did not include
any positive test cases, and just removed some operations from a test
case where the actual logic being changed isn't fully visible from the
test.
What this commit did was two things. First, it reversed the low and high
results in the formation of the MERGE_VALUES node for the multiple
results. This is entirely correct.
Second it changed the shuffles for extracting the low and high
components from the i64 results of the multiplies to extract them
assuming a big-endian-style encoding of the multiply results. This
second change is wrong. There is no big-endian encoding in x86, the
results of the multiplies are normal v2i64s: when cast to v4i32, the low
i32s are at offsets 0 and 2, and the high i32s are at offsets 1 and 3.
However, the first change wasn't enough to actually fix the bug, which
is (I assume) why the second change was also made. There was another bug
in the MERGE_VALUES formation: we weren't using a VTList, and so were
getting a single result node! When grabbing the *second* result from the
node, we got... well.. colud be anything. I think this *appeared* to
invert things, but had to be causing other problems as well.
Fortunately, I fixed the MERGE_VALUES issue in r213931, so we should
have been fine, right? NOOOPE! Because the core bug was never addressed,
the test in vector-idiv failed when I fixed the MERGE_VALUES node.
Because there are essentially no docs for this node, I had to guess at
how to fix it and tried swapping the operands, restoring the order of
the original code before r212808. While this "fixed" the test case (in
that we produced the write instructions) we were still extracting the
wrong elements of the i64s, and thus PR20355 was still broken.
This commit essentially reverts the big-endian-style extraction part of
r212808 and goes back to the original masks which were correct. Now that
the MERGE_VALUES node formation is also correct, everything works. I've
also included a more detailed test from PR20355 to make sure this stays
fixed.
llvm-svn: 214011