Davide Italiano [Thu, 5 Apr 2018 22:46:39 +0000 (22:46 +0000)]
[dotest] --skip-category should append and not override.
<rdar://problem/
38566150>
llvm-svn: 329358
Eugene Zelenko [Thu, 5 Apr 2018 22:15:42 +0000 (22:15 +0000)]
[Sema] Revert r329346 because of memory sanitizer failures.
llvm-svn: 329357
Zvi Rackover [Thu, 5 Apr 2018 21:57:20 +0000 (21:57 +0000)]
X86 Tests: Add a case for combining sdiv by a splatted pow2 negative. NFC.
Noticed test was missing while working on D42479.
llvm-svn: 329356
Lang Hames [Thu, 5 Apr 2018 21:56:55 +0000 (21:56 +0000)]
[RuntimeDyld][PowerPC] Add a test case for r329335.
Checks that calls to different sections go to the function's global entry point,
rather than the local one.
llvm-svn: 329355
Craig Topper [Thu, 5 Apr 2018 21:56:19 +0000 (21:56 +0000)]
[X86] Separate CDQ and CDQE in the scheduler model.
According to Agner's data, CDQE is closer to CWDE.
llvm-svn: 329354
Mandeep Singh Grang [Thu, 5 Apr 2018 21:52:24 +0000 (21:52 +0000)]
[IR] Change std::sort to llvm::sort in response to r327219
r327219 added wrappers to std::sort which randomly shuffle the container before
sorting. This will help in uncovering non-determinism caused due to undefined
sorting order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of
std::sort.
Note: This patch is one of a series of patches to replace *all* std::sort to
llvm::sort. Refer D44363 for a list of all the required patches.
llvm-svn: 329353
Richard Smith [Thu, 5 Apr 2018 21:49:20 +0000 (21:49 +0000)]
Add a couple more tests for DR372.
llvm-svn: 329352
Craig Topper [Thu, 5 Apr 2018 21:40:32 +0000 (21:40 +0000)]
[X86] Add MOVZPQILo2PQIrr to the Sandy Bridge scheduler model
llvm-svn: 329351
Sanjay Patel [Thu, 5 Apr 2018 21:37:17 +0000 (21:37 +0000)]
[InstCombine] nsz: -(X - Y) --> Y - X
This restores part of the fold that was removed with rL73243 (PR4374).
llvm-svn: 329350
Roman Lebedev [Thu, 5 Apr 2018 21:34:59 +0000 (21:34 +0000)]
[InstCombine][NFC] Regenerate select-of-bittest.ll with instnamer pass
As requested by spatel in https://reviews.llvm.org/D45329
llvm-svn: 329349
Roman Lebedev [Thu, 5 Apr 2018 21:34:53 +0000 (21:34 +0000)]
[InstCombine] [NFC] Add more tests for getting rid of select of bittest (D45108, PR36950 / PR17564)
Summary:
More tests for D45108:
* One use tests
* allow shift to be a variable, too
Reviewers: spatel, craig.topper
Reviewed By: spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45329
llvm-svn: 329348
Craig Topper [Thu, 5 Apr 2018 21:16:26 +0000 (21:16 +0000)]
[X86] Add LEAVE instruction to the scheduler models using the same data as LEAVE64. Make LEAVE/LEAVE64 more correct on Sandy Bridge.
This is the 32-bit mode version of LEAVE64. It should be at least somewhat similar to LEAVE64.
The Sandy Bridge version was missing a load port use.
llvm-svn: 329347
Eugene Zelenko [Thu, 5 Apr 2018 21:09:03 +0000 (21:09 +0000)]
[Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 329346
Wolfgang Pieb [Thu, 5 Apr 2018 21:01:49 +0000 (21:01 +0000)]
[DWARF v5][NFC]: Refactor DebugRnglists to prepare for the support of the DW_AT_ranges
attribute in conjunction with .debug_rnglists.
Reviewers: JDevlieghere
Differential Revision: https://reviews.llvm.org/D45307
llvm-svn: 329345
Simon Pilgrim [Thu, 5 Apr 2018 21:01:21 +0000 (21:01 +0000)]
[X86][SSE] Add floating point add/mul fast-math vector.reduce tests
Strict versions aren't working at all (PR36732) and the accumulators aren't supported (PR36734)
llvm-svn: 329344
Simon Pilgrim [Thu, 5 Apr 2018 20:54:55 +0000 (20:54 +0000)]
[X86][SSE] Add floating point min/max vector.reduce tests
llvm-svn: 329343
Richard Smith [Thu, 5 Apr 2018 20:52:58 +0000 (20:52 +0000)]
PR36992: do not store beyond the dsize of a class object unless we know
the tail padding is not reused.
We track on the AggValueSlot (and through a couple of other
initialization actions) whether we're dealing with an object that might
share its tail padding with some other object, so that we can avoid
emitting stores into the tail padding if that's the case. We still
widen stores into tail padding when we can do so.
Differential Revision: https://reviews.llvm.org/D45306
llvm-svn: 329342
Konstantin Zhuravlyov [Thu, 5 Apr 2018 20:46:04 +0000 (20:46 +0000)]
AMDGPU/Metadata: Always report a fixed number of hidden arguments
Currently it is 6. If the "feature" was not used, report dummy
hidden argument. Otherwise it does not match the kernarg size
reported in the kernel header.
Differential Revision: https://reviews.llvm.org/D45129
llvm-svn: 329341
Aaron Smith [Thu, 5 Apr 2018 20:27:50 +0000 (20:27 +0000)]
[cmake] Remove duplicate command line options from build
CMAKE_CXX_FLAGS and CMAKE_C_FLAGS are added twice to the command line.
This causes the command line options to be doubled which works until
it doesn't as not all options can be specified twice.
For example,
clang-cl foo.c /GS- /GS- -mllvm -small-loop-cost=1 -mllvm -small-loop-cost=1
clang (LLVM option parsing): for the -small-loop-cost option: may only occur zero or one times!
llvm-svn: 329340
Craig Topper [Thu, 5 Apr 2018 20:04:06 +0000 (20:04 +0000)]
[X86] Remove some InstRWs for plain store instructions on Sandy Bridge.
We were forcing the latency of these instructions to 5 cycles, but every other scheduler model had them as 1 cycle. I'm sure I didn't get everything, but this gets a big portion.
llvm-svn: 329339
Max Moroz [Thu, 5 Apr 2018 19:43:24 +0000 (19:43 +0000)]
[llvm-cov] Prevent llvm-cov from hanging when a symblink doesn't exist.
Summary:
Previous code hangs indefinitely when trying to iterate through a
symbol link file that points to an non-exist directory. This change
fixes the bug to make the addCollectedPath function exit ealier and
print out correct warning messages.
Patch by Yuke Liao (@liaoyuke).
Reviewers: Dor1s, vsk
Reviewed By: vsk
Subscribers: bruno, mgrang, llvm-commits
Differential Revision: https://reviews.llvm.org/D44960
llvm-svn: 329338
Rui Ueyama [Thu, 5 Apr 2018 19:37:48 +0000 (19:37 +0000)]
[WebAssembly] Remove StackPointerGlobal member variable from the driver.
Since InputGlobal makes a copy of a given object, we can use a temporary
object allocated on the stack here.
Differential Revision: https://reviews.llvm.org/D43924
llvm-svn: 329337
Rui Ueyama [Thu, 5 Apr 2018 19:37:31 +0000 (19:37 +0000)]
[WebAssembly] Remove another trivial accessor.
Differential Revision: https://reviews.llvm.org/D43725
llvm-svn: 329336
Lang Hames [Thu, 5 Apr 2018 19:37:05 +0000 (19:37 +0000)]
[RuntimeDyld][PowerPC] Use global entry points for calls between sections.
Functions in different objects may use different TOCs, so calls between such
functions should use the global entry point of the callee which updates the
TOC pointer.
This should fix a bug that the Numba developers encountered (see
https://github.com/numba/numba/issues/2451).
Patch by Olexa Bilaniuk. Thanks Olexa!
No RuntimeDyld checker test case yet as I am not familiar enough with how
RuntimeDyldELF fixes up call-sites, but I do not want to hold up landing
this. I will continue to work on it and see if I can rope some powerpc
experts in.
llvm-svn: 329335
Mandeep Singh Grang [Thu, 5 Apr 2018 19:27:04 +0000 (19:27 +0000)]
[Bitcode] Change std::sort to llvm::sort in response to r327219
Summary:
r327219 added wrappers to std::sort which randomly shuffle the container before sorting.
This will help in uncovering non-determinism caused due to undefined sorting
order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of std::sort.
Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort.
Refer the comments section in D44363 for a list of all the required patches.
Reviewers: pcc, mehdi_amini, dexonsmith
Reviewed By: dexonsmith
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45132
llvm-svn: 329334
Fangrui Song [Thu, 5 Apr 2018 19:20:33 +0000 (19:20 +0000)]
[ELF] Add CHECK to test/ELF/undef-start.s
llvm-svn: 329333
Richard Smith [Thu, 5 Apr 2018 18:55:37 +0000 (18:55 +0000)]
DR1672, DR1813, DR1881, DR2120: Implement recent fixes to "standard
layout" rules.
The new rules say that a standard-layout struct has its first non-static
data member and all base classes at offset 0, and consider a class to
not be standard-layout if that would result in multiple subobjects of a
single type having the same address.
We track "is C++11 standard-layout class" separately from "is
standard-layout class" so that the ABIs that need this information can
still use it.
Differential Revision: https://reviews.llvm.org/D45176
llvm-svn: 329332
Daniel Neilson [Thu, 5 Apr 2018 18:51:45 +0000 (18:51 +0000)]
[InstCombine] Properly change GEP type when reassociating loop invariant GEP chains
Summary:
This is a fix to PR37005.
Essentially, rL328539 ([InstCombine] reassociate loop invariant GEP chains to enable LICM) contains a bug
whereby it will convert:
%src = getelementptr inbounds i8, i8* %base, <2 x i64> %val
%res = getelementptr inbounds i8, <2 x i8*> %src, i64 %val2
into:
%src = getelementptr inbounds i8, i8* %base, i64 %val2
%res = getelementptr inbounds i8, <2 x i8*> %src, <2 x i64> %val
By swapping the index operands if the GEPs are in a loop, and %val is loop variant while %val2
is loop invariant.
This fix recreates new GEP instructions if the index operand swap would result in the type
of %src changing from vector to scalar, or vice versa.
Reviewers: sebpop, spatel
Reviewed By: sebpop
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45287
llvm-svn: 329331
Craig Topper [Thu, 5 Apr 2018 18:38:45 +0000 (18:38 +0000)]
[X86] Synchronize the SchedRW on some EVEX instructions with their VEX equivalents.
Mostly vector load, store, and move instructions.
llvm-svn: 329330
Mandeep Singh Grang [Thu, 5 Apr 2018 18:31:50 +0000 (18:31 +0000)]
[ARM] Change std::sort to llvm::sort in response to r327219
Summary:
r327219 added wrappers to std::sort which randomly shuffle the container before sorting.
This will help in uncovering non-determinism caused due to undefined sorting
order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of std::sort.
Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort.
Refer the comments section in D44363 for a list of all the required patches.
Reviewers: t.p.northover, RKSimon, MatzeB, bkramer
Reviewed By: bkramer
Subscribers: javed.absar, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D44855
llvm-svn: 329329
Michael Kruse [Thu, 5 Apr 2018 18:30:44 +0000 (18:30 +0000)]
Silence msvc warning on isl. NFC.
The warning is:
isl_union_map.c(2041): warning C4221: nonstandard extension used: 'filter_user': cannot be initialized using address of automatic variable 'data'
for the following code (and others)
struct isl_un_op_drop_user_data data = { &isl_set_is_wrapping };
struct isl_un_op_control control = {
.filter = &un_op_filter_drop_user,
.filter_user = &data,
.fn_map = &isl_set_wrapped_domain_map,
};
llvm-svn: 329328
Craig Topper [Thu, 5 Apr 2018 18:20:14 +0000 (18:20 +0000)]
[X86] Disassembler support for having an ADSIZE prefix affect instructions with 0xf2 and 0xf3 prefixes.
Needed to support umonitor from D45253.
llvm-svn: 329327
Zachary Turner [Thu, 5 Apr 2018 18:18:12 +0000 (18:18 +0000)]
[llvm-pdbutil] Display types from MSVC precompiled header object files.
These appear in a .debug$P section, which is exactly the same in
format as a .debug$T section. So we shouldn't ignore these when
dumping types.
llvm-svn: 329326
Konstantin Zhuravlyov [Thu, 5 Apr 2018 18:16:02 +0000 (18:16 +0000)]
llvm-exegesis: Fix unittests include dirs when llvm is a part of another project
When llvm is a part of another project (i.e. opencl),
CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR are pointing to
the parent project, which lead to build failures.
Differential Revision: https://reviews.llvm.org/D45328
llvm-svn: 329325
Alex Lorenz [Thu, 5 Apr 2018 18:12:06 +0000 (18:12 +0000)]
Remove the temporary availability checking workaround for
the nested declarations in @interface.
rdar://
28825862
llvm-svn: 329324
Sam Clegg [Thu, 5 Apr 2018 17:44:08 +0000 (17:44 +0000)]
Fix typo in comment -fmath-errno=0 -> -fno-math-errno
The former is not a valid clang argument
Differential Revision: https://reviews.llvm.org/D45102
llvm-svn: 329323
Sanjay Patel [Thu, 5 Apr 2018 17:40:51 +0000 (17:40 +0000)]
[InstCombine] add test for fneg+fsub with nsz; NFC
There used to be a fold that would handle this case more generally,
but it was removed at rL73243 to fix PR4374:
https://bugs.llvm.org/show_bug.cgi?id=4374
llvm-svn: 329322
Simon Pilgrim [Thu, 5 Apr 2018 17:37:35 +0000 (17:37 +0000)]
[X86][SSE] Add integer add/mul vector.reduce tests
llvm-svn: 329321
Simon Pilgrim [Thu, 5 Apr 2018 17:29:51 +0000 (17:29 +0000)]
[X86][SSE] Add integer and/or/xor vector.reduce tests
llvm-svn: 329320
Simon Pilgrim [Thu, 5 Apr 2018 17:25:40 +0000 (17:25 +0000)]
[X86][SSE] Add integer min/max vector.reduce tests
llvm-svn: 329319
Philip Pfaffe [Thu, 5 Apr 2018 17:20:45 +0000 (17:20 +0000)]
Another fix for r329293: Unbreak the windows bots
Only build the unittest if plugins are enabled. Link components into the
TestPlugin on windows and cygwin.
llvm-svn: 329318
Rui Ueyama [Thu, 5 Apr 2018 17:20:18 +0000 (17:20 +0000)]
Make "Size" column in the map file one characters shorter.
Previously, "size" column is 9 characters long which is too long
at least for 32-bit (because at maximum it needs 8 columns). This
patch make it one column shorter than before. That's also a reasonable
default for 64-bit.
llvm-svn: 329317
Sanjay Patel [Thu, 5 Apr 2018 17:06:45 +0000 (17:06 +0000)]
[InstCombine] use pattern matchers for fsub --> fadd folds
This allows folding for vectors with undef elements.
llvm-svn: 329316
Sam Clegg [Thu, 5 Apr 2018 17:01:39 +0000 (17:01 +0000)]
[WebAssembly] Allow for the creation of user-defined custom sections
This patch adds a way for users to create their own custom sections to
be added to wasm files. At the LLVM IR layer, they are defined through
the "wasm.custom_sections" named metadata. The expected use case for
this is bindings generators such as wasm-bindgen.
Patch by Dan Gohman
Differential Revision: https://reviews.llvm.org/D45297
llvm-svn: 329315
Pavel Labath [Thu, 5 Apr 2018 16:59:36 +0000 (16:59 +0000)]
One more windows build fix
llvm-svn: 329314
Sanjay Patel [Thu, 5 Apr 2018 16:51:09 +0000 (16:51 +0000)]
[InstCombine] add tests for fsub --> fadd; NFC
llvm-svn: 329313
Rui Ueyama [Thu, 5 Apr 2018 16:45:37 +0000 (16:45 +0000)]
Fix column size in the map file.
Size can be narrow, but LMA should be the same width as VMA.
llvm-svn: 329312
Andrea Di Biagio [Thu, 5 Apr 2018 16:42:32 +0000 (16:42 +0000)]
[documentation][llvm-mca] Update the documentation.
Scheduling models can now describe processor register files and retire control
units. This updates the existing documentation and the README file.
llvm-svn: 329311
Craig Topper [Thu, 5 Apr 2018 16:32:48 +0000 (16:32 +0000)]
[X86] Use WriteFShuffle256 for VEXTRACTF128 to be consistent with VEXTRACTI128 which uses WriteShuffle256.
llvm-svn: 329310
Pavel Labath [Thu, 5 Apr 2018 16:23:54 +0000 (16:23 +0000)]
Fix windows build after r329296
Add a couple of #include <csignal>s.
llvm-svn: 329309
Philip Pfaffe [Thu, 5 Apr 2018 15:58:27 +0000 (15:58 +0000)]
Fix r329293: Add a missing CMake dependency
The unittest plugin indirectly includes Attributes.gen, so make sure its
target depends on the appropriate tablegen target.
llvm-svn: 329308
Rafael Espindola [Thu, 5 Apr 2018 15:56:04 +0000 (15:56 +0000)]
Initialize OutputOff to zero.
We have a dedicated Live bit, so we don't need a special value and we
were not accounting for in at least one place.
llvm-svn: 329307
Andrea Di Biagio [Thu, 5 Apr 2018 15:53:31 +0000 (15:53 +0000)]
Fix the buildbots after r329304.
llvm-svn: 329306
Greg Clayton [Thu, 5 Apr 2018 15:52:39 +0000 (15:52 +0000)]
Cleanup DWARFCompileUnit and DWARFUnit in preparation for adding DWARFTypeUnit
Many things that were in DWARFCompileUnit actually need to be in DWARFUnit. This patch moves all DWARFUnit specific things over into DWARFUnit and fixes the layering. This is in preparation for adding DWARFTypeUnit for the .debug_types patch.
Differential Revision: https://reviews.llvm.org/D45170
llvm-svn: 329305
Andrea Di Biagio [Thu, 5 Apr 2018 15:41:41 +0000 (15:41 +0000)]
[MC][Tablegen] Allow models to describe the retire control unit for llvm-mca.
This patch adds the ability to describe properties of the hardware retire
control unit.
Tablegen class RetireControlUnit has been added for this purpose (see
TargetSchedule.td).
A RetireControlUnit specifies the size of the reorder buffer, as well as the
maximum number of opcodes that can be retired every cycle.
A zero (or negative) value for the reorder buffer size means: "the size is
unknown". If the size is unknown, then llvm-mca defaults it to the value of
field SchedMachineModel::MicroOpBufferSize. A zero or negative number of
opcodes retired per cycle means: "there is no restriction on the number of
instructions that can be retired every cycle".
Models can optionally specify an instance of RetireControlUnit. There can only
be up-to one RetireControlUnit definition per scheduling model.
Information related to the RCU (RetireControlUnit) is stored in (two new fields
of) MCExtraProcessorInfo. llvm-mca loads that information when it initializes
the DispatchUnit / RetireControlUnit (see Dispatch.h/Dispatch.cpp).
This patch fixes PR36661.
Differential Revision: https://reviews.llvm.org/D45259
llvm-svn: 329304
Sanjay Patel [Thu, 5 Apr 2018 15:36:55 +0000 (15:36 +0000)]
[PatternMatch] define m_FNeg using m_FSub
Using cstfp_pred_ty in the definition allows us to match vectors with undef elements.
This replicates the change for m_Not from D44076 / rL326823 and continues
towards making all pattern matchers allow undef elements in vectors.
llvm-svn: 329303
Michael Kruse [Thu, 5 Apr 2018 15:32:06 +0000 (15:32 +0000)]
Remove namespace comment at end of class. NFC.
The
}; // namespace polly
comment was put at the closing brace of the FunctionToScopPassAdaptor class.
Since no namespace ends here, the comment is misplaced.
Reported-by: Lukas Böhm <lukas.boehm93@gmail.com>
llvm-svn: 329302
Aleksei Sidorin [Thu, 5 Apr 2018 15:31:49 +0000 (15:31 +0000)]
[ASTImporter] Fix for importing unnamed structs
Patch by Peter Szecsi!
Differential Revision: https://reviews.llvm.org/D30876
llvm-svn: 329301
Manoj Gupta [Thu, 5 Apr 2018 15:29:52 +0000 (15:29 +0000)]
Disable -fmerge-all-constants as default.
Summary:
"-fmerge-all-constants" is a non-conforming optimization and should not
be the default. It is also causing miscompiles when building Linux
Kernel (https://lkml.org/lkml/2018/3/20/872).
Fixes PR18538.
Reviewers: rjmccall, rsmith, chandlerc
Reviewed By: rsmith, chandlerc
Subscribers: srhines, cfe-commits
Differential Revision: https://reviews.llvm.org/D45289
llvm-svn: 329300
Hiroshi Inoue [Thu, 5 Apr 2018 15:27:06 +0000 (15:27 +0000)]
[PowerPC] fix assertion failure due to missing instruction in P9InstrResources.td
This patch adds L(W|H|B)ZXTLS_32 instructions introduced by https://reviews.llvm.org/rL327635 in P9InstrResources.td.
llvm-svn: 329299
Ben Hamilton [Thu, 5 Apr 2018 15:26:25 +0000 (15:26 +0000)]
[clang-format] Support lightweight Objective-C generics
Summary:
Previously, `clang-format` didn't understand lightweight
Objective-C generics, which have the form:
```
@interface Foo <KeyType,
ValueTypeWithConstraint : Foo,
AnotherValueTypeWithGenericConstraint: Bar<Baz>, ... > ...
```
The lightweight generic specifier list appears before the base
class, if present, but because it starts with < like the protocol
specifier list, `UnwrappedLineParser` was getting confused and
failed to parse interfaces with both generics and protocol lists:
```
@interface Foo <KeyType> : NSObject <NSCopying>
```
Since the parsed line would be incomplete, the format result
would be very confused (e.g., https://bugs.llvm.org/show_bug.cgi?id=24381).
This fixes the issue by explicitly parsing the ObjC lightweight
generic conformance list, so the line is fully parsed.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=24381
Test Plan: New tests added. Ran tests with:
% make -j16 FormatTests && ./tools/clang/unittests/Format/FormatTests
Reviewers: djasper, jolesiak
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D45185
llvm-svn: 329298
Ben Hamilton [Thu, 5 Apr 2018 15:26:23 +0000 (15:26 +0000)]
[clang-format] Ensure ObjC selectors with 0 args are annotated correctly
Summary:
Previously, clang-format would incorrectly annotate 0-argument
Objective-C selector names as TT_TrailingAnnotation:
```
% echo "-(void)foo;" > /tmp/test.m
% ./bin/clang-format -debug /tmp/test.m
Language: Objective-C
----
Line(0, FSC=0): minus[T=68, OC=0] l_paren[T=68, OC=1] void[T=68, OC=2]
r_paren[T=68, OC=6] identifier[T=68, OC=7] semi[T=68, OC=10]
Line(0, FSC=0): eof[T=68, OC=0]
Run 0...
AnnotatedTokens(L=0):
M=0 C=0 T=ObjCMethodSpecifier S=1 B=0 BK=0 P=0 Name=minus L=1 PPK=2
FakeLParens= FakeRParens=0 Text='-'
M=0 C=1 T=Unknown S=1 B=0 BK=0 P=33 Name=l_paren L=3 PPK=2
FakeLParens= FakeRParens=0 Text='('
M=0 C=1 T=Unknown S=0 B=0 BK=0 P=140 Name=void L=7 PPK=2 FakeLParens=
FakeRParens=0 Text='void'
M=0 C=0 T=CastRParen S=0 B=0 BK=0 P=43 Name=r_paren L=8 PPK=2
FakeLParens= FakeRParens=0 Text=')'
M=0 C=1 T=TrailingAnnotation S=0 B=0 BK=0 P=120 Name=identifier L=11
PPK=2 FakeLParens= FakeRParens=0 Text='foo'
M=0 C=0 T=Unknown S=0 B=0 BK=0 P=23 Name=semi L=12 PPK=2 FakeLParens=
FakeRParens=0 Text=';'
```
This caused us to incorrectly indent 0-argument wrapped selectors
when Style.IndentWrappedFunctionNames was false, as we thought
the 0-argument ObjC selector name was actually a trailing
annotation (which is always indented).
This diff fixes the issue and adds tests.
Test Plan: New tests added. Confirmed tests failed before diff.
After diff, tests passed. Ran tests with:
% make -j12 FormatTests &&
./tools/clang/unittests/Format/FormatTests
Reviewers: djasper, jolesiak
Reviewed By: djasper, jolesiak
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D44996
llvm-svn: 329297
Pavel Labath [Thu, 5 Apr 2018 15:17:51 +0000 (15:17 +0000)]
Remove unused NativeProcessProtocol.h include from Platform.h
After removing it, I got a couple of compile errors because we were
missing some symbols (SIGKILL and such), as their definitions were not
transitively included anymore. I fix this by including csignal from
PosixApi.h, as it's windows version provides a stub definitions of these
symbols. This should make the result of #including PosixApi.h more
consistent across platforms (although in the long run, we should just
get rid of this header).
llvm-svn: 329296
Pavel Labath [Thu, 5 Apr 2018 15:17:43 +0000 (15:17 +0000)]
Fix error in QEnableErrorStrings gdb-remote docs
this probably happened because we changed the name of the packet
mid-review.
llvm-svn: 329295
Sanjay Patel [Thu, 5 Apr 2018 15:07:35 +0000 (15:07 +0000)]
[InstCombine] add vector and vector undef tests for FP folds; NFC
llvm-svn: 329294
Philip Pfaffe [Thu, 5 Apr 2018 15:04:13 +0000 (15:04 +0000)]
Re-land r329273: [Plugins] Add a slim plugin API to work together with the new PM
Fix unittest: Do not link LLVM into the test plugin.
Additionally, remove an unrelated change that slipped in in r329273.
llvm-svn: 329293
Benjamin Kramer [Thu, 5 Apr 2018 14:51:01 +0000 (14:51 +0000)]
[clang-tidy] Remove google-runtime-member-string-references
This is triggering on a pattern that's both too broad (const
std::string& members can be used safely) and too narrow (std::string is
not the only class with this problem). It has a very low true positive
rate, just remove it until we find a better solution for dangling string
references.
llvm-svn: 329292
Jan Vesely [Thu, 5 Apr 2018 14:47:57 +0000 (14:47 +0000)]
r600: Update datalayout after LLVM r328656
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 329291
Jan Vesely [Thu, 5 Apr 2018 14:47:44 +0000 (14:47 +0000)]
amdgcn: Update datalayout after LLVM r328656
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 329290
Akira Hatanaka [Thu, 5 Apr 2018 14:39:57 +0000 (14:39 +0000)]
[ObjC] Make C++ triviality type traits available to non-trivial C
structs.
r326307 and r327870 made changes that allowed using non-trivial C
structs with fields qualified with __strong or __weak. This commit makes
the following C++ triviality type traits available to non-trivial C
structs:
__has_trivial_assign
__has_trivial_move_assign
__has_trivial_copy
__has_trivial_move_constructor
__has_trivial_constructor
__has_trivial_destructor
This reapplies r328680. This commit fixes a bug where the copy/move
__has_trivial_* traits would return false when a volatile type was being
passed. Thanks to Richard Smith for pointing out the mistake.
rdar://problem/
33599681
Differential Revision: https://reviews.llvm.org/D44913
llvm-svn: 329289
Pavel Labath [Thu, 5 Apr 2018 14:32:10 +0000 (14:32 +0000)]
[Testing/Support]: Better matching of Error failure states
Summary:
The existing Failed() matcher only allowed asserting that the operation
failed, but it was not possible to verify any details of the returned
error.
This patch adds two new matchers, which make this possible:
- Failed<InfoT>() verifies that the operation failed with a single error
of a given type.
- Failed<InfoT>(M) additionally check that the contained error info
object is matched by the nested matcher M.
To make these work, I've changed the implementation of the ErrorHolder
class. Now, instead of just storing the string representation of the
Error, it fetches the ErrorInfo objects and stores then as a list of
shared pointers. This way, ErrorHolder remains copyable, while still
retaining the full information contained in the Error object.
In case the Error object contains two or more errors, the new matchers
will fail to match, instead of trying to match all (or any) of the
individual ErrorInfo objects. This seemed to be the most sensible
behavior for when one wants to match exact error details, but I could be
convinced otherwise...
Reviewers: zturner, lhames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44925
llvm-svn: 329288
Tim Northover [Thu, 5 Apr 2018 14:26:06 +0000 (14:26 +0000)]
ARM: Do not spill CSR to stack on entry to noreturn functions
A noreturn nounwind function can be expected to never return in any way, and by
never returning it will also never have to restore any callee-saved registers
for its caller. This makes it possible to skip spills of those registers during
function entry, saving some stack space and time in the process. This is rather
useful for embedded targets with limited stack space.
Should fix PR9970.
Patch by myeisha (pmb).
llvm-svn: 329287
Krzysztof Parzyszek [Thu, 5 Apr 2018 14:25:52 +0000 (14:25 +0000)]
[Hexagon] Remove default values from lambda parameters
llvm-svn: 329286
Brian Gesiak [Thu, 5 Apr 2018 14:08:16 +0000 (14:08 +0000)]
[Lexicon] Add "ICE", internal compiler error
Test Plan:
1. `ninja docs-llvm-html`
2. Confirm that the rendered docs HTML contains the new "ICE" entry
llvm-svn: 329285
Andrea Di Biagio [Thu, 5 Apr 2018 13:59:52 +0000 (13:59 +0000)]
[MC] Fix spaces between values printed by EmitRegisterFileInfo.
llvm-svn: 329284
Sam Parker [Thu, 5 Apr 2018 13:46:17 +0000 (13:46 +0000)]
[DAGCombine] Revert r329160
Again, broke the big endian stage 2 builders.
llvm-svn: 329283
Sanjay Patel [Thu, 5 Apr 2018 13:24:26 +0000 (13:24 +0000)]
[InstCombine] cleanup; NFC
llvm-svn: 329282
Eugene Leviant [Thu, 5 Apr 2018 13:23:59 +0000 (13:23 +0000)]
[ELF] Don't add NOLOAD sections to segment
Differential revision: https://reviews.llvm.org/D45264
llvm-svn: 329281
Simon Pilgrim [Thu, 5 Apr 2018 13:11:36 +0000 (13:11 +0000)]
[SchedModel] Complete models shouldn't match against itineraries when they don't use them (PR35639)
For schedule models that don't use itineraries, checkCompleteness still checks that an instruction has a matching itinerary instead of skipping and going straight to matching the InstRWs. That doesn't seem to match what happens in TargetSchedule.cpp
This patch causes problems for a number of models that had been incorrectly flagged as complete.
Differential Revision: https://reviews.llvm.org/D43235
llvm-svn: 329280
Florian Hahn [Thu, 5 Apr 2018 13:07:39 +0000 (13:07 +0000)]
[LoopInterchange] Require asserts for test using -stats (NFC)
This fixes a buildbot failure.
llvm-svn: 329279
Shiva Chen [Thu, 5 Apr 2018 12:54:00 +0000 (12:54 +0000)]
[PATCH] [RISCV] Extend getTargetDefines for RISCVTargetInfo
Summary:
This patch extend getTargetDefines and implement handleTargetFeatures
and hasFeature. and define corresponding marco for those features.
Reviewers: asb, apazos, eli.friedman
Differential Revision: https://reviews.llvm.org/D44727
Patch by Kito Cheng.
llvm-svn: 329278
Alexander Kornienko [Thu, 5 Apr 2018 12:48:22 +0000 (12:48 +0000)]
Minor fix in docs.
llvm-svn: 329277
Philip Pfaffe [Thu, 5 Apr 2018 12:42:12 +0000 (12:42 +0000)]
Revert "[Plugins] Add a slim plugin API to work together with the new PM"
This reverts commit
ecf3ba1ab45edb1b0fadce716a7facf50dca4fbb/r329273.
llvm-svn: 329276
George Rimar [Thu, 5 Apr 2018 12:07:20 +0000 (12:07 +0000)]
[ELF] - Eliminate Target::isPicRel method.
As was mentioned in comments for D45158,
isPicRel's name does not make much sense,
because what this method does is checks if
we need to create the dynamic relocation or not.
Instead of renaming it to something different,
we can 'isPicRel' completely.
We can reuse the getDynRel method.
They are logically very close, getDynRel can just return
R_*_NONE in case no dynamic relocation should be produced
and that would simplify things and avoid functionality
correlation/duplication with 'isPicRel'.
The patch does this change.
Differential revision: https://reviews.llvm.org/D45248
llvm-svn: 329275
Andrea Di Biagio [Thu, 5 Apr 2018 11:36:50 +0000 (11:36 +0000)]
[llvm-mca] Remove flag -max-retire-per-cycle, and update the docs.
This is done in preparation for D45259.
With D45259, models can specify the size of the reorder buffer, and the retire
throughput directly via tablegen.
llvm-svn: 329274
Philip Pfaffe [Thu, 5 Apr 2018 11:29:37 +0000 (11:29 +0000)]
[Plugins] Add a slim plugin API to work together with the new PM
Summary:
Add a new plugin API. This closes the gap between pass registration and out-of-tree passes for the new PassManager.
Unlike with the existing API, interaction with a plugin is always
initiated from the tools perspective. I.e., when a plugin is loaded, it
resolves and calls a well-known symbol `llvmGetPassPluginInfo` to obtain
details about the plugin. The fundamental motivation is to get rid of as
many global constructors as possible. The API exposed by the plugin
info is kept intentionally minimal.
Reviewers: chandlerc
Reviewed By: chandlerc
Subscribers: bollu, grosser, lksbhm, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D35258
llvm-svn: 329273
George Rimar [Thu, 5 Apr 2018 11:25:58 +0000 (11:25 +0000)]
[ELF] - Reveal more information in -Map file about assignments.
Currently, LLD print symbol assignment commands to the map file,
but it does not do that for assignments that are outside of the section
descriptions. Such assignments can affect the layout though.
The patch implements the following:
* Teaches LLD to print symbol assignments outside of section declaration.
* Teaches LLD to print PROVIDE/HIDDEN/PROVIDE hidden commands.
In case when symbol is not provided, nothing will be printed.
Differential revision: https://reviews.llvm.org/D44894
llvm-svn: 329272
George Rimar [Thu, 5 Apr 2018 10:51:06 +0000 (10:51 +0000)]
[ELF] - Print LMA in a -Map file.
Currently, LLD prints VA, but not LMA in a map file.
It seems can be useful to print both to reveal layout
details and patch implements it.
Differential revision: https://reviews.llvm.org/D44899
llvm-svn: 329271
Simon Pilgrim [Thu, 5 Apr 2018 10:48:38 +0000 (10:48 +0000)]
[UpdateTestChecks] Moved core functionality of add_asm_checks into add_checks
As discussed on D45272
llvm-svn: 329270
Florian Hahn [Thu, 5 Apr 2018 10:39:23 +0000 (10:39 +0000)]
[LoopInterchange] Add stats counter for number of interchanged loops.
Reviewers: samparker, karthikthecool, blitz.opensource
Reviewed By: samparker
Differential Revision: https://reviews.llvm.org/D45209
llvm-svn: 329269
Simon Dardis [Thu, 5 Apr 2018 10:30:17 +0000 (10:30 +0000)]
[mips] Regenerate test before posting patch for constant multiplication (NFC)
llvm-svn: 329268
Fedor Sergeev [Thu, 5 Apr 2018 10:29:37 +0000 (10:29 +0000)]
allow custom OptBisect classes set to LLVMContext
This patch introduces a way to set custom OptPassGate instances to LLVMContext.
A new instance field OptBisector and a new method setOptBisect() are added
to the LLVMContext classes. These changes allow to set a custom OptBisect class
that can make its own decisions on skipping optional passes.
Another important feature of this change is ability to set different instances
of OptPassGate to different LLVMContexts. So the different contexts can be used
independently in several compiling threads of one process.
One unit test is added.
Patch by Yevgeny Rouban.
Reviewers: andrew.w.kaylor, fedor.sergeev, vsk, dberlin, Eugene.Zelenko, reames, skatkov
Reviewed By: andrew.w.kaylor, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D44464
llvm-svn: 329267
Simon Pilgrim [Thu, 5 Apr 2018 10:26:13 +0000 (10:26 +0000)]
[UpdateTestChecks] Split core functionality of add_ir_checks into add_checks
Cherry picked from D45272, also added some setup for add_asm_checks to use add_checks as well.
llvm-svn: 329266
Simon Pilgrim [Thu, 5 Apr 2018 09:50:58 +0000 (09:50 +0000)]
[UpdateTestChecks] Make add_asm_checks more like add_ir_checks
Towards merging them as mentioned on D45272
llvm-svn: 329265
Florian Hahn [Thu, 5 Apr 2018 09:48:45 +0000 (09:48 +0000)]
[LoopInterchange] Preserve LoopInfo after interchanging.
LoopInterchange relies on LoopInfo being up-to-date, so we should
preserve it after interchanging. This patch updates restructureLoops to
move the BBs of the interchanged loops to the right place.
Reviewers: davide, efriedma, karthikthecool, mcrosier
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D45278
llvm-svn: 329264
Krasimir Georgiev [Thu, 5 Apr 2018 09:33:03 +0000 (09:33 +0000)]
[clang-format] Preserve spaces before a percent in (text) protos
This makes sure that we do not change the meaning of pieces of text with
format specifiers.
llvm-svn: 329263
Simon Pilgrim [Thu, 5 Apr 2018 09:30:42 +0000 (09:30 +0000)]
[UpdateTestChecks] Remove unnecessary return from add_ir_checks
llvm-svn: 329262
Clement Courbet [Thu, 5 Apr 2018 07:35:28 +0000 (07:35 +0000)]
[llvm-exegesis] Check for libpfm headers.
HAVE_LIBPFM is only defined if the libpfm headers are present.
llvm-svn: 329261
Puyan Lotfi [Thu, 5 Apr 2018 06:56:44 +0000 (06:56 +0000)]
[MIR-Canon] Fixing warnings in Non-assert builds.
llvm-svn: 329258
Clement Courbet [Thu, 5 Apr 2018 05:57:23 +0000 (05:57 +0000)]
[llvm-exegesis] Suppress a warning.
llvm-svn: 329257