Commit Graph

351378 Commits

Author SHA1 Message Date
jasonliu
d5143e3f10 Remove '<' from test for better yam2obj input consumption
Address post-commit comment:
https://reviews.llvm.org/D77580#inline-713676

yaml2obj does not record the source filename in the output,
 which may make FileCheck tests brittle sometimes.
2020-04-13 21:42:30 +00:00
Louis Dionne
961914eeb9 [libc++] Mark test failing with macos < 10.13 as unsupported 2020-04-13 17:39:05 -04:00
River Riddle
d3588d0814 [mlir][NFC] Replace mlir/Support/Functional.h with llvm equivalents.
Summary: Functional.h contains many different methods that have a direct, and more efficient, equivalent in LLVM. This revision replaces all usages with the LLVM equivalent, and removes the header. This is part of larger cleanup, pr45513, merging MLIR support facilities into LLVM.

Differential Revision: https://reviews.llvm.org/D78053
2020-04-13 14:22:12 -07:00
Louis Dionne
9d8c22587b [libc++] NFC: Remove unused Lit features in the test suite
The libc++ test suite currently defines several features that are not
used anywhere in the tests, or that are redundant with other features.
For the purpose of simplifying config.py and to ease the bring up of a
new configuration, this commit removes some of these features:

- rename dylib-has-no-filesystem to c++filesystem-disabled, which exists
- rename apple-darwin to just darwin, which is already set
- remove useless setting of libstdc++, which is already set correctly
- remove libcpp-abi-unstable, which is not used anywhere
- remove the glibc-XXX features, which are not used anywhere
2020-04-13 17:19:00 -04:00
Benjamin Kramer
f1542efd97 [CHR] Clean up some code and reduce copying. NFCI. 2020-04-13 23:11:20 +02:00
Nico Weber
4d4fef22da Revert a few unsuccessful attempts at fixing bots.
I broke bots last week and tried a few things to fix them.
These were attempts that didn't help, so back them back out.

This reverts commit c7aff9a109.
This reverts commit 8838d6d356.
This reverts commit e875ba1509.
2020-04-13 17:09:21 -04:00
Sterling Augustine
215e6bfcfb Use a temporary file, to allow running on read-only file systems 2020-04-13 14:05:03 -07:00
Louis Dionne
4537ba4978 [libc++] NFC: Remove unused method call 2020-04-13 16:59:54 -04:00
Craig Topper
113f37a1f9 [CallSite removal][TargetLowering] Replace ImmutableCallSite with CallBase
Differential Revision: https://reviews.llvm.org/D77995
2020-04-13 13:50:15 -07:00
Eli Friedman
89e0662dee Make IRBuilder automatically set alignment on load/store/alloca.
This is equivalent in terms of LLVM IR semantics, but we want to
transition away from using MaybeAlign to represent the alignment of
these instructions.

Differential Revision: https://reviews.llvm.org/D77984
2020-04-13 13:43:14 -07:00
Dan Liew
8efc3ccaf8 [Darwin] Fix a bug where the symbolizer would examine the wrong process.
Summary:
Previously `AtosSymbolizer` would set the PID to examine in the
constructor which is called early on during sanitizer init. This can
lead to incorrect behaviour in the case of a fork() because if the
symbolizer is launched in the child it will be told examine the parent
process rather than the child.

To fix this the PID is determined just before the symbolizer is
launched.

A test case is included that triggers the buggy behaviour that existed
prior to this patch. The test observes the PID that `atos` was called
on. It also examines the symbolized stacktrace. Prior to this patch
`atos` failed to symbolize the stacktrace giving output that looked
like...

```
  #0 0x100fc3bb5 in __sanitizer_print_stack_trace asan_stack.cpp:86
  #1 0x10490dd36 in PrintStack+0x56 (/path/to/print-stack-trace-in-code-loaded-after-fork.cpp.tmp_shared_lib.dylib:x86_64+0xd36)
  #2 0x100f6f986 in main+0x4a6 (/path/to/print-stack-trace-in-code-loaded-after-fork.cpp.tmp_loader:x86_64+0x100001986)
  #3 0x7fff714f1cc8 in start+0x0 (/usr/lib/system/libdyld.dylib:x86_64+0x1acc8)
```

After this patch stackframes `#1` and `#2` are fully symbolized.

This patch is also a pre-requisite refactor for rdar://problem/58789439.

