OSDN Git Service
Leo Li [Fri, 14 Jul 2017 00:35:21 +0000 (00:35 +0000)]
[CMake]Use LLVM_LIBRARY_DIR for lib path.
Summary:
This makes sure the correct lib path is being used when `CMAKE_CFG_INTDIR` or
`LLVM_LIBDIR_SUFFIX` is set.
Reviewers: beanz
Subscribers: mgorny, srhines, pirama, llvm-commits
Differential Revision: https://reviews.llvm.org/D35318
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307985
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 14 Jul 2017 00:18:37 +0000 (00:18 +0000)]
[libFuzzer] update the comments in afl/afl_driver.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307981
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 14 Jul 2017 00:16:23 +0000 (00:16 +0000)]
[libFuzzer] remove stale code; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307980
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 14 Jul 2017 00:11:13 +0000 (00:11 +0000)]
AMDGPU: Detect kernarg segment pointer
This is necessary to pass the kernarg segment pointer
to callee functions. Also don't unconditionally enable
for kernels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307978
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 14 Jul 2017 00:06:27 +0000 (00:06 +0000)]
[libFuzzer] simplify the handling of memmem/strstr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307977
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Thu, 13 Jul 2017 23:59:15 +0000 (23:59 +0000)]
[AMDGPU] fcaninicalize optimization for GFX9+
Since GFX9 supports denorm modes for v_min_f32/v_max_f32 that
is possible to further optimize fcanonicalize and remove it
if applied to min/max given their operands are known not to be
an sNaN or that sNaNs are not supported.
Additionally we can remove fcanonicalize if denorms are supported
for the VT and we know that its argument is never a NaN.
Differential Revision: https://reviews.llvm.org/D35335
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307976
91177308-0d34-0410-b5e6-
96231b3b80d8
Spyridoula Gravani [Thu, 13 Jul 2017 23:25:24 +0000 (23:25 +0000)]
[DWARF] Introduce verification for the unit header chain in .debug_info section to llvm-dwarfdump.
This patch adds verification checks for the unit header chain in the .debug_info section.
Specifically, for each unit in the .debug_info section, the verifier checks that:
The unit length is valid (i.e. the unit can actually fit in the .debug_info section)
The dwarf version of the unit is valid
The address size is valid (4 or 8)
The unit type (if the unit is in dwarf5) is valid
The debug_abbrev_offset is valid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307975
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Thu, 13 Jul 2017 23:11:57 +0000 (23:11 +0000)]
[Dominators] Define Arc less-than operator inline.
This fixes warnings on some buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307974
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 13 Jul 2017 22:30:23 +0000 (22:30 +0000)]
[libFuzzer] move code around; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307973
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 13 Jul 2017 22:05:30 +0000 (22:05 +0000)]
Fix build due to const-correctness issue after last minute refactoring
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307971
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 13 Jul 2017 22:02:23 +0000 (22:02 +0000)]
[PDB] Fix quadratic behavior when writing a BinaryItemStream
Binary streams are an abstraction over a discontiguous buffer. To write
a discontiguous buffer, we want to copy each contiguous chunk
individually. Currently BinaryStreams do not expose a way to iterate
over the chunks, so the code repeatedly calls
readLongestContiguousChunk() with an increasing offset. In order to
lookup the chunk by offset, we would iterate the items list to figure
out which chunk the offset is within. This is obviously O(n^2).
Instead, pre-compute a table of offsets and do a binary search to figure
out which chunk to use. This is still only an O(n^2) to O(n log n)
improvement, but it's a very local fix that seems worth doing.
This improves self-linking lld.exe with PDBs from 90s to 10s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307970
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Thu, 13 Jul 2017 21:52:56 +0000 (21:52 +0000)]
[Dominators] Rename Update.Arc to Update.Edge
Update.Arc of type Arc caused a warning on some buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307968
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 13 Jul 2017 21:43:42 +0000 (21:43 +0000)]
AMDGPU: Annotate call graph with used features
Previously this wouldn't detect used features indirectly
used in callee functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307967
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Thu, 13 Jul 2017 21:16:01 +0000 (21:16 +0000)]
[Dominators] Add CFGBuilder testing utility
Summary:
This patch introduces a new testing utility for building and modifying CFG -- CFGBuilder. The primary use case for the utility is testing the upcoming incremental dominator tree update API.
The current design provides a simple mechanism of constructing arbitrary graphs and then applying series of updates to them. CFGBuilder takes care of creating empty functions, connecting and disconnecting basic blocks. Under the hood it uses SwitchInst and UnreachableInst.
It will be also possible to create a thin wrapper over CFGBuilder for parsing string input and to hook it up to other textual tools (e.g. opt used with FileCheck).
Reviewers: dberlin, sanjoy, grosser, dblaikie
Reviewed By: dblaikie
Subscribers: davide, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D34798
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307960
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Thu, 13 Jul 2017 20:45:32 +0000 (20:45 +0000)]
[Dominators] Simplify templates
Summary: DominatorTreeBase and related classes used overcomplicated template machinery. This patch simplifies them and gets rid of DominatorTreeBaseTraits and DominatorTreeBaseByTraits, which weren't actually used outside the DomTree construction.
Reviewers: dberlin, sanjoy, davide, grosser
Reviewed By: dberlin, davide, grosser
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35285
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307953
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 13 Jul 2017 20:44:46 +0000 (20:44 +0000)]
[Orc] Fix some Error-related fixmes in CompileOnDemandLayer now that the layer
interface has been errorized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307952
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 13 Jul 2017 20:35:45 +0000 (20:35 +0000)]
[InstCombine] put tests for commuted variants of the same fold together; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307951
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Thu, 13 Jul 2017 20:35:01 +0000 (20:35 +0000)]
[Dominators] Split SemiNCA into smaller functions
Summary:
This patch splits the SemiNCA algorithm into smaller functions. It also adds a new debug macro.
In order to perform incremental updates, we need to be able to refire SemiNCA on a subset of CFG nodes (determined by a DFS walk results). We also need to skip nodes that are not deep enough in a DomTree.
Reviewers: dberlin, davide, sanjoy, grosser
Reviewed By: dberlin, davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35282
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307950
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Thu, 13 Jul 2017 20:26:45 +0000 (20:26 +0000)]
[NFC] Move DEBUG_TYPE below includes in Hexagon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307947
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 13 Jul 2017 20:12:23 +0000 (20:12 +0000)]
[PDB] Fix type server handling for archives
Summary:
This fixes type indices for SDK or CRT static archives. Previously we'd
try to look next to the archive object file path, which would not exist
on the local machine.
Also error out if we can't resolve a type server record. Hypothetically
we can recover from this error by discarding debug info for this object,
but that is not yet implemented.
Reviewers: ruiu, amccarth
Subscribers: aprantl, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D35369
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307946
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Thu, 13 Jul 2017 19:30:52 +0000 (19:30 +0000)]
[NFC] Move DEBUG_TYPE macro below includes...
in MachineCombiner.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307940
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Thu, 13 Jul 2017 19:27:41 +0000 (19:27 +0000)]
Revert "[mips][mt][6/7] Add support for mftr, mttr instructions."
This reverts r307836, it broke one of the buildbots. Reverting
while I investigate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307939
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Thu, 13 Jul 2017 19:26:27 +0000 (19:26 +0000)]
[lit] add a -vv option to echo all executed commands.
Debugging LIT scripts can be rather painful, as LIT directly does not
specify which line has failed.
Rather, FileCheck is expected to report the failing location, but it can
be often ambiguous if multiple commands are tested against the same
prefix. This change adds a -vv option, which echoes all output.
Then detecting the error becomes straightforward: last printed line is
the failing one.
Of course, it could be desired to try to get failing line number
directly from bash, but it involves excessive hacks on older bash
versions (cf.
https://stackoverflow.com/questions/
24398691/how-to-get-the-real-line-number-of-a-failing-bash-command)
Differential Revision: https://reviews.llvm.org/D35330
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307938
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Zhogin [Thu, 13 Jul 2017 18:57:40 +0000 (18:57 +0000)]
[X86][tests] Added rotate_vec.ll CodeGen test. NFC precommit for bug 33691 fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307937
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Thu, 13 Jul 2017 18:55:52 +0000 (18:55 +0000)]
[Dominators] Improve reachability verification
Summary:
This patch improves verification by making `verifyReachablility` look for CFG not found in the DomTree.
It also makes the verification work with postdominators by handling virtual root.
Reviewers: dberlin, davide, grosser, sanjoy
Reviewed By: dberlin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35279
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307936
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 13 Jul 2017 18:17:58 +0000 (18:17 +0000)]
[Hexagon] Use VSPLAT instead of COMBINE for vectors of type v2i32, NFC
This cleans up the vector shift patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307935
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Thu, 13 Jul 2017 18:17:10 +0000 (18:17 +0000)]
[PowerPC] Ensure displacements for DQ-Form instructions are multiples of 16
As outlined in the PR, we didn't ensure that displacements for DQ-Form
instructions are multiples of 16. Since the instruction encoding encodes
a quad-word displacement, a sub-16 byte displacement is meaningless and
ends up being encoded incorrectly.
Fixes https://bugs.llvm.org/show_bug.cgi?id=33671.
Differential Revision: https://reviews.llvm.org/D35007
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307934
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 13 Jul 2017 17:24:57 +0000 (17:24 +0000)]
[InstCombine] add descriptive comments for tests; NFC
Also, remove unnecessary function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307930
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 13 Jul 2017 17:10:12 +0000 (17:10 +0000)]
Fix unused variable warning on EXPENSIVE_CHECKS release builds. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307929
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 13 Jul 2017 17:03:12 +0000 (17:03 +0000)]
[AArch64] Implement support for windows style vararg functions
Pass parameters properly in calls to such functions (pass all
floats in integer registers), and handle va_start properly (allocate
stack immediately below the arguments on the stack, to save the
register arguments into a single continuous array).
Differential Revision: https://reviews.llvm.org/D35006
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307928
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 13 Jul 2017 17:03:02 +0000 (17:03 +0000)]
[llvm-objdump] Properly print MachO aarch64 addend relocations
Previously such relocations fell into the last case for local
symbols, using the relocation addend as symbol index, leading to
a crash.
Differential Revision: https://reviews.llvm.org/D35239
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307927
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 13 Jul 2017 17:00:30 +0000 (17:00 +0000)]
Documentation fix. NFC.
A MCFixup might not even be in an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307926
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 13 Jul 2017 16:56:24 +0000 (16:56 +0000)]
Put std::mutex usage behind #ifdefs to pacify the sanitizer buildbot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307925
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederich Munch [Thu, 13 Jul 2017 16:11:08 +0000 (16:11 +0000)]
Support: Add llvm::center_justify.
Summary: Completes the set.
Reviewers: ruiu
Reviewed By: ruiu
Subscribers: ruiu, llvm-commits
Differential Revision: https://reviews.llvm.org/D35278
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307922
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 15:55:34 +0000 (15:55 +0000)]
[GlobalOpt] Autogenerate checks for the test in PR33686.
Also fix a typo while here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307921
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 15:40:59 +0000 (15:40 +0000)]
Reapply [GlobalOpt] Remove unreachable blocks before optimizing a function.
This commit reapplies r307215 now that we found out and fixed
the cause of the cfi test failure (in r307871).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307920
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Thu, 13 Jul 2017 15:29:13 +0000 (15:29 +0000)]
[AArch64] Enable the mnemonic spell checker
The AsmParser mnemonic spell checker was introduced in r307148 and enabled only
for ARM. This patch enables it for AArch64.
Differential Revision: https://reviews.llvm.org/D35357
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307918
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Thu, 13 Jul 2017 15:19:56 +0000 (15:19 +0000)]
[AArch64] Add an SVE target feature to the backend and TargetParser.
The feature will be used properly once assembler/disassembler support
begins to land.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307917
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Thu, 13 Jul 2017 15:01:23 +0000 (15:01 +0000)]
[AArch64] Add preliminary support for ARMv8.1 SUB/AND atomics
This patch is a follow-up to r305893 and adds preliminary support for the
fetch_sub and fetch_and operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307913
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Thu, 13 Jul 2017 13:21:23 +0000 (13:21 +0000)]
[RuntimeUnrolling] Update DomTree correctly when exit blocks have successors
Summary:
When we runtime unroll with multiple exit blocks, we also need to update the
immediate dominators of the immediate successors of the exit blocks.
Reviewers: reames, mkuper, mzolotukhin, apilipenko
Reviewed by: mzolotukhin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35304
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307909
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Thu, 13 Jul 2017 11:28:05 +0000 (11:28 +0000)]
Reland "[mips] Fix multiprecision arithmetic."
For multiprecision arithmetic on MIPS, rather than using ISD::ADDE / ISD::ADDC,
get SelectionDAG to break down the operation into ISD::ADDs and ISD::SETCCs.
For MIPS, only the DSP ASE has a carry flag, so in the general case it is not
useful to directly support ISD::{ADDE, ADDC, SUBE, SUBC} nodes.
Also improve the generation code in such cases for targets with
TargetLoweringBase::ZeroOrOneBooleanContent by directly using the result of the
comparison node rather than using it in selects. Similarly for ISD::SUBE /
ISD::SUBC.
Address optimization breakage by moving the generation of MIPS specific integer
multiply-accumulate nodes to before legalization.
This revolves PR32713 and PR33424.
Thanks to Simonas Kazlauskas and Pirama Arumuga Nainar for reporting the issue!
Reviewers: slthakur
Differential Revision: https://reviews.llvm.org/D33494
The previous version of this patch was too aggressive in producing fused
integer multiple-addition instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307906
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 13 Jul 2017 11:09:34 +0000 (11:09 +0000)]
[ARM] GlobalISel: Support G_BR
This boils down to not crashing in reg bank select due to the lack of
register operands on this instruction, and adding some tests. The
instruction selection is already covered by the TableGen'erated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307904
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 13 Jul 2017 10:52:00 +0000 (10:52 +0000)]
[PM] Use range-based for loops in LegacyPassManager.cpp (NFC).
Summary:
This patch replaces a bunch of iterator-based for loops with range-based
for loops. There are 2 iterator-based loops left in this file in
removeNotPreservedAnalysis, but I think those cannot be replaced by
range-based for loops as they modify the container they are iterating
over.
Unless I missed something, this schould be a NFC and I would appreciate
if someone could have a quick look to confirm that.
Reviewers: chandlerc, pcc, jhenderson
Reviewed By: jhenderson
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D35310
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307902
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 13 Jul 2017 10:41:49 +0000 (10:41 +0000)]
[DAGCombiner] Fix issue with rotate combines asserting if the constant value types differ from the result type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307900
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Thu, 13 Jul 2017 10:24:30 +0000 (10:24 +0000)]
[ARM] Tidy up and organise better ARM.td. NFC.
This patch tidies up and organises ARM.td
so that it is easier to understandand
and extend in the future.
Reviewed by: @hahn, @rovka
Differential Revision: https://reviews.llvm.org/D35248
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307897
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 13 Jul 2017 09:52:06 +0000 (09:52 +0000)]
Fixup r307893: Silence warning
Silence unused variable warning in release builds.
*sigh*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307896
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 13 Jul 2017 09:39:00 +0000 (09:39 +0000)]
Use isNullConstantOrNullSplatConstant helper. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307895
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 13 Jul 2017 09:36:04 +0000 (09:36 +0000)]
Fix whitespace indentation. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307894
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 13 Jul 2017 09:30:08 +0000 (09:30 +0000)]
[ARM] GlobalISel: Move local variable. NFC
Move a local variable from outside a switch to inside every case that
needs it (which isn't all of the cases, of course).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307893
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 13 Jul 2017 08:53:43 +0000 (08:53 +0000)]
[ARM] Fix typo in test added in r307889
This fixes the following test failure:
LLVM :: Transforms/Inline/ARM/inline-target-attr.ll
Sorry for any inconenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307892
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Thu, 13 Jul 2017 08:40:59 +0000 (08:40 +0000)]
[AVR] Fix broken indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307891
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Thu, 13 Jul 2017 08:39:46 +0000 (08:39 +0000)]
[AVR] Add a 'LLVM_FALLTHROUGH' statement to the AsmParser
Should fix warnings in the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307890
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Thu, 13 Jul 2017 08:26:17 +0000 (08:26 +0000)]
[ARM] Inline callee if its target-features are a subset of the caller
Summary:
Similar to X86, it should be safe to inline callees if their
target-features are a subset of the caller. As some subtarget features
provide different instructions depending on whether they are set or
unset (e.g. ThumbMode and ModeSoftFloat), we use a whitelist of
target-features describing hardware capabilities only.
Reviewers: kristof.beyls, rengolin, t.p.northover, SjoerdMeijer, peter.smith, silviu.baranga, efriedma
Reviewed By: SjoerdMeijer, efriedma
Subscribers: dschuff, efriedma, aemerson, sdardis, javed.absar, arichardson, eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D34697
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307889
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Thu, 13 Jul 2017 08:09:36 +0000 (08:09 +0000)]
[AVR] Fix indirect calls to function pointers
Patch by Carl Peto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307888
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Thu, 13 Jul 2017 07:38:53 +0000 (07:38 +0000)]
Add original reproducer for r307754 / PR33689
Apparently I managed to drop the test case between two revisions in
Phabricator: https://reviews.llvm.org/D35003
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307887
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Inoue [Thu, 13 Jul 2017 06:48:39 +0000 (06:48 +0000)]
fix typos in comments and error messges; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307885
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 13 Jul 2017 06:34:10 +0000 (06:34 +0000)]
[X86] Simplify the getHostCPUName for AMD family 6 and 15.
As far as I can tell we can simply distinguish based on features rather than model number. Many of the strings we were previously using are treated the same by the backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307884
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Thu, 13 Jul 2017 05:54:08 +0000 (05:54 +0000)]
[llvm-objdump] Correctly distinguish between the MachO upper/lower16 relocations
All other code in MachODump.cpp uses the same comparison,
((r_length & 0x1) == 1), for distinguishing between the two,
while the code in llvm-objdump.cpp seemed to be incorrect.
Differential Revision: https://reviews.llvm.org/D35240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307882
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 04:19:13 +0000 (04:19 +0000)]
[opt-viewer] Don't except when debug info is not available.
For records without DebugLoc we simply skip the caller location in
map_remarks.
Fixes PR33764.
Patch by Simon Whittaker!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307880
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Thu, 13 Jul 2017 03:49:42 +0000 (03:49 +0000)]
[TargetLowering] Add hook for adding target MMO flags when doing ISel.
Summary: Add TargetLowering hook getMMOFlags() to add target specific
MMO flags to load/store instructions created by ISel.
Reviewers: bogner, hfinkel, qcolombet, MatzeB
Subscribers: mcrosier, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D34962
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307879
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Thu, 13 Jul 2017 02:28:54 +0000 (02:28 +0000)]
[MIR] Add support for printing and parsing target MMO flags
Summary: Add target hooks for printing and parsing target MMO flags.
Targets may override getSerializableMachineMemOperandTargetFlags() to
return a mapping from string to flag value for target MMO values that
should be serialized/parsed in MIR output.
Add implementation of this hook for AArch64 SuppressPair MMO flag.
Reviewers: bogner, hfinkel, qcolombet, MatzeB
Subscribers: mcrosier, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D34962
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307877
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 13 Jul 2017 01:56:37 +0000 (01:56 +0000)]
[libFuzzer] make sure that -reduce_inputs=1 deletes redundant files in the corpus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307875
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 01:36:12 +0000 (01:36 +0000)]
[sanstats] Remove a flaky test.
I don't know a reliable way of crafting a test for this case,
but I'll try a little harder. In the meanwhile, let's get the
bots green again. Please note this will be tested by `check-cfi`
once r307215 relands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307874
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 13 Jul 2017 01:08:53 +0000 (01:08 +0000)]
[libFuzzer] experimental feature -reduce_inputs (off by default) that tries to replace elements in the corpus with smaller ones that have the same feature set. Still needs tuning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307873
91177308-0d34-0410-b5e6-
96231b3b80d8
Wolfgang Pieb [Thu, 13 Jul 2017 01:03:28 +0000 (01:03 +0000)]
[DWARF] Fixing a bug with processing of DWARF v5 indexed strings in Mach-O objects.
Code to convert MachO - specific section debug section names to standard DWARF v5
section names was in the wrong place.
Differential Revision: https://reviews.llvm.org/D35321
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307872
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 13 Jul 2017 00:49:03 +0000 (00:49 +0000)]
[sanstats] Print the correct line information.
The instrumentation tracks the return address and not that of the
call so we remove one to compensate. Thanks for Peter Collingbourne
for confirming the analysis of the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307871
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 12 Jul 2017 23:30:02 +0000 (23:30 +0000)]
[CodeGenPrepare] Don't create dead instructions in addrmode sinking
When we fail to sink an instruction, we must make sure not to modify
the function; otherwise, we end up in an infinite loop because
CodeGenPrepare iterates until it doesn't make any changes.
Fixes https://bugs.llvm.org/show_bug.cgi?id=33608 .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307866
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Wed, 12 Jul 2017 23:27:44 +0000 (23:27 +0000)]
[PGO] Enhance pgo counter promotion
This is an incremental change to the promotion feature.
There are two problems with the current behavior:
1) loops with multiple exiting blocks are totally disabled
2) a counter update can only be promoted one level up in
the loop nest -- which does help much for short trip
count inner loops inside a high trip-count outer loops.
Due to this limitation, we still saw very large profile
count fluctuations from run to run for the affected loops
which are usually very hot.
This patch adds the support for promotion counters iteratively
across the loop nest. It also turns on the promotion for
loops with multiple exiting blocks (with a limit).
For single-threaded applications, the performance impact is flat
on average. For instance, dealII improves, but povray regresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307863
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Jul 2017 23:22:32 +0000 (23:22 +0000)]
[libFuzzer] relax test/shrink.test a bit (got broken on windows)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307862
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 12 Jul 2017 23:06:18 +0000 (23:06 +0000)]
AMDGPU: Fix converting unanalyzable global loads to SMRD
Not all memory dependence queries succeed, so this needs to
be conservative if it fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307861
91177308-0d34-0410-b5e6-
96231b3b80d8
Gerolf Hoflehner [Wed, 12 Jul 2017 23:05:15 +0000 (23:05 +0000)]
[SjLj] Replace recursive block marking algorithm with iterative algorithm
Summary:
Some programs run into a stack overflow issue. This change avoids this
problem by replacing the recursive algorithm with the iterative version.
Reviewers: MatzeB, t.p.northover, dblaikie
Reviewed By: MatzeB
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35105
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307860
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 12 Jul 2017 22:42:39 +0000 (22:42 +0000)]
[x86] add select-of-constant tests; NFC
We're using cmov in these cases, but we could reduce to simpler ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307859
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Jul 2017 22:22:36 +0000 (22:22 +0000)]
[libFuzzer] remove include <sanitizer/coverage_interface.h>, not needed any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307858
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 12 Jul 2017 22:20:04 +0000 (22:20 +0000)]
[libFuzzer] refactoring in preparation for -reduce_inputs; NFC intended
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307857
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Wed, 12 Jul 2017 21:57:23 +0000 (21:57 +0000)]
Add element atomic memset intrinsic
Summary: Continuing the work from https://reviews.llvm.org/D33240, this change introduces an element unordered-atomic memset intrinsic. This intrinsic is essentially memset with the implementation requirement that all stores used for the assignment are done with unordered-atomic stores of a given element size.
Reviewers: eli.friedman, reames, mkazantsev, skatkov
Reviewed By: reames
Subscribers: jfb, dschuff, sbc100, jgravelle-google, aheejin, efriedma, llvm-commits
Differential Revision: https://reviews.llvm.org/D34885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307854
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 12 Jul 2017 21:43:14 +0000 (21:43 +0000)]
[Solaris] Detect Solaris LD, use detection results to pass Solaris-ld options
Solaris ld is not the only linker available on Solaris.
Introducing linker detection and using LLVM_LINKER_IS_SOLARISLD to
select Solaris-ld specific handling.
Patch by: Fedor Sergeev
Differential Revision: https://reviews.llvm.org/D35325
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307852
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 12 Jul 2017 21:41:28 +0000 (21:41 +0000)]
[AArch64] Only run macro fusion for CPUs with any fusion support.
Reviewers: evandro, t.p.northover, javed.absar
Reviewed By: evandro
Subscribers: aemerson, rengolin, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34959
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307851
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Wed, 12 Jul 2017 21:37:02 +0000 (21:37 +0000)]
Use --color-diagnostics instead of -color-diagnostics.
Solaris ld interprets -color-diagnostics as a -c option, so it is
better to use --color-diagnostics instead. lld accepts both.
Differential Revision: https://reviews.llvm.org/D35327
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307850
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederich Munch [Wed, 12 Jul 2017 21:22:45 +0000 (21:22 +0000)]
Allow clients to specify search order of DynamicLibraries.
Summary: Different JITs and other clients of LLVM may have different needs in how symbol resolution should occur.
Reviewers: v.g.vassilev, lhames, karies
Reviewed By: v.g.vassilev
Subscribers: pcanal, llvm-commits
Differential Revision: https://reviews.llvm.org/D33529
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307849
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 12 Jul 2017 21:20:28 +0000 (21:20 +0000)]
[AMDGPU] fcanonicalize elimination optimization
We are using multiplication by 1.0 to flush denormals and quiet sNaNs.
That is possible to omit this multiplication if source of the
fcanonicalize instruction is known to be flushed/quieted, i.e.
if it comes from another instruction known to do the normalization
and we are using IEEE mode to quiet sNaNs.
Differential Revision: https://reviews.llvm.org/D35218
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307848
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 12 Jul 2017 21:08:24 +0000 (21:08 +0000)]
Don't expose a map in the DWARFContext interface.
Doing so is leaking an implementation detail.
I have an implementation that uses the lld infrastructure and doesn't
use a map or object::SectionRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307846
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Wed, 12 Jul 2017 20:55:43 +0000 (20:55 +0000)]
[LoopUnrollRuntime] NFC: Refactored safety checks of unrolling multi-exit loop
Refactored the code and separated out a function
`canSafelyUnrollMultiExitLoop` to reduce redundant checks and make it
easier to add profitability heuristics later.
Added tests to runtime unrolling to make sure that unrolling for
multi-exit loops is not done unless the option
-unroll-runtime-multi-exit is true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307843
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 12 Jul 2017 20:53:22 +0000 (20:53 +0000)]
[AArch64] Add AArch64Subtarget::isFusion function.
Summary:
isFusion returns true if the subtarget supports any kind of instruction
fusion, similar to ARMSubtarget::isFusion. This was suggested in D34142.
This changes the current behavior slightly, because the macro fusion mutation
is now added to the PostRA MachineScheduler in case the subtarget supports
any kind of fusion. I think that makes sense because if the PostRA
MachineScheduler is run, there is potential that instructions scheduled back to
back are re-scheduled.
Reviewers: evandro, t.p.northover, joelkevinjones, joel_k_jones, steleman
Reviewed By: joelkevinjones
Subscribers: joel_k_jones, aemerson, rengolin, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34958
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307842
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 12 Jul 2017 20:50:04 +0000 (20:50 +0000)]
[WebAssembly] Mark element atomic memcpy/memmove intrinsics as unsupported
Summary:
Element atomic intrinsicAtomic instructions are not yet supported in WebAssembly, so we mark them as
unsupported for the moment.
Reviewers: sunfish, dschuff, sbc100
Reviewed By: dschuff, sbc100
Subscribers: jfb, sbc100, jgravelle-google
Differential Revision: https://reviews.llvm.org/D35322
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307841
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Wed, 12 Jul 2017 20:49:21 +0000 (20:49 +0000)]
Remove unneeded use of #undef DEBUG_TYPE. NFC
Where is is needed (at the end of headers that define it), be
consistent about its use.
Also fix a few header guards that I found in the process.
Differential Revision: https://reviews.llvm.org/D34916
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307840
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 12 Jul 2017 19:53:55 +0000 (19:53 +0000)]
[LV] Don't allow outside uses of IVs if the SCEV is predicated on loop conditions.
This fixes PR33706.
Differential Revision: https://reviews.llvm.org/D35227
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307837
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 19:47:45 +0000 (19:47 +0000)]
[mips][mt][6/7] Add support for mftr, mttr instructions.
Unlike many other instructions, these instructions have aliases which
take coprocessor registers, gpr register, accumulator (and dsp accumulator)
registers, floating point registers, floating point control registers and
coprocessor 2 data and control operands.
For the moment, these aliases are treated as pseudo instructions which are
expanded into the underlying instruction. As a result, disassembling these
instructions shows the underlying instruction and not the alias.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35253
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307836
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 12 Jul 2017 19:46:35 +0000 (19:46 +0000)]
Fix non-Windows build after PDB native builtin type change
Some C++14 features slipped in along with an extra member qualification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307835
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Wed, 12 Jul 2017 19:38:11 +0000 (19:38 +0000)]
[PDB] Enable NativeSession to create symbols for built-in types on demand
Summary:
There is a reserved range of type indexes for built-in types (like integers).
This will create a symbol for a built-in type if the caller askes for one by
type index. This is also plumbing for being able to recall symbols by type
index in general, but user-defined types will come in subsequent patches.
Reviewers: rnk, zturner
Subscribers: mgorny, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D35163
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307834
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Neilson [Wed, 12 Jul 2017 19:24:07 +0000 (19:24 +0000)]
Fix to web assembly lib call list
Summary:
Revision 307796 caused an internal build break in WebAssembly bots in the form of a
crash. ex:
Here's the crash dump from one of the failing tests:
/usr/local/google/home/blaikie/dev/llvm/build/default/./bin/llc < /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals | /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/FileCheck /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
--
Exit Code: 2
Command Output (stderr):
--
Stack dump:
0. Program arguments: build/default/./bin/llc -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals
1. Running pass 'Function Pass Manager' on module '<stdin>'.
2. Running pass 'WebAssembly Assembly Printer' on function '@call_memcpy'
FileCheck error: '-' is empty.
FileCheck command line: build/default/./bin/FileCheck src/test/CodeGen/WebAssembly/global.ll
The problem is in lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp. There’s an array declared:
545 static const char *
Fix to web assembly lib call list
Summary:
Revision 307796 caused an internal build break in WebAssembly bots in the form of a
crash. ex:
Here's the crash dump from one of the failing tests:
/usr/local/google/home/blaikie/dev/llvm/build/default/./bin/llc < /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals | /usr/local/google/home/blaikie/dev/llvm/build/default/./bin/FileCheck /usr/local/google/home/blaikie/dev/llvm/src/test/CodeGen/WebAssembly/global.ll
--
Exit Code: 2
Command Output (stderr):
--
Stack dump:
0. Program arguments: build/default/./bin/llc -asm-verbose=false -disable-wasm-fallthrough-return-opt -disable-wasm-explicit-locals
1. Running pass 'Function Pass Manager' on module '<stdin>'.
2. Running pass 'WebAssembly Assembly Printer' on function '@call_memcpy'
FileCheck error: '-' is empty.
FileCheck command line: build/default/./bin/FileCheck src/test/CodeGen/WebAssembly/global.ll
The problem is in lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp. There’s an array declared:
static const char *
RuntimeLibcallNames[RTLIB::UNKNOWN_LIBCALL] = {
That is defining a runtime lib call name for each entry in the enum RTLIB:Libcall from include/llvm/CodeGen/RuntimeLibcalls.h.
Revision 307796 added entries to the enum, but didn’t add entries to the RuntimeLibcallNames array, which caused a crash when attempting
to access past the end of the array.
This patch fixes the issue by adding the element atomic memmove to the WebAssembly arrays.
Reviewed by: reames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307831
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Kuderski [Wed, 12 Jul 2017 18:42:16 +0000 (18:42 +0000)]
[LoopRotate] Fix DomTree update logic for unreachable nodes. Fix PR33701.
Summary:
LoopRotate manually updates the DoomTree by iterating over all predecessors of a basic block and computing the Nearest Common Dominator.
When a predecessor happens to be unreachable, `DT.findNearestCommonDominator` returns nullptr.
This patch teaches LoopRotate to handle this case and fixes [[ https://bugs.llvm.org/show_bug.cgi?id=33701 | PR33701 ]].
In the future, LoopRotate should be taught to use the new incremental API for updating the DomTree.
Reviewers: dberlin, davide, uabelho, grosser
Subscribers: efriedma, mzolotukhin
Differential Revision: https://reviews.llvm.org/D35074
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307828
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 12 Jul 2017 18:23:06 +0000 (18:23 +0000)]
Use std::mutex to avoid memory allocation after OOM
ManagedStatic<sys::Mutex> would lazilly allocate a sys::Mutex to lock
when reporting an OOM, which is a bad idea.
The three STL implementations that I know of use pthread_mutex_lock and
EnterCriticalSection to implement std::mutex. I'm pretty sure that
neither of those allocate heap memory.
It seems that we unconditionally use std::mutex without testing
LLVM_ENABLE_THREADS elsewhere in the codebase, so this should be
portable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307827
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Wed, 12 Jul 2017 18:17:34 +0000 (18:17 +0000)]
[libFuzzer] Add a dependency on symbolizer from libFuzzer tests
Some libFuzzer tests on Linux would fail with bizarre error messages
unless llvm-symbolizer binary is present.
Differential Revision: https://reviews.llvm.org/D35313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307826
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Wed, 12 Jul 2017 18:16:09 +0000 (18:16 +0000)]
[libFuzzer] NFC Declare LIBFUZZER_FLAGS_BASE outside of an if-block
The current code relies on the assumption that tests are included only
if LLVM_USE_SANITIZE_COVERAGE is enabled.
This commit makes it easier to relax the assumption in the future, as
the variable LIBFUZZER_FLAGS_BASE is used further in libFuzzer tests.
Differential Revision: https://reviews.llvm.org/D35314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307825
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Wed, 12 Jul 2017 18:14:19 +0000 (18:14 +0000)]
[libFuzzer] Do not use LLVM ostream in tests
Differential Revision: https://reviews.llvm.org/D35312
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307824
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 12 Jul 2017 17:56:46 +0000 (17:56 +0000)]
[x86] improve SBB optimizations for SETB/SETA with subtract
This is another step towards removing a combine that turns sext
into select of constants and preparing the backend for an IR
future where select is the canonical form.
Earlier commits in this area:
https://reviews.llvm.org/rL306040
https://reviews.llvm.org/rL306072
https://reviews.llvm.org/rL307404 (https://reviews.llvm.org/D34652)
https://reviews.llvm.org/rL307471
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307821
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 12 Jul 2017 17:44:50 +0000 (17:44 +0000)]
[x86] add tests for improving sbb transforms; NFC
We're subtracting X from X the hard way...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307819
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Wed, 12 Jul 2017 17:32:32 +0000 (17:32 +0000)]
GlobalISel: Handle selection of G_IMPLICIT_DEF in AArch64
A generic variant of IMPLICIT_DEF was added in r306875, but this
survives to selection and hits a `Cannot Select`. Add handling that
converts the note to a regular IMPLICIT_DEF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307817
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Wed, 12 Jul 2017 16:30:37 +0000 (16:30 +0000)]
Add a test for r307754
As promised in D35003.
Uses -codegenprepare instead of -instcombine since we hit the same
buggy path anyway, and CGP lets us keep this test really simple
(instcombine likes turning the alloca T, N into alloca [N x T], which
hides the bug this is testing for).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307811
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 12 Jul 2017 16:23:57 +0000 (16:23 +0000)]
[mips][mt][5/7] Add support for fork and yield instructions.
Reviewers: slthakur, atanasyan
Differential Revision: https://reviews.llvm.org/D35252
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307808
91177308-0d34-0410-b5e6-
96231b3b80d8