Commit Graph

360142 Commits

Author SHA1 Message Date
Benjamin Kramer 724afa5a33 [analyzer] Inline StringSet that's defined in a header
That's just asking for ODR violations. Also drop a call to lower()
that's not needed.
2020-07-13 23:51:05 +02:00
Vedant Kumar e51c7fb842 [debugify] Add targeted test for 2fa656c, NFC
https://reviews.llvm.org/D78411 introduced test changes which relied on
the ability to strip debugify metadata even if module-level metadata is
missing. This introduces a more targeted test for that ability.
2020-07-13 14:40:12 -07:00
Quentin Colombet 427bda4e9b [MC/AsmParser] layout-interdependency.s depends on having a proper triple
Fix the requirements for that test.

NFC
2020-07-13 14:38:47 -07:00
Nicolas Vasilache affbc0cd1c [mlir] Add alignment attribute to LLVM memory ops and use in vector.transfer
Summary: The native alignment may generally not be used when lowering a vector.transfer to the underlying load/store operation. This revision fixes the unmasked load/store alignment to match that of the masked path.

Differential Revision: https://reviews.llvm.org/D83684
2020-07-13 17:35:20 -04:00
Nikita Popov b9c2dd11a5 [ADT] Specialize std::swap() for SetVector
This is intended to address a compile-time regression from
1eddce4177. A SmallPtrSet was
replaced with a SetVector there, which had an unexpected large
compile-time impact. It turns out that this structure is getting
swapped a lot, and previously this used an optimized std::swap()
specialization for SmallPtrSet. Now it ends up using the default,
triple-move based implementation, which is much more expensive.

This patch (partly) addresses the issue by specializing std::swap()
for SetVector.

Differential Revision: https://reviews.llvm.org/D82230
2020-07-13 23:14:04 +02:00
Walter Erquinigo 77c9aafc5d Retry ""[lldb-vscode] Fix TestVSCode_module""
Original commit c60216db15.

The test can only run on Darwin because of how it was setup, so I'm
enforcing that.

Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
2020-07-13 14:12:03 -07:00
Jonas Devlieghere 32d35fb74b [lldb] Remove unused argument (NFC)
Nobody is writing to the stream so there's no point in passing it
around.
2020-07-13 13:44:51 -07:00
Rahul Joshi 0d988da6d1 [MLIR] Change ODS collective params build method to provide an empty default value for named attributes
- Provide default value for `ArrayRef<NamedAttribute> attributes` parameter of
  the collective params build method.
- Change the `genSeparateArgParamBuilder` function to not generate build methods
  that may be ambiguous with the new collective params build method.
- This change should help eliminate passing empty NamedAttribue ArrayRef when the
  collective params build method is used
- Extend op-decl.td unit test to make sure the ambiguous build methods are not
  generated.

Differential Revision: https://reviews.llvm.org/D83517
2020-07-13 13:35:44 -07:00
AlexisPerry f630b8590f [flang] Extended the flang driver options to include gfortran equivalents to pgf90 specific options.
Summary: Added gfortran equivalents of pgf90's -Mfixed, -Mfree, -Mextend, -Mstandard, -Munlimited and also added -fdefault-double-8

Reviewers: sscalpone, richard.barton.arm, DavidTruby, clementval, jdoerfert

Reviewed By: sscalpone, richard.barton.arm

Subscribers: sstefan1, llvm-commits, flang-commits

Tags: #llvm, #flang

Differential Revision: https://reviews.llvm.org/D83687
2020-07-13 14:26:28 -06:00
Thomas Raoux 2f23270af9 [mlir] Support operations with multiple results in slicing
Right now slicing would assert if an operation with multiple results is in the
slice.

Differential Revision: https://reviews.llvm.org/D83627
2020-07-13 13:24:27 -07:00
LLVM GN Syncbot 540277d084 [gn build] Port 9908a3b9f5 2020-07-13 20:18:59 +00:00
Lei Zhang 4ba45a778a [mlir][StandardToSPIRV] Fix conversion for signed remainder
Per the Vulkan's SPIR-V environment spec, "for the OpSRem and OpSMod
instructions, if either operand is negative the result is undefined."
So we cannot directly use spv.SRem/spv.SMod if either operand can be
negative. Emulate it via spv.UMod.

Because the emulation uses spv.SNegate, this commit also defines
spv.SNegate.

Differential Revision: https://reviews.llvm.org/D83679
2020-07-13 16:15:31 -04:00
Davide Italiano 9908a3b9f5 Revert "[llvm] Native size estimator for training -Oz inliner"
This reverts commit 83080a294a as
it breaks the macOS modules build.
2020-07-13 13:13:36 -07:00
Adrian Prantl 341ec56418 Add a decorator to skip tests when running under Rosetta
This allows skipping a test when running the testsuite on macOS under
the Rosetta translation layer.

