OSDN Git Service
Alexandre Ganea [Thu, 7 Feb 2019 15:24:18 +0000 (15:24 +0000)]
[CodeView] Fix cycles in debug info when merging Types with global hashes
When type streams with forward references were merged using GHashes, cycles
were introduced in the debug info. This was caused by
GlobalTypeTableBuilder::insertRecordAs() not inserting the record on the second
pass, thus yielding an empty ArrayRef at that record slot. Later on, upon PDB
emission, TpiStreamBuilder::commit() would skip that empty record, thus
offseting all indices that came after in the stream.
This solution comes in two steps:
1. Fix the hash calculation, by doing a multiple-step resolution, iff there are
forward references in the input stream.
2. Fix merge by resolving with multiple passes, therefore moving records with
forward references at the end of the stream.
This patch also adds support for llvm-readoj --codeview-ghash.
Finally, fix dumpCodeViewMergedTypes() which previously could reference deleted
memory.
Fixes PR40221
Differential Revision: https://reviews.llvm.org/D57790
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353412
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Thu, 7 Feb 2019 14:38:25 +0000 (14:38 +0000)]
Fix misspelled filenames in file headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353408
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 7 Feb 2019 13:32:54 +0000 (13:32 +0000)]
[LSR] Generate cross iteration indexes
Modify GenerateConstantOffsetsImpl to create offsets that can be used
by indexed addressing modes. If formulae can be generated which
result in the constant offset being the same size as the recurrence,
we can generate a pre-indexed access. This allows the pointer to be
updated via the single pre-indexed access so that (hopefully) no
add/subs are required to update it for the next iteration. For small
cores, this can significantly improve performance DSP-like loops.
Differential Revision: https://reviews.llvm.org/D55373
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353403
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 7 Feb 2019 11:05:33 +0000 (11:05 +0000)]
[ARM GlobalISel] Support G_ICMP for Thumb2
Mark as legal and use the t2* equivalents of the arm mode instructions,
e.g. t2CMPrr instead of plain CMPrr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353392
91177308-0d34-0410-b5e6-
96231b3b80d8
David Green [Thu, 7 Feb 2019 10:51:04 +0000 (10:51 +0000)]
[ARM] Reformat isRedundantFlagInstr for D57833. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353386
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiong Wang [Thu, 7 Feb 2019 10:43:09 +0000 (10:43 +0000)]
[BPF] add code-gen support for JMP32 instructions
JMP32 instructions has been added to eBPF ISA. They are 32-bit variants of
existing BPF conditional jump instructions, but the comparison happens on
low 32-bit sub-register only, therefore some unnecessary extensions could
be saved.
JMP32 instructions will only be available for -mcpu=v3. Host probe hook has
been updated accordingly.
JMP32 instructions will only be enabled in code-gen when -mattr=+alu32
enabled, meaning compiling the program using sub-register mode.
For JMP32 encoding, it is a new instruction class, and is using the
reserved eBPF class number 0x6.
This patch has been tested by compiling and running kernel bpf selftests
with JMP32 enabled.
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353384
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 7 Feb 2019 10:35:34 +0000 (10:35 +0000)]
AArch64: implement copy for paired GPR registers.
When doing 128-bit atomics using CASP we might need to copy a GPRPair to a
different register, but that was unimplemented up to now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353383
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 7 Feb 2019 06:21:28 +0000 (06:21 +0000)]
[BranchFolding] Remove dead code for handling EHPad blocks
Summary: This code tries to handle the case where IBB is an EHPad, but there's an earlier check that uses PBB->hasEHPadSuccessor(). Where PBB is a predecessor of IBB. The hasEHPadSuccessor function would have visited IBB and seen that it was an EHPad and returned false. This would prevent us from reaching this code with IBB as an EHPad.
Looks like this code was originally added in rL37427 (ancient) and made dead in rL143001.
Reviewers: rnk, void, efriedma
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D57358
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353375
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Thu, 7 Feb 2019 05:20:00 +0000 (05:20 +0000)]
Bump minimum toolchain version
Summary:
The RFC on moving past C++11 got good traction:
http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html
This patch therefore bumps the toolchain versions according to our policy:
llvm.org/docs/DeveloperPolicy.html#toolchain
Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, mehdi_amini, jyknight, rsmith, chandlerc, smeenai, hans, reames, lattner, lhames, erichkeane
Differential Revision: https://reviews.llvm.org/D57264
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353374
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail R. Gadelha [Thu, 7 Feb 2019 03:19:45 +0000 (03:19 +0000)]
Move the SMT API to LLVM
Moved everything SMT-related to LLVM and updated the cmake scripts.
Differential Revision: https://reviews.llvm.org/D54978
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353373
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 7 Feb 2019 02:40:49 +0000 (02:40 +0000)]
gn build: Merge the test part of r353237.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353369
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 7 Feb 2019 02:35:22 +0000 (02:35 +0000)]
[WebAssembly] Update test output after rL353357. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353368
91177308-0d34-0410-b5e6-
96231b3b80d8
Brad Smith [Thu, 7 Feb 2019 02:06:58 +0000 (02:06 +0000)]
Add OpenBSD support to be able to get the thread name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353367
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 7 Feb 2019 01:24:44 +0000 (01:24 +0000)]
[WebAssembly] Add symbol flag to the binary format llvm.used
Summary:
Rather than add a new attribute
See https://github.com/WebAssembly/tool-conventions/issues/64
Subscribers: dschuff, jgravelle-google, aheejin, sunfish, rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57864
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353360
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 7 Feb 2019 01:22:07 +0000 (01:22 +0000)]
Fix a minor grammar thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353359
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 7 Feb 2019 01:17:34 +0000 (01:17 +0000)]
[WebAssembly] Expand symbol flags shown by llvm-objdump --symbols
Differential Revision: https://reviews.llvm.org/D57861
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353357
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Thu, 7 Feb 2019 01:12:56 +0000 (01:12 +0000)]
[cmake] Drop clang-tools-extra from LLVM_ALL_PROJECTS
We iterate over the list and only enable projects from that list that
are present in LLVM_ENABLE_PROJECTS and disable all other projects. Most
users will only specify clang in LLVM_ENABLE_PROJECTS and expect
clang-tools-extra to be implicitly enabled, so remove clang-tools-extra
from LLVM_ALL_PROJECTS so that it doesn't get disabled instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353354
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Thu, 7 Feb 2019 00:11:43 +0000 (00:11 +0000)]
Remove reference to non-existent function. NFC.
This comment is old. The code in question was removed in rL203174
Differential Revision: https://reviews.llvm.org/D57856
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353352
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Wed, 6 Feb 2019 21:50:45 +0000 (21:50 +0000)]
[llvm-ar] Remove leading slash when printing thin archive members
Reviewers: ruiu
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57845
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353347
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Wed, 6 Feb 2019 21:49:47 +0000 (21:49 +0000)]
[cmake] Add all subprojects to LLVM_ALL_PROJECTS
Make LLVM_ALL_PROJECTS reflect all top-level directories in the monorepo
rather than an arbitrary subset. clang-tools-extra is technically
unnecessary since it gets enabled by clang, but having it there for
consistency shouldn't hurt either.
Differential Revision: https://reviews.llvm.org/D57843
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353346
91177308-0d34-0410-b5e6-
96231b3b80d8
Roland Froese [Wed, 6 Feb 2019 21:34:44 +0000 (21:34 +0000)]
[PowerPC] Add vector truncate test to prep for D56507 NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353344
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Wed, 6 Feb 2019 21:08:17 +0000 (21:08 +0000)]
[cmake] Add openmp to LLVM_ALL_PROJECTS
It'll get ignored in LLVM_ENABLE_PROJECTS after r353148 otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353343
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Wed, 6 Feb 2019 20:51:04 +0000 (20:51 +0000)]
[libObject][NFC] Include filename in error message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353341
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Wed, 6 Feb 2019 20:25:17 +0000 (20:25 +0000)]
[LICM/MSSA] Add promotion to scalars by building an AliasSetTracker with MemorySSA.
Summary:
Experimentally we found that promotion to scalars carries less benefits
than sinking and hoisting in LICM. When using MemorySSA, we build an
AliasSetTracker on demand in order to reuse the current infrastructure.
We only build it if less than AccessCapForMSSAPromotion exist in the
loop, a cap that is by default set to 250. This value ensures there are
no runtime regressions, and there are small compile time gains for
pathological cases. A much lower value (20) was found to yield a single
regression in the llvm-test-suite and much higher benefits for compile
times. Conservatively we set the current cap to a high value, but we will
explore lowering it when MemorySSA is enabled by default.
Reviewers: sanjoy, chandlerc
Subscribers: nemanjai, jlebar, Prazek, george.burgess.iv, jfb, jsji, llvm-commits
Differential Revision: https://reviews.llvm.org/D56625
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353339
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 6 Feb 2019 20:12:03 +0000 (20:12 +0000)]
[DAG] Immediately cleanup unused nodes from extend-based combines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353338
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Berg [Wed, 6 Feb 2019 19:57:06 +0000 (19:57 +0000)]
Move IR flag handling directly into builder calls for cases translated from Instructions in GlobalIsel
Reviewers: aditya_nandakumar, volkan
Reviewed By: aditya_nandakumar
Subscribers: rovka, kristof.beyls, volkan, Petar.Avramovic
Differential Revision: https://reviews.llvm.org/D57630
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353336
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Wed, 6 Feb 2019 19:55:12 +0000 (19:55 +0000)]
[AliasSetTracker] Pass MustAlias to addPointer more often.
Summary:
Pass the alias info to addPointer when available. Will save an alias()
call for must sets when adding a known Must or May alias.
[Part of a series of cleanup patches]
Reviewers: reames, mkazantsev
Subscribers: sanjoy, jlebar, llvm-commits
Differential Revision: https://reviews.llvm.org/D56613
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353335
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 6 Feb 2019 19:50:59 +0000 (19:50 +0000)]
[X86] Change the CPU on the test case for pr40529.ll to really show the bug. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353334
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 6 Feb 2019 19:45:47 +0000 (19:45 +0000)]
[X86][DAG] Avoid creating dangling bitcast.
combineExtractWithShuffle may leave a dangling bitcast which may
prevent further optimization in later passes. Avoid constructing it
unless it is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353333
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 6 Feb 2019 19:40:11 +0000 (19:40 +0000)]
[x86] add tests for horizontal ops (PR38971, PR33758); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353332
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Wed, 6 Feb 2019 19:23:31 +0000 (19:23 +0000)]
[SystemZ] Improved handling of the @llvm.ctlz intrinsic.
Since SystemZ supports counting of leading zeros with the FLOGR instruction,
isCheapToSpeculateCtlz() should return true, which it now does.
ISD::CTLZ_ZERO_UNDEF i32 is now handled the same way as ISD::CTLZ is, which
is needed since promotion to i64 is required and CTLZ_ZERO_UNDEF is only
expanded to CTLZ if it is Legal or Custom.
Review: Ulrich Weigand
https://reviews.llvm.org/D57710
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353330
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 6 Feb 2019 19:20:47 +0000 (19:20 +0000)]
build: Remove the cmake check for malloc.h.
As far as I can tell, malloc.h is only being used here to provide
a definition of mallinfo (malloc itself is declared in stdlib.h via
cstdlib). We already have a macro for whether mallinfo is available,
so switch to using that instead.
Differential Revision: https://reviews.llvm.org/D57807
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353329
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Wed, 6 Feb 2019 18:59:19 +0000 (18:59 +0000)]
[SystemZ] Wait with VGBM selection until after DAGCombine2.
Don't lower BUILD_VECTORs to BYTE_MASK, but instead expose the BUILD_VECTORs
to the DAGCombiner and select them to VGBM in Select(). This allows the
DAGCombiner to understand the constant vector values.
For floating point, only all-zeros vectors are now generated with VGBM, as it
turned out to be somewhat complicated to handle any arbitrary constants,
while in practice this is very rare and hardly needed.
The SystemZ ISD opcodes z_byte_mask, z_vzero and z_vones have been removed.
Review: Ulrich Weigand
https://reviews.llvm.org/D57152
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353325
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 6 Feb 2019 18:43:37 +0000 (18:43 +0000)]
[opt-viewer] Add --filter option to select remarks for displaying.
This allows limiting the displayed remarks to the ones with names
matching the filter (regular) expression.
Generating html pages for a larger project with optimization remarks can
result in a huge HTML documents and using --filter allows to focus on a
set of interesting remarks.
Reviewers: hfinkel, anemet, thegameg, serge-sans-paille
Reviewed By: anemet
Differential Revision: https://reviews.llvm.org/D57827
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353322
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Pettersson [Wed, 6 Feb 2019 17:36:18 +0000 (17:36 +0000)]
[SelectionDAG] Cleanup some code comments. NFC
Don't repeat the function name in some doxygen
comments.
(Just a minor cleanup, while testing to push
from the git monorepo setup.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353317
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 6 Feb 2019 17:25:54 +0000 (17:25 +0000)]
[GlobalISel][NFC] Gardening: Factor out code for simple unary intrinsics
There was a lot of repeated code wrt unary math intrinsics in
translateKnownIntrinsic. This factors out the repeated MIRBuilder code into
two functions: translateSimpleUnaryIntrinsic and getSimpleUnaryIntrinsicOpcode.
This simplifies adding simple unary intrinsics, since after this, all you have
to do is add the mapping to SimpleUnaryIntrinsicOpcodes.
Differential Revision: https://reviews.llvm.org/D57774
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353316
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Wed, 6 Feb 2019 17:16:33 +0000 (17:16 +0000)]
[yaml2obj]Allow number for ELF symbol type
yaml2obj previously only recognised standard STT_* names, and didn't
allow arbitrary numbers. This change allows the user to specify a number
for the type instead. It also adds a test to verify the existing
behaviour for obj2yaml for unkown symbol types.
Reviewed by: grimar
Differential Revision: https://reviews.llvm.org/D57822
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353315
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 6 Feb 2019 16:43:54 +0000 (16:43 +0000)]
[InstCombine] X | C == C --> (X & ~C) == 0
We should canonicalize to one of these forms,
and compare-with-zero could be more conducive
to follow-on transforms. This also leads to
generally better codegen as shown in PR40611:
https://bugs.llvm.org/show_bug.cgi?id=40611
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353313
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 6 Feb 2019 16:17:05 +0000 (16:17 +0000)]
[InstCombine] add tests for PR40611 and regenerate checks; NFC
Lots of unrelated diffs here from the newer version of the script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353312
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 6 Feb 2019 15:26:35 +0000 (15:26 +0000)]
AArch64: enforce even/odd register pairs for CASP instructions.
ARMv8.1a CASP instructions need the first of the pair to be an even register
(otherwise the encoding is unallocated). We enforced this during assembly, but
not CodeGen before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353308
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 6 Feb 2019 15:26:29 +0000 (15:26 +0000)]
[InlineAsm][X86] Add backend support for X86 flag output parameters.
Allow custom handling of inline assembly output parameters and add X86
flag parameter support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353307
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Wed, 6 Feb 2019 15:12:46 +0000 (15:12 +0000)]
[SelectionDAGBuilder] Refactor Inline Asm output check. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353305
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 6 Feb 2019 15:10:13 +0000 (15:10 +0000)]
[SystemZ] Do not return INT_MIN from strcmp/memcmp
The IPM sequence currently generated to compute the strcmp/memcmp
result will return INT_MIN for the "less than zero" case. While
this is in compliance with the standard, strictly speaking, it
turns out that common applications cannot handle this, e.g. because
they negate a comparison result in order to implement reverse
compares.
This patch changes code to use a different sequence that will result
in -2 for the "less than zero" case (same as GCC). However, this
requires that the two source operands of the compare instructions
are inverted, which breaks the optimization in removeIPMBasedCompare.
Therefore, I've removed this (and all of optimizeCompareInstr), and
replaced it with a mostly equivalent optimization in combineCCMask
at the DAGcombine level.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353304
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 6 Feb 2019 15:07:59 +0000 (15:07 +0000)]
AArch64: annotate atomics with dropped acquire semantics when printing.
A quirk of the v8.1a spec is that when the writeback regiser for an atomic
read-modify-write instruction is wzr/xzr, the instruction no longer enforces
acquire ordering. However, it's still written with the misleading 'a' mnemonic.
So this adds an annotation when disassembling such instructions, mentioning the
change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353303
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 6 Feb 2019 14:59:39 +0000 (14:59 +0000)]
[x86] vectorize cast ops in lowering to avoid register file transfers
The proposal in D56796 may cross the line because we're trying to avoid vectorization
transforms in generic DAG combining. So this is an alternate, later, x86-specific
translation of that patch.
There are several potential follow-ups to enhance this:
1. Allow extraction from non-zero element index.
2. Peek through extends of smaller width integers.
3. Support x86-specific conversion opcodes like X86ISD::CVTSI2P
Differential Revision: https://reviews.llvm.org/D56864
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353302
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Wed, 6 Feb 2019 14:57:28 +0000 (14:57 +0000)]
[MCA] Speedup ResourceManager queries. NFCI
When a resource unit R is released, the ResourceManager notifies groups that
contain R. Before this patch, the logic in method ResourceManager::release()
implemented a potentially slow iterative search of dependent groups on the
entire set of processor resources.
This patch replaces that logic with a simpler (and often faster) lookup on array
`Resource2Groups`. This patch gives an average speedup of ~3-4% (observed on a
release build when testing for target btver2).
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353301
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Wed, 6 Feb 2019 13:53:47 +0000 (13:53 +0000)]
gn build: Merge r353265, r353237
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353298
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Wed, 6 Feb 2019 13:45:22 +0000 (13:45 +0000)]
Attempt to fix buildbot after r353289
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353294
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Wed, 6 Feb 2019 12:36:17 +0000 (12:36 +0000)]
[DAGCombine][NFC] GatherAllAliases should take a LSBaseSDNode.
GatherAllAliases only makes sense for LSBaseSDNode. Enforce it with
static typing instead of runtime cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353291
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Wed, 6 Feb 2019 11:27:00 +0000 (11:27 +0000)]
[NFC] Simplify check in guard widening
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353290
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Wed, 6 Feb 2019 11:00:07 +0000 (11:00 +0000)]
[llvm-objcopy] Allow regular expressions in name comparison
Differential revision: https://reviews.llvm.org/D57517
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353289
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Wed, 6 Feb 2019 10:31:50 +0000 (10:31 +0000)]
[DebugInfo]Print correct value for special opcode address increment
The wrong variable was being used when printing the address increment in
verbose output of .debug_line. This patch fixes this.
Reviewed by: JDevlieghere
Differential Revision: https://reviews.llvm.org/D57693
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353288
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Wed, 6 Feb 2019 10:13:14 +0000 (10:13 +0000)]
[DebugInfo][llvm-symbolizer]Add some tests for edge cases when symbolizing
This patch adds half a dozen new tests that test various edge cases in
the behaviour of the symbolizer and DWARF data parsing. All of them test
the current behaviour.
Reviewed by: JDevlieghere, aprantl
Differential Revision: https://reviews.llvm.org/D57741
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353286
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Wed, 6 Feb 2019 08:57:01 +0000 (08:57 +0000)]
[yaml::BinaryRef] Slight perf tuning (for llvm-exegesis analysis mode)
Summary:
llvm-exegesis uses this functionality to read it's benchmark dumps.
This reading of `.yaml`s takes ~60% of runtime for 14656 benchmark points (i.e. one sweep over all x86 instructions),
but only 30% of time for 3x as much benchmark points.
In particular, this `BinaryRef` appears to be an obvious pain point.
Without patch:
```
$ perf stat -r 25 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file="" -analysis-inconsistencies-output-file=/tmp/clusters-orig.html
no exegesis target for x86_64-unknown-linux-gnu, using default
Parsed 14656 benchmark points
Printing sched class consistency analysis results to file '/tmp/clusters-orig.html'
...
no exegesis target for x86_64-unknown-linux-gnu, using default
Parsed 14656 benchmark points
Printing sched class consistency analysis results to file '/tmp/clusters-orig.html'
Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file= -analysis-inconsistencies-output-file=/tmp/clusters-orig.html' (25 runs):
972.86 msec task-clock # 0.994 CPUs utilized ( +- 0.25% )
30 context-switches # 30.774 M/sec ( +- 21.74% )
0 cpu-migrations # 0.370 M/sec ( +- 67.81% )
11873 page-faults # 12211.512 M/sec ( +- 0.00% )
3898373408 cycles #
4009682.186 GHz ( +- 0.25% ) (83.12%)
360399748 stalled-cycles-frontend # 9.24% frontend cycles idle ( +- 0.54% ) (83.24%)
1099450483 stalled-cycles-backend # 28.20% backend cycles idle ( +- 0.59% ) (33.63%)
4910528820 instructions # 1.26 insn per cycle
# 0.22 stalled cycles per insn ( +- 0.13% ) (50.21%)
1111976775 branches #
1143726625.854 M/sec ( +- 0.10% ) (66.77%)
23248474 branch-misses # 2.09% of all branches ( +- 0.19% ) (83.29%)
0.97850 +- 0.00647 seconds time elapsed ( +- 0.66% )
```
With the patch:
```
$ perf stat -r 25 ./bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file="" -analysis-inconsistencies-output-file=/tmp/clusters-new.html
no exegesis target for x86_64-unknown-linux-gnu, using default
Parsed 14656 benchmark points
Printing sched class consistency analysis results to file '/tmp/clusters-new.html'
...
no exegesis target for x86_64-unknown-linux-gnu, using default
Parsed 14656 benchmark points
Printing sched class consistency analysis results to file '/tmp/clusters-new.html'
Performance counter stats for './bin/llvm-exegesis -mode=analysis -analysis-epsilon=1.0 -benchmarks-file=/tmp/benchmarks-inverse_throughput-onefull.yaml -analysis-clusters-output-file= -analysis-inconsistencies-output-file=/tmp/clusters-new.html' (25 runs):
905.29 msec task-clock # 0.999 CPUs utilized ( +- 0.11% )
15 context-switches # 16.533 M/sec ( +- 32.27% )
0 cpu-migrations # 0.000 K/sec
11873 page-faults # 13121.789 M/sec ( +- 0.00% )
3627759720 cycles #
4009283.100 GHz ( +- 0.11% ) (83.19%)
370401480 stalled-cycles-frontend # 10.21% frontend cycles idle ( +- 0.22% ) (83.19%)
1007114438 stalled-cycles-backend # 27.76% backend cycles idle ( +- 0.34% ) (33.62%)
4414014304 instructions # 1.22 insn per cycle
# 0.23 stalled cycles per insn ( +- 0.08% ) (50.36%)
1003751700 branches #
1109314021.971 M/sec ( +- 0.07% ) (66.97%)
24611010 branch-misses # 2.45% of all branches ( +- 0.10% ) (83.41%)
0.90593 +- 0.00105 seconds time elapsed ( +- 0.12% )
```
So this decreases the overall run time of llvm-exegesis analysis mode (on one sweep) by roughly -7%.
To be noted, `BinaryRef::writeAsBinary()` change is the reason for the perf changes,
usage of `llvm::isHexDigit()` instead of `isxdigit()` does not appear to have any perf impact,
i have only changed it "for symmetry".
`writeAsBinary()` change is correct, it produces identical de-hex-ified buffer, and the final output is thus identical:
```
$ sha512sum /tmp/clusters-*
db4bbd904fe8840853b589b032c5041bc060b91bcd9c27b914b56581fbc473550eea74b852238c79963b5adf2419f379e9f5db76784048b48e3937f9f3e732bf /tmp/clusters-new.html
db4bbd904fe8840853b589b032c5041bc060b91bcd9c27b914b56581fbc473550eea74b852238c79963b5adf2419f379e9f5db76784048b48e3937f9f3e732bf /tmp/clusters-orig.html
```
Reviewers: silvas, espindola, sbc100, zturner, courbet, gchatelet
Reviewed By: gchatelet
Subscribers: tschuett, RKSimon, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57699
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353282
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Wed, 6 Feb 2019 08:02:46 +0000 (08:02 +0000)]
Fix misspelled filenames in file headers of llvm/{MC,Object,CodeGen}/*.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353278
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Wed, 6 Feb 2019 07:56:36 +0000 (07:56 +0000)]
[NFC] Factor out detatchment of dead blocks from their erasing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353277
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Wed, 6 Feb 2019 07:49:17 +0000 (07:49 +0000)]
[LoopSimplifyCFG] Do not count dead exit blocks twice, make CFG simpler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353276
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Wed, 6 Feb 2019 06:33:02 +0000 (06:33 +0000)]
[NFC] Revert rL353274
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353275
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Wed, 6 Feb 2019 06:00:02 +0000 (06:00 +0000)]
[NFC] Extend API of DeleteDeadBlock(s) to collect updates without DTU
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353274
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Wed, 6 Feb 2019 05:40:31 +0000 (05:40 +0000)]
[NFC] Replace readonly SmallVectorImpl with ArrayRef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353273
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Wed, 6 Feb 2019 04:29:39 +0000 (04:29 +0000)]
[HotColdSplit] Move splitting after instrumented PGO use
Summary:
Follow up to D57082 which moved splitting earlier in the pipeline, in
order to perform it before inlining. However, it was moved too early,
before the IR is annotated with instrumented PGO data. This caused the
splitting to incorrectly determine cold functions.
Move it to just after PGO annotation (still before inlining), in both
pass managers.
Reviewers: vsk, hiraditya, sebpop
Subscribers: mehdi_amini, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57805
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353270
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Wed, 6 Feb 2019 03:51:00 +0000 (03:51 +0000)]
[CMake] Unify scripts for generating VCS headers
Previously, there were two different scripts for generating VCS headers:
one used by LLVM and one used by Clang and lldb. They were both similar,
but different. They were both broken in their own ways, for example the
one used by Clang didn't properly handle monorepo resulting in an
incorrect version information reported by Clang.
This change unifies two the scripts by introducing a new script that's
used from both LLVM, Clang and lldb, ensures that the new script
supports both monorepo and standalone SVN and Git setups, and removes
the old scripts.
Differential Revision: https://reviews.llvm.org/D57063
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353268
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 6 Feb 2019 03:46:40 +0000 (03:46 +0000)]
[AliasSetTracker] Minor style tweak to avoid a variable w/two distinct live ranges [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353267
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Wed, 6 Feb 2019 03:19:04 +0000 (03:19 +0000)]
[Test] Add codegen tests for unordered and monotonic integer operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353266
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Wed, 6 Feb 2019 02:52:52 +0000 (02:52 +0000)]
Move DomTreeUpdater from IR to Analysis
DomTreeUpdater depends on headers from Analysis, but is in IR. This is a
layering violation since Analysis depends on IR. Relocate this code from IR
to Analysis to fix the layering violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353265
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 6 Feb 2019 00:19:56 +0000 (00:19 +0000)]
[x86] add tests for extract+sitofp; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353249
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 6 Feb 2019 00:17:03 +0000 (00:17 +0000)]
[WebAssembly] Tidy up `let` statements in .td files (NFC)
Summary:
- Delete {} for one-line `let` statements
- Don't indent within `let` blocks
- Add comments after `let` block's closing braces
Reviewers: tlively
Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57730
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353248
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 5 Feb 2019 23:52:08 +0000 (23:52 +0000)]
[BasicAA] Cache nonEscapingLocalObjects for alias() calls.
Summary:
Use a small cache for Values tested by nonEscapingLocalObject().
Since the calls to PointerMayBeCaptured are fairly expensive, this saves
a good amount of compile time for anything relying heavily on
BasicAA.alias() calls.
This uses the same approach as the AliasCache, i.e. the cache is reset
after each alias() call. The cache is not used or updated by modRefInfo
calls since it's harder to know when to reset the cache.
Testcases that show improvements with this patch are too large to
include. Example compile time improvement: 7s to 6s.
Reviewers: chandlerc, sunfish
Subscribers: sanjoy, jlebar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57627
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353245
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 5 Feb 2019 23:48:13 +0000 (23:48 +0000)]
gn build: Fix clang-tidy build
Not depending on //clang/lib/StaticAnalyzer/Core and
//clang/lib/StaticAnalyzer/Frontend causes a linker error even if
ClangSACheckers are not supported.
Undefined symbols for architecture x86_64:
"clang::ento::CreateAnalysisConsumer(clang::CompilerInstance&)", referenced from:
clang::tidy::ClangTidyASTConsumerFactory::CreateASTConsumer(
clang::CompilerInstance&, llvm::StringRef)
in libclangTidy.a(libclangTidy.ClangTidy.o)
Patch from Mirko Bonadei <mbonadei@webrtc.org>!
Differential Revision: https://reviews.llvm.org/D57777
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353244
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 5 Feb 2019 23:39:02 +0000 (23:39 +0000)]
[HotColdSplit] Do not split out `resume` instructions
Resumes that are not reachable from a cleanup landing pad are considered
to be unreachable. It’s not safe to split them out.
rdar://
47808235
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353242
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 5 Feb 2019 23:38:55 +0000 (23:38 +0000)]
Orc: Simplify RPC naming system by using function-local statics
The existing scheme of class template static members for Name and
NameMutex is a bit verbose, involves global ctors (even if they're cheap
for string and mutex, still not entirely free), and (importantly/my
immediate motivation here) trips over a bug in LLVM's modules
implementation that's a bit involved (hmm, sounds like Mr. Smith has a
fix for the modules thing - but I'm still inclined to commit this patch
as general goodness).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353241
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Yung [Tue, 5 Feb 2019 23:27:38 +0000 (23:27 +0000)]
Fixup test on Windows with a case-insensitive filesystem due to path printing changes from r352704.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353238
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 5 Feb 2019 23:17:11 +0000 (23:17 +0000)]
[ADT] Add a fallible_iterator wrapper.
A fallible iterator is one whose increment or decrement operations may fail.
This would usually be supported by replacing the ++ and -- operators with
methods that return error:
class MyFallibleIterator {
public:
// ...
Error inc();
Errro dec();
// ...
};
The downside of this style is that it no longer conforms to the C++ iterator
concept, and can not make use of standard algorithms and features such as
range-based for loops.
The fallible_iterator wrapper takes an iterator written in the style above
and adapts it to (mostly) conform with the C++ iterator concept. It does this
by providing standard ++ and -- operator implementations, returning any errors
generated via a side channel (an Error reference passed into the wrapper at
construction time), and immediately jumping the iterator to a known 'end'
value upon error. It also marks the Error as checked any time an iterator is
compared with a known end value and found to be inequal, allowing early exit
from loops without redundant error checking*.
Usage looks like:
MyFallibleIterator I = ..., E = ...;
Error Err = Error::success();
for (auto &Elem : make_fallible_range(I, E, Err)) {
// Loop body is only entered when safe.
// Early exits from loop body permitted without checking Err.
if (SomeCondition)
return;
}
if (Err)
// Handle error.
* Since failure causes a fallible iterator to jump to end, testing that a
fallible iterator is not an end value implicitly verifies that the error is a
success value, and so is equivalent to an error check.
Reviewers: dblaikie, rupprecht
Subscribers: mgorny, dexonsmith, kristina, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57618
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353237
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Tue, 5 Feb 2019 23:01:41 +0000 (23:01 +0000)]
[WebAssembly] Add a comment about why v128.const test was disabled (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353236
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 5 Feb 2019 22:58:45 +0000 (22:58 +0000)]
[InstCombine] limit extracting shuffle transform based on uses
As discussed in D53037, this can lead to worse codegen, and we
don't generally expect the backend to be able to optimize
arbitrary shuffles. If there's only one use of the 1st shuffle,
that means it's getting removed, so that should always be
safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353235
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Tue, 5 Feb 2019 22:47:29 +0000 (22:47 +0000)]
[WebAssembly] Disable a v128.const test line temporarily
r353131 caused failures in v128.const test for clang-ppc64be-linux-lnt
and clang-s390x-linux bots. This temporarily disables that line until
it is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353234
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 5 Feb 2019 22:46:13 +0000 (22:46 +0000)]
[InstCombine] split shuffle test to show extra use constraint; NFC
As discussed in D53037, this transform can cause codegen problems
if the 1st shuffle has multiple uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353233
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Tue, 5 Feb 2019 22:34:45 +0000 (22:34 +0000)]
[PGO] Use a function for creating variable for profile file name. NFC.
Factored out the code for creating variable for profile file name to
a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353230
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Jovanovic [Tue, 5 Feb 2019 22:23:46 +0000 (22:23 +0000)]
[elfabi] Fix the type of the variable formated for error output
Change the format type of Dyn.SONameOffset to PRIx64 since it is a uint64_t.
The problem was detected on mips builds, where it was printing junk values
and causing test failure.
Patch by Milos Stojanovic.
Differential Revision: https://reviews.llvm.org/D57676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353225
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Tue, 5 Feb 2019 22:14:40 +0000 (22:14 +0000)]
[NFC][GlobalISel]: Add a convenience method to MachineInstrBuilder to simplify getOperand(i).getReg()
https://reviews.llvm.org/D57608
It's a common pattern in GISel to have a MachineInstrBuilder from which we get various regs
(commonly MIB->getOperand(0).getReg()). This adds a helper method and the above can be
replaced with MIB.getReg(0).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353223
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 5 Feb 2019 21:47:42 +0000 (21:47 +0000)]
[X86] Regenerate tests missed in r353061. NFC
We now print the implicit %st register on these instruction, but since they occur at the end of the line, FileCheck didn't see they were missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353222
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 5 Feb 2019 21:14:09 +0000 (21:14 +0000)]
[MC] Don't error on numberless .file directives on MachO
Summary:
Before r349976, MC ignored such directives when producing an object file
and asserted when re-producing textual assembly output. I turned this
assertion into a hard error in both cases in r349976, but this makes it
unnecessarily difficult to write a single assembly file that supports
both MachO and other object formats that support .file. A user reported
this as PR40578, and we decided to go back to ignoring the directive.
Fixes PR40578
Reviewers: mstorsjo
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57772
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353218
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Davis [Tue, 5 Feb 2019 21:01:01 +0000 (21:01 +0000)]
[llvm-readobj] Display sections that do not belong to a segment in the section-mapping
Summary:
The following patch adds the "None" line to the section to segment mapping dump.
That line lists the sections that do not belong to any segment.
I realize that this change differs from GNU readelf which does not display the latter information.
I'd rather not add this "feature" under a command line option. I think that might introduce confusion, since users would have to
make an additional decision as to if they want to see all of the section-to-segment map or just a subset of it.
Another option is to only print the "None" line if the `--section-mapping` option is passed; however,
that might also introduce some confusion, because the section-to-segment map would be different between`--program-headers`
and the `--section-mapping` output. While the difference is just the "None" line, it seems that if we choose to display
the segment-to-section mapping, then we should always display the whole map including the sections
that do not belong to segments.
```
Section to Segment mapping:
Segment Sections...
00
01 .interp
02 .interp .note.ABI-tag .gnu.hash
03 .init_array .fini_array .dynamic
04 .dynamic
05 .note.ABI-tag
06 .eh_frame_hdr
07
08 .init_array .fini_array .dynamic .got
None .comment .symtab .strtab .shstrtab <--- THIS LINE
```
Reviewers: grimar, rupprecht, jhenderson, espindola
Reviewed By: rupprecht
Subscribers: khemant, emaste, arichardson, llvm-commits
Differential Revision: https://reviews.llvm.org/D57700
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353217
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Tue, 5 Feb 2019 20:57:40 +0000 (20:57 +0000)]
[WebAssembly] Lower memmove to memory.copy
Summary: The lowering is identical to the memcpy lowering.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D57727
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353216
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Tue, 5 Feb 2019 20:24:21 +0000 (20:24 +0000)]
[TargetLibraryInfo] Regroup run time functions for Windows (NFC)
Regroup supported and unsupported functions by precision and C standard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353213
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 5 Feb 2019 20:12:48 +0000 (20:12 +0000)]
Move some llvm-mc tests where they belong
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353211
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 5 Feb 2019 20:04:12 +0000 (20:04 +0000)]
GlobalISel: Verify G_GEP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353209
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Linder [Tue, 5 Feb 2019 19:50:32 +0000 (19:50 +0000)]
[AMDGPU] Consider XOR in waterfall loop as a terminator
Ensure the XOR in the waterfall loop for indirect addressing is considered a terminator.
Differential Revision: https://reviews.llvm.org/D57703
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353207
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Tue, 5 Feb 2019 19:33:47 +0000 (19:33 +0000)]
[DEBUG_INFO][NVPTX] Generate DW_AT_address_class to get the values in debugger.
Summary:
According to
https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf,
the compiler should emit the DW_AT_address_class attribute for all
variable and parameter. It means, that DW_AT_address_class attribute
should be used in the non-standard way to support compatibility with the
cuda-gdb debugger.
Clang is able to generate the information about the variable address
class. This information is emitted as the expression sequence
`DW_OP_constu <DWARF Address Space> DW_OP_swap DW_OP_xderef`. The patch
tries to find all such expressions and transform them into
`DW_AT_address_class <DWARF Address Space>` if target is NVPTX and the debugger is gdb.
If the expression is not found, then default values are used. For the
local variables <DWARF Address Space> is set to ADDR_local_space(6), for
the globals <DWARF Address Space> is set to ADDR_global_space(5). The
values are taken from the table in the same section 5.2. CUDA-Specific
DWARF Definitions.
Reviewers: echristo, probinson
Subscribers: jholewinski, aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D57157
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353203
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 5 Feb 2019 19:23:57 +0000 (19:23 +0000)]
AMDGPU: Fix assert on trunc from bitcast of build_vector
The v2i64 argument is lowered to a bitcast of v4i32 build_vector.
This would then attempt to use the i32-element as the source of the
vector truncate. This really would need to collect 2 elements from the
build_vector to produce the intended truncate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353202
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 5 Feb 2019 19:15:48 +0000 (19:15 +0000)]
[X86][SSE] Disable ZERO_EXTEND shuffle combining
rL352997 enabled ZERO_EXTEND from non-shuffle-able value types. I've disabled it for now to fix a regression identified by @asbirlea until I can fix this properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353198
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Jovanovic [Tue, 5 Feb 2019 18:09:28 +0000 (18:09 +0000)]
[PGO] Fix the type of the formated variable
Change the format type of Value to PRIu64 since it is a uint64_t.
The problem was detected on mips boards building 32-bit binaries,
where it was printing junk values and causing test failure.
Patch by Milos Stojanovic.
Differential Revision: https://reviews.llvm.org/D57583
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353194
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Widmann [Tue, 5 Feb 2019 18:05:44 +0000 (18:05 +0000)]
[LLVM-C] Add Bindings to GlobalIFunc
Summary:
Adds the standard gauntlet of accessors for global indirect functions and updates the echo test.
Now it would be nice to have a target abstraction so one could know if they have access to a suitable ELF linker and runtime.
Reviewers: whitequark, deadalnix
Reviewed By: whitequark
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56177
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353193
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 5 Feb 2019 18:01:45 +0000 (18:01 +0000)]
Enable integrated assembler on MSP430 by default.
Patch by Kristina Bessonova!
Differential Revision: https://reviews.llvm.org/D56787
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353192
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Tue, 5 Feb 2019 17:21:57 +0000 (17:21 +0000)]
[AArch64][Outliner] Don't outline BTI instructions
We can't outline BTI instructions, because they need to be the very first
instruction executed after an indirect call or branch. If we outline them, then
an indirect call might go to the branch to the outlined function, which will
fault.
Differential revision: https://reviews.llvm.org/D57753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353190
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 5 Feb 2019 17:02:49 +0000 (17:02 +0000)]
[X86][AVX] Attempt to combine shuffles to subvector broadcast load
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353189
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 5 Feb 2019 16:57:18 +0000 (16:57 +0000)]
AArch64/GlobalISel: Don't clamp from 2 to 2
This is equivalent to clampMaxNumElements, but saves a check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353188
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Tue, 5 Feb 2019 16:30:21 +0000 (16:30 +0000)]
[WebAssembly] Object: Remove redundant method. NFC.
Differential Revision: https://reviews.llvm.org/D57719
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353183
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 5 Feb 2019 16:18:30 +0000 (16:18 +0000)]
[X86][AVX] Add PR34041 subvector broadcast test cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353182
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 5 Feb 2019 15:27:40 +0000 (15:27 +0000)]
[CGP] add test for unsigned subtract of 1 with overflow; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353179
91177308-0d34-0410-b5e6-
96231b3b80d8