Reviewers: kubamracek, yln

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D77623
2020-04-13 13:36:29 -07:00
Dan Liew
2169568d9f [Sanitizer Common] Show command used to launch symbolizer process at high verbosity level.
Summary:
In preparation for writing a test for a bug fix we need to be able to
see the command used to launch the symbolizer process. This feature
will likely be useful for debugging how the Sanitizers use the
symbolizer in general.

This patch causes the command line used to launch the process to be
shown at verbosity level 3 and higher.

A small test case is included.

Reviewers: kubamracek, yln, vitalybuka, eugenis, kcc

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D77622
2020-04-13 13:36:29 -07:00
LLVM GN Syncbot
bb0e6cc1dd [gn build] Port e823068306 2020-04-13 20:31:14 +00:00
LLVM GN Syncbot
c88a567279 [gn build] Port 255cc202ea 2020-04-13 20:31:14 +00:00
Lang Hames
255cc202ea [Support] Add missing files from e823068306. 2020-04-13 13:30:45 -07:00
Martin Storsjö
12c9e2f111 [LLD] [COFF] Fix alignment of thunks for ARM/ARM64
The alignment of ARM64 range extension thunks was fixed in
7c81649219, but ARM range extension thunks, and import
and delay import thunks also need aligning (like all code on ARM
platforms).

I'm adding a test for alignment of ARM64 import thunks - not
specifically adding tests for misalignment of all of them though.

Differential Revision: https://reviews.llvm.org/D77796
2020-04-13 23:27:15 +03:00
MaheshRavishankar
2a99e700e0 [mlir][Linalg] NFC: Add utility function to tile, fuse and set marker to use loop.parallel.
This change is NFC since the facility to tile and generate
loop.parallel loops already exists in Linalg.

Differential Revision: https://reviews.llvm.org/D77965
2020-04-13 13:23:06 -07:00
MaheshRavishankar
3b2f26ab05 [mlir][Linalg] NFC : Fix check for scalar case handling in LinalgToLoops
The invertPermutation method does not return a nullptr anymore, but
rather returns an empty map for the scalar case. Update the check in
LinalgToLoops to reflect this.
Also add test case for generating scalar code.
2020-04-13 13:23:01 -07:00
MaheshRavishankar
03391df90e [mlir][Linalg] Add loop.parallel lowering for all Linalg Ops.
The outer parallel loops of a linalg operation is lowered to
loop.parallel, with the other loops lowered to loop.for. This gets the
lowering to loop.parallel on par with the loop.for lowering. In future
the reduction loop could also be lowered to loop.parallel.
Also add a utility function that returns the loops that are
created.

Differential Revision: https://reviews.llvm.org/D77678
2020-04-13 13:19:12 -07:00
Sam McCall
dffbeffa39 [Support] Fix CMakeLists after e823068306 2020-04-13 22:14:44 +02:00
Reid Kleckner
eac56724fd Fix target_info.test on Windows with a hack
Add a quote character to the sed command to cause it to be quoted.
Hopefully, which will help both gnuwin and MSys versions of sed tokenize
the command line the same way.
2020-04-13 13:14:06 -07:00
Sam McCall
596b63ad40 [clangd] Rebuild dependent files when a header is saved.
Summary:
Caveats:
 - only works when the header is changed in the editor and the editor provides
   the notification
 - we revalidate preambles for all open files (stat all their headers) rather
   than taking advantage of the fact that we know which file changed.
   This is much simpler!

Fixes https://github.com/clangd/clangd/issues/107

Reviewers: kadircet

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77847
2020-04-13 22:08:15 +02:00
Christopher Tetreault
f22fbe3a15 Clean up usages of asserting vector getters in Type
Summary:
Remove usages of asserting vector getters in Type in preparation for the
VectorType refactor. The existence of these functions complicates the
refactor while adding little value.

Reviewers: sdesmalen, efriedma, krememek

Reviewed By: sdesmalen, efriedma

Subscribers: dexonsmith, Charusso, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77257
2020-04-13 13:01:40 -07:00
Lang Hames
840a23b0b5 [ORC] Update ORCv2 docs to reflect removal of ExecutionSession::getMainJITDylib.
Thanks to Dibyendu Majumdar for spotting the issue.
2020-04-13 12:52:44 -07:00
Lang Hames
e823068306 [Support] Add support RTTI support for open class hierarchies.
This patch extracts the RTTI part of llvm::ErrorInfo into its own class
(RTTIExtends) so that it can be used in other non-error hierarchies, and makes
it compatible with the existing LLVM RTTI function templates (isa, cast,
dyn_cast, dyn_cast_or_null) by adding the classof method.

