Andrea Di Biagio [Wed, 23 Jul 2014 11:20:24 +0000 (11:20 +0000)]
Revert r211771. It was: "[X86] Improve the selection of SSE3/AVX addsub instructions".
This chang fully reverts r211771.
That revision added a canonicalization rule which has the potential to causes a
combine-cycle in the target-independent canonicalizing DAG combine.
The plan is to move the logic that forms target specific addsub nodes as part of
the lowering of shuffles.
llvm-svn: 213736
Alexey Bataev [Wed, 23 Jul 2014 10:25:33 +0000 (10:25 +0000)]
[OPENMP] Initial parsing and sema analysis for 'update' clause of 'atomic' directive.
llvm-svn: 213735
Simon Atanasyan [Wed, 23 Jul 2014 09:27:10 +0000 (09:27 +0000)]
[Driver][Mips] Restore FIXME comment was removed accidentally.
llvm-svn: 213734
Yi Kong [Wed, 23 Jul 2014 09:25:02 +0000 (09:25 +0000)]
ARM: Add doc for ACLE memory barrier intrinsics
Add documentations for ACLE memory barrier intrinsics, describing their motion
barrier characteristics.
llvm-svn: 213733
Chandler Carruth [Wed, 23 Jul 2014 09:11:48 +0000 (09:11 +0000)]
[x86] Clean up a test case to use check labels and spell out the exact
instruction sequences with CHECK-NEXT for these test cases.
This notably exposes how absolutely horrible the generated code is for
several of these test cases, and will make any future updates to the
test as our vector instruction selection gets better.
llvm-svn: 213732
Yi Kong [Wed, 23 Jul 2014 09:00:21 +0000 (09:00 +0000)]
Add module map entry for ARM ACLE header file
llvm-svn: 213731
Tilmann Scheller [Wed, 23 Jul 2014 08:39:50 +0000 (08:39 +0000)]
[ARM] Add regression test for the earlyclobber constraint of ARM STRB.
The constraint was added in r213369.
llvm-svn: 213730
Tilmann Scheller [Wed, 23 Jul 2014 08:12:51 +0000 (08:12 +0000)]
[ARM] Add earlyclobber constraint to pre/post-indexed ARM STRH instructions.
The post-indexed instructions were missing the constraint, causing unpredictable STRH instructions to be emitted.
The earlyclobber constraint on the pre-indexed STR instructions is not strictly necessary, as the instruction selection for pre-indexed STR instructions goes through an additional layer of pseudo instructions which have the constraint defined, however it doesn't hurt to specify the constraint directly on the pre-indexed instructions as well, since at some point someone might create instances of them programmatically and then the constraint is definitely needed.
llvm-svn: 213729
Alexey Bataev [Wed, 23 Jul 2014 07:46:59 +0000 (07:46 +0000)]
[OPENMP] Initial parsing an sema analysis for 'write' clause of 'atomic' directive.
llvm-svn: 213728
Chandler Carruth [Wed, 23 Jul 2014 07:08:53 +0000 (07:08 +0000)]
[SDAG] Make the DAGCombine worklist not grow endlessly due to duplicate
insertions.
The old behavior could cause arbitrarily bad memory usage in the DAG
combiner if there was heavy traffic of adding nodes already on the
worklist to it. This commit switches the DAG combine worklist to work
the same way as the instcombine worklist where we null-out removed
entries and only add new entries to the worklist. My measurements of
codegen time shows slight improvement. The memory utilization is
unsurprisingly dominated by other factors (the IR and DAG itself
I suspect).
This change results in subtle, frustrating churn in the particular order
in which DAG combines are applied which causes a number of minor
regressions where we fail to match a pattern previously matched by
accident. AFAICT, all of these should be using AddToWorklist to directly
or should be written in a less brittle way. None of the changes seem
drastically bad, and a few of the changes seem distinctly better.
A major change required to make this work is to significantly harden the
way in which the DAG combiner handle nodes which become dead
(zero-uses). Previously, we relied on the ability to "priority-bump"
them on the combine worklist to achieve recursive deletion of these
nodes and ensure that the frontier of remaining live nodes all were
added to the worklist. Instead, I've introduced a routine to just
implement that precise logic with no indirection. It is a significantly
simpler operation than that of the combiner worklist proper. I suspect
this will also fix some other problems with the combiner.
I think the x86 changes are really minor and uninteresting, but the
avx512 change at least is hiding a "regression" (despite the test case
being just noise, not testing some performance invariant) that might be
looked into. Not sure if any of the others impact specific "important"
code paths, but they didn't look terribly interesting to me, or the
changes were really minor. The consensus in review is to fix any
regressions that show up after the fact here.
Thanks to the other reviewers for checking the output on other
architectures. There is a specific regression on ARM that Tim already
has a fix prepped to commit.
Differential Revision: http://reviews.llvm.org/D4616
llvm-svn: 213727
Nick Lewycky [Wed, 23 Jul 2014 06:24:49 +0000 (06:24 +0000)]
We may visit a call that uses an alloca multiple times in callUsesLocalStack, sometimes with IsNocapture true and sometimes with IsNocapture false. We accidentally skipped work we needed to do in the IsNocapture=false case if we were called with IsNocapture=true the first time. Fixes PR20405!
llvm-svn: 213726
Nico Weber [Wed, 23 Jul 2014 05:16:10 +0000 (05:16 +0000)]
Improve diagnostic on default-initializing const variables (PR20208).
This tweaks the diagnostic wording slighly, and adds a fixit on a note.
An alternative would be to add the fixit directly on the diagnostic, see
the review thread linked to from the bug for a few notes on that approach.
llvm-svn: 213725
Renato Golin [Wed, 23 Jul 2014 04:46:23 +0000 (04:46 +0000)]
Revert "Include assembly files in builtins library build"
This reverts commit r213684, since it was breaking the compiler-rt
build and the sanitizers' bot.
llvm-svn: 213724
NAKAMURA Takumi [Wed, 23 Jul 2014 04:32:21 +0000 (04:32 +0000)]
Rework to let RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s pass on win32.
FIXME: "llvm-rtdyld -verify -check" is still sensitive to path separator.
Fix searching StubMap to be tolerant of both '/' and '\\' on Win32.
llvm-svn: 213723
Richard Smith [Wed, 23 Jul 2014 04:13:00 +0000 (04:13 +0000)]
Revert r213647; the added test triggers an assertion.
llvm-svn: 213722
NAKAMURA Takumi [Wed, 23 Jul 2014 04:05:58 +0000 (04:05 +0000)]
Suppress a test on win32 for now, llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s.
FIXME: Fix searching StubMap with '/' and '\\' on Win32.
llvm-svn: 213721
NAKAMURA Takumi [Wed, 23 Jul 2014 04:05:46 +0000 (04:05 +0000)]
RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s: Use %/T here, or sed(1) would be confused with dos path.
llvm-svn: 213720
Richard Smith [Wed, 23 Jul 2014 03:22:10 +0000 (03:22 +0000)]
AST printer: fix double space before base class with no access specifier.
llvm-svn: 213719
Richard Smith [Wed, 23 Jul 2014 03:17:06 +0000 (03:17 +0000)]
When pretty-printing a declaration of a pack, put the ellipsis before the name
being declared, not at the end. When pretty-printing a non-type template
parameter, put the name of the parameter in the middle of the type, not at the
end.
llvm-svn: 213718
Alexey Bataev [Wed, 23 Jul 2014 02:27:21 +0000 (02:27 +0000)]
[OPENMP] Initial parsing and sema analysis for 'read' clause in 'atomic' directive.
llvm-svn: 213717
Saleem Abdulrasool [Wed, 23 Jul 2014 01:53:54 +0000 (01:53 +0000)]
Plugins: silence a few more signed comparision warnings
Address a few signed-compare warnings that were triggered on GCC 4.8.2.
llvm-svn: 213716
Saleem Abdulrasool [Wed, 23 Jul 2014 01:53:52 +0000 (01:53 +0000)]
Target: silence a GCC warning
GCC emits a warning:
warning: enumeral and non-enumeral type in conditional expression [enabled by default]
which does not seem to have a flag to control it. Simply add an explicit cast
for the boolean value.
llvm-svn: 213715
Saleem Abdulrasool [Wed, 23 Jul 2014 01:32:32 +0000 (01:32 +0000)]
test: add an explicit target triple
Now that we support WoA, this test fails on ARM build bots as __va_start has a
different signature on different architectures.
llvm-svn: 213714
Rui Ueyama [Wed, 23 Jul 2014 00:57:57 +0000 (00:57 +0000)]
[PECOFF] Fix entry point functions selection
On Windows there are four "main" functions -- main, wmain, WinMain,
or wWinMain. Their parameter types are diffferent. The standard
library provides four different entry functions (i.e.
{w,}{WinMain,main}CRTStartup) for them. You need to use the right
entry routine for your "main" function.
If you give an /entry option, the specified name is used
unconditionally.
Otherwise, the linker needs to select the right one based on
user-supplied entry point function. This can be done after the
linker reads all the input files.
This patch moves the code to determine the entry point function
from the driver to a virtual input file. It also implements the
correct logic for the entry point function selection.
llvm-svn: 213713
Nick Kledzik [Wed, 23 Jul 2014 00:51:37 +0000 (00:51 +0000)]
[mach-o] add initial support for modes in arm code.
This patch just supports marking ranges that are thumb code (vs arm code).
Future patches will mark data and jump table ranges. The ranges are encoded
as References with offsetInAtom being the start of the range and the target
being the same atom.
llvm-svn: 213712
NAKAMURA Takumi [Wed, 23 Jul 2014 00:42:52 +0000 (00:42 +0000)]
Trailing whitespace.
llvm-svn: 213711
NAKAMURA Takumi [Wed, 23 Jul 2014 00:17:44 +0000 (00:17 +0000)]
RuntimeDyldMachOAArch64.h: Fix a warning. [-Wunused-variable]
llvm-svn: 213710
Richard Smith [Tue, 22 Jul 2014 23:56:53 +0000 (23:56 +0000)]
PR14615: add (passing) tests for this already-fixed bug
llvm-svn: 213709
Lang Hames [Tue, 22 Jul 2014 23:50:51 +0000 (23:50 +0000)]
[MCJIT] Make stub_addr functionality in RuntimeDyldChecker work in release mode.
There's no reason to restrict this particular piece of RuntimeDyldChecker
functionality to +Asserts builds.
This should fix failures in MachO_x86-64_PIC_relocations.s on release bots.
llvm-svn: 213708
Todd Fiala [Tue, 22 Jul 2014 23:41:36 +0000 (23:41 +0000)]
Enable lldb-platform exe support for Linux.
This change enables lldb-platform for Linux. In addition, it does the following:
* fixes Host::GetLLDBPath() to work on Linux/*BSD for ePathTypeSupportExecutableDir-relative paths.
* adds more logging and comments around lldb-platform startup and remote lldb-platform usage.
* refactors lldb-platform remote-* support for Darwin and Linux into PlatformPOSIX. This, in theory, is the bulk of what is needed for *BSD to make remote connections to lldb-platform as well (although I haven't tested that yet). FreeBSD can make similar changes to their Platform* as was made here for PlatformLinux to pick up the rest of the bits.
* teaches GDBRemoteCommunication to use lldb-gdbserver for non-Apple hosts.
llvm-svn: 213707
Lang Hames [Tue, 22 Jul 2014 23:17:21 +0000 (23:17 +0000)]
[MCJIT] Teach RuntimeDyldChecker to handle underscores at the start of symbols.
RuntimeDyldChecker had been testing isalpha(Expr[0]) to recognise symbol tokens,
and throwing unrecognized token errors when it hit symbols with leading
underscores. This fixes that.
llvm-svn: 213706
Juergen Ributzka [Tue, 22 Jul 2014 23:15:01 +0000 (23:15 +0000)]
XFAIL the test on MIPS
Not sure how to debug this one without a MIPS machine. Any takers?
llvm-svn: 213705
Juergen Ributzka [Tue, 22 Jul 2014 23:14:58 +0000 (23:14 +0000)]
[FastIsel][AArch64] Add support for the FastLowerCall and FastLowerIntrinsicCall target-hooks.
This commit modifies the existing call lowering functions to be used as the
FastLowerCall and FastLowerIntrinsicCall target-hooks instead.
This enables patchpoint intrinsic lowering for AArch64.
This fixes <rdar://problem/
17733076>
llvm-svn: 213704
Juergen Ributzka [Tue, 22 Jul 2014 23:14:54 +0000 (23:14 +0000)]
[AArch64] Use CHECK-LABEL in ARM64 ABI unit tests.
llvm-svn: 213703
Alexey Samsonov [Tue, 22 Jul 2014 23:10:13 +0000 (23:10 +0000)]
[Sanitizer] Disable Wframe-larger-than on PowerPC hosts
llvm-svn: 213702
Lang Hames [Tue, 22 Jul 2014 23:07:52 +0000 (23:07 +0000)]
[MCJIT] Improve stub_addr file-not-found diagnostic to help track down a
buildbot failure.
llvm-svn: 213701
Nick Kledzik [Tue, 22 Jul 2014 23:07:49 +0000 (23:07 +0000)]
[mach-o] add support for round tripping all arm/thumb relocations
Update the parse-arm-relocs.yaml test case to run the linker back to back
to ensure all relocations round trip in and out of mach-o.
llvm-svn: 213700
Rui Ueyama [Tue, 22 Jul 2014 22:55:06 +0000 (22:55 +0000)]
[PECOFF] Parameterize ResovalbeSymbols object.
So that it can be shared by multiple input files.
llvm-svn: 213699
Lang Hames [Tue, 22 Jul 2014 22:47:39 +0000 (22:47 +0000)]
[MCJIT] Refactor and add stub inspection to the RuntimeDyldChecker framework.
This patch introduces a 'stub_addr' builtin that can be used to find the address
of the stub for a given (<file>, <section>, <symbol>) tuple. This address can be
used both to verify the contents of stubs (by loading from the returned address)
and to verify references to stubs (by comparing against the returned address).
Example (1) - Verifying stub contents:
Load 8 bytes (assuming a 64-bit target) from the stub for 'x' in the __text
section of f.o, and compare that value against the addres of 'x'.
# rtdyld-check: *{8}(stub_addr(f.o, __text, x) = x
Example (2) - Verifying references to stubs:
Decode the immediate of the instruction at label 'l', and verify that it's
equal to the offset from the next instruction's PC to the stub for 'y' in the
__text section of f.o (i.e. it's the correct PC-rel difference).
# rtdyld-check: decode_operand(l, 4) = stub_addr(f.o, __text, y) - next_pc(l)
l:
movq y@GOTPCREL(%rip), %rax
Since stub inspection requires cooperation with RuntimeDyldImpl this patch
pimpl-ifies RuntimeDyldChecker. Its implementation is moved in to a new class,
RuntimeDyldCheckerImpl, that has access to the definition of RuntimeDyldImpl.
llvm-svn: 213698
Rui Ueyama [Tue, 22 Jul 2014 22:19:42 +0000 (22:19 +0000)]
[PECOFF] Remember /noentry option so that later passes can handle it.
This is a part of a larger change to move the entry point
processing to a later pass than the driver. On Windows the default
entry point function varies depending on user-provided functions.
That means the driver is not able to correctly know the entry point
function name. Only passes after the core linker can infer it.
llvm-svn: 213697
David Majnemer [Tue, 22 Jul 2014 22:12:58 +0000 (22:12 +0000)]
SBCommunication: Fix a pointer-to-function to void-pointer cast
reinterpret_cast may not convert a pointer-to-function to a
void-pointer. Take a detour through intptr_t and *then* convert to a
pointer-to-function.
This fixes a diagnostic emitted by GCC.
llvm-svn: 213696
David Majnemer [Tue, 22 Jul 2014 22:02:48 +0000 (22:02 +0000)]
ScriptInterpreterPython: %p should be used with void-pointer
printf's %p format specifier expects an argument of type void-pointer,
not type PyThreadState*. Fix this with a static_cast.
Differential Revision: http://reviews.llvm.org/D4632
llvm-svn: 213695
Juergen Ributzka [Tue, 22 Jul 2014 22:02:19 +0000 (22:02 +0000)]
Appease the buildbots.
llvm-svn: 213694
David Majnemer [Tue, 22 Jul 2014 22:00:42 +0000 (22:00 +0000)]
Host: Fix a pointer-to-function to void-pointer cast
reinterpret_cast may not convert a pointer-to-function to a
void-pointer. Take a detour through intptr_t and *then* convert to a
pointer-to-function.
This silences a warning emitted by GCC when building LLDB.
Differential Revision: http://reviews.llvm.org/D4631
llvm-svn: 213693
David Majnemer [Tue, 22 Jul 2014 22:00:04 +0000 (22:00 +0000)]
SBHostOS: Fix a pointer-to-function to void-pointer cast
reinterpret_cast may not convert a pointer-to-function to a
void-pointer. Take a detour through intptr_t and *then* convert to a
pointer-to-function.
This fixes a warning emitted by GCC.
Differential Revision: http://reviews.llvm.org/D4624
llvm-svn: 213692
David Majnemer [Tue, 22 Jul 2014 21:59:22 +0000 (21:59 +0000)]
PluginManager: Don't cast from void-pointer to pointer-to-function
GCC warns on reinterpret_cast expressions involving a void-pointer
source and a pointer-to-function destination. Take a detour through
intptr_t to silence it.
Differential Revision: http://reviews.llvm.org/D4626
llvm-svn: 213691
Simon Atanasyan [Tue, 22 Jul 2014 21:47:34 +0000 (21:47 +0000)]
[Mips] Replace assembler code by YAML to make the 'entry-name.test' test target
independent.
llvm-svn: 213690
Juergen Ributzka [Tue, 22 Jul 2014 21:42:55 +0000 (21:42 +0000)]
[RuntimeDyld][MachO][AArch64] Add a helper function for encoding addends in instructions.
Factor out the addend encoding into a helper function and simplify the
processRelocationRef.
Also add a few simple rtdyld tests. More tests to come once GOTs can be tested too.
Related to <rdar://problem/
17768539>
llvm-svn: 213689
Juergen Ributzka [Tue, 22 Jul 2014 21:42:51 +0000 (21:42 +0000)]
[RuntimeDyld][MachO][AArch64] Implement the decodeAddend method.
This adds the required functionality to decode the immediate encoded in an
instruction that is referenced in a relocation entry.
llvm-svn: 213688
Juergen Ributzka [Tue, 22 Jul 2014 21:42:49 +0000 (21:42 +0000)]
[RuntimeDyld][MachO][AArch64] Add assertion to check for duplicate addend definition.
In MachO for AArch64 it is possible to have an explicit addend defined by
the ARM64_RELOC_ADDEND relocation or having an addend encoded within the
instruction. Only one of them are allowed per relocation.
llvm-svn: 213687
Juergen Ributzka [Tue, 22 Jul 2014 21:42:46 +0000 (21:42 +0000)]
[RuntimeDyld] Change the return type of decodeAddend to match the storage type.
llvm-svn: 213686
Renato Golin [Tue, 22 Jul 2014 20:59:41 +0000 (20:59 +0000)]
Fix incompatible assembly in ARM builtins library
Convert the CBNZ backward branch instruction to CMP and BNE
avoiding illegal backwards branch and making the assembly code
in synh-ops.h to be UAL compliant.
Patch by: Sumanth Gundapaneni
llvm-svn: 213685
Renato Golin [Tue, 22 Jul 2014 20:59:38 +0000 (20:59 +0000)]
Include assembly files in builtins library build
The CMake assembler build system ignores the .S assembly files in builtins
library build. This patch fixes the issue.
Patch by: Sumanth Gundapaneni
llvm-svn: 213684
David Majnemer [Tue, 22 Jul 2014 20:40:01 +0000 (20:40 +0000)]
TypeSynthetic: Fix a pointer-to-function to void-pointer cast
reinterpret_cast may not convert a pointer-to-function to a
void-pointer. Take a detour through intptr_t and *then* convert to a
pointer-to-function.
Differential Revision: http://reviews.llvm.org/D4627
llvm-svn: 213682
David Majnemer [Tue, 22 Jul 2014 20:36:37 +0000 (20:36 +0000)]
Mangled: Fix an 'unused variable' warning on GNU/Linux
Platforms which don't use LLDB's built-in demangler don't use the
'mangled_length' variable. Instead, replace it's only use by an
expression it is equivalent to.
Differential Revision: http://reviews.llvm.org/D4625
llvm-svn: 213681
Ehsan Akhgari [Tue, 22 Jul 2014 20:20:14 +0000 (20:20 +0000)]
Use the correct from type in a SCS
Summary:
If during constructing a standard conversion sequence, we resolve an
overload, we need to adjust the from type in the SCS according to the
resolved operator.
I found this bug when debugging PR20218. This doesn't seem to be
observable, so there is no good way of testing it.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4402
llvm-svn: 213680
Suyog Sarda [Tue, 22 Jul 2014 19:19:36 +0000 (19:19 +0000)]
This patch implements optimization as mentioned in PR19753: Optimize comparisons with "ashr/lshr exact" of a constanst.
It handles the errors which were seen in PR19958 where wrong code was being emitted due to earlier patch.
Added code for lshr as well as non-exact right shifts.
It implements :
(icmp eq/ne (ashr/lshr const2, A), const1)" ->
(icmp eq/ne A, Log2(const2/const1)) ->
(icmp eq/ne A, Log2(const2) - Log2(const1))
Differential Revision: http://reviews.llvm.org/D4068
llvm-svn: 213678
Suyog Sarda [Tue, 22 Jul 2014 18:30:54 +0000 (18:30 +0000)]
Added InstCombine transform for pattern "(A & B) ^ (A ^ B) -> (A | B)"
Patch idea by Ankit Jain !
Differential Revision: http://reviews.llvm.org/D4618
llvm-svn: 213677
Suyog Sarda [Tue, 22 Jul 2014 18:09:41 +0000 (18:09 +0000)]
Added InstCombine Transform for patterns:
"((~A & B) | A) -> (A | B)" and "((A & B) | ~A) -> (~A | B)"
Original Patch credit to Ankit Jain !!
Differential Revision: http://reviews.llvm.org/D4591
llvm-svn: 213676
Dan Liew [Tue, 22 Jul 2014 18:09:17 +0000 (18:09 +0000)]
Revert "Treat warnings in Sphinx as errors. The reasons for doing this are..."
This reverts commit r213661.
Reverting at the request of Sean Silva.
llvm-svn: 213675
Dan Liew [Tue, 22 Jul 2014 17:48:51 +0000 (17:48 +0000)]
Add LLVM_TOOLS_BINARY_DIR variable to LLVMConfig.cmake so clients
of LLVM using CMake can easily find the tools directory.
LLVM_BUILD_TOOLS_BINARY_DIR was removed because it is now
superfluous.
llvm-svn: 213674
Alexey Samsonov [Tue, 22 Jul 2014 17:46:09 +0000 (17:46 +0000)]
[ASan] Fix comments about __sanitizer_cov function
llvm-svn: 213673
Dan Albert [Tue, 22 Jul 2014 17:32:56 +0000 (17:32 +0000)]
Fix classic_locale for Android.
Android's classic_locale begins at _ctype_ + 1.
llvm-svn: 213672
Kate Stone [Tue, 22 Jul 2014 17:03:38 +0000 (17:03 +0000)]
Dramatically improves C++ demangling performance by introducing a new implementation that is much faster than the existing demangler. While not yet complete, the new demangler will fail gracefully when it encounters symbols it isn’t prepared to deal with. In these cases LLDB will fall back to using the full demangler to prevent a loss in functionality. On sizable code bases the fast path succeeds 95% of the time, providing a significant net win.
The new implementation is located in source/Core/FastDemangle.cpp. It’s fairly straightforward C code with a few basic C++ extensions. It should compile with little or no change on a variety of platforms, but of course it is still only useful for symbols that comply with the Itanium ABI mangling spec (plus a few Clang extensions.)
<rdar://problem/
15397553> <rdar://problem/
15794867>
llvm-svn: 213671
Hal Finkel [Tue, 22 Jul 2014 16:58:55 +0000 (16:58 +0000)]
Make use of the align parameter attribute for all pointer arguments
We previously supported the align attribute on all (pointer) parameters, but we
only used it for byval parameters. However, it is completely consistent at the
IR level to treat 'align n' on all pointer parameters as an alignment
assumption on the pointer, and now we wll. Specifically, this causes
computeKnownBits to use the align attribute on all pointer parameters, not just
byval parameters. I've also added an explicit parameter attribute test for this
to test/Bitcode/attributes.ll.
And I've updated the LangRef to document the align parameter attribute (as it
turns out, it was not documented at all previously, although the byval
documentation mentioned that it could be used).
There are (at least) two benefits to doing this:
- It allows enhancing alignment based on the pointer alignment after inlining callees.
- It allows simplification of pointer arithmetic.
llvm-svn: 213670
Zachary Turner [Tue, 22 Jul 2014 16:19:29 +0000 (16:19 +0000)]
Make the test runner understand Windows command shell execution.
Currently, the test runner makes the assumption that it will run
commands through /bin/sh. This is obviously not true on Windows,
so this patch abstracts this logic out somewhat. Instead of
having the caller build the command string himself, the caller
will now pass in argument list of the form [[a, b], [c, d], ...]
which will get converted into a string of the form a b; c d or
a b && c d, depending on the platform.
Reviewed by: Todd Fiala
Differential Revision: http://reviews.llvm.org/D4590
llvm-svn: 213669
Timur Iskhodzhanov [Tue, 22 Jul 2014 16:09:11 +0000 (16:09 +0000)]
[ASan/Win tests] Bring back -GS- as SEH tests fail otherwise
llvm-svn: 213668
Timur Iskhodzhanov [Tue, 22 Jul 2014 15:53:10 +0000 (15:53 +0000)]
[ASan/Win tests] Don't generate debug info where it is not needed
Otherwise it results in flaky tests
llvm-svn: 213667
Tim Northover [Tue, 22 Jul 2014 15:47:09 +0000 (15:47 +0000)]
X86: drop relocations on __eh_frame sections globally.
Without this, we produce non-extern relocations when targeting older OS X
versions that ld64 can't cope with in the particular context of __eh_frame
sections (who'd want generic relocation-processing anyway?).
This means that an updated linker (ld64 from Xcode 3.2.6 or later) may be
needed when targeting such platforms with a modern version of LLVM, but this is
probably the case anyway and a reasonable requirement.
PR20212, rdar://problem/
17544795
llvm-svn: 213665
Dan Liew [Tue, 22 Jul 2014 15:41:33 +0000 (15:41 +0000)]
Export LLVM_ENABLE_RTTI and LLVM_ENABLE_EH in LLVMConfig.cmake so
clients of LLVM know if RTTI and/or EH were enabled in the build of
LLVM they are trying to link against.
llvm-svn: 213664
Dan Liew [Tue, 22 Jul 2014 15:41:18 +0000 (15:41 +0000)]
Added LLVM_ENABLE_RTTI and LLVM_ENABLE_EH options that allow RTTI and EH
to globally be controlled. Individual targets (e.g. ExceptionDemo) can
still override this by using LLVM_REQUIRE_RTTI and LLVM_REQUIRE_EH if
they need to be compiled with RTTI or exception handling respectively.
llvm-svn: 213663
Suyog Sarda [Tue, 22 Jul 2014 15:37:39 +0000 (15:37 +0000)]
This patch implements transform for pattern "(A | B) ^ (~A) -> (A | ~B)".
Patch Credit to Ankit Jain !!
Differential Revision: http://reviews.llvm.org/D4588
llvm-svn: 213662
Dan Liew [Tue, 22 Jul 2014 15:07:35 +0000 (15:07 +0000)]
Treat warnings in Sphinx as errors. The reasons for doing this are...
- When CMake builds the documentation with sphinx-build it treats
warnings as errors. We should be consistent with what we do in
CMake.
- Having warnings treated as errors will hopefully encourage
developers to write documentation correctly.
llvm-svn: 213661
Dan Liew [Tue, 22 Jul 2014 14:59:38 +0000 (14:59 +0000)]
Fix Sphinx warning.
llvm-svn: 213660
Robert Lytton [Tue, 22 Jul 2014 14:47:42 +0000 (14:47 +0000)]
remove hardcoded metadata numbers from tests
llvm-svn: 213659
Aaron Ballman [Tue, 22 Jul 2014 14:09:34 +0000 (14:09 +0000)]
Improve the checkUInt32Argument() helper function so that it diagnoses integer constants larger than 32-bits.
llvm-svn: 213658
Aaron Ballman [Tue, 22 Jul 2014 14:08:09 +0000 (14:08 +0000)]
Provide extra information in the "integer constant is too large" diagnostic. This will be used to improve other diagnostics.
llvm-svn: 213657
Timur Iskhodzhanov [Tue, 22 Jul 2014 14:02:53 +0000 (14:02 +0000)]
[ASan/Win] Add SEH handling to the DLL thunk as well
llvm-svn: 213656
Peter Zotov [Tue, 22 Jul 2014 13:55:20 +0000 (13:55 +0000)]
[OCaml] Don't truncate constants over 32 bits in Llvm.const_int.
llvm-svn: 213655
Timur Iskhodzhanov [Tue, 22 Jul 2014 13:44:18 +0000 (13:44 +0000)]
[ASan/Win] Handle SEH exceptions (best-effort, similar to longjmp)
llvm-svn: 213654
Sasa Stankovic [Tue, 22 Jul 2014 13:36:02 +0000 (13:36 +0000)]
[mips] Fix two patterns that select i32's (for MIPS32r6) / i64's (for MIPS64r6)
from setne comparison with an i32.
The patterns that are fixed:
* (select (i32 (setne i32, immZExt16)), i32, i32) (for MIPS32r6)
* (select (i32 (setne i32, immZExt16)), i64, i64) (for MIPS64r6)
llvm-svn: 213653
Aaron Ballman [Tue, 22 Jul 2014 13:13:31 +0000 (13:13 +0000)]
Adding a heading to the loop hint attributes so that attribute documentation can be generated again.
llvm-svn: 213652
Aaron Ballman [Tue, 22 Jul 2014 13:12:38 +0000 (13:12 +0000)]
Escaping an RST character to correct a Sphinx warning.
llvm-svn: 213651
Aaron Ballman [Tue, 22 Jul 2014 12:44:22 +0000 (12:44 +0000)]
Disallowing GNU-style attributes in new expressions, since they are prohibited by GCC as well.
llvm-svn: 213650
Timur Iskhodzhanov [Tue, 22 Jul 2014 12:37:51 +0000 (12:37 +0000)]
[ASan/Win] Add handling of C++ exceptions to the RTL
Also add a longjmp() test
llvm-svn: 213649
Alexey Bataev [Tue, 22 Jul 2014 12:35:18 +0000 (12:35 +0000)]
[OPENMP] Tests for nesting of regions for 'atomic' directive.
llvm-svn: 213648
Benjamin Kramer [Tue, 22 Jul 2014 12:30:35 +0000 (12:30 +0000)]
[clang-tidy] Add a check for RAII temporaries.
Summary:
This tries to find code similar that immediately destroys
an object that looks like it's trying to follow RAII.
{
scoped_lock(&global_mutex);
critical_section();
}
This checker will have false positives if someone uses this pattern
to legitimately invoke a destructor immediately (or the statement is
at the end of a scope anyway). To reduce the number we ignore this
pattern in macros (this is heavily used by gtest) and ignore objects
with no user-defined destructor.
Reviewers: alexfh, djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4615
llvm-svn: 213647
Timur Iskhodzhanov [Tue, 22 Jul 2014 12:25:51 +0000 (12:25 +0000)]
[ASan] Simplify exception/longjmp tests even further
llvm-svn: 213646
Elena Demikhovsky [Tue, 22 Jul 2014 12:08:25 +0000 (12:08 +0000)]
AVX-512: I added new headers to makefiles. It should resolve tests fail.
If it will not, I'm reverting the both commits.
llvm-svn: 213645
Deepak Panickal [Tue, 22 Jul 2014 12:01:43 +0000 (12:01 +0000)]
Fix an issue where an entry point of 0x00 would cause LLDB to think that the ELF is not executable without checking for ET_EXEC
llvm-svn: 213644
Deepak Panickal [Tue, 22 Jul 2014 11:59:11 +0000 (11:59 +0000)]
Fix the warnings introduced
llvm-svn: 213643
Timur Iskhodzhanov [Tue, 22 Jul 2014 11:46:24 +0000 (11:46 +0000)]
[ASan] Split throw_catch tests into two files: throw/catch + longjmp
Also add some more assertions into these tests
llvm-svn: 213642
Elena Demikhovsky [Tue, 22 Jul 2014 11:31:39 +0000 (11:31 +0000)]
AVX-512: Added intrinsics to clang.
The set is small, that what I have right now.
Everybody is welcome to add more.
llvm-svn: 213641
Elena Demikhovsky [Tue, 22 Jul 2014 11:07:31 +0000 (11:07 +0000)]
AVX-512: Fixed intrinsic of VSQRTPS/PD instructions.
I set number and types of parameters according to GCC intrinsics.
llvm-svn: 213640
Alexey Bataev [Tue, 22 Jul 2014 10:10:35 +0000 (10:10 +0000)]
[OPENMP] Initial parsing and sema analysis for 'atomic' directive.
llvm-svn: 213639
Alexey Bataev [Tue, 22 Jul 2014 06:45:04 +0000 (06:45 +0000)]
[OPENMP] Initial parsing and sema analysis for 'ordered' directive.
llvm-svn: 213616
David Majnemer [Tue, 22 Jul 2014 06:07:09 +0000 (06:07 +0000)]
Fix std::make_heap's worst case time complexity
std::make_heap is currently implemented by iteratively applying a
siftup-type algorithm. Since sift-up is O(ln n), this gives
std::make_heap a worst case time complexity of O(n ln n).
The C++ standard mandates that std::make_heap make no more than O(3n)
comparisons, this makes our std::make_heap out of spec.
Fix this by introducing an implementation of __sift_down and switch
std::make_heap to create the heap using it.
This gives std::make_heap linear time complexity in the worst case.
This fixes PR20161.
llvm-svn: 213615
Sanjay Patel [Tue, 22 Jul 2014 04:57:06 +0000 (04:57 +0000)]
fixed typo in comment
llvm-svn: 213614
Richard Trieu [Tue, 22 Jul 2014 04:42:15 +0000 (04:42 +0000)]
Fix '&' printing for template arguments in parentheses in template diffing.
llvm-svn: 213613
Chandler Carruth [Tue, 22 Jul 2014 04:07:55 +0000 (04:07 +0000)]
[SDAG] Refactor the code for inserting a newly allocated SDNode into the
DAG into a helper function.
This adds a trip through the (very minimal) verification logic in
a bunch of places that were missing it, but shouldn't have any other
impact outside of refactoring. I'm hoping to use this to do more clever
things when DAG nodes are inserted into the graph.
llvm-svn: 213612