OSDN Git Service
Zachary Turner [Mon, 17 Dec 2018 16:14:50 +0000 (16:14 +0000)]
[MS Demangler] Add a helper function to print a Node as a string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349359
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Avramovic [Mon, 17 Dec 2018 15:12:53 +0000 (15:12 +0000)]
[MIPS GlobalISel] Remove switch statement (fix r349346 for MSVC)
Temporarily remove switch statement without any case labels
in function legalizeCustom in order to fix r349346 for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349356
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 17 Dec 2018 15:05:32 +0000 (15:05 +0000)]
ARM: use acquire/release instruction variants when available.
These features (fairly) recently got split out into their own feature, so we
should make CodeGen use them when available. The main change here is that the
check used to be based on the triple, but now it's based on CPU features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349355
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Mon, 17 Dec 2018 14:27:33 +0000 (14:27 +0000)]
[MCA] Add support for BeginGroup/EndGroup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349354
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Liu [Mon, 17 Dec 2018 14:14:40 +0000 (14:14 +0000)]
Revert "DebugInfo: Assume an absence of ranges or high_pc on a CU means the CU is empty (devoid of code addresses)"
This reverts commit r349333. It caused internal test to fail. I have
sent more information to the author.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349353
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Mon, 17 Dec 2018 14:00:37 +0000 (14:00 +0000)]
[MCA] Don't assume that createMCInstrAnalysis() always returns a valid pointer.
Class InstrBuilder wrongly assumed that llvm targets were always able to return
a non-null pointer when createMCInstrAnalysis() was called on them.
This was causing crashes when simulating executions for targets that don't
provide an MCInstrAnalysis object.
This patch fixes the issue by making MCInstrAnalysis optional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349352
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 17 Dec 2018 12:48:34 +0000 (12:48 +0000)]
Regenerate test in prep for SimplifyDemandedBits improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349350
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 17 Dec 2018 12:36:35 +0000 (12:36 +0000)]
[AggressiveInstCombine] add test for rotate insertion point; NFC
As noted in D55604 - we need a test to make sure that the new intrinsic
is inserted into a valid position.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349347
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Avramovic [Mon, 17 Dec 2018 12:31:07 +0000 (12:31 +0000)]
[MIPS GlobalISel] Lower G_UADDE and narrowScalar G_ADD
Lower G_UADDE and legalize G_ADD using narrowScalar on MIPS32.
Differential Revision: https://reviews.llvm.org/D54580
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349346
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandros Lamprineas [Mon, 17 Dec 2018 10:45:43 +0000 (10:45 +0000)]
[AArch64] Re-run load/store optimizer after aggressive tail duplication
The Load/Store Optimizer runs before Machine Block Placement. At O3 the
Tail Duplication Threshold is set to 4 instructions and this can create
new opportunities for the Load/Store Optimizer. It seems worthwhile to
run it once again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349338
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 17 Dec 2018 08:27:19 +0000 (08:27 +0000)]
DebugInfo: Assume an absence of ranges or high_pc on a CU means the CU is empty (devoid of code addresses)
GCC emitted these unconditionally on/before 4.4/March 2012
Clang emitted these unconditionally on/before 3.5/March 2014
This improves performance when parsing CUs (especially those using split
DWARF) that contain no code ranges (such as the mini CUs that may be
created by ThinLTO importing - though generally they should be/are
avoided, especially for Split DWARF because it produces a lot of very
small CUs, which don't scale well in a bunch of other ways too
(including size)).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349333
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Mon, 17 Dec 2018 08:08:31 +0000 (08:08 +0000)]
[llvm-mca] Move llvm-mca library to llvm/lib/MCA.
Summary: See PR38731.
Reviewers: andreadb
Subscribers: mgorny, javed.absar, tschuett, gbedwell, andreadb, RKSimon, llvm-commits
Differential Revision: https://reviews.llvm.org/D55557
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349332
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 17 Dec 2018 07:51:17 +0000 (07:51 +0000)]
[X86] Add test case for PR39968. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349331
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 17 Dec 2018 06:40:35 +0000 (06:40 +0000)]
[X86] Fix bad operand lookup for cmov introduced in r349315
The CC is operand 2 not operand 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349330
91177308-0d34-0410-b5e6-
96231b3b80d8
Kewen Lin [Mon, 17 Dec 2018 06:32:02 +0000 (06:32 +0000)]
[Power9][NFC]update vabsd case for better dumping
Appended options -ppc-vsr-nums-as-vr and -ppc-asm-full-reg-names to get the
more descriptive output. Also removed useless function attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349329
91177308-0d34-0410-b5e6-
96231b3b80d8
Kewen Lin [Mon, 17 Dec 2018 03:16:12 +0000 (03:16 +0000)]
[Power9][NFC]Make pre-inc-disable case more robust
With some patch adopted for Power9 vabsd* insns, some CHECKs can't get the expected results.
But it's false alarm, we should update the case more robust.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349325
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 17 Dec 2018 02:33:15 +0000 (02:33 +0000)]
[gn build] Add build files for opt and its dependency Transforms/Couroutines
Needed for check-lld.
Differential Revision: https://reviews.llvm.org/D55750
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349324
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 17 Dec 2018 01:42:39 +0000 (01:42 +0000)]
[EarlyCSE] If DI can't be salvaged, mark it as unavailable.
Fixes PR39874.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349323
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sun, 16 Dec 2018 23:48:18 +0000 (23:48 +0000)]
[InstCombine] Add cttz/ctlz + select non-bitwidth tests; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349322
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sun, 16 Dec 2018 23:48:11 +0000 (23:48 +0000)]
[InstCombine] Regenerate test checks; NFC
Also drop unnecessary entry blocks and avoid use of anonymous
variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349321
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 16 Dec 2018 19:46:04 +0000 (19:46 +0000)]
[X86] Pull out constant splat rotation detection.
We had 3 different approaches - consistently use getTargetConstantBitsFromNode and allow undef elts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349319
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sun, 16 Dec 2018 19:12:08 +0000 (19:12 +0000)]
[InstCombine] Make cttz/ctlz knownbits tests more robust; NFC
Tests checking for the addition of !range metadata should be
preserved if cttz/ctlz + icmp is optimized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349318
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 16 Dec 2018 19:07:57 +0000 (19:07 +0000)]
Regenerate test (merges X86+X64 cases). NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349317
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Dec 2018 18:35:55 +0000 (18:35 +0000)]
[X86] Remove truncation handling from EmitTest. Replace it with a DAG combine.
I'd like to try to move a lot of the flag matching out of EmitTest and push it to isel or isel preprocessing. This is a step towards that.
The test-shrink-bug.ll changie is an improvement because we are no longer interfering with test shrink handling in isel.
The pr34137.ll change is a regression, but the IR came from -O0 and was not reduced by InstCombine. So it contains a lot of redundancies like duplicate loads that made it combine poorly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349315
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 16 Dec 2018 18:35:54 +0000 (18:35 +0000)]
[X86] Autogenerate complete checks. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349314
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sun, 16 Dec 2018 18:27:37 +0000 (18:27 +0000)]
Revert "[InstCombine] Regenerate test checks; NFC"
This reverts commit r349311.
Didn't check this carefully enough...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349312
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sun, 16 Dec 2018 18:22:57 +0000 (18:22 +0000)]
[InstCombine] Regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349311
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sun, 16 Dec 2018 17:51:32 +0000 (17:51 +0000)]
[InstCombined] Add more tests for cttz/ctlz + icmp; NFC
Test cases other than icmp with the bitwidth.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349310
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sun, 16 Dec 2018 17:45:25 +0000 (17:45 +0000)]
[InstCombine] Add additional saturating add/sub + icmp tests; NFC
These test comparisons with saturating add/sub in non-canonical
form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349309
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 16 Dec 2018 16:14:42 +0000 (16:14 +0000)]
[InstCombine] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349307
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 16 Dec 2018 15:50:50 +0000 (15:50 +0000)]
[InstCombine] add tests for vector widening transforms (PR40032); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349306
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 16 Dec 2018 15:05:48 +0000 (15:05 +0000)]
[x86] increment/decrement constant vector with min/max in vsetcc lowering (PR39859)
This is part of fixing PR39859:
https://bugs.llvm.org/show_bug.cgi?id=39859
We have a crippled vector ISA, so we have to invert a typical fold and create min/max here.
As discussed in the bug report, we can probably do better by using saturating subtract when
it's available, but we should have this improvement for the min/max patterns regardless.
Alive proofs:
https://rise4fun.com/Alive/zsf
https://rise4fun.com/Alive/Qrl
Differential Revision: https://reviews.llvm.org/D55515
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349304
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 16 Dec 2018 14:57:04 +0000 (14:57 +0000)]
[DAGCombiner] allow hoisting vector bitwise logic ahead of truncates
The transform performs a bitwise logic op in a wider type followed by
truncate when both inputs are truncated from the same source type:
logic_op (truncate x), (truncate y) --> truncate (logic_op x, y)
There are a bunch of other checks that should prevent doing this when
it might be harmful.
We already do this transform for scalars in this spot. The vector
limitation was shared with a check for the case when the operands are
extended. I'm not sure if that limit is needed either, but that would
be a separate patch.
Differential Revision: https://reviews.llvm.org/D55448
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349303
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Sun, 16 Dec 2018 14:47:16 +0000 (14:47 +0000)]
Update the list of platforms & archs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349302
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Sun, 16 Dec 2018 14:19:39 +0000 (14:19 +0000)]
Use backquotes to avoid a sphinx unexpected error:
Unknown target name: "bootstrap".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349301
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Sun, 16 Dec 2018 14:04:10 +0000 (14:04 +0000)]
Document the usage of BOOTSTRAP_XXX with stage2 builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349299
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 16 Dec 2018 13:33:37 +0000 (13:33 +0000)]
[SelectionDAG] Add FSHL/FSHR support to computeKnownBits
Also exposes an issue in DAGCombiner::visitFunnelShift where we were assuming the shift amount had the result type (after legalization it'll have the targets shift amount type).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349298
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 16 Dec 2018 12:15:31 +0000 (12:15 +0000)]
[X86] Add computeKnownBits tests for funnel shift intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349297
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 16 Dec 2018 02:32:20 +0000 (02:32 +0000)]
[gn build] Merge r349167
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349291
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 16 Dec 2018 02:29:02 +0000 (02:29 +0000)]
[gn build] Add build files for obj2yaml, yaml2obj, and lib/ObjectYAML
The two executables are needed by check-lld.
Differential Revision: https://reviews.llvm.org/D55687
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349290
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 16 Dec 2018 02:27:10 +0000 (02:27 +0000)]
[gn build] Add build files for llvm-as, llvm-dis, llvm-dwarfdump, llvm-mc, FileCheck, count, not
These executables are needed by check-lld.
Differential Revision: https://reviews.llvm.org/D55688
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349289
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 15 Dec 2018 22:52:57 +0000 (22:52 +0000)]
[X86] Autogenerate complete checks. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349287
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 15 Dec 2018 21:11:49 +0000 (21:11 +0000)]
[X86] Begin cleaning up combineOr -> SHLD/SHRD. NFCI.
In preparation for converting to funnel shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349286
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 15 Dec 2018 19:43:44 +0000 (19:43 +0000)]
[X86] Lower to SHLD/SHRD on slow machines for optsize
Use consistent rules for when to lower to SHLD/SHRD for slow machines - fixes a weird issue where funnel shift gets expanded but then X86ISelLowering's combineOr sees the optsize and combines to SHLD/SHRD, but now with the modulo amount guard......
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349285
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 15 Dec 2018 19:32:26 +0000 (19:32 +0000)]
[X86] Add optsize SHLD/SHRD tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349284
91177308-0d34-0410-b5e6-
96231b3b80d8
Kamil Rytarowski [Sat, 15 Dec 2018 16:51:35 +0000 (16:51 +0000)]
Add NetBSD support in needsRuntimeRegistrationOfSectionRange.
Use linker script magic to get data/cnts/name start/end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349277
91177308-0d34-0410-b5e6-
96231b3b80d8
Kamil Rytarowski [Sat, 15 Dec 2018 16:32:41 +0000 (16:32 +0000)]
Register kASan shadow offset for NetBSD/amd64
The NetBSD x86_64 kernel uses the 0xdfff900000000000 shadow
offset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349276
91177308-0d34-0410-b5e6-
96231b3b80d8
Dinar Temirbulatov [Sat, 15 Dec 2018 14:37:01 +0000 (14:37 +0000)]
[CodeGen] Enhance machine PHIs optimization
Summary:
Make machine PHIs optimization to work for single value register taken from
several different copies. This is the first step to fix PR38917. This change
allows to get rid of redundant PHIs (see opt_phis2.mir test) to make
the subsequent optimizations (like CSE) possible and simpler.
For instance, before this patch the code like this:
%b = COPY %z
...
%a = PHI %bb1, %a; %bb2, %b
could be optimized to:
%a = %b
but the code like this:
%c = COPY %z
...
%b = COPY %z
...
%a = PHI %bb1, %a; %bb2, %b; %bb3, %c
would remain unchanged.
With this patch the latter case will be optimized:
%a = %z```.
Committed on behalf of: Anton Afanasyev anton.a.afanasyev@gmail.com
Reviewers: RKSimon, MatzeB
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D54839
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349271
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 15 Dec 2018 14:23:18 +0000 (14:23 +0000)]
Regenerate neon copy tests. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349270
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 15 Dec 2018 12:25:22 +0000 (12:25 +0000)]
Fix -Wunused-variable warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349265
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 15 Dec 2018 11:36:36 +0000 (11:36 +0000)]
[TargetLowering] Add ISD::OR + ISD::XOR handling to SimplifyDemandedVectorElts
Differential Revision: https://reviews.llvm.org/D55600
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349264
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Sat, 15 Dec 2018 10:37:01 +0000 (10:37 +0000)]
[InstSimplify] Add tests for saturating add/sub + icmp; NFC
If a saturating add/sub with a constant operand is compared to
another constant, we should be able to determine that the condition
is always true/false in some cases (but currently don't).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349261
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Sat, 15 Dec 2018 08:44:47 +0000 (08:44 +0000)]
[mips] Fix test typo in rL348914
RUN; -> RUN:
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349258
91177308-0d34-0410-b5e6-
96231b3b80d8
Kewen Lin [Sat, 15 Dec 2018 04:39:37 +0000 (04:39 +0000)]
[Power9][NFC] add setb exploitation test case
Add an original test case for setb before the exploitation actually takes effect, later we can check the difference.
Differential Revision: https://reviews.llvm.org/D55696
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349251
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Sat, 15 Dec 2018 01:32:58 +0000 (01:32 +0000)]
[SILoadStoreOptimizer] Use std::abs to avoid truncation.
Using regular abs() causes the following warning
error: absolute value function 'abs' given an argument of type 'int64_t' (aka 'long') but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
(uint32_t)abs(Dist) > MaxDist) {
^
lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:1369:19: note: use function 'std::abs' instead
which causes a bot to fail:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/18284/steps/bootstrap%20clang/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349224
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 15 Dec 2018 01:07:19 +0000 (01:07 +0000)]
[X86] Rename hasNoSignedComparisonUses to hasNoSignFlagUses. Add the instruction that only modify the O flag to the waiver list.
The only caller of this turns CMP with 0 into TEST. CMP with 0 and TEST both set OF to 0 so we should have no issues with instructions that only use OF.
Though I don't think there's any reason we would read just OF after a compare with 0 anyway. So this probably isn't an observable change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349223
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 15 Dec 2018 01:07:16 +0000 (01:07 +0000)]
[X86] Make hasNoCarryFlagUses/hasNoSignedComparisonUses take an SDValue that indicates which result is the flag result. NFCI
hasNoCarryFlagUses hardcoded that the flag result is 1 and used that to filter which uses were of interest. hasNoSignedComparisonUses just assumes the only result is flags and checks whether any user of the node is a CopyToReg instruction.
After this patch we now do a result number check in both and rely on the caller to provide the result number.
This shouldn't change behavior it was just an odd difference between the two functions that I noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349222
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Sat, 15 Dec 2018 00:58:12 +0000 (00:58 +0000)]
[WebAssembly] Check if the section order is correct
Summary:
This patch checks if the section order is correct when reading a wasm
object file in `WasmObjectFile` and converting YAML to wasm object in
yaml2wasm. (It is not possible to check when reading YAML because it is
handled exclusively by the YAML reader.)
This checks the ordering of all known sections (core sections + known
custom sections). This also adds section ID DataCount section that will
be scheduled to be added in near future.
Reviewers: sbc100
Subscribers: dschuff, mgorny, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D54924
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349221
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Sat, 15 Dec 2018 00:32:38 +0000 (00:32 +0000)]
[NewGVN] Update use counts for SSA copies when replacing them by their operands.
The current code relies on LeaderUseCount to determine if we can remove
an SSA copy, but in that the LeaderUseCount does not refer to the SSA
copy. If a SSA copy is a dominating leader, we use the operand as dominating
leader instead. This means we removed a user of a ssa copy and we should
decrement its use count, so we can remove the ssa copy once it becomes dead.
Fixes PR38804.
Reviewers: efriedma, davide
Reviewed By: davide
Differential Revision: https://reviews.llvm.org/D51595
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349217
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Sat, 15 Dec 2018 00:03:33 +0000 (00:03 +0000)]
[Util] Refer to [s|z]exts of args when converting dbg.declares (fix PR35400)
When converting dbg.declares, if the described value is a [s|z]ext,
refer to the ext directly instead of referring to its operand.
This fixes a narrowing bug (the debugger got the sign of a variable
wrong, see llvm.org/PR35400).
The main reason to refer to the ext's operand was that an optimization
may remove the ext itself, leading to a dropped variable. Now that
InstCombine has been taught to use replaceAllDbgUsesWith (r336451), this
is less of a concern. Other passes can/should adopt this API as needed
to fix dropped variable bugs.
Differential Revision: https://reviews.llvm.org/D51813
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349214
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Belevich [Fri, 14 Dec 2018 23:53:06 +0000 (23:53 +0000)]
[NVPTX] Lower instructions that expand into libcalls.
The change is an effort to split and refactor abandoned
D34708 into smaller parts.
Here the behaviour of unsupported instructions is changed
to match the behaviour of explicit intrinsics calls.
Currently LLVM crashes with:
> Assertion getInstruction() && "Not a call or invoke instruction!" failed.
With this patch LLVM produces a more sensible error message:
> Cannot select: ... i32 = ExternalSymbol'__foobar'
Author: Denys Zariaiev <denys.zariaiev@gmail.com>
Differential Revision: https://reviews.llvm.org/D55145
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349213
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 14 Dec 2018 22:44:46 +0000 (22:44 +0000)]
DebugInfo: Avoid using split DWARF when the split unit would be empty.
In ThinLTO many split CUs may be effectively empty because of the lack
of support for cross-unit references in split DWARF.
Using a split unit in those cases is just a waste/overhead - and turned
out to be one contributor to a significant symbolizer performance issue
when global variable debug info was being imported (see r348416 for the
primary fix) due to symbolizers seeing CUs with no ranges, assuming
there might still be addresses covered and walking into the split CU to
see if there are any ranges (when that split CU was in a DWP file, that
meant loading the DWP and its index, the index was extra large because
of all these fractured/empty CUs... and so was very expensive to load).
(the 3rd fix which will follow, is to assume that a CU with no ranges is
empty rather than merely missing its CU level range data - and to not
walk into its DIEs (split or otherwise) in search of address information
that is generally not present)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349207
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 14 Dec 2018 22:40:28 +0000 (22:40 +0000)]
[codeview] Add begin/endSymbolRecord helpers, NFC
Previously beginning a symbol record was excessively verbose. Now it's a
bit simpler. This follows the same pattern as begin/endCVSubsection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349205
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 14 Dec 2018 22:34:03 +0000 (22:34 +0000)]
DebugInfo: Move addAddrBase from DwarfUnit to DwarfCompileUnit
Only CUs need an address table reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349203
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 14 Dec 2018 22:33:48 +0000 (22:33 +0000)]
[Hexagon] Add patterns for shifts of v2i16
This fixes https://llvm.org/PR39983.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349202
91177308-0d34-0410-b5e6-
96231b3b80d8
Volkan Keles [Fri, 14 Dec 2018 22:11:20 +0000 (22:11 +0000)]
[GlobalISel] LegalizerHelper: Implement fewerElementsVector for G_LOAD/G_STORE
Reviewers: aemerson, dsanders, bogner, paquette, aditya_nandakumar
Reviewed By: dsanders
Subscribers: rovka, kristof.beyls, javed.absar, tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D53728
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349200
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 14 Dec 2018 22:05:44 +0000 (22:05 +0000)]
[Hexagon] Use IMPLICIT_DEF to any-extend 32-bit values to 64 bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349199
91177308-0d34-0410-b5e6-
96231b3b80d8
Farhana Aleen [Fri, 14 Dec 2018 21:13:14 +0000 (21:13 +0000)]
[AMDGPU] Promote constant offset to the immediate by finding a new base with 13bit constant offset from the nearby instructions.
Summary: Promote constant offset to immediate by recomputing the relative 13bit offset from nearby instructions.
E.g.
s_movk_i32 s0, 0x1800
v_add_co_u32_e32 v0, vcc, s0, v2
v_addc_co_u32_e32 v1, vcc, 0, v6, vcc
s_movk_i32 s0, 0x1000
v_add_co_u32_e32 v5, vcc, s0, v2
v_addc_co_u32_e32 v6, vcc, 0, v6, vcc
global_load_dwordx2 v[5:6], v[5:6], off
global_load_dwordx2 v[0:1], v[0:1], off
=>
s_movk_i32 s0, 0x1000
v_add_co_u32_e32 v5, vcc, s0, v2
v_addc_co_u32_e32 v6, vcc, 0, v6, vcc
global_load_dwordx2 v[5:6], v[5:6], off
global_load_dwordx2 v[0:1], v[5:6], off offset:2048
Author: FarhanaAleen
Reviewed By: arsenm, rampitec
Subscribers: llvm-commits, AMDGPU
Differential Revision: https://reviews.llvm.org/D55539
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349196
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Fri, 14 Dec 2018 21:04:00 +0000 (21:04 +0000)]
Add missing includes and forward decls to unbreak build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349193
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Fri, 14 Dec 2018 20:14:12 +0000 (20:14 +0000)]
[SDAG] Ignore chain operand in REG_SEQUENCE when emitting instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349186
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Fri, 14 Dec 2018 20:04:58 +0000 (20:04 +0000)]
[AArch64] Simplify the scheduling predicates (NFC)
The instruction encodings make it unnecessary to distinguish extended W-form
from X-form instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349185
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kruse [Fri, 14 Dec 2018 19:45:43 +0000 (19:45 +0000)]
[TransformWarning] Do not warn missed transformations in optnone functions.
Optimization transformations are intentionally disabled by the 'optnone'
function attribute. Therefore do not warn if transformation metadata is
still present.
Using the legacy pass manager structure, the `skipFunction` method takes
care for the optnone attribute (already called before this patch). For
the new pass manager, there is no equivalent, so we check for the
'optnone' attribute manually.
Differential Revision: https://reviews.llvm.org/D55690
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349184
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 14 Dec 2018 19:15:54 +0000 (19:15 +0000)]
[x86] add tests for extractelement of FP binops; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349179
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 14 Dec 2018 18:47:04 +0000 (18:47 +0000)]
[ARM] make test immune to scalarization improvements; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349177
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 14 Dec 2018 18:44:16 +0000 (18:44 +0000)]
[x86] make tests immune to scalarization improvements; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349176
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 14 Dec 2018 18:25:05 +0000 (18:25 +0000)]
[globalisel][combiner] Fix r349167 for release mode bots
This test relies on -debug-only which is unavailable in non-asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349174
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 14 Dec 2018 18:21:20 +0000 (18:21 +0000)]
[ADT] Fix bugs in SmallBitVector.
Fixes:
* find_last/find_last_unset - off-by-one error
* Compound assignment ops and operator== when mixing big/small modes
Patch by Brad Moody
Differential Revision: https://reviews.llvm.org/D54933
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349173
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 14 Dec 2018 18:20:21 +0000 (18:20 +0000)]
Fix Visual Studio PointerIntPair visualizer
Patch by: Trass3r
Differential Revision: https://reviews.llvm.org/D55252
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349172
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kruse [Fri, 14 Dec 2018 18:15:11 +0000 (18:15 +0000)]
[Transforms] Preserve metadata when converting invoke to call.
The `changeToCall` function did not preserve the invoke's metadata.
Currently, there is probably no metadata that depends on being applied
on a CallInst or InvokeInst. Therefore we can replace the instruction's
metadata.
This fixes http://llvm.org/PR39994
Suggested-by: Moritz Kreutzer <moritz.kreutzer@siemens.com>
Differential Revision: https://reviews.llvm.org/D55666
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349170
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 14 Dec 2018 18:10:13 +0000 (18:10 +0000)]
[MS Demangler] Fail gracefully on invalid pointer types.
Once we detect a 'P', we know we a pointer type is upcoming, so
we make some assumptions about the output that follows. If those
assumptions didn't hold, we would assert. Instead, we should
fail gracefully and propagate the error up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349169
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 14 Dec 2018 17:59:27 +0000 (17:59 +0000)]
[MS Demangler] Add a regression test for an invalid mangled name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349168
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 14 Dec 2018 17:50:14 +0000 (17:50 +0000)]
[globalisel][combiner] Make the CombinerChangeObserver a MachineFunction::Delegate
Summary:
This allows us to register it with the MachineFunction delegate and be
notified automatically about erasure and creation of instructions. However,
we still need explicit notification for modifications such as those caused
by setReg() or replaceRegWith().
There is a catch with this though. The notification for creation is
delivered before any operands can be added. While appropriate for
scheduling combiner work. This is unfortunate for debug output since an
opcode by itself doesn't provide sufficient information on what happened.
As a result, the work list remembers the instructions (when debug output is
requested) and emits a more complete dump later.
Another nit is that the MachineFunction::Delegate provides const pointers
which is inconvenient since we want to use it to schedule future
modification. To resolve this GISelWorkList now has an optional pointer to
the MachineFunction which describes the scope of the work it is permitted
to schedule. If a given MachineInstr* is in this function then it is
permitted to schedule work to be performed on the MachineInstr's. An
alternative to this would be to remove the const from the
MachineFunction::Delegate interface, however delegates are not permitted
to modify the MachineInstr's they receive.
In addition to this, the observer has three interface changes.
* erasedInstr() is now erasingInstr() to indicate it is about to be erased
but still exists at the moment.
* changingInstr() and changedInstr() have been added to report changes
before and after they are made. This allows us to trace the changes
in the debug output.
* As a convenience changingAllUsesOfReg() and
finishedChangingAllUsesOfReg() will report changingInstr() and
changedInstr() for each use of a given register. This is primarily useful
for changes caused by MachineRegisterInfo::replaceRegWith()
With this in place, both combine rules have been updated to report their
changes to the observer.
Finally, make some cosmetic changes to the debug output and make Combiner
and CombinerHelp
Reviewers: aditya_nandakumar, bogner, volkan, rtereshin, javed.absar
Reviewed By: aditya_nandakumar
Subscribers: mgorny, rovka, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D52947
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349167
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 14 Dec 2018 17:44:07 +0000 (17:44 +0000)]
[AArch64] make test immune to scalarization improvements; NFC
This is explicitly implementing what the comment says rather
than relying on the implicit zext of a costant operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349166
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 14 Dec 2018 17:43:56 +0000 (17:43 +0000)]
Fix a crash in llvm-undname with invalid types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349165
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 14 Dec 2018 17:28:52 +0000 (17:28 +0000)]
[SystemZ] make test immune to scalarization improvements; NFC
The undef operands mean this test is probably still too fragile
to accomplish what the comments suggest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349164
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 14 Dec 2018 17:23:01 +0000 (17:23 +0000)]
[Hexagon] make test immune to scalarization improvements; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349163
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 14 Dec 2018 16:49:57 +0000 (16:49 +0000)]
[x86] auto-generate complete checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349162
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 14 Dec 2018 16:46:21 +0000 (16:46 +0000)]
[x86] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349161
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 14 Dec 2018 16:44:58 +0000 (16:44 +0000)]
[x86] make tests immune to scalarization improvements; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349160
91177308-0d34-0410-b5e6-
96231b3b80d8
Ehsan Amiri [Fri, 14 Dec 2018 16:19:02 +0000 (16:19 +0000)]
NFC. Adding an empty line to test the updated commit credentials.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349158
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Linder [Fri, 14 Dec 2018 15:38:15 +0000 (15:38 +0000)]
Implement -frecord-command-line (-frecord-gcc-switches)
Implement options in clang to enable recording the driver command-line
in an ELF section.
Implement a new special named metadata, llvm.commandline, to support
frontends embedding their command-line options in IR/ASM/ELF.
This differs from the GCC implementation in some key ways:
* In GCC there is only one command-line possible per compilation-unit,
in LLVM it mirrors llvm.ident and multiple are allowed.
* In GCC individual options are separated by NULL bytes, in LLVM entire
command-lines are separated by NULL bytes. The advantage of the GCC
approach is to clearly delineate options in the face of embedded
spaces. The advantage of the LLVM approach is to support merging
multiple command-lines unambiguously, while handling embedded spaces
with escaping.
Differential Revision: https://reviews.llvm.org/D54487
Clang Differential Revision: https://reviews.llvm.org/D54489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349155
91177308-0d34-0410-b5e6-
96231b3b80d8
John Brawn [Fri, 14 Dec 2018 14:07:57 +0000 (14:07 +0000)]
[RegAllocGreedy] IMPLICIT_DEF values shouldn't prefer registers
It costs nothing to spill an IMPLICIT_DEF value (the only spill code that's
generated is a KILL of the value), so when creating split constraints if the
live-out value is IMPLICIT_DEF the exit constraint should be DontCare instead
of PrefReg.
Differential Revision: https://reviews.llvm.org/D55652
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349151
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Fri, 14 Dec 2018 13:45:38 +0000 (13:45 +0000)]
[ARM GlobalISel] Thumb2: casts between int and ptr
Mark as legal and add tests. Nothing special to do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349147
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Fri, 14 Dec 2018 13:28:34 +0000 (13:28 +0000)]
[ARM GlobalISel] Remove duplicate test. NFCI
Fixup for r349026. I forgot to delete these test functions from the
original file when I moved them to arm-legalize-exts.mir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349146
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Fri, 14 Dec 2018 12:37:24 +0000 (12:37 +0000)]
[ARM GlobalISel] Minor refactoring. NFCI
Refactor the ARMInstructionSelector to cache some opcodes in the
constructor instead of checking all the time if we're in ARM or Thumb
mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349143
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Fri, 14 Dec 2018 11:58:14 +0000 (11:58 +0000)]
[ARM GlobalISel] Allow simple binary ops in Thumb2
Mark G_ADD, G_SUB, G_MUL, G_AND, G_OR and G_XOR as legal for both ARM
and Thumb2.
Extract the legalizer tests for these opcodes into another file.
Add tests for the instruction selector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349142
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Tatham [Fri, 14 Dec 2018 11:39:55 +0000 (11:39 +0000)]
[TableGen:AsmWriter] Cope with consecutive tied operands.
When you define an instruction alias as a subclass of InstAlias, you
specify all the MC operands for the instruction it expands to, except
for operands that are tied to a previous one, which you leave out in
the expectation that the Tablegen output code will fill them in
automatically.
But the code in Tablegen's AsmWriter backend that skips over a tied
operand was doing it using 'if' instead of 'while', because it wasn't
expecting to find two tied operands in sequence.
So if an instruction updates a pair of registers in place, so that its
MC representation has two input operands tied to the output ones (for
example, Arm's UMLAL instruction), then any alias which wants to
expand to a special case of that instruction is likely to fail to
match, because the indices of subsequent operands will be off by one
in the generated printAliasInstr function.
This patch re-indents some existing code, so it's clearest when
viewed as a diff with whitespace changes ignored.
Reviewers: fhahn, rengolin, sdesmalen, atanasyan, asb, jholewinski, t.p.northover, kparzysz, craig.topper, stoklund
Reviewed By: rengolin
Subscribers: javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D53816
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349141
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 14 Dec 2018 09:25:08 +0000 (09:25 +0000)]
Revert rL349136: [llvm-exegesis] Optimize ToProcess in dbScan
Summary:
Use `vector<char> Added + vector<size_t> ToProcess` to replace `SetVector ToProcess`
We also check `Added[P]` to enqueueing a point more than once, which
also saves us a `ClusterIdForPoint_[Q].isUndef()` check.
Reviewers: courbet, RKSimon, gchatelet, john.brawn, lebedev.ri
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D54442
........
Patch wasn't approved and breaks buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349139
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 14 Dec 2018 08:28:24 +0000 (08:28 +0000)]
[DAGCombiner][X86] Prevent visitSIGN_EXTEND from returning N when (sext (setcc)) already has the target desired type for the setcc
Summary:
If the setcc already has the target desired type we can reach the getSetCC/getSExtOrTrunc after the MatchingVecType check with the exact same types as the nodes we started with. This causes those causes VsetCC to be CSEd to N0 and the getSExtOrTrunc will CSE to N. When we return N, the caller will think that meant we called CombineTo and did our own worklist management. But that's not what happened. This prevents target hooks from being called for the node.
To fix this, I've now returned SDValue if the setcc is already the desired type. But to avoid some regressions in X86 I've had to disable one of the target combines that wasn't being reached before in the case of a (sext (setcc)). If we get vector widening legalization enabled that entire function will be deleted anyway so hopefully this is only for the short term.
Reviewers: RKSimon, spatel
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D55459
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349137
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Fri, 14 Dec 2018 08:27:35 +0000 (08:27 +0000)]
[llvm-exegesis] Optimize ToProcess in dbScan
Summary:
Use `vector<char> Added + vector<size_t> ToProcess` to replace `SetVector ToProcess`
We also check `Added[P]` to enqueueing a point more than once, which
also saves us a `ClusterIdForPoint_[Q].isUndef()` check.
Reviewers: courbet, RKSimon, gchatelet, john.brawn, lebedev.ri
Subscribers: tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D54442
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349136
91177308-0d34-0410-b5e6-
96231b3b80d8