Differential Revision: https://reviews.llvm.org/D39111
2020-04-13 12:52:44 -07:00
Denis Khalikov
ec99d6e62f [mlir][spirv] Add a spirv::InterfaceVarABIAttr.
Summary:
Add a proper dialect-specific attribute for interface variable ABI.

Differential Revision: https://reviews.llvm.org/D77941
2020-04-13 22:47:47 +03:00
Lei Zhang
a9cb529a84 [mlir][spirv] NFC: use Optional to replace SPV_Optional
Differential Revision: https://reviews.llvm.org/D78046
2020-04-13 15:44:06 -04:00
Chris Lattner
359541ed4f Remove the Identifier::is() method, it is now equivalent to operator==. NFC.
Summary: Depends on D78042.

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/D78043
2020-04-13 12:37:37 -07:00
Christopher Tetreault
3297e9b7c3 Clean up usages of asserting vector getters in Type
Summary:
Remove usages of asserting vector getters in Type in preparation for the
VectorType refactor. The existence of these functions complicates the
refactor while adding little value.

Reviewers: rriddle, sdesmalen, efriedma

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77259
2020-04-13 12:29:43 -07:00
Rahman Lavaee
05192e585c Extend BasicBlock sections to allow specifying clusters of basic blocks in the same section.
Differential Revision: https://reviews.llvm.org/D76954
2020-04-13 12:19:59 -07:00
Rahman Lavaee
4ddf7ab454 Revert "Extend BasicBlock sections to allow specifying clusters of basic blocks"
This reverts commit 0d4ec16d3d Because
tests were not added to the commit.
2020-04-13 12:19:59 -07:00
Lama
5c7bbe3659 [MachinePipeliner] Refine the RecMII calculation
In the case of more than one SDep  between two successor SUnits in the Nodeset, the current implementation sums the latencies of the dependencies, which could create a larger RecMII than necessary.

for example, in case there is both a data dependency and an output dependency (with latency > 0) between successor nodes:
SU(1) inst1:
  successors:
    SU(2): out  latency = 1
    SU(2): data latency = 1
SU(2) inst2:
  successors:
    SU(3): out  latency = 1
    SU(3): data latency = 1
SU(3) inst3:
  successors:
    SU(1): out  latency = 1
    SU(1): data latency = 1

the NodeSet latency returned would be 6, whereas it could be 3 if we take the max for each successor SUnit.
In general this can be extended to finding the shortest path in the recurrence..
thoughts?

Unfortunately I had a hard time creating a test for this in Hexagon/PowerPC, so help would be appreciated.

Reviewed By: bcahoon

Differential Revision: https://reviews.llvm.org/D75918
2020-04-13 19:17:15 +00:00
Austin Kerbow
cc4d7dced9 [AMDGPU] Fix comment for llvm.amdgcn.div.scale. NFC.
Update comment to reflect actual lowering.
2020-04-13 12:04:55 -07:00
Chris Lattner
74e6a5b2a3 Eliminate all uses of Identifier::is() in the source tree, this doesn't remove the definition of it (yet). NFC.
Reviewers: mravishankar, antiagainst, herhut, rriddle!

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78042
2020-04-13 11:49:31 -07:00
Matt Arsenault
dc89a3efb4 HIP: Fix handling of denormal mode
I didn't realize HIP was a distinct offloading kind, so the subtarget
was looking for -march, which isn't correct for HIP. We also have the
possibility of different denormal defaults in the case of multiple
offload targets, so we need to thread the JobAction through the target
hook.
2020-04-13 11:48:45 -07:00
Rahman Lavaee
0d4ec16d3d Extend BasicBlock sections to allow specifying clusters of basic blocks
in the same section.

This allows specifying BasicBlock clusters like the following example:
!foo
!!0 1 2
!!4
This places basic blocks 0, 1, and 2 in one section in this order, and
places basic block #4 in a single section of its own.
2020-04-13 11:46:11 -07:00
Benjamin Kramer
ec228d722c [InstCombine] Use SmallBitVector for convienently checking if all bits are set 2020-04-13 20:37:15 +02:00
Uday Bondhugula
42ada5fee9 [MLIR] NFC cleanup/modernize memref-dataflow-opt / getNestingDepth
Bring code to date with recent changes to the core infrastructure /
coding style.

