Commit Graph

352571 Commits

Author SHA1 Message Date
River Riddle 910fff1c1d [mlir][DenseStringAttr] Fix support for splat detection and iteration
This revision also adds proper tests for splat detection.
2020-04-26 13:53:57 -07:00
Hongtao Yu 93efe25ab3 [ViewCFG] Allow printing edge weights in debuggers
Summary:
Extending the Function::viewCFG prototypes to allow for printing block probability info in form of .dot files during debugging.

Also avoiding an AV when no BFI/BPI available.

Reviewers: wenlei, davidxl, knaumov

Reviewed By: wenlei, davidxl

Subscribers: MaskRay, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77978
2020-04-26 13:18:29 -07:00
Matt Arsenault 4cef9812eb AMDGPU: Add some missing atomics tests
We had no FP atomic load/store coverage.
2020-04-26 15:09:35 -04:00
Sergei Trofimovich 41eb0fc00d [Lexicon] fix typo "may is" -> "is"
Reviewers: MaskRay

Reviewed By: MaskRay

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78878
2020-04-26 19:35:25 +01:00
Benjamin Kramer e3306c56b3 [IR] Since AttributeSets are sorted, binary search them.
Not likely to make a big difference, but there's a fair bit of pointer
chasing in large sets.
2020-04-26 20:15:41 +02:00
Ayal Zaks a3c964a278 [LV] Fix recording of BranchTakenCount for FoldTail
When folding tail, branch taken count is computed during initial VPlan execution
and recorded to be used by the compare computing the loop's mask. This recording
should directly set the State, instead of reusing Value2VPValue mapping which
serves original Values present prior to vectorization.
The branch taken count may be a constant Value, which may be used elsewhere in
the loop; trying to employ Value2VPValue for both leads to the issue reported in
https://reviews.llvm.org/D76992#inline-721028

Differential Revision: https://reviews.llvm.org/D78847
2020-04-26 20:13:10 +03:00
Florian Hahn 2f3e86b318 [DSE,MSSA] Continue checking more remaining candidates with dbgcnt.
After changing the candidate iteration strategy, we should continue with
the next candidate, rather than breaking out of the loop.
2020-04-26 16:59:32 +01:00
Benjamin Kramer c758181525 [clang-tidy] Use StringSwitch in a bunch of places. NFCI. 2020-04-26 17:24:47 +02:00
Sanjay Patel 3f10f1a5c7 [InstCombine] updated test comments; NFC
As suggested in review for:
rG4abab5c5ca7b
2020-04-26 11:11:00 -04:00
Benjamin Kramer ed766f1bb1 Sort EnumAttr so it matches Attribute::operator<
This means AttrBuilder will always create a sorted set of attributes and
we can skip the sorting step. Sorting attributes is surprisingly
expensive, and I recently made it worse by making it use array_pod_sort.
2020-04-26 17:00:25 +02:00
Simon Pilgrim 39f6f29613 [polly] Don't include PassSupport.h directly - include via Pass.h
Missed this in D78815
2020-04-26 15:51:32 +01:00
Alexandre Ganea fd773e8a51 Re-land [MC] Fix quadratic behavior in addPendingLabel
This was discovered when compiling large unity/blob/jumbo files.

Differential Revision: https://reviews.llvm.org/D78775
2020-04-26 10:39:42 -04:00
Simon Pilgrim acbc5ede99 [X86][SSE] getFauxShuffle - support insert(truncate/extend(extract(vec0,c0)),vec1,c1) shuffle patterns at the byte level
Followup to the PR45604 fix at rGe71dd7c011a3 where we disabled most of these cases.

By creating the shuffle at the byte level we can handle any extension/truncation as long as we track how small the scalar got and assume that the upper bytes will need to be zero.
2020-04-26 15:31:01 +01:00
Simon Pilgrim 33f043cc9f X86ISelDAGToDAG.cpp - remove unnecessary includes. NFC.
The X86 specific headers have to include these so we don't need to duplicate.
2020-04-26 14:50:53 +01:00
Simon Pilgrim 57fc701cf3 MachineFunction.h - reduce includes to forward declarations. NFC. 2020-04-26 14:50:53 +01:00
Simon Pilgrim a90d939030 X86MCTargetDesc.h - remove unused DataType.h include. NFC. 2020-04-26 14:50:52 +01:00
Simon Pilgrim 5cc84d095e X86MCTargetDesc.cpp - remove MSVC intrin.h include. NFC.
This was needed when the file called cpuid but that was removed at rL233170.
2020-04-26 14:50:52 +01:00
Simon Pilgrim fd283ddb9b X86MacroFusion.h - reduce MachineScheduler.h include. NFC.
We only need a ScheduleDAGMutation forward declaration.
2020-04-26 14:50:52 +01:00
Benjamin Kramer 3e14b95d99 raw_ostream_test: Add a missing buffer flush 2020-04-26 15:18:57 +02:00
Sam McCall 6d7637dc46 [clangd] Disable delayed template parsing in the main file
Summary:
This is on by default in windows and breaks most features in template bodies.
We'd already disabled it in code completion, now disable it for building ASTs.

