Commit Graph

351070 Commits

Author SHA1 Message Date
Kadir Cetinkaya 101a69d71b
[clangd] Reland target_info_test 2020-04-12 16:10:04 +02:00
Simon Pilgrim 2b74755ec5 TrigramIndex.h - remove unnecessary StringMap.h include. NFC
Include StringRef.h inside TrigramIndex.cpp as thats the only part of StringMap.h that is actually required.
2020-04-12 14:30:52 +01:00
Simon Pilgrim 688ac00bb2 IPO.h - replace SmallVector.h include with forward declaration. NFC. 2020-04-12 13:49:57 +01:00
Simon Pilgrim d02bc5e150 Pass.h - replace StringRef.h include with forward declaration. NFC. 2020-04-12 13:36:20 +01:00
Simon Pilgrim c46e65fa80 VirtRegMap.h - remove unnecessary MCRegisterInfo.h include. NFC 2020-04-12 13:11:13 +01:00
Simon Pilgrim 9ad6773790 SelectionDAGISel.h - remove Pass.h include and forward declarations. NFC.
Remove Pass.h include - we don't use anything direct from the header and its implicitly included by MachineFunctionPass.h.
Remove unused forward declarations.
2020-04-12 12:49:29 +01:00
Simon Pilgrim 0bd13e98cb ParallelCG.h - replace TargetMachine.h include with forward declaration. NFC.
We need to include memory.h as it was being implicitly included.

Also remove unused llvm::TargetOptions forward declaration.
2020-04-12 12:36:02 +01:00
Florian Hahn ae1e353a25 [VPlan] Turn classes with all public members into structs (NFC).
struct should be used when all members are public:
 https://llvm.org/docs/CodingStandards.html#use-of-class-and-struct-keywords

Reviewers: gilr, rengolin, Ayal, hsaito

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D77865
2020-04-12 11:03:39 +01:00
Simon Pilgrim 40581a0a2b [X86] Use isAnyZero shuffle mask helper where possible. NFC. 2020-04-12 10:57:29 +01:00
Ehud Katz 3e8de2ed74 [MLIR] Fix MLIR_MAIN_[SRC|INCLUDE]_DIR variables
Define MLIR_MAIN_INCLUDE_DIR, as it was not set anywhere.

Set MLIR_MAIN_SRC_DIR to the actual "source directory", and not the
"include directory" (as currently set).

Differential Revision: https://reviews.llvm.org/D77943
2020-04-12 09:29:07 +03:00
River Riddle 8938dea44a [mlir][IR] Manually register command line options for MLIRContext and AsmPrinter
Summary: This revision makes the registration of command line options for these two files manual with `registerMLIRContextCLOptions` and `registerAsmPrinterCLOptions` methods. This removes the last remaining static constructors within lib/.

Differential Revision: https://reviews.llvm.org/D77960
2020-04-11 23:13:00 -07:00
River Riddle 1fc6efaf6a [mlir][StorageUniquer] Replace all usages of std::function with function_ref.
Summary: std::function has a notoriously large amount of malloc traffic, whereas function_ref is a cheaper and more efficient alternative.

Differential Revision: https://reviews.llvm.org/D77959
2020-04-11 23:07:52 -07:00
Chris Lattner d985b0bf5c A few cosmetic cleanups to StringMap/StringSet.h, including fixing
the indentation of the StringSet.h file and its file comment header,
and significantly reduce redundant #includes that are already pulled
in transitively.  NFC.

This is in preparation for a more interesting patch I'll post to phab.
2020-04-11 22:14:35 -07:00
Chris Lattner aef4ec00f9 Change the identifier table in MLIRContext to use StringSet instead of
StringMap<char>, saving a byte due to the StringMapEntry specialization
for a value of NoneType.  NFC.
2020-04-11 22:07:39 -07:00
Stephen Neuendorffer 4956871c0e [MLIR] CMake cleanup for mlir-opt
A few libraries which are also Dialect libraries where independently
in the link line for mlir-opt.  Remove them.

Differential Revision: https://reviews.llvm.org/D77927
2020-04-11 22:02:16 -07:00
Stephen Neuendorffer 4c18e1d3af [MLIR] add cmake abstraction for translation libraries
Differential Revision: https://reviews.llvm.org/D77926
2020-04-11 22:02:16 -07:00
Chris Lattner ed87d9d643 Change the implementation of mlir::hash_value(Identifier) to be consistent
with DenseMapInfo<mlir::Identifier>::getHashValue. NFC.