Differential Revision: https://reviews.llvm.org/D77998
2020-04-14 00:03:06 +05:30
Uday Bondhugula
500e03881b [MLIR] NFC clean up simplify-affine-structures test case
NFC clean up for simplify-affine-structures test cases. Rename sets
better; avoid suffix numbers;  move outlined definitions close to use.
This is in preparation for other functionality updates.

Differential Revision: https://reviews.llvm.org/D78017
2020-04-13 23:59:21 +05:30
River Riddle
8a49ed2133 [mlir][Transforms][docs] Add a description blurb for various passes
Summary: This revision adds blurbs of documentation to various different passes, namely: Canonicalizer, CSE, LocationSnapshot, StripDebugInfo, and SymbolDCE.

Differential Revision: https://reviews.llvm.org/D78007
2020-04-13 11:28:03 -07:00
Mehdi Amini
ed6c452edc Add missing dependencies on the flang test target
Without this, the LLVM utilities (FileCheck) aren't built when running
`ninja check-flang` and it fails with:

llvm-project/llvm/utils/lit/lit/llvm/subst.py:134: fatal: Did not find FileCheck in...

Also the modules aren't built without depending on `module_files`, which
makes multiple tests failing.

Differential Revision: https://reviews.llvm.org/D78036
2020-04-13 18:23:01 +00:00
Lei Zhang
a290c3af9d [mlir][spirv] Improve stride support in array types
This commit added stride support in runtime array types. It also
adjusted the assembly form for the stride from `[N]` to `stride=N`.
This makes the IR more readable, especially for the cases where
one mix array types and struct types.

Differential Revision: https://reviews.llvm.org/D78034
2020-04-13 14:08:17 -04:00
Matt Morehouse
6cdcb9b402 [SanCov] Disable whitelist/blacklist test on Darwin. 2020-04-13 10:59:05 -07:00
Nico Weber
6b4cd6b62d [gn build] (manually) merge 6dbf1a1229 2020-04-13 13:57:20 -04:00
Vedant Kumar
4831f4b7bd [InstCombine] Fix debug variance issue in tryToMoveFreeBeforeNullTest
Fix an issue where the presence of debug info could disable an
optimization in tryToMoveFreeBeforeNullTest.
2020-04-13 10:55:17 -07:00
Vedant Kumar
122a6bfb07 [Debugify] Strip added metadata in the -debugify-each pipeline
Summary:
Share logic to strip debugify metadata between the IR and MIR level
debugify passes. This makes it simpler to hunt for bugs by diffing IR
with vs. without -debugify-each turned on.

As a drive-by, fix an issue causing CallGraphNodes to become invalid
when a dead llvm.dbg.value prototype is deleted.

Reviewers: dsanders, aprantl

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77915
2020-04-13 10:55:17 -07:00
Fangrui Song
95e6f5c655 [llvm-xray][test] Combine two AArch64 tests
Rename extract-instrmap-aarch64.test to extract-instrmap.test because
the path component `AArch64` conveys the target name clearly.

Additionally, adopt a convention we start to use in LLVM binary
utilities: prepend `#` to CHECK/RUN lines and `##` to comment lines even
if the file contains no code. The notation makes CHECK/RUN/comments
stand out.

Reviewed By: dberris

Differential Revision: https://reviews.llvm.org/D77883
2020-04-13 10:54:21 -07:00
Chris Lattner
d63036c0ef Reimplement mlir::Identifier to be a wrapper around 'StringMapEntry*' instead of a wrapper around a 'const char*'. This makes it so strref() can be computed without calling strlen, which is more efficient and less error-prone. While here...
Summary:
..., reimplement DenseMapInfo<mlir::Identifier>::getHashValue in terms of mlir::hash_value(Identifier).

Both of these improvements were suggested by River, thanks!

Reviewers: rriddle!

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77999
2020-04-13 10:47:04 -07:00
Sam McCall
31db1e0bd1 [clangd] Send the correct error code when cancelling requests.
Summary:
I couldn't quite bring myself to make Cancellation depend on LSP ErrorCode.
Magic numbers instead...

Reviewers: kadircet

Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, jfb, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77947
2020-04-13 19:42:38 +02:00
Simon Pilgrim
353347288b [CostModel][X86] Remove comments that begin with a filecheck prefix.
Stop filecheck from confusing a general comment with a check.
2020-04-13 18:39:24 +01:00