Sean Callanan [Tue, 28 Oct 2014 20:23:20 +0000 (20:23 +0000)]
Added the ability to add attributes to inline
testcases. Also fixed one of the testcases to
not run on the platforms that don't support
Objective-C.
We want to do better with the Objective-C attribute
but we'll do that in a future commit.
llvm-svn: 220820
Fariborz Jahanian [Tue, 28 Oct 2014 20:21:33 +0000 (20:21 +0000)]
Objective-C remove an unused enumerator which causes
warning in a switch statement.
llvm-svn: 220819
Peter Zotov [Tue, 28 Oct 2014 19:47:02 +0000 (19:47 +0000)]
[OCaml] PR19859: Add functions to query and modify branches.
Patch by Gabriel Radanne <drupyog@zoho.com>.
llvm-svn: 220818
Peter Zotov [Tue, 28 Oct 2014 19:46:56 +0000 (19:46 +0000)]
[C API] PR19859: Add functions to query and modify branches.
Patch by Gabriel Radanne <drupyog@zoho.com>.
llvm-svn: 220817
Peter Zotov [Tue, 28 Oct 2014 19:46:52 +0000 (19:46 +0000)]
[OCaml] PR19859: Add tests for reading the values of numeric constants.
Patch by Gabriel Radanne <drupyog@zoho.com>.
llvm-svn: 220816
Peter Zotov [Tue, 28 Oct 2014 19:46:48 +0000 (19:46 +0000)]
[OCaml] PR19859: Add Llvm.{fcmp_predicate,float_of_const}.
Patch by Gabriel Radanne <drupyog@zoho.com>.
llvm-svn: 220815
Peter Zotov [Tue, 28 Oct 2014 19:46:44 +0000 (19:46 +0000)]
[C API] PR19859: Add LLVMGetFCmpPredicate and LLVMConstRealGetDouble.
Patch by Gabriel Radanne <drupyog@zoho.com>.
llvm-svn: 220814
Daniel Jasper [Tue, 28 Oct 2014 18:28:22 +0000 (18:28 +0000)]
clang-format: Improve && detection as binary operator.
Before:
template <class T,
class = typename ::std::enable_if<
::std::is_array<T>{}&& ::std::is_array<T>{}>::type>
void F();
After:
template <class T,
class = typename ::std::enable_if<
::std::is_array<T>{} && ::std::is_array<T>{}>::type>
void F();
llvm-svn: 220813
Fariborz Jahanian [Tue, 28 Oct 2014 18:28:16 +0000 (18:28 +0000)]
Objective-C. revert patch for rdar://
17554063.
llvm-svn: 220812
Saleem Abdulrasool [Tue, 28 Oct 2014 18:27:37 +0000 (18:27 +0000)]
Transforms: reapply SVN r219899
This restores the commit from SVN r219899 with an additional change to ensure
that the CodeGen is correct for the case that was identified as being incorrect
(originally PR7272).
In the case that during inlining we need to synthesize a value on the stack
(i.e. for passing a value byval), then any function involving that alloca must
be stripped of its tailness as the restriction that it does not access the
parent's stack no longer holds. Unfortunately, a single alloca can cause a
rippling effect through out the inlining as the value may be aliased or may be
mutated through an escaped external call. As such, we simply track if an alloca
has been introduced in the frame during inlining, and strip any tail calls.
llvm-svn: 220811
Enrico Granata [Tue, 28 Oct 2014 18:25:50 +0000 (18:25 +0000)]
When trying to get the element type of an array type, do not go to the canonical type, since that will strip typedefs where we want them to be preserved. Fixes rdar://
15453076
llvm-svn: 220810
Robert Khasanov [Tue, 28 Oct 2014 18:22:41 +0000 (18:22 +0000)]
[AVX512] Fix VSQRT packed instructions internal names.
No functional change
llvm-svn: 220808
Daniel Jasper [Tue, 28 Oct 2014 18:18:02 +0000 (18:18 +0000)]
clang-format: Fix test.
llvm-svn: 220807
Robert Khasanov [Tue, 28 Oct 2014 18:15:20 +0000 (18:15 +0000)]
[AVX512] Extended avx512_sqrt_packed (sqrt instructions) to VL subset.
Refactored through AVX512_maskable
llvm-svn: 220806
Daniel Jasper [Tue, 28 Oct 2014 18:11:52 +0000 (18:11 +0000)]
clang-format: Improve && detection as binary operators.
Before:
template <class T, class = typename std::enable_if<std::is_integral<
T>::value &&(sizeof(T) > 1 || sizeof(T) < 8)>::type>
void F();
After:
template <class T, class = typename std::enable_if<
std::is_integral<T>::value &&
(sizeof(T) > 1 || sizeof(T) < 8)>::type>
void F();
llvm-svn: 220805
Eric Fiselier [Tue, 28 Oct 2014 18:03:38 +0000 (18:03 +0000)]
Fix example in documentation of target triple sanitization.
llvm-svn: 220804
Fariborz Jahanian [Tue, 28 Oct 2014 17:32:36 +0000 (17:32 +0000)]
Actually remove this test entirely.
llvm-svn: 220803
Fariborz Jahanian [Tue, 28 Oct 2014 17:26:21 +0000 (17:26 +0000)]
[Objective-C]. revert r220740,r220727
llvm-svn: 220802
Daniel Jasper [Tue, 28 Oct 2014 17:06:04 +0000 (17:06 +0000)]
clang-format: Improve function declaration detection.
Before:
ReturnType MACRO
FunctionName() {}
After:
ReturnType MACRO
FunctionName() {}
This fixes llvm.org/PR21404.
I wonder what the motivation for that if-condition was. But as no test
breaks, ...
llvm-svn: 220801
Richard Smith [Tue, 28 Oct 2014 17:00:19 +0000 (17:00 +0000)]
PR17730: Add test that we don't crash on this testcase. (The bug is already fixed.)
llvm-svn: 220787
Daniel Jasper [Tue, 28 Oct 2014 16:56:37 +0000 (16:56 +0000)]
clang-format: Update generated documentation with new flag.
llvm-svn: 220786
Richard Smith [Tue, 28 Oct 2014 16:55:02 +0000 (16:55 +0000)]
PR21367: Don't accept rvalue references as an extension in C++98 mode if we're in a new-type-id or conversion-type-id, since those things can legitimately be followed by a binary && operator.
llvm-svn: 220785
Daniel Jasper [Tue, 28 Oct 2014 16:53:38 +0000 (16:53 +0000)]
clang-format: [ObjC] Add separate flag to control indentation in blocks
Apparently, people are very much divided on what the "correct"
indentation is. So, best to give them a choice.
The new flag is called ObjCBlockIndentWidth and the default is now set
to the same value as IndentWidth for the pre-defined styles.
llvm-svn: 220784
Robert Khasanov [Tue, 28 Oct 2014 16:37:13 +0000 (16:37 +0000)]
[AVX-512] Expanded rsqrt/rcp instructions to VL subset.
Refactored multiclass through AVX512_maskable
llvm-svn: 220783
Richard Smith [Tue, 28 Oct 2014 16:30:57 +0000 (16:30 +0000)]
Extend test to check that -D flags do not leak across module boundaries.
llvm-svn: 220782
Daniel Jasper [Tue, 28 Oct 2014 16:29:56 +0000 (16:29 +0000)]
clang-format: Fix test after recent flag change.
llvm-svn: 220781
Richard Smith [Tue, 28 Oct 2014 16:24:08 +0000 (16:24 +0000)]
[modules] Allow -I, -D, -W flags to change between building a module and
explicitly using the resulting .pcm file. Unlike for an implicit module build,
we don't need nor want to require these flags to match between the module
and its users.
llvm-svn: 220780
Robert Khasanov [Tue, 28 Oct 2014 16:17:14 +0000 (16:17 +0000)]
[AVX512] Removed special case for cmp instructions in getVectorMaskingNode. Now cmp intrinsics lower as other intrinsics through VSELECT, and then VSELECT tranforms to AND in PerformSELECTCombine.
No functional change.
llvm-svn: 220779
Daniel Jasper [Tue, 28 Oct 2014 16:15:52 +0000 (16:15 +0000)]
clang-format: Don't put functions on a single line in Google's Java
style.
llvm-svn: 220778
Robert Khasanov [Tue, 28 Oct 2014 15:59:40 +0000 (15:59 +0000)]
[x86] Simplify vector selection if condition value type matches vselect value type and true value is all ones or false value is all zeros.
This transformation worked if selector is produced by SETCC, however SETCC is needed only if we consider to swap operands. So I replaced SETCC check for this case.
Added tests for vselect of <X x i1> values.
llvm-svn: 220777
Samuel Benzaquen [Tue, 28 Oct 2014 13:33:58 +0000 (13:33 +0000)]
Add valueDecl() matcher.
Summary: Add valueDecl() matcher.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6005
llvm-svn: 220776
Aaron Ballman [Tue, 28 Oct 2014 13:12:13 +0000 (13:12 +0000)]
Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.
llvm-svn: 220775
Robert Khasanov [Tue, 28 Oct 2014 12:28:51 +0000 (12:28 +0000)]
[AVX512] Bring back vector-shuffle lowering support through broadcasts
Ffter commit at rev219046 512-bit broadcasts lowering become non-optimal. Most of tests on broadcasting and embedded broadcasting were changed and they doesn’t produce efficient code.
Example below is from commit changes (it’s the first test from test/CodeGen/X86/avx512-vbroadcast.ll):
define <16 x i32> @_inreg16xi32(i32 %a) {
; CHECK-LABEL: _inreg16xi32:
; CHECK: ## BB#0:
-; CHECK-NEXT: vpbroadcastd %edi, %zmm0
+; CHECK-NEXT: vmovd %edi, %xmm0
+; CHECK-NEXT: vpbroadcastd %xmm0, %ymm0
+; CHECK-NEXT: vinserti64x4 $1, %ymm0, %zmm0, %zmm0
; CHECK-NEXT: retq
%b = insertelement <16 x i32> undef, i32 %a, i32 0
%c = shufflevector <16 x i32> %b, <16 x i32> undef, <16 x i32> zeroinitializer
ret <16 x i32> %c
}
Here, 256-bit broadcast was generated instead of 512-bit one.
In this patch
1) I added vector-shuffle lowering through broadcasts
2) Removed asserts and branches likes because this is incorrect
- assert(Subtarget->hasDQI() && "We can only lower v8i64 with AVX-512-DQI");
3) Fixed lowering tests
llvm-svn: 220774
NAKAMURA Takumi [Tue, 28 Oct 2014 11:54:52 +0000 (11:54 +0000)]
Reformat partially, where I touched for whitespace changes.
llvm-svn: 220773
NAKAMURA Takumi [Tue, 28 Oct 2014 11:54:05 +0000 (11:54 +0000)]
LoopRerollPass.cpp: Use range-based loop. NFC.
llvm-svn: 220772
NAKAMURA Takumi [Tue, 28 Oct 2014 11:53:30 +0000 (11:53 +0000)]
Untabify and whitespace cleanups.
llvm-svn: 220771
NAKAMURA Takumi [Tue, 28 Oct 2014 11:34:29 +0000 (11:34 +0000)]
clang/test/Modules/explicit-build.cpp: Tweak to meet win32's backslash.
llvm-svn: 220770
Eric Fiselier [Tue, 28 Oct 2014 06:31:22 +0000 (06:31 +0000)]
[libcxx] Delay evaluation of __make_tuple_types to prevent blowing the max template instantiation depth. Fixes Bug #18345
Summary:
http://llvm.org/bugs/show_bug.cgi?id=18345
Tuple's constructor and assignment operators for "tuple-like" types evaluates __make_tuple_types unnecessarily. In the case of a large array this can blow the template instantiation depth.
Ex:
```
#include <array>
#include <tuple>
#include <memory>
typedef std::array<int, 1256> array_t;
typedef std::tuple<array_t> tuple_t;
int main() {
array_t a;
tuple_t t(a); // broken
t = a; // broken
// make_shared uses tuple behind the scenes. This bug breaks this code.
std::make_shared<array_t>(a);
}
```
To prevent this from happening we delay the instantiation of `__make_tuple_types` until after we perform the length check. Currently `__make_tuple_types` is instantiated at the same time that the length check .
Test Plan: Two tests have been added. One for the "tuple-like" constructors and another for the "tuple-like" assignment operator.
Reviewers: mclow.lists, EricWF
Reviewed By: EricWF
Subscribers: K-ballo, cfe-commits
Differential Revision: http://reviews.llvm.org/D4467
llvm-svn: 220769
Rui Ueyama [Tue, 28 Oct 2014 06:30:34 +0000 (06:30 +0000)]
Update compile target dependency.
test/elf/Mips/hilo16-*.test depends on llvm-mc, so we need to
make CMake to build that before running the tests.
llvm-svn: 220768
Peter Zotov [Tue, 28 Oct 2014 06:15:41 +0000 (06:15 +0000)]
[OCaml] Enable -g for debug builds.
We don't care about pre-3.12.1 anymore.
llvm-svn: 220767
Peter Zotov [Tue, 28 Oct 2014 06:15:18 +0000 (06:15 +0000)]
[OCaml] Fix whitespace.
llvm-svn: 220766
Richard Trieu [Tue, 28 Oct 2014 04:37:34 +0000 (04:37 +0000)]
Fix warning text: lower -> higher
llvm-svn: 220763
Jason Molenda [Tue, 28 Oct 2014 03:43:54 +0000 (03:43 +0000)]
Add breakpoint instruction byte sequences for arm to
PlatformLinux::GetSoftwareBreakpointTrapOpcode.
Patch by Stephane Sezer.
http://reviews.llvm.org/D5923
llvm-svn: 220762
Jason Molenda [Tue, 28 Oct 2014 03:15:33 +0000 (03:15 +0000)]
Clarify the launch style for debugserver to use.
<rdar://problem/
18786645>
llvm-svn: 220761
Saleem Abdulrasool [Tue, 28 Oct 2014 03:15:02 +0000 (03:15 +0000)]
Driver: remove a stray s that propagated in cross-windows
The option is '--allow-multiple-definition' not '--allow-multiple-definitions'.
llvm-svn: 220760
David Blaikie [Tue, 28 Oct 2014 02:57:26 +0000 (02:57 +0000)]
Minimize the scope of some variables, NFC.
llvm-svn: 220759
Reid Kleckner [Tue, 28 Oct 2014 01:29:26 +0000 (01:29 +0000)]
X86: Implement the vectorcall calling convention
This is a Microsoft calling convention that supports both x86 and x86_64
subtargets. It passes vector and floating point arguments in XMM0-XMM5,
and passes them indirectly once they are consumed.
Homogenous vector aggregates of up to four elements can be passed in
sequential vector registers, but this part is not implemented in LLVM
and will be handled in Clang.
On 32-bit x86, it is similar to fastcall in that it uses ecx:edx as
integer register parameters and is callee cleanup. On x86_64, it
delegates to the normal win64 calling convention.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D5943
llvm-svn: 220745
Tim Northover [Tue, 28 Oct 2014 01:24:32 +0000 (01:24 +0000)]
AArch64: enable Cortex-A57 FP balancing on Cortex-A53.
Benchmarks have shown that it's harmless to the performance there, and having a
unified set of passes between the two cores where possible helps big.LITTLE
deployment.
Patch by Z. Zheng.
llvm-svn: 220744
Jim Ingham [Tue, 28 Oct 2014 00:53:20 +0000 (00:53 +0000)]
Add a test for setting and hitting the C++ Exception throw breakpoint.
llvm-svn: 220743
Rafael Espindola [Tue, 28 Oct 2014 00:29:51 +0000 (00:29 +0000)]
Update for LLVM API change.
llvm-svn: 220742
Rafael Espindola [Tue, 28 Oct 2014 00:24:16 +0000 (00:24 +0000)]
Remove the PreserveSource linker mode.
I noticed that it was untested, and forcing it on caused some tests to fail:
LLVM :: Linker/metadata-a.ll
LLVM :: Linker/prefixdata.ll
LLVM :: Linker/type-unique-odr-a.ll
LLVM :: Linker/type-unique-simple-a.ll
LLVM :: Linker/type-unique-simple2-a.ll
LLVM :: Linker/type-unique-simple2.ll
LLVM :: Linker/type-unique-type-array-a.ll
LLVM :: Linker/unnamed-addr1-a.ll
LLVM :: Linker/visibility1.ll
If it is to be resurrected, it has to be fixed and we should probably have a
-preserve-source command line option in llvm-mc and run tests with and without
it.
llvm-svn: 220741
Fariborz Jahanian [Mon, 27 Oct 2014 23:41:04 +0000 (23:41 +0000)]
Improve on the diagnostic in my last patch and change warning
to error. rdar://
18768214.
llvm-svn: 220740
NAKAMURA Takumi [Mon, 27 Oct 2014 23:29:27 +0000 (23:29 +0000)]
AArch64InstrInfo.h: Fix a warning introduced in clang r220703. [-Winconsistent-missing-override]
llvm-svn: 220739
Richard Smith [Mon, 27 Oct 2014 23:25:15 +0000 (23:25 +0000)]
Remove unused variable.
llvm-svn: 220738
Adam Nemet [Mon, 27 Oct 2014 23:08:40 +0000 (23:08 +0000)]
[AVX512] Add vpermil variable version
This is implemented via a multiclass that derives from the vperm imm
multiclass.
Fixes <rdar://problem/
18426089>
llvm-svn: 220737
Adam Nemet [Mon, 27 Oct 2014 23:08:37 +0000 (23:08 +0000)]
[AVX512] Clean up avx512_perm_imm to use X86VectorVTInfo
No functionality change. No change in X86.td.expanded except that we only set
the CD8 attributes for the memory variants. (This shouldn't be used unless we
have a memory operand.)
llvm-svn: 220736
Adam Nemet [Mon, 27 Oct 2014 23:08:34 +0000 (23:08 +0000)]
[AVX512] Derive vpermil* from avx512_perm_imm
This used to derive from avx512_pshuf_imm which is confusing.
NFC. Compared X86.td.expanded.
llvm-svn: 220735
Adam Nemet [Mon, 27 Oct 2014 23:08:31 +0000 (23:08 +0000)]
[AVX512] Fix copy-and-paste bugs in vpermil
1) i512mem -> f512mem (this is the packed FP input being permuted)
2) element size is 64 bits in EVEX_CD8 for PD.
(A good illustration why X86VectorVTInfo is useful)
llvm-svn: 220734
Rafael Espindola [Mon, 27 Oct 2014 23:02:34 +0000 (23:02 +0000)]
Use the newer/simple API for passing a diagnostic handler to the IR linker.
llvm-svn: 220733
Rafael Espindola [Mon, 27 Oct 2014 23:02:10 +0000 (23:02 +0000)]
Make it easier to pass a custom diagnostic handler to the IR linker.
llvm-svn: 220732
Richard Smith [Mon, 27 Oct 2014 23:01:16 +0000 (23:01 +0000)]
[modules] Load .pcm files specified by -fmodule-file lazily.
llvm-svn: 220731
Tim Northover [Mon, 27 Oct 2014 22:48:35 +0000 (22:48 +0000)]
TMP: fix readN & writeN to not encourage UB
llvm-svn: 220730
Jonathan Roelofs [Mon, 27 Oct 2014 22:39:19 +0000 (22:39 +0000)]
Test that the single-threaded lit feature is available iff the corresponding guard is #defined
http://reviews.llvm.org/D6006
llvm-svn: 220729
Pete Cooper [Mon, 27 Oct 2014 22:38:45 +0000 (22:38 +0000)]
Fix a stackmap bug introduced in r220710.
For a call to not return in to the stackmap shadow, the shadow must end with the call.
To do this, we must insert any required nops *before* the call, and not after it.
llvm-svn: 220728
Fariborz Jahanian [Mon, 27 Oct 2014 22:33:06 +0000 (22:33 +0000)]
Objective-C ARC [qoi]. Issue diagnostic if __bridge casting
to C type a collection literal. rdar://
18768214
llvm-svn: 220727
David Majnemer [Mon, 27 Oct 2014 22:31:50 +0000 (22:31 +0000)]
Frontend: Don't include stdin in the dependency list for an object file
GCC doesn't do this and it semes weird to include a file that we can't
open.
This fixes PR21362.
llvm-svn: 220726
Hans Wennborg [Mon, 27 Oct 2014 22:28:50 +0000 (22:28 +0000)]
Try to appease the C++ gods
Looks like some builds were not happy with the potentially-throwing move
constructor that was added in r220723, and reached for the implicitly
deleted copy constructor instead.
llvm-svn: 220725
Eric Fiselier [Mon, 27 Oct 2014 22:14:25 +0000 (22:14 +0000)]
Add special case handling of linux target triples that do not contain `-gnu`.
For targets that end it `redhat-linux` and `suse-linux` manually add the `-gnu`
section of the target since `linux-gnu` is needed in the testsuite.
This patch also moves the removal of minor and patchlevel numbers from OSX
triples to be handled when deducing the triple instead of when adding available
features.
llvm-svn: 220724
Hans Wennborg [Mon, 27 Oct 2014 21:50:49 +0000 (21:50 +0000)]
Give TypoExprState a move constructor and assignment operator to appease MSVC build
llvm-svn: 220723
Eric Fiselier [Mon, 27 Oct 2014 21:38:23 +0000 (21:38 +0000)]
Add test to ensure including <atomic> fails when _LIBCPP_HAS_NO_THREADS is defined.
llvm-svn: 220722
Jingyue Wu [Mon, 27 Oct 2014 21:14:41 +0000 (21:14 +0000)]
[ScalarEvolution] Guard dump() with #if
to be consistent with its definition in ScalarEvolution.cpp
llvm-svn: 220721
Greg Clayton [Mon, 27 Oct 2014 21:14:34 +0000 (21:14 +0000)]
Make sure OTHER_CFLAGS and OTHER_LDFLAGS are inherited from the Xcode project so you can easily add to the flags of all targets.
llvm-svn: 220720
Samuel Benzaquen [Mon, 27 Oct 2014 20:58:44 +0000 (20:58 +0000)]
Fix segfault in hasDeclContext for nodes that have no decl context.
Summary:
Some declarations do not have a declaration context, like TranslationUnitDecl.
Fix hasDeclContext() to not segfault on these nodes.
Reviewers: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6003
llvm-svn: 220719
Enrico Granata [Mon, 27 Oct 2014 20:31:12 +0000 (20:31 +0000)]
This looks like the actual path under which the builder looks for LLDB headers, so use this path instead
llvm-svn: 220718
Rafael Espindola [Mon, 27 Oct 2014 20:30:04 +0000 (20:30 +0000)]
Fix bug where sys::Wait could wait on wrong pid.
Setting ChildPid to -1 would cause waitpid to wait for any child process.
Patch by Daniel Reynaud!
llvm-svn: 220717
Eric Fiselier [Mon, 27 Oct 2014 20:29:05 +0000 (20:29 +0000)]
[libcxx] use clang's __char16_t and __char32_t definitions on Linux in C++03 mode.
Summary: This fixes ODR violations in C++03 mode in test/localization/locale.stdcvt. The special case for linux was introduced in 2010 before clang always defined __char16_t and __char32_t.
Reviewers: mclow.lists, danalbert, jroelofs, EricWF
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5930
llvm-svn: 220716
Eric Fiselier [Mon, 27 Oct 2014 20:26:25 +0000 (20:26 +0000)]
Fix use of operator comma in is_permutation and delete comma operator for test iterators.
The comma operators in the test iterators give better error messages when they
are deleted as opposed to not defined. Delete these functions when possible.
llvm-svn: 220715
David Majnemer [Mon, 27 Oct 2014 20:02:19 +0000 (20:02 +0000)]
Frontend: Define __EXCEPTIONS if -fexceptions is passed
GCC defines __EXCEPTIONS, regardless of language mode, if -fexceptions
is passed. We should do the same.
This fixes PR21358.
llvm-svn: 220714
Juergen Ributzka [Mon, 27 Oct 2014 19:58:36 +0000 (19:58 +0000)]
[FastISel][AArch64] Emit immediate version of icmp (subs) for null pointer check.
This is a minor change to use the immediate version when the operand is a null
value. This should get rid of an unnecessary 'mov' instruction in debug
builds and align the code more with the one generated by SelectionDAG.
This fixes rdar://problem/
18785125.
llvm-svn: 220713
Juergen Ributzka [Mon, 27 Oct 2014 19:46:23 +0000 (19:46 +0000)]
[FastISel][AArch64] Optimize compare-and-branch for i1 to use 'tbz'.
Minor enhancement to use 'tbz' for i1 compare-and-branch to get rid of an 'and'
instruction.
This fixes rdar://problem/
18784953.
llvm-svn: 220712
Daniel Jasper [Mon, 27 Oct 2014 19:45:31 +0000 (19:45 +0000)]
Fix polly formatting after recent clang-format behavior change.
llvm-svn: 220711
Pete Cooper [Mon, 27 Oct 2014 19:40:35 +0000 (19:40 +0000)]
Stackmap shadows should consider call returns a branch target.
To avoid emitting too many nops, a stackmap shadow can include emitted instructions in the shadow, but these must not include branch targets.
A return from a call should count as a branch target as patching over the instructions after the call would lead to incorrect behaviour for threads currently making that call, when they return.
llvm-svn: 220710
Juergen Ributzka [Mon, 27 Oct 2014 19:38:05 +0000 (19:38 +0000)]
[FastISel][AArch64] Use 'cbz' also for null values (pointers).
The pattern matching for a 'ConstantInt' value was too restrictive. Checking for
a 'Constant' with a bull value is sufficient for using an 'cbz/cbnz' instruction.
This fixes rdar://problem/
18784732.
llvm-svn: 220709
Kostya Serebryany [Mon, 27 Oct 2014 19:34:10 +0000 (19:34 +0000)]
Do not insert asan paddings after fields that have flexible arrays.
Summary:
We should avoid a tail padding not only if the last field
has zero size but also if the last field is a struct with a flexible array.
If/when http://reviews.llvm.org/D5478 is committed,
this will also handle the case of structs with zero-sized arrays.
Reviewers: majnemer, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5924
llvm-svn: 220708
Eric Fiselier [Mon, 27 Oct 2014 19:29:32 +0000 (19:29 +0000)]
[libcxx] Remove use of uniform initialization from regex tests so that they compile in C++03.
Reviewers: danalbert, jroelofs, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5957
llvm-svn: 220707
Eric Fiselier [Mon, 27 Oct 2014 19:28:20 +0000 (19:28 +0000)]
[libcxx] Fix use of operator comma where the types can be user defined
Summary:
An evil user might overload operator comma. Use a void cast to make sure any user overload is not selected.
Modify all the test iterators to define operator comma.
Reviewers: danalbert, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5929
llvm-svn: 220706
Hafiz Abid Qadeer [Mon, 27 Oct 2014 19:27:00 +0000 (19:27 +0000)]
Stub out 'close' call on m_master_fd for Windows.
PseudoTerminal.cpp uses a dummy implementation of posix_openpt for Windows. This
implementation just returns 0. So m_master_fd is 0. But destructor calls 'close'
on m_master_fd. This 'close' calls seems un-necessary as m_master_fd was never
opened in first place and calling 'close' on 0 can have other un-intended
consequences.
I am committing it as obvious as it is only a one-liner. Long term, we may want
to refactor this class.
llvm-svn: 220705
Juergen Ributzka [Mon, 27 Oct 2014 19:16:48 +0000 (19:16 +0000)]
[FastISel][AArch64] Don't fold the 'and' instruction into the 'tbz/tbnz' instruction if it is in a different basic block.
This fixes a bug where the input register was not defined for the 'tbz/tbnz'
instruction. This happened, because we folded the 'and' instruction from a
different basic block.
This fixes rdar://problem/
18784013.
llvm-svn: 220704
Fariborz Jahanian [Mon, 27 Oct 2014 19:11:51 +0000 (19:11 +0000)]
c++11 patch to issue warning on missing 'override' on
overriding methods. Patch review by Richard Smith.
rdar://
18295240
llvm-svn: 220703
Marshall Clow [Mon, 27 Oct 2014 19:08:10 +0000 (19:08 +0000)]
PR #21321 talked about implementation-defined behavior of realloc. I poo-poohed it, and was wrong. Fix the call in <locale>. Review the others, refactored some duplicated code, and found overflow bugs (and __event_cap_ was never getting updated, either).
llvm-svn: 220702
Juergen Ributzka [Mon, 27 Oct 2014 18:21:58 +0000 (18:21 +0000)]
[FastISel][AArch64] Fix load/store with frame indices.
At higher optimization levels the LLVM IR may contain more complex patterns for
loads/stores from/to frame indices. The 'computeAddress' function wasn't able to
handle this and triggered an assertion.
This fix extends the possible addressing modes for frame indices.
This fixes rdar://problem/
18783298.
llvm-svn: 220700
Kostya Serebryany [Mon, 27 Oct 2014 18:13:56 +0000 (18:13 +0000)]
[asan] experimental tracing for indirect calls, llvm part.
llvm-svn: 220699
Kaelyn Takata [Mon, 27 Oct 2014 18:07:46 +0000 (18:07 +0000)]
Wire up LookupMemberExpr to use the new TypoExpr.
This includes adding the new TypoExpr-based lazy typo correction to
LookupMemberExprInRecord as an alternative to the existing eager typo
correction.
llvm-svn: 220698
Kaelyn Takata [Mon, 27 Oct 2014 18:07:42 +0000 (18:07 +0000)]
Add a callback for recovering using a typo correction.
Also keep track of the stack of Exprs visited during the tree transform
so the callback can be passed the parent of the TypoExpr.
llvm-svn: 220697
Kaelyn Takata [Mon, 27 Oct 2014 18:07:40 +0000 (18:07 +0000)]
Add simple way for a CorrectionCandidateCallback to reject exact
matches of the typo.
Also be more proactive about checking a correction's visibility so that
a correction requiring a module import can be distinguished from the
original typo even if it looks identical. Otherwise the correction will
be excluded and the diagnostic about needing the module import won't be
emitted.
Note that no change was made to checkCorrectionVisibility other than
moving where it is at in SemaLookup.cpp.
llvm-svn: 220696
Kaelyn Takata [Mon, 27 Oct 2014 18:07:37 +0000 (18:07 +0000)]
Start adding the infrastructure for handling TypoExprs.
Part of the infrastructure is a map from a TypoExpr to the Sema-specific
state needed to correct it, along with helpers to ease dealing with the
state.
The the typo count is propagated up the stack of
ExpressionEvaluationContextRecords when one is popped off of to
avoid accidentally dropping TypoExprs on the floor. For example,
the attempted correction of g() in test/CXX/class/class.mem/p5-0x.cpp
happens with an ExpressionEvaluationContextRecord that is popped off
the stack prior to ActOnFinishFullExpr being called and the tree
transform for TypoExprs being run.
llvm-svn: 220695
Kaelyn Takata [Mon, 27 Oct 2014 18:07:34 +0000 (18:07 +0000)]
Have TypoCorrectionConsumer remember the TypoCorrections it returned.
Two additional methods are provided: one to return the current
correction (the last correction returned by getNextCorrection), and one
to "reset" the state so that getNextCorrection will return the previous
corrections before returning any new corrections.
Also ensure that all TypoCorrections have valid source ranges.
llvm-svn: 220694
Kaelyn Takata [Mon, 27 Oct 2014 18:07:29 +0000 (18:07 +0000)]
Pass around CorrectionCandidateCallbacks as unique_ptrs so
TypoCorrectionConsumer can keep the callback around as long as needed.
llvm-svn: 220693
Kaelyn Takata [Mon, 27 Oct 2014 18:07:20 +0000 (18:07 +0000)]
Add the initial TypoExpr AST node for delayed typo correction.
llvm-svn: 220692
Kaelyn Takata [Mon, 27 Oct 2014 18:07:13 +0000 (18:07 +0000)]
Move TypoCorrectionConsumer into a header.
This makes it available outside of SemaLookup.cpp, as
needed for the forthcoming TypoExpr AST node which will
keep a TypoCorrectionConsumer that provides the possible
typo corrections for that TypoExpr.
llvm-svn: 220691