Differential Revision: https://reviews.llvm.org/D83600
2020-07-13 13:09:53 -07:00
Martin Storsjö 340c376b87 [lldb] Fix a CMake warning typo. NFC. 2020-07-13 22:48:17 +03:00
Lang Hames 31b5b12129 [ORC] Remove a spurious reinterpret_cast. 2020-07-13 12:39:24 -07:00
Mircea Trofin 11046ef69e [llvm][NFC] Factored the default inlining advice
This is in preparation for the 'development' mode advisor. We currently
want to track what the default policy's decision would have been, this
refactoring makes it easier to do that.
2020-07-13 12:20:35 -07:00
Tim Keith 3780d3eb10 [flang] Use octal escapes for character literals in modfiles
Character literals can be formatted using octal or hex escapes for
non-ascii characters. This is so that the program can be unparsed for
either pgf90 or gfortran to compile. But modfiles should not be affected
by that -- they should be consistent.

This changes causes modfiles to always have character literals formatted
with octal escapes.

Differential Revision: https://reviews.llvm.org/D83703
2020-07-13 12:19:18 -07:00
Nikita Popov 353fa4403a [PredicateInfo] Place predicate info after assume
Place the ssa.copy instructions for assumes after the assume,
instead of before it. Both options are valid, but placing them
afterwards prevents assumes from being replaced with assume(true).
This fixes https://bugs.llvm.org/show_bug.cgi?id=37541 in NewGVN
and will avoid a similar issue in SCCP when we handle more
predicate infos.

Differential Revision: https://reviews.llvm.org/D83631
2020-07-13 21:10:11 +02:00
Nikita Popov 4b626dd949 [NewGVN] Separate passing assume tests (NFC)
Result might not be exactly the same as under GVN, but all the
desired transforms are made.
2020-07-13 21:07:03 +02:00
Nikita Popov 14f738b350 [NewGVN] Rename xfail tests (NFC)
Add an -xfail.ll suffix to tests marked XFAIL, so these files can
be split into passing and failing parts.
2020-07-13 21:07:03 +02:00
Lang Hames 51b20152e6 [JITLink] Apply MSVCPError workaround to a1fc26030a.
Hopefully this will get the Windows bots building again.
2020-07-13 11:55:50 -07:00
Matt Arsenault 83aaa2085e GlobalISel: Define equivalent nodes for saturating add/sub 2020-07-13 14:46:40 -04:00
Matt Arsenault 23ec773d19 GlobalISel: Implement fewerElementsVector for saturating add/sub 2020-07-13 14:46:40 -04:00
Matt Arsenault 6a8c11a11f GlobalISel: Implement widenScalar for saturating add/sub
Add a placeholder legality rule for AMDGPU until the rest of the
actions are handled.
2020-07-13 14:46:40 -04:00
Matt Arsenault c0ee2d7468 AMDGPU/GlobalISel: Add baseline add/sub sat legalization tests 2020-07-13 14:46:40 -04:00
Sam McCall 9d3e9a3e3c [clangd] Remove const_cast. NFC 2020-07-13 20:44:11 +02:00
Lei Zhang 9cafbf8f66 [NFC] Remove unused header include
Differential Revision: https://reviews.llvm.org/D83706
2020-07-13 14:43:48 -04:00
serge-sans-paille 62881fda58 Fix HexagonGenExtract return status
Differential Revision: https://reviews.llvm.org/D83460
2020-07-13 20:41:59 +02:00
Arthur Eubanks fefe7555e9 [NewPM][opt] Translate -foo-analysis to require<foo-analysis>
Fixes 53 check-llvm tests under NPM.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D83633
2020-07-13 11:24:59 -07:00
LLVM GN Syncbot c1efd6675a [gn build] Port fdb69539bc 2020-07-13 18:10:37 +00:00
Jan Korous fdb69539bc [AST] Fix potential nullptr dereference in Expr::HasSideEffects
Array returned by LambdaExpr::capture_inits() can contain nullptrs.

Differential Revision: https://reviews.llvm.org/D83438
2020-07-13 11:08:51 -07:00
Matt Arsenault 87f8a4f9a2 AMDGPU/GlobalISel: Add tests for 96-bit add/sub/mul
I almost regressed these, so add tests for them.
2020-07-13 14:07:34 -04:00
Mircea Trofin acabaf600b [llvm][NFC] ML Policies: changed the saved_model protobuf to text
Also compacted the checkpoints (variables) to one file (plus the index).