Adjust a few variable names to follow MLIR convention while here NFC.
2020-04-11 21:59:48 -07:00
Chris Lattner 0031c7f7da Implement some micro-optimizations for Identifier. NFC
Summary:
Identifier doesn't maintain a length, so every time strref() is called,
it does a strlen.  In the case of comparisons, this isn't necessary:
there is no need to scan a string to get its length, then rescan it to
do the comparison.  Just done one comparison.

This also moves some assertions in Identifier::get as another
microoptimization for 'assertions enabled' modes.

Reviewers: rriddle!

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77958
2020-04-11 21:48:52 -07:00
Craig Topper 5b42399029 [CallSite removal][FastISel] Remove uses of CallSite.
Differential Revision: https://reviews.llvm.org/D77933
2020-04-11 20:52:45 -07:00
Craig Topper d3465e0691 [X86] Enable shuffle combining for AVX512 unless the root is used by a vselect
A lot of vectorized code doesn't use masks so we shouldn't penalize them by not doing shuffle combining on avx512 targets.

I've added support for VALIGNQ/VALIGND and 512-bit SHUF128 to prevent some regressions. I also prevented recombining 256-bit SHUF128 to PERM2X128. We may not need to add 256-bit SHUF128 support, but I don't think I found any cases requiring that in my testing.

Differential Revision: https://reviews.llvm.org/D77928
2020-04-11 20:05:10 -07:00
Stefanos Baziotis 72ffeb2d38 [LoopTerminology] LCSSA: Fix typo in code sample 2020-04-12 04:40:55 +03:00
Sam Clegg 9225ff6278 [lld][WebAssembly] Add test for --export of empty string
The actual bug was fixed in https://reviews.llvm.org/D74589

Differential Revision: https://reviews.llvm.org/D77084
2020-04-11 18:21:40 -07:00
Matt Arsenault 96819011ca AMDGPU/GlobalISel: Fix RegBankSelect for v2s16 shifts
These need to be promoted and scalarized for the SALU.
2020-04-11 20:55:33 -04:00
David Blaikie 7a45aeacf3 Revert "llvm-dwarfdump: Report errors when failing to parse loclist/debug_loc entries"
Broke an LLDB build bot & I can't seem to build LLDB locally to fix
forward...
http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/15567/steps/test/logs/stdio

This reverts commit 416fa7720e.
2020-04-11 16:54:49 -07:00
Rahman Lavaee 61d39b627a Revert "This is a test commit."
This reverts commit ab31797e16.
2020-04-11 15:55:07 -07:00
Rahman Lavaee ab31797e16 This is a test commit. 2020-04-11 15:19:46 -07:00
Matt Arsenault ac8d51a3c6 AMDGPU/GlobalISel: Legalize 16-bit shift amounts to s16
The current selector depends on 16-bit shifts using 16-bit shift
amount types, but really it should accept either for all types.
2020-04-11 18:12:26 -04:00
Uday Bondhugula 75ea9e4e40 [MLIR][NFC] add doc cross links from/to std.alloca
Add doc cross links between std.alloca and AutomaticAllocationScope.

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77956
2020-04-12 03:33:19 +05:30
Craig Topper d1da1b53ff [X86] Cleanup ISD::BRIND handling code in X86DAGToDAGISel::Select. NFC
-Drop llvm:: on MVT::i32
-Use getValueType instead of getSimpleValueType for an equality
check just cause its shorter and doesn't matter.
-Don't create a const SDValue & since its cheap to copy.
-Remove explicit case from MVT enum to EVT.
-Add message to assert.
2020-04-11 15:01:05 -07:00
Craig Topper 21a7d08e72 [X86] Move code that replaces ISD::VSELECT with X86ISD::BLENDV from X86DAGToDAGISel::Select to PreprocessISelDAG 2020-04-11 15:01:05 -07:00
Eli Friedman 4e86e5eedc [DenseMap] Add assertion that end() iterator isn't derefenced.
This would have saved me some time this morning.
2020-04-11 14:53:09 -07:00
River Riddle 89b007037f [mlir][docs] Remove the MLIR prefix from several titles.
This prefix is already implied by the doc location and functions only as
filler.
2020-04-11 14:49:03 -07:00
Simon Pilgrim 1b76c4cade ModuleUtils.h - include and forward declaration cleanup. NFC.
Replace SmallSet.h include with SmallVector.h - only SmallVector.h is used from inside SmallSet.h
Remove llvm::StringRef forward declaration (we include StringRef.h)
Remove unused llvm::GlobalVariable forward declaration.
2020-04-11 21:25:53 +01:00
Kadir Cetinkaya 5d5671242e
[clangd] Disable failing target_info test 2020-04-11 22:17:01 +02:00
Craig Topper 806763efcf [CallSite removal][SelectionDAGBuilder] Use CallBase instead of ImmutableCallSite in visitPatchpoint.
Differential Revision: https://reviews.llvm.org/D77932
2020-04-11 13:07:31 -07:00
Kadir Cetinkaya d34a91a10f
[clangd][test] Provide registered targets to lit tests
Summary:
We had tests in clangd (target_info.test) that got enabled only on
systems that know about x86. But they were always disabled as clangd lit config
never registered those targets.

This patch adds those targets as `$TARGET$-registered-target`

Reviewers: sammccall

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77944
2020-04-11 22:03:08 +02:00
Matt Arsenault 1747ba25b2 GlobalISel: Fix typo in assert message 2020-04-11 16:02:26 -04:00
Matt Arsenault c5497e5399 AMDGPU/GlobalISel: Fix legalizing <3 x s16> vselects 2020-04-11 15:59:51 -04:00
Hongtao Yu 11455a7905 [CodeGen] Allow partial tail duplication in Machine Block Placement.
Summary: A count profile may affect tail duplication's heuristic causing a block to be duplicated in only a part of its predecessors. This is not allowed in the Machine Block Placement pass where an assert will go off. I'm removing the assert and making the optimization bail out when such case happens.

Reviewers: wenlei, davidxl, Carrot

Reviewed By: Carrot

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77748
2020-04-11 12:20:31 -07:00
Aaron Puchert b96b9335ae Use more LLVM_ENABLE_ABI_BREAKING_CHECKS in Error.h
Summary:
If we don't read the flag, we don't need to set it. Then we also don't
need to filter it out to get the pointer.

This should have a (small) positive impact on code size and performance.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D76259
2020-04-11 21:14:18 +02:00
River Riddle 55de49ac1c [mlir][docs] Refactor the layout of the docs folder
Summary:
This revision performs a few refactorings on the main docs folder. Namely it:
* Adds a new Rationale/ folder to contain various rationale documents
* Moves several "getting started" documents to the Tutorials/ folder
* Cleans up the titles of various documents

Differential Revision: https://reviews.llvm.org/D77934
2020-04-11 11:47:01 -07:00
Casey Carter 470eb62d7b [libc++][test] Silence "unused variable" warning 2020-04-11 11:40:16 -07:00
Fangrui Song 0a55d3f557 [MC] Default MCAsmInfo::UseIntegratedAssembler to true 2020-04-11 10:13:52 -07:00
Fangrui Song d2e5157c1f [MC] Add UseIntegratedAssembler = false. NFC 2020-04-11 10:13:49 -07:00
Benjamin Kramer 52dcbcbfe0 Simplify string joins. NFCI. 2020-04-11 17:20:11 +02:00
Sam McCall a50df668f6
[clangd] Remove redundant code in test. NFC 2020-04-11 17:14:31 +02:00
Jonathan Roelofs 0dbaafaa3a [mlir][docs] Explain the EDSC acronym. NFC
Differential Revision: https://reviews.llvm.org/D77914
2020-04-11 09:11:35 -06:00
Jonathan Roelofs 015ebd2930 [mlir][toy] Fix comment typo. NFC
Differential Revision: https://reviews.llvm.org/D77917
2020-04-11 09:11:35 -06:00
Jonathan Roelofs 3737be8902 [mlir][toy][docs] Fix reference to generated ToyCombine.inc. NFC
Differential Revision: https://reviews.llvm.org/D77916
2020-04-11 09:11:35 -06:00
Jonathan Roelofs 2f7707db02 [mlir][toy][docs] Reword for better sentence flow. NFC 2020-04-11 09:11:34 -06:00