Potential regressions:
 - we may give spurious errors where files with templates relying on delayed
   parsing are directly opened
 - we may misparse such template bodies that are instantiated (and therefore
   *were* previously parsed)

Still *probably* a win overall. Avoiding the regressions entirely would be
substantial work and we don't have plans for it now.

Fixes https://github.com/clangd/clangd/issues/302 (again)

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D78848
2020-04-26 14:29:38 +02:00
Florian Hahn 7d57d22baa [SCCP] Support ranges for loads and stores.
Integer ranges can be used for loaded/stored values. Note that widening
can be disabled for loads/stores, as we only rely on instructions that
cause continued increases to ranges to be widened (like binary
operators).

Reviewers: efriedma, mssimpso, davide

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D78433
2020-04-26 13:16:47 +01:00
Florian Hahn c1c5c47e64 [SCCP] Add load/store test for integer ranges. 2020-04-26 13:16:47 +01:00
Benjamin Kramer 609c2873e7 raw_ostream: Simplify code a bit. NFCI. 2020-04-26 14:07:05 +02:00
Simon Pilgrim a3982491db [Pass] Ensure we don't include PassSupport.h or PassAnalysisSupport.h directly
Both PassSupport.h and PassAnalysisSupport.h are only supposed to be included via Pass.h.

Differential Revision: https://reviews.llvm.org/D78815
2020-04-26 12:58:20 +01:00
Sander de Smalen 3817ca7dbf [SveEmitter] Add IsAppendSVALL and builtins for svptrue and svcnt[bhwd]
Some ACLE builtins leave out the argument to specify the predicate
pattern, which is expected to be expanded to an SV_ALL pattern.

This patch adds the flag IsAppendSVALL to append SV_ALL as the final
operand.

Reviewers: SjoerdMeijer, efriedma, rovka, rengolin

Reviewed By: efriedma

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77597
2020-04-26 12:44:26 +01:00
David Zarzycki 665471907a [CMake] Fix logic error: NOT LIBCLANG_BUILD_STATIC does not imply PIC 2020-04-26 07:16:42 -04:00
Simon Pilgrim e4196b1cae X86Operand.h - remove unnecessary includes. NFC. 2020-04-26 12:12:22 +01:00
Simon Pilgrim 43d6f9a876 AMDGPU/Utils - cleanup include and forward declarations. NFC.
Remove unused includes + forward declarations.
Reduce unnecessary StringRef.h includes to StringRef forward declaration.
2020-04-26 12:12:21 +01:00
Benjamin Kramer d93ad3aedb [IR] Simplify code to print string attributes a bit. NFC. 2020-04-26 13:06:50 +02:00
Benjamin Kramer 65b13610a5 Default raw_string_ostream to be unbuffered
raw_string_ostream can just use the std::string as a buffer. The buffer
requirement came from the days when the minimum buffer size was 128
(fixed in 2015) and std::string was non-SSO. Now we can just use the
inline capacity for small things and on a good growth strategy later.

This assumes that the standard library isn't doing something bad like
only growing to the exact size. I checked some common implementations
and they grow by 2x (libc++) or 1.5x (msvc) which is reasonable. We
should still check if this incurs any performance regressions though.
2020-04-26 12:45:57 +02:00
Fangrui Song 9caac56a65 [TableGen] Delete unused Record::resolveReferencesTo() after D44478. NFC 2020-04-26 01:21:41 -07:00
Nikita Popov 2b2827552a [CaptureTracking] Make MaxUsesToExplore cheaper (NFC)
The change in D78624 had a noticeable negative compile-time impact.
It seems that going through a function call for the MaxUsesToExplore
default is fairly expensive, at least if LLVM is not built with LTO.

This patch makes MaxUsesToExpore default to 0 and assigns the actual
default in the implementation instead. This recovers most of the
regression.

