Wolfgang Pieb [Tue, 27 Mar 2018 20:27:36 +0000 (20:27 +0000)]
[DWARF][DWARF v5]: Adding support for dumping DW_RLE_offset_pair and DW_RLE_base_address
Reviewers: dblakie, aprantl
Differential Revision: https://reviews.llvm.org/D44811
llvm-svn: 328662
Graydon Hoare [Tue, 27 Mar 2018 19:52:45 +0000 (19:52 +0000)]
[YAML] Escape non-printable multibyte UTF8 in Output::scalarString.
The existing YAML Output::scalarString code path includes a partial and
incorrect implementation of YAML escaping logic. In particular, the logic put
in place in rL321283 escapes non-printable bytes only if they are not part of a
multibyte UTF8 sequence; implicitly this means that all multibyte UTF8
sequences -- printable and non -- are passed through verbatim.
The simplest solution to this is to direct the Output::scalarString method to
use the standalone yaml::escape function, and this _almost_ works, except that
the existing code in that function _over_ escapes: any multibyte UTF8 sequence
is escaped, even printable ones. While this is permitted for YAML, it is also
more aggressive (and hard to read for non-English locales) than necessary,
and the entire point of rL321283 was to back off such aggressive over-escaping.
So in this change, I have both redirected Output::scalarString to use
yaml::escape _and_ modified yaml::escape to optionally restrict its escaping to
non-printables. This preserves behaviour of any existing clients while giving
them a path to more moderate escaping should they desire.
Reviewers: JDevlieghere, thegameg, MatzeB, vladimir.plyashkun
Reviewed By: thegameg
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44863
llvm-svn: 328661
Xin Tong [Tue, 27 Mar 2018 19:43:02 +0000 (19:43 +0000)]
80-line wrap. NFC
llvm-svn: 328660
Matt Arsenault [Tue, 27 Mar 2018 19:42:55 +0000 (19:42 +0000)]
AMDGPU: Fix not preserving CSR VGPR if used for SGPR spills
Before this was not done if the function had no calls in it. This
is still a possible issue with any callable function, regardless
of calls present.
llvm-svn: 328659
Davide Italiano [Tue, 27 Mar 2018 19:40:50 +0000 (19:40 +0000)]
Use the DWARF linkage name when importing C++ methods.
When importing C++ methods into clang AST nodes from the DWARF symbol
table, preserve the DW_AT_linkage_name and use it as the linker
("asm") name for the symbol.
Concretely, this enables `expression` to call into names that use the
GNU `abi_tag` extension, and enables lldb to call into code using
std::string or std::list from recent versions of libstdc++. See
https://bugs.llvm.org/show_bug.cgi?id=35310 . It also seems broadly
more robust than relying on the DWARF->clang->codegen pipeline to
roundtrip properly, but I'm not immediately aware of any other cases
in which it makes a difference.
Patch by Nelson Elhage!
Differential Revision: https://reviews.llvm.org/D40283
llvm-svn: 328658
Matt Arsenault [Tue, 27 Mar 2018 19:26:51 +0000 (19:26 +0000)]
AMDGPU: Update datalayout for stack alignment
llvm-svn: 328657
Matt Arsenault [Tue, 27 Mar 2018 19:26:40 +0000 (19:26 +0000)]
AMDGPU: Set natural stack alignment in DataLayout
Only 4 byte alignment is ever useful, so increasing anything
beyond this may require realigning the stack.
llvm-svn: 328656
Fangrui Song [Tue, 27 Mar 2018 19:05:02 +0000 (19:05 +0000)]
[DWARF] Simplify DWARFAddressRange::contains
This transform is valid because the ranges have been validated (LowPC <= HighPC).
Differential Revision: https://reviews.llvm.org/D44772
llvm-svn: 328655
Shoaib Meenai [Tue, 27 Mar 2018 18:58:28 +0000 (18:58 +0000)]
[Sema] Avoid crash for category implementation without interface
When we have a category implementation without a corresponding interface
(which is an error by itself), semantic checks for property accesses
will attempt to access a null interface declaration and then segfault.
Error out in such cases instead.
Differential Revision: https://reviews.llvm.org/D44916
llvm-svn: 328654
Rong Xu [Tue, 27 Mar 2018 18:55:56 +0000 (18:55 +0000)]
[PGO] Fix branch probability remarks assert
Fixed counter/weight overflow that leads to an assertion. Also fixed the help
string for pgo-emit-branch-prob option.
Differential Revision: https://reviews.llvm.org/D44809
llvm-svn: 328653
Matt Arsenault [Tue, 27 Mar 2018 18:39:45 +0000 (18:39 +0000)]
AMDGPU: Fix crash when MachinePointerInfo invalid
The combine on a select of a load only triggers for
addrspace 0, and discards the MachinePointerInfo. The
conservative default needs to be used for this.
llvm-svn: 328652
Matt Arsenault [Tue, 27 Mar 2018 18:39:42 +0000 (18:39 +0000)]
AMDGPU: Fix register name format in tests
These were changed to match the asm output name a long time ago,
although I think the old tablegenerated names still work.
llvm-svn: 328651
Matt Arsenault [Tue, 27 Mar 2018 18:38:51 +0000 (18:38 +0000)]
AMDGPU: Fix FP restore from being reordered with stack ops
In a function, s5 is used as the frame base SGPR. If a function
is calling another function, during the call sequence
it is copied to a preserved SGPR and restored.
Before it was possible for the scheduler to move stack operations
before the restore of s5, since there's nothing to associate
a frame index access with the restore.
Add an implicit use of s5 to the adjcallstack pseudo which ends
the call sequence to preven this from happening. I'm not 100%
satisfied with this solution, but I'm not sure what else would be
better.
llvm-svn: 328650
Davide Italiano [Tue, 27 Mar 2018 18:37:54 +0000 (18:37 +0000)]
[Core] Correctly handle float division in Scalar.
Patch by Tom Tromey!
Differential Revision: https://reviews.llvm.org/D44693
llvm-svn: 328649
Krzysztof Parzyszek [Tue, 27 Mar 2018 18:10:47 +0000 (18:10 +0000)]
[Hexagon] Implement TTI::shouldMaximizeVectorBandwidth
llvm-svn: 328648
Stefan Pintilie [Tue, 27 Mar 2018 17:51:53 +0000 (17:51 +0000)]
[Power9] Fix the resource list for the COPY instruction.
The COPY instruction was listed as a 4 cycle instruction.
It is now listed correctly as a 2 cycle ALU instruction.
llvm-svn: 328647
Alex Shlyapnikov [Tue, 27 Mar 2018 17:45:53 +0000 (17:45 +0000)]
[HWASan] Make use-after-free c, not c++ test.
To minimize testing surface (remove libstdc++ from the picture, for
one), make use-after-free c, not c++ test.
Differential Revision: https://reviews.llvm.org/D44705
llvm-svn: 328646
Reid Kleckner [Tue, 27 Mar 2018 17:44:12 +0000 (17:44 +0000)]
Attempt to fix clangd test on Windows by wildcarding drive letters
llvm-svn: 328645
Pirama Arumuga Nainar [Tue, 27 Mar 2018 17:42:36 +0000 (17:42 +0000)]
Remap values in PromotedFloats
Summary: When a node is about to be erased from ReplacedValues, we should also remap its corresponding values in PromotedFloats.
Patch by Yan Luo (Yan.Luo2@synopsys.com)
Reviewers: pirama
Reviewed By: pirama
Subscribers: lebedev.ri, llvm-commits
Differential Revision: https://reviews.llvm.org/D44872
llvm-svn: 328644
Nicholas Wilson [Tue, 27 Mar 2018 17:38:51 +0000 (17:38 +0000)]
[WebAssembly] Add export/import for function pointer table
This enables callback-style programming where the JavaScript environment
can call back into the Wasm environment using a function pointer
received from the module.
Differential Revision: https://reviews.llvm.org/D44427
llvm-svn: 328643
Artur Pilipenko [Tue, 27 Mar 2018 17:33:50 +0000 (17:33 +0000)]
Fix a reoccuring typo in load-combine tests
%tmp = bitcast i32* %arg to i8*
%tmp1 = getelementptr inbounds i8, i8* %tmp, i32 0
- %tmp2 = load i8, i8* %tmp, align 1
+ %tmp2 = load i8, i8* %tmp1, align 1
This doesn't change the semantics of the tests but makes use of %tmp1 which was originally intended.
llvm-svn: 328642
Krzysztof Parzyszek [Tue, 27 Mar 2018 17:17:39 +0000 (17:17 +0000)]
Update test after r328635 in LLVM
llvm-svn: 328641
Rafael Espindola [Tue, 27 Mar 2018 17:09:23 +0000 (17:09 +0000)]
Force SHF_MERGE optimizations with -r.
Some tools (dwarfdump for example) get confused by the current -O0 -r
output since it has multiple copies of .debug_str.
We cannot just merge sections with the same name as they can have
different sh_entsize.
We could have duplicated logic for merging sections based on name and
sh_entsize, but it seems better to just use the existing logic by
enabling optimizations.
llvm-svn: 328640
Krzysztof Parzyszek [Tue, 27 Mar 2018 17:07:52 +0000 (17:07 +0000)]
[Hexagon] Rudimentary support for auto-vectorization for HVX
This implements a set of TTI functions that the loop vectorizer uses.
The only purpose of this is to enable testing. Auto-vectorization is
disabled by default, enabled by -hexagon-autohvx.
llvm-svn: 328639
Rafael Auler [Tue, 27 Mar 2018 16:58:01 +0000 (16:58 +0000)]
[AArch64] Decorate AArch64 instrs with OPERAND_PCREL
Summary:
This is a canonical way to teach objdump to print the target
symbols for branches when disassembling AArch64 code.
Reviewers: evandro, t.p.northover, espindola
Reviewed By: t.p.northover
Differential Revision: https://reviews.llvm.org/D44851
llvm-svn: 328638
Fedor Sergeev [Tue, 27 Mar 2018 16:57:20 +0000 (16:57 +0000)]
[NFC] OptPassGate extracted from OptBisect
Summary:
This is an NFC refactoring of the OptBisect class to split it into an optional pass gate interface used by LLVMContext and the Optional Pass Bisector (OptBisect) used for debugging of optional passes.
This refactoring is needed for D44464, which introduces setOptPassGate() method to allow implementations other than OptBisect.
Patch by Yevgeny Rouban.
Reviewers: andrew.w.kaylor, fedor.sergeev, vsk, dberlin, Eugene.Zelenko, reames, skatkov
Reviewed By: fedor.sergeev
Differential Revision: https://reviews.llvm.org/D44821
llvm-svn: 328637
Mandeep Singh Grang [Tue, 27 Mar 2018 16:50:00 +0000 (16:50 +0000)]
[clang] 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.
llvm-svn: 328636
Krzysztof Parzyszek [Tue, 27 Mar 2018 16:44:41 +0000 (16:44 +0000)]
Use .set instead of = when printing assignment in assembly output
On Hexagon "x = y" is a syntax used in most instructions, and is not
treated as a directive.
Differential Revision: https://reviews.llvm.org/D44256
llvm-svn: 328635
Matt Morehouse [Tue, 27 Mar 2018 16:40:34 +0000 (16:40 +0000)]
[libFuzzer] Disable optimization for exit_on_src_pos.test.
Test fails on Darwin with -O2.
llvm-svn: 328634
Matt Morehouse [Tue, 27 Mar 2018 16:40:20 +0000 (16:40 +0000)]
[libFuzzer] Place volatile after pointer types.
For a few tests, volatile was placed before the '*' in pointer
declarations, resulting in it applying to the underlying data rather
than the pointer itself. Placing volatile after the '*' allows us to
switch those tests to -O2.
llvm-svn: 328633
Krzysztof Parzyszek [Tue, 27 Mar 2018 16:14:11 +0000 (16:14 +0000)]
[LV] Add TTI::shouldMaximizeVectorBandwidth to allow enabling it per target
The default implementation returns false and keeps the current behavior.
Differential Revision: https://reviews.llvm.org/D44735
llvm-svn: 328632
Rafael Espindola [Tue, 27 Mar 2018 16:10:01 +0000 (16:10 +0000)]
Add a passing test.
I noticed that we were not testing this while working on another patch.
llvm-svn: 328631
Alex Shlyapnikov [Tue, 27 Mar 2018 16:04:40 +0000 (16:04 +0000)]
[HWASan] Relax use-after-free.cc test matching rules.
Relax use-after-free.cc test matching rules to cover more malloc/free
interceptor names variations.
Differential Revision: https://reviews.llvm.org/D44705
llvm-svn: 328630
Andrea Di Biagio [Tue, 27 Mar 2018 15:23:41 +0000 (15:23 +0000)]
[llvm-mca] pass the correct set of used registers in checkRAT.
We were incorrectly initializing the array of used registers in method checkRAT.
As a consequence, the number of register file stalls was misreported.
Added a test to cover this case.
llvm-svn: 328629
Ben Hamilton [Tue, 27 Mar 2018 15:01:21 +0000 (15:01 +0000)]
[clang-format] Refine ObjC guesser to handle child lines of child lines
Summary:
This fixes an issue brought up by djasper@ in his review of D44790. We
handled top-level child lines, but if those child lines themselves
had child lines, we didn't handle them.
Rather than use recursion (which could blow out the stack), I use a
DenseSet to hold the set of lines we haven't yet checked (since order
doesn't matter), and update the set to add the children of each
line as we check it.
Test Plan: New tests added. Confirmed tests failed before fix
and passed after fix.
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D44831
llvm-svn: 328628
Ben Hamilton [Tue, 27 Mar 2018 15:01:17 +0000 (15:01 +0000)]
[clang-format] Do not insert space before closing brace in ObjC dict literal
Summary:
Previously, `clang-format` would sometimes insert a space
before the closing brace in an Objective-C dictionary literal.
Unlike array literals (which obey `Style.SpacesInContainerLiterals`
to add a space after `[` and before `]`), Objective-C dictionary
literals currently are not meant to insert a space after `{` and before
`}`, regardless of `Style.SpacesInContainerLiterals`.
However, some constructs like `@{foo : @(bar)}` caused `clang-format`
to insert a space between `)` and `}`.
This fixes the issue and adds tests. (I understand the behavior is
not consistent between array literals and dictionary literals, but
that's existing behavior that's a much larger change.)
Test Plan: New tests added. Ran tests with:
% make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests
Reviewers: djasper, jolesiak, Wizard
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D44816
llvm-svn: 328627
Sven van Haastregt [Tue, 27 Mar 2018 14:57:56 +0000 (14:57 +0000)]
Drop spurious break; NFC
llvm-svn: 328626
Kostya Kortchinsky [Tue, 27 Mar 2018 14:40:39 +0000 (14:40 +0000)]
[scudo] Fuchsia minimal shared runtime
Summary:
Fuchsia requires its Scudo shared runtime to not be C++ dependant. Since they
don't use UBSan in conjunction with Scudo, we can just remove the runtime,
and add the extra `nostdinc++` and `nostdlib++` flags. No need for Coverage
either. This allows to keep things going while working on additional splits
of sanitizer_commong and a more minimal runtime.
Reviewers: phosek, flowerhack, alekseyshl
Reviewed By: phosek, alekseyshl
Subscribers: mgorny, delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D44791
llvm-svn: 328625
Andrew Ng [Tue, 27 Mar 2018 14:10:07 +0000 (14:10 +0000)]
[ELF] Disable ICF for synthetic sections
The Data member of synthetic section's is not valid and empty. The Data
member is required to be valid by ICF as it is used by ICF to determine
the equality of section contents. Therefore, exclude synthetic sections
from ICF.
Fixes bug PR36910.
Differential Revision: https://reviews.llvm.org/D44923
llvm-svn: 328624
Alexander Kornienko [Tue, 27 Mar 2018 14:02:06 +0000 (14:02 +0000)]
Move a ref-counted pointer instead of copying it. NFC.
llvm-svn: 328623
Krasimir Georgiev [Tue, 27 Mar 2018 13:39:33 +0000 (13:39 +0000)]
[clang-move] Fix test failing due to clang-format change
r328621 reverted the removal of empty lines before the closing `}` in
namespaces.
llvm-svn: 328622
Krasimir Georgiev [Tue, 27 Mar 2018 13:14:29 +0000 (13:14 +0000)]
Revert "[clang-format] Remove empty lines before }[;] // comment"
This reverts commit r327861.
The empty line before namespaces is desired in some places. We need a
better approach to handle this.
llvm-svn: 328621
Simon Pilgrim [Tue, 27 Mar 2018 12:26:12 +0000 (12:26 +0000)]
[X86][Btver2] Add MMX_PMOVMSKBrr to MOVMSK scheduler class
llvm-svn: 328620
Peter Szecsi [Tue, 27 Mar 2018 12:16:56 +0000 (12:16 +0000)]
[analyzer] LoopUnrolling: update the matched assignment operators
Extended the matched assignment operators when checking for bound changes in a body of the loop by using the freshly added isAssignmentOperator matcher.
This covers all the (current) possible assignments, tests added as well.
Differential Revision: https://reviews.llvm.org/D38921
llvm-svn: 328619
Peter Szecsi [Tue, 27 Mar 2018 12:11:46 +0000 (12:11 +0000)]
[ASTMatchers] Add isAssignmentOperator matcher
Adding a matcher for BinaryOperator and cxxOperatorCallExpr to be able to
decide whether it is any kind of assignment operator or not. This would be
useful since allows us to easily detect assignments via matchers for static
analysis (Tidy, SA) purposes.
Differential Revision: https://reviews.llvm.org/D44893
llvm-svn: 328618
Strahinja Petrovic [Tue, 27 Mar 2018 11:23:53 +0000 (11:23 +0000)]
[PowerPC] Secure PLT support
This patch supports secure PLT mode for PowerPC 32 architecture.
Differential Revision: https://reviews.llvm.org/D42112
llvm-svn: 328617
Alexander Richardson [Tue, 27 Mar 2018 10:08:12 +0000 (10:08 +0000)]
[MIPS] Add static_assert that all Fixups are handled in getFixupKind
Summary:
I recently added a new Fixup kind to our fork of LLVM but forgot to add
it to the table in MipsAsmBackend.cpp. With this static_assert the error
would have been caught instead of zero-initializing the array entries for
the new fixups.
Reviewers: sdardis, atanasyan
Reviewed By: atanasyan
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44895
llvm-svn: 328616
Max Kazantsev [Tue, 27 Mar 2018 09:40:51 +0000 (09:40 +0000)]
[LoopUnroll][NFC] Remove redundant canPeel check
We check `canPeel` twice: when evaluating the number of iterations to be peeled
and within the method `peelLoop` that performs peeling. This method is only
executed if the calculated peel count is positive. Thus, the check in `peelLoop` can
never fail. This patch replaces this check with an assert.
Differential Revision: https://reviews.llvm.org/D44919
Reviewed By: fhahn
llvm-svn: 328615
Sam Parker [Tue, 27 Mar 2018 08:24:53 +0000 (08:24 +0000)]
[IRCE] Enable decreasing loops of non-const bound
As a follow-up to r328480, this updates the logic for the decreasing
safety checks in a similar manner:
- CanBeMax is replaced by CannotBeMaxInLoop which queries
isLoopEntryGuardedByCond on the maximum value.
- SumCanReachMin is replaced by isSafeDecreasingBound which includes
some logic from parseLoopStructure and, again, has been updated to
use isLoopEntryGuardedByCond on the given bounds.
Differential Revision: https://reviews.llvm.org/D44776
llvm-svn: 328613
Max Kazantsev [Tue, 27 Mar 2018 08:13:55 +0000 (08:13 +0000)]
[NFC] Fix comments in getExact()
llvm-svn: 328612
Max Kazantsev [Tue, 27 Mar 2018 07:30:38 +0000 (07:30 +0000)]
[SCEV] Make exact taken count calculation more optimistic
Currently, `getExact` fails if it sees two exit counts in different blocks. There is
no solid reason to do so, given that we only calculate exact non-taken count
for exiting blocks that dominate latch. Using this fact, we can simply take min
out of all exits of all blocks to get the exact taken count.
This patch makes the calculation more optimistic with enforcing our assumption
with asserts. It allows us to calculate exact backedge taken count in trivial loops
like
for (int i = 0; i < 100; i++) {
if (i > 50) break;
. . .
}
Differential Revision: https://reviews.llvm.org/D44676
Reviewed By: fhahn
llvm-svn: 328611
Bob Haarman [Tue, 27 Mar 2018 06:08:35 +0000 (06:08 +0000)]
[lld] fix data race in ICF.cpp
Summary: Fixes PR36823.
Reviewers: ruiu, pcc, rnk
Reviewed By: ruiu
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44716
llvm-svn: 328610
Max Kazantsev [Tue, 27 Mar 2018 04:54:00 +0000 (04:54 +0000)]
[SCEV] Add one more case in computeConstantDifference
This patch teaches `computeConstantDifference` handle calculation of constant
difference between `(X + C1)` and `(X + C2)` which is `(C2 - C1)`.
Differential Revision: https://reviews.llvm.org/D43759
Reviewed By: anna
llvm-svn: 328609
Craig Topper [Tue, 27 Mar 2018 04:26:39 +0000 (04:26 +0000)]
[MachineScheduler] Add itinerary to schedcover.py. Make default work in the command line filter
Summary:
This patch adds itinerary support to the schedcover.py script. I've been trying to use this script to figure out why SSE and AVX instructions are ending up in separate tablegen scheduler classes and sometimes its because we are using different itineraries.
Rather than using None to indicate the default scheduler model, I now use the string "default". I had to hack around the sorting a little to keep "default" at the beginning. But this also makes it so you can specify "default" on the command line to just get the defaults
I also fixed the regular expression code so that the no_default wasn't evaluated twice.
Reviewers: RKSimon, atrick, jmolloy, javed.absar
Reviewed By: javed.absar
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44834
llvm-svn: 328608
Eric Fiselier [Tue, 27 Mar 2018 03:33:06 +0000 (03:33 +0000)]
[coroutines] Fix unused warning on result of co_yield.
This patch follows up on r328602, which fixed the spurious unused
result warning for `co_await`.
llvm-svn: 328607
Eric Fiselier [Tue, 27 Mar 2018 03:15:46 +0000 (03:15 +0000)]
[coroutines] Fix invalid source range in co_await call expressions.
Summary:
Currently an invalid source range is generated for the member call expressions of `co_await`. The end location of the call expression is the `co_await` token loc, while the start is the location of the operand. This causes crashes when the source range is used to produce diagnostics.
This patch fixes the issues by using the expression location instead of the token location when building the member calls.
Reviewers: GorNishanov, rsmith, vsk, aaron.ballman
Reviewed By: vsk
Subscribers: cfe-commits, modocache
Differential Revision: https://reviews.llvm.org/D44915
llvm-svn: 328606
Rui Ueyama [Tue, 27 Mar 2018 02:53:08 +0000 (02:53 +0000)]
Remove extraneous local variable. NFC.
llvm-svn: 328605
Rui Ueyama [Tue, 27 Mar 2018 02:52:58 +0000 (02:52 +0000)]
Update comments.
llvm-svn: 328604
Mircea Trofin [Tue, 27 Mar 2018 01:39:17 +0000 (01:39 +0000)]
Revert "Revert "[lit] Generalized /dev/null support on Windows.""
Summary:
This reverts commit r328596.
Checking if the arguments are strings before testing if they contain "/dev/null".
Reviewers: rnk
Reviewed By: rnk
Subscribers: delcypher, llvm-commits
Differential Revision: https://reviews.llvm.org/D44914
llvm-svn: 328603
Eric Fiselier [Tue, 27 Mar 2018 00:58:16 +0000 (00:58 +0000)]
Fix unused expression warning in co_await.
Previously, anytime the result of the resume expression in
operator co_await was unused, a warning was generated. This
patch fixes the issue by only generating the unused result warning
if calling `await_resume()` would also generate a warning.
llvm-svn: 328602
Sanjay Patel [Tue, 27 Mar 2018 00:32:19 +0000 (00:32 +0000)]
[x86] add RUN for target before roundss; NFC
llvm-svn: 328601
Evgeniy Stepanov [Tue, 27 Mar 2018 00:31:16 +0000 (00:31 +0000)]
Revert "[asan] Replace vfork with fork."
Replacing vfork with fork results in significant slowdown of certain
apps (in particular, memcached).
This reverts r327752.
llvm-svn: 328600
Reid Kleckner [Tue, 27 Mar 2018 00:26:13 +0000 (00:26 +0000)]
Remove dead method
llvm-svn: 328599
Jan Korous [Tue, 27 Mar 2018 00:16:28 +0000 (00:16 +0000)]
[lit] Temporarily disable shtest-timeout.py on darwin
Disabled until fixed in order to avoid random failures on green dragon.
rdar://problem/
38774530
llvm-svn: 328598
Eugene Zelenko [Tue, 27 Mar 2018 00:01:49 +0000 (00:01 +0000)]
[Edit, Rewrite] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 328597
Mircea Trofin [Mon, 26 Mar 2018 23:59:39 +0000 (23:59 +0000)]
Revert "[lit] Generalized /dev/null support on Windows."
This reverts commit
ca7fdbb974384ce5a05528b22a41d46b1cc13e92.
llvm-svn: 328596
David Blaikie [Mon, 26 Mar 2018 23:48:52 +0000 (23:48 +0000)]
Add a build dependency from libMC to libDebugInfoCodeView to match the reality of header dependencies here
llvm-svn: 328595
David Blaikie [Mon, 26 Mar 2018 23:43:29 +0000 (23:43 +0000)]
Fix for header rename in LLVM
llvm-svn: 328594
David Blaikie [Mon, 26 Mar 2018 23:37:02 +0000 (23:37 +0000)]
Move CVDebugRecord from CodeView to Object to fix layering
llvm-svn: 328593
Sanjay Patel [Mon, 26 Mar 2018 23:18:32 +0000 (23:18 +0000)]
[x86] add tests for ftrunc; NFC
llvm-svn: 328592
Jason Molenda [Mon, 26 Mar 2018 23:13:17 +0000 (23:13 +0000)]
Add the same new entitlement from r326399 to
the macos entitlement list.
<rdar://problem/
38887712>
llvm-svn: 328591
Aaron Smith [Mon, 26 Mar 2018 22:53:38 +0000 (22:53 +0000)]
[DebugInfoPDB] Print the method name along with the variant value
Before this change, using dumpProperties() with PDBSymbolData
would look like this:
get_locationType: 3
1
After this change:
get_locationType: 3
get_value: 1
llvm-svn: 328590
Mircea Trofin [Mon, 26 Mar 2018 22:41:06 +0000 (22:41 +0000)]
[lit] Generalized /dev/null support on Windows.
Generalized /dev/null remapping on Windows, and added test.
Reviewers: rnk
Reviewed By: rnk
Subscribers: amccarth, zturner, delcypher, llvm-commits
Differential Revision: https://reviews.llvm.org/D44771
llvm-svn: 328589
Julie Hockett [Mon, 26 Mar 2018 22:37:31 +0000 (22:37 +0000)]
[clang-doc] Removing -Wunused-variable warning
Warning was appearing in release with debug info build, this removes it.
Differential Revision: https://reviews.llvm.org/D44912
llvm-svn: 328588
Aaron Smith [Mon, 26 Mar 2018 22:17:12 +0000 (22:17 +0000)]
[DebugInfoPDB] Add methods to get the compiland and line numbers with PDBSymbolData
llvm-svn: 328587
Aaron Smith [Mon, 26 Mar 2018 22:13:22 +0000 (22:13 +0000)]
[DebugInfoPDB] Add DIA implementation of findLineNumbersByRVA
This method is used to find line numbers for PDBSymbolData
that have an invalid virtual address.
llvm-svn: 328586
Aaron Smith [Mon, 26 Mar 2018 22:10:02 +0000 (22:10 +0000)]
[DebugInfoPDB] Add DIA implementation of addressForVA and addressForRVA
These are used in finding line numbers for PDBSymbolData
llvm-svn: 328585
Eugene Zelenko [Mon, 26 Mar 2018 21:45:04 +0000 (21:45 +0000)]
[Frontend] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 328584
Simon Pilgrim [Mon, 26 Mar 2018 21:07:59 +0000 (21:07 +0000)]
Fix newlines. NFCI.
llvm-svn: 328583
Simon Pilgrim [Mon, 26 Mar 2018 21:06:14 +0000 (21:06 +0000)]
[X86] Add WriteCRC32 scheduler class
Currently CRC32 instructions use the WriteFAdd class, this patch splits them off into their own, at the moment it is still mostly just a duplicate of WriteFAdd but it can now be tweaked on a target by target basis.
Differential Revision: https://reviews.llvm.org/D44647
llvm-svn: 328582
Rafael Espindola [Mon, 26 Mar 2018 20:40:22 +0000 (20:40 +0000)]
Use local symbols for creating .stack-size.
llvm-svn: 328581
Reid Kleckner [Mon, 26 Mar 2018 20:19:14 +0000 (20:19 +0000)]
Fix go bindings test when using goma distributed build tool
Goma[1] is a distributed build system similar to distcc and icecc
primarily used to compile Chromium. The client is open source, and
hopefully soon the server will be as well. The intended usage model is
similar to most distributed build systems: prefix gomacc onto your
compiler command line, and it transparently distributes compilation.
The go lit config wants to determine the host compiler binary, so it
needs some extra logic to avoid looking at these prefixes.
[1] https://chromium.googlesource.com/infra/goma/client/
llvm-svn: 328580
Rui Ueyama [Mon, 26 Mar 2018 19:57:38 +0000 (19:57 +0000)]
Refactor SharedFile::parseRest. NFC.
SharedFile::parseRest function grew organically and got a bit hard to
understand. This patch refactor it. This patch also adds comments.
Differential Revision: https://reviews.llvm.org/D44860
llvm-svn: 328579
Paul Robinson [Mon, 26 Mar 2018 19:55:01 +0000 (19:55 +0000)]
Use correct format specifier.
Review comment on r328235 by James Henderson.
llvm-svn: 328578
Eli Friedman [Mon, 26 Mar 2018 19:52:54 +0000 (19:52 +0000)]
[MemorySSA] Fix exponential compile-time updating MemorySSA.
MemorySSAUpdater::getPreviousDefRecursive is a recursive algorithm, for
each block, it computes the previous definition for each predecessor,
then takes those definitions and combines them. But currently it doesn't
remember results which it already computed; this means it can visit the
same block multiple times, which adds up to exponential time overall.
To fix this, this patch adds a cache. If we computed the result for a
block already, we don't need to visit it again because we'll come up
with the same result. Well, unless we RAUW a MemoryPHI; in that case,
the TrackingVH will be updated automatically.
This matches the original source paper for this algorithm.
The testcase isn't really a test for the bug, but it adds coverage for
the case where tryRemoveTrivialPhi erases an existing PHI node. (It's
hard to write a good regression test for a performance issue.)
Differential Revision: https://reviews.llvm.org/D44715
llvm-svn: 328577
Matt Morehouse [Mon, 26 Mar 2018 19:36:20 +0000 (19:36 +0000)]
[libFuzzer] Do not optimize minimize_two_crashes.test.
Speculative fix for build bot breakage on Mac.
llvm-svn: 328576
Jonathan Peyton [Mon, 26 Mar 2018 19:20:50 +0000 (19:20 +0000)]
Move blocktime_str variable right before its first use
llvm-svn: 328575
Krzysztof Parzyszek [Mon, 26 Mar 2018 19:04:58 +0000 (19:04 +0000)]
[Hexagon] Assertion failure in HexagonSubtarget.cpp
In restoreLatency, replace range-for loop with std::find.
Patch by Jyotsna Verma.
llvm-svn: 328574
Simon Pilgrim [Mon, 26 Mar 2018 19:01:06 +0000 (19:01 +0000)]
[X86][Btver2] Add (U)COMISD/(U)COMISD scheduler costs
Account for the "+i" integer pipe transfer cost (1cy use of JALU0 for GPR PRF write)
llvm-svn: 328573
Haicheng Wu [Mon, 26 Mar 2018 18:59:28 +0000 (18:59 +0000)]
[SLP] Add more checks to a test case. NFC.
llvm-svn: 328572
Rafael Espindola [Mon, 26 Mar 2018 18:55:33 +0000 (18:55 +0000)]
Reduce code duplication a bit.
Thanks to George Rimar for pointing it out.
llvm-svn: 328571
Reid Kleckner [Mon, 26 Mar 2018 18:49:48 +0000 (18:49 +0000)]
[X86] Fix Windows `i1 zeroext` conventions to use i8 instead of i32
Summary:
Re-lands r328386 and r328443, reverting r328482.
Incorporates fixes from @mstorsjo in D44876 (thanks!) so that small
parameters in i8 and i16 do not end up in the SysV register parameters
(EDI, ESI, etc).
I added tests for how we receive small parameters, since that is the
important part. It's always safe to store more bytes than will be read,
but the assumptions you make when loading them are what really matter.
I also tested this by self-hosting clang and it passed tests on win64.
Reviewers: mstorsjo, hans
Subscribers: hiraditya, mstorsjo, llvm-commits
Differential Revision: https://reviews.llvm.org/D44900
llvm-svn: 328570
Rafael Espindola [Mon, 26 Mar 2018 18:49:31 +0000 (18:49 +0000)]
Reduce code duplication a bit. NFC
llvm-svn: 328569
Jonathan Peyton [Mon, 26 Mar 2018 18:44:48 +0000 (18:44 +0000)]
Add summarizeStats.py to tools directory
The summarizeStats.py script processes raw data provided by the
instrumented (stats-gathering) OpenMP* runtime library. It provides:
1) A radar chart which plots counters as frequency (per GigaTick) of use within
the program. The frequencies are plotted as log10, however values less than
one are kept as it is and represented in red color. This was done to help
visualize the differences better.
2) Pie charts separating total time as compute and non-compute. The compute and
non-compute times have their own pie charts showing the constructs that
contributed to them. The percentages listed are with respect to the total
time.
3) '.csv' file with percentage of time spent within the different constructs.
The script can be used as:
$ python $PATH_TO_SCRIPT/summarizeStats.py instrumented1.csv instrumented2.csv
Patch by Taru Doodi
Differential Revision: https://reviews.llvm.org/D41838
llvm-svn: 328568
Reid Kleckner [Mon, 26 Mar 2018 18:22:47 +0000 (18:22 +0000)]
[MS] Fix late-parsed template infinite loop in eager instantiation
Summary:
This fixes PR33561 and PR34185.
Don't store pending template instantiations for late-parsed templates in
the normal PendingInstantiations queue. Instead, use a separate list
that will only be parsed and instantiated at end of TU when late
template parsing actually works and doesn't infinite loop.
Reviewers: rsmith, thakis, hans
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D44846
llvm-svn: 328567
Simon Pilgrim [Mon, 26 Mar 2018 18:19:28 +0000 (18:19 +0000)]
[X86] Add WriteBitScan/WriteLZCNT/WriteTZCNT/WritePOPCNT scheduler classes (PR36881)
Give the bit count instructions their own scheduler classes instead of forcing them into existing classes.
These were mostly overridden anyway, but I had to add in costs from Agner for silvermont and znver1 and the Fam16h SoG for btver2 (Jaguar).
Differential Revision: https://reviews.llvm.org/D44879
llvm-svn: 328566
David Blaikie [Mon, 26 Mar 2018 18:10:31 +0000 (18:10 +0000)]
Remove unused file, ExecutionEngine/MCJIT/ObjectBuffer.h
This header also wasn't self contained/modular - but with no users, it
didn't seem worth fixing because it'd break so easily again.
llvm-svn: 328565
Mandeep Singh Grang [Mon, 26 Mar 2018 18:08:26 +0000 (18:08 +0000)]
[XCore] 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: dblaikie, RKSimon, robertlytton
Reviewed By: robertlytton
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D44875
llvm-svn: 328564
Reid Kleckner [Mon, 26 Mar 2018 18:05:12 +0000 (18:05 +0000)]
[lit] Implement 'cat' command for internal shell
Fixes PR36449
Patch by Chamal de Silva
Differential Revision: https://reviews.llvm.org/D43501
llvm-svn: 328563
Zachary Turner [Mon, 26 Mar 2018 18:01:07 +0000 (18:01 +0000)]
Delete pdbutil diff mode.
This has been made obsolete by the fact that almost all of the
things it previously checked for are no longer relevant since
we can just compare bytes in a lot of places.
llvm-svn: 328562