This reduces the binary model files to just the variables and their
index. The index is very small. The variables are serialized float
arrays. When updated through training, the changes are very likely
unlocalized, so there's very little value in them being anything else
than binary.
2020-07-13 11:07:07 -07:00
Matt Arsenault 2e2af6026b TableGen/GlobalISel: Emit enum names for reg class ID instead of value
This was emitting the raw value for the reg class ID with a comment
for the actual class name. Switch to emitting the qualified enum name
instead, which obviates the need for the comment and also helps keep
the lit tests on the emitter output more stable.
2020-07-13 14:02:08 -04:00
Matt Arsenault db091e12b2 RISCV: Avoid GlobalISel build break in a future patch
The GlobalISelEmitter is stricter about matching timm instruction
outputs to timm inputs (although in an accidental sort of way that
doesn't hit a proper import failure error). Also, apparently no
intrinsic patterns were importing since the ID enum declaration was
missing.
2020-07-13 14:01:57 -04:00
Louis Dionne 2d3b8cc83f [libc++] Implement P0551
Make sure we satisfy the requirements added by P0551, and add tests to
enforce that.
2020-07-13 13:42:26 -04:00
Hiroshi Yamauchi fb558ccae7 [PGO][PGSO] Add profile guided size optimization to X86ISelDAGToDAG.
Differential Revision: https://reviews.llvm.org/D83331
2020-07-13 10:28:09 -07:00
LLVM GN Syncbot 44899ed659 [gn build] Port 83080a294a 2020-07-13 17:19:05 +00:00
Lang Hames fb7ef0bb0b [ORC] Generalize emit re-entry, stub, etc. APIs for working addr != link addr.
This patch generalizes the APIs for writing re-entry blocks, trampolines and
stubs to allow their final linked address to differ from the address of
their initial working memory. This will allow these routines to be used with
JITLinkMemoryManagers, which will in turn allow for unification of code paths
for in-process and cross-process lazy JITing.
2020-07-13 10:15:10 -07:00
Lang Hames a1fc26030a [JITLink] Add a synchronous version of finalize for convenience.
This will be used by upcoming patches that implement indirection utils
(reentry, reentry trampolines, and stubs) on top of
JITLinkMemoryManager to unify in-process and cross-process lazy
compilation support.
2020-07-13 10:15:10 -07:00
Mircea Trofin 83080a294a [llvm] Native size estimator for training -Oz inliner
Summary:
This is an experimental ML-based native size estimator, necessary for
computing partial rewards during -Oz inliner policy training. Data
extraction for model training will be provided in a separate patch.

RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-April/140763.html

Reviewers: davidxl, jdoerfert

Subscribers: mgorny, hiraditya, mgrang, arphaman, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82817
2020-07-13 10:13:56 -07:00
Hiroshi Yamauchi 153a0b8906 [PGO][PGSO] Add profile guided size optimization to the X86 LEA fixup.
Differential Revision: https://reviews.llvm.org/D83330
2020-07-13 09:46:22 -07:00
Sanjay Patel 8779b11410 [DAGCombiner] rot i16 X, 8 --> bswap X
We have this generic transform in IR (instcombine),
but as shown in PR41098:
http://bugs.llvm.org/PR41098
...the pattern may emerge in codegen too.

x86 has a potential refinement/reversal opportunity here,
but that should come later or needs a target hook to
avoid the transform. Converting to bswap is the more
specific form, so we should use it if it is available.
2020-07-13 12:01:53 -04:00
Sanjay Patel 69fff1fc49 [x86] add tests for bswap/rotate; NFC 2020-07-13 12:01:53 -04:00
Pavel Iliin 8f7d3430b7 [ARM][NFC] More detailed vbsl checks in ARM & Thumb2 tests. 2020-07-13 17:00:43 +01:00
stevewan a7e9c5a39f [llvm-ar][test][AIX] Unsupport error-opening-directory.test on AIX
Summary:
The test fails on AIX as it allows open() and read() on a directory. This patch adds `# UNSUPPORTED:
system-aix` to the test to prevent it from running on AIX.

Reviewers: sameerarora101, daltenty, ShuhongL, hubert.reinterpretcast, MaskRay, smeenai, alexshap

Reviewed By: sameerarora101, hubert.reinterpretcast, MaskRay, smeenai

Subscribers: MaskRay, rupprecht, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83579
2020-07-13 12:00:07 -04:00
Pavel Labath a2552f76ac [ADT] Make Load(AP)IntFromMemory pointer argument const
The function does not modify this memory.
2020-07-13 17:32:54 +02:00
Sanne Wouda 4d3e8dc215 Fix llvm-test-suite failure introduced by D82550/D83122
Apparently, isIndirectCall does not imply that getCalledFunction will be non-null
2020-07-13 16:14:22 +01:00
David Truby 4121172239 [flang][openmp] libc++ unordered_map build fix in flang openmp static analysis
Simply move the include of unordered_map from the .cpp file to the .h file
2020-07-13 16:08:24 +01:00