Differential Revision: https://reviews.llvm.org/D78734
2020-04-26 09:54:15 +02:00
Nikita Popov 164845cd92 [GVN] Reduce expression size (NFC)
Reduce size of GVN::Expression by reordering fields to reduce padding.
2020-04-26 09:43:35 +02:00
Nikita Popov 8f4c78dcf8 [IR] Use map for string attributes (NFC)
Attributes are currently stored as a simple list. Enum attributes
additionally use a bitset to allow quickly determining whether an
attribute is set. String attributes on the other hand require a
full scan of the list. As functions tend to have a lot of string
attributes (at least when clang is used), this is a noticeable
performance issue.

This patch adds an additional name => attribute map to the
AttributeSetNode, which allows querying string attributes quickly.
This results in a 3% reduction in instructions retired on CTMark.
Changes to memory usage seem to be in the noise (attribute sets are
uniqued, and we don't tend to have more than a few dozen or hundred
unique attribute sets, so adding an extra map does not have a
noticeable cost.)

Differential Revision: https://reviews.llvm.org/D78859
2020-04-26 09:38:05 +02:00
Craig Topper b9de62c2b6 [X86] Fix the cost of v16i1->v16i16 sext/zext on avx targets.
Previously we were hitting the scalarization case in the default
implementation.
2020-04-25 23:16:20 -07:00
Craig Topper 19cb26f517 [X86][CostModel] Improve costs for vXi1 sign_extend/zero_extend with avx512.
With avx512 vXi1 is legal and uses k-registers with many custom cases
for extending.
2020-04-25 23:16:20 -07:00
Craig Topper 084433702d [X86][CostModel] Add sext/zext from vXi1 tests to min-legal-vector-width.ll. NFC
We aren't properly costing extends from k-registers. I also added
command lines without avx512bw to be able to show all the different
extending strategies we have.
2020-04-25 23:15:40 -07:00
Fangrui Song e69605bfb6 [TableGen] Add TGParser::consume() 2020-04-25 21:58:54 -07:00
Kang Zhang f85e35d2a3 [NFC][PowerPC] Add the killed flag for the case expand-isel-liveness.mir 2020-04-26 04:40:20 +00:00
Nathan Ridge 230cae89db [clangd] Enable textual fallback for go-to-definition on dependent names
Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76451
2020-04-26 00:38:38 -04:00
Chris Lattner 919dcc7f68 [SourceMgr] Tidy up the SourceMgr header file to include less stuff.
Summary:
Specifically make some simple refactorings to get PointerUnion.h and
Twine.h out of the public includes.  While here, trim out a lot of
transitive includes as well.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78870
2020-04-25 21:18:59 -07:00
Fangrui Song 7016a4b5c3 llvm-tblgen -gen-dag-isel: Hoist SmallVector TmpBuf 2020-04-25 20:41:04 -07:00
Kang Zhang fe2a522533 [NFC][PowerPC] Add a new test case in expand-isel-liveness.mir 2020-04-26 03:15:54 +00:00
Fangrui Song 58dbd5befd llvm-tblgen -gen-dag-isel: Reduce lib/Target/*/*GenDAGISel.inc
X86GenDAGISel.inc: 22597697 bytes -> 20874981 bytes
2020-04-25 20:02:04 -07:00
Fangrui Song 94d331a718 [X86] Shrink lib/Target/X86/X86GenDisassemblerTables.inc
6330853 bytes -> 5207842 bytes
2020-04-25 19:44:32 -07:00
Ayke van Laethem ceba881aea
[AVR][NFC] Move preprocessor tests to Preprocessor directory
These tests were placed in the CodeGen directory while they really
should have been placed in the Preprocessor directory.

Differential Revision: https://reviews.llvm.org/D78163
2020-04-26 01:29:25 +02:00
Fangrui Song 59ec55fa19 [TableGen] Drop deprecated leading # when parsing a SimpleValue 2020-04-25 16:27:40 -07:00
Fangrui Song 2cb48d620f [TableGen] Drop deprecated leading # operation (NOP) and replace ## with # 2020-04-25 16:26:45 -07:00
Ayke van Laethem 4d41df6482
[builtins] Support architectures with 16-bit int
This is the first patch in a series to add support for the AVR target.
This patch includes changes to make compiler-rt more target independent
by not relying on the width of an int or long.

Differential Revision: https://reviews.llvm.org/D78662
2020-04-26 01:22:10 +02:00
Craig Topper c1cb733db6 [X86] Improve lowering of v16i8->v16i1 truncate under prefer-vector-width=256. 2020-04-25 15:20:33 -07:00