Commit Graph

361907 Commits

Author SHA1 Message Date
David Truby 332170356e [flang] Fix multi-config generator builds.
Summary:
Currently the binaries are output directly into the bin subdirectory of the
build directory. This doesn't work correctly with multi-config generators which
should output the binaries into <CONFIG_NAME>/bin instead.

Reviewers: sscalpone, richard.barton.arm

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D84022
2020-07-30 09:56:52 +01:00
Florian Hahn 1ac72a0774 [IPConstProp] Regenerate check lines.
Preparation for D84447.
2020-07-30 09:52:16 +01:00
Rainer Orth bbe5099207 [compiler-rt][cmake] Simplify COMPILER_RT_HAS_VERSION_SCRIPT tests
As requested in the review, this patch removes the additional conditions in
the `COMPILER_RT_HAS_VERSION_SCRIPT` tests.

Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.

Differential Revision: https://reviews.llvm.org/D84559
2020-07-30 10:27:36 +02:00
George Mitenkov 1880532036 [MLIR][SPIRVToLLVM] Conversion of GLSL ops to LLVM intrinsics
This patch introduces new intrinsics in LLVM dialect:
-  `llvm.intr.floor`
-  `llvm.intr.maxnum`
-  `llvm.intr.minnum`
-  `llvm.intr.smax`
-  `llvm.intr.smin`
These intrinsics correspond to SPIR-V ops from GLSL
extended instruction set (`spv.GLSL.Floor`, `spv.GLSL.FMax`,
`spv.GLSL.FMin`,  `spv.GLSL.SMax` and `spv.GLSL.SMin`
respectively). Also conversion patterns for them were added.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D84661
2020-07-30 11:22:44 +03:00
Kang Zhang 0037a5f894 [PHIElimination] Fix the killed flag for LowerPHINode()
Summary:
In the phi-node-elimination pass, we set the killed flag incorrectly.
When we eliminate the PHI node, we replace the PHI with a copy for the
incoming value.

Before this patch, we will set incoming value as killed(PHICopy). And
we will remove the killed flag from last using incoming value(OldKill).
This is correct, only if the new PHICopy is after the OldKill.

Reviewed By: bjope

Differential Revision: https://reviews.llvm.org/D80886
2020-07-30 08:18:50 +00:00
George Mitenkov 3aab320557 [MLIR][SPIRVToLLVM] Conversion for inverse sqrt and tanh
This is a second patch on conversion of GLSL ops to LLVM dialect.
It introduces patterns to convert `spv.InverseSqrt` and `spv.Tanh`.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D84633
2020-07-30 10:50:48 +03:00
Balázs Kéri 1745ba41b1 [Analyzer] Remove inclusion of uniqueing decl from diagnostic profile.
The uniqueing decl in PathDiagnostic is the declaration with the
uniqueing loc, as stated by documentation comments.
It is enough to include the uniqueing loc in the profile. It is possible
to have objects with different uniqueing decl but same location, at
least with templates. These belong to the same class and should have
same profile.

Reviewed By: vsavchenko, NoQ

Differential Revision: https://reviews.llvm.org/D84843
2020-07-30 09:52:28 +02:00
David Sherwood 23ad660b5d [SVE][CodeGen] At -O0 fallback to DAG ISel when translating alloca with scalable types
When building code at -O0 We weren't falling back to DAG ISel correctly
when encountering alloca instructions with scalable vector types. This
is because the alloca has no operands that are scalable. I've fixed this by
adding a check in AArch64ISelLowering::fallBackToDAGISel for alloca
instructions with scalable types.

Differential Revision: https://reviews.llvm.org/D84746
2020-07-30 08:40:53 +01:00
Haojian Wu 73c12bd8ff [Concepts] Fix a deserialization crash.
`TemplateTypeParmDecl::hasTypeConstraint` is not a safe guard for
checking `TemplateTypeParmDecl::getTypeConstraint()` result is null.

in somecases (e.g. implicit deduction guide templates synthesized from the
constructor, immediately-declared constraint is not formed because of an error),
hasTypeConstraint returns false, and getTypeConstraint returns a nullptr.

Fix https://bugs.llvm.org/show_bug.cgi?id=46790

Differential Revision: https://reviews.llvm.org/D84455
2020-07-30 09:25:15 +02:00
George Mitenkov 647e9a54c7 [MLIR][SPIRVToLLVM] Conversion patterns for GLSL ops
This is the first patch that adds support for GLSL extended
instruction set ops. These are direct conversions, apart from `spv.Tan`
that is lowered to `sin() / cos()`.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D84627
2020-07-30 10:20:11 +03:00
Haojian Wu cd4e8d7f6f [clangd] Fix an assertion failure in TargetFinder's heuristic resolution of dependent type.
The assertion is not true anymore after D82739, this patch just removes
it, and rename related functions.

And also fixes a missing cases.

Differential Revision: https://reviews.llvm.org/D84837
2020-07-30 08:54:22 +02:00
Craig Topper 07bb8240a0 [X86] Pass the OperandVector to ParseMemOperand instead of returning the operand. NFCI
Continue the change made to ParseATTOperand to take the vector by
reference. Let ParseMemOperand add its memory operand to the
vector and just return true/false to indicate error.
2020-07-29 23:44:56 -07:00
Craig Topper 17597442db [X86] Don't pass some many parameters to ParseMemOperand by reference.
Pointers and SMLocs are cheap to copy. Even though the function
modifies some of these the caller doesn't use them after the call.
2020-07-29 23:44:56 -07:00
Serge Pavlov 032ed39def [Support] Class to facilitate file locking
This change define RAII class `FileLocker` and methods `lock` and
`tryLockFor` of the class `raw_fd_stream` to facilitate using file locks.

Differential Revision: https://reviews.llvm.org/D79066
2020-07-30 13:42:20 +07:00
Max Kazantsev 3678ad88a6 [NFC] Remove unused variable 2020-07-30 13:32:15 +07:00
Balázs Kéri b22b97b3d0 [Analyzer] Use of BugType in DereferenceChecker (NFC).
Use of BuiltinBug is replaced by BugType.
Class BuiltinBug seems to have no benefits and is confusing.

Reviewed By: Szelethus, martong, NoQ, vsavchenko

Differential Revision: https://reviews.llvm.org/D84494
2020-07-30 08:33:12 +02:00
Tony 629467eb98 [AMDGPU] Fix DWARF extensions User Guide table of contents 2020-07-30 05:10:21 +00:00
Tony e24f5f3149 [AMDGPU] DWARF proposal changes
- Clarify that these are extensions to DWARF 5 and not as yet a
  proposal.

Reviewed By: scott.linder

Differential Revision: https://reviews.llvm.org/D70523
2020-07-30 05:07:09 +00:00
Craig Topper 9611ee5f40 [X86] Teach the assembler parser to handle a '*' between segment register and base/index/displacement part of an address
A '*' after the segment is equivalent to a '*' before the segment register. To make the AsmMatcher table work we need to place the '*' token into the operand vector before the full memory operand. To accomplish this I've modified some portions of operand parsing to expose the operand vector to ParseATTOperand so that the token can be pushed to the vector after parsing the segment register and before creating the memory operand using that segment register.

Fixes PR46879

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D84895
2020-07-29 21:15:04 -07:00
Amy Huang f71deb43ab [DebugInfo] Fix to ctor homing to ignore classes with trivial ctors.
Previously ctor homing was omitting debug info for classes if they
have both trival and nontrivial constructors, but we should only omit debug
info if the class doesn't have any trivial constructors.

retained types list.

bug: https://bugs.llvm.org/show_bug.cgi?id=46537

Differential Revision: https://reviews.llvm.org/D84870
2020-07-29 19:55:20 -07:00
Yuanfang Chen 8224c5047e For some tests targeting SystemZ, -march=z13 ---> -mcpu=z13
z13 is not a target. It is a CPU.
2020-07-29 19:18:01 -07:00
Yuanfang Chen ec93293942 NFC. Fix comments 2020-07-29 19:18:01 -07:00
Yuanfang Chen eee7cc95d6 [llvm-readobj] NFC. Add -help description of --hex-dump and
--string-dump
2020-07-29 19:18:01 -07:00
Kang Zhang a18953c1c0 [PowerPC] Fix RM operands for some instructions
Summary:
Some instructions have set the wrong [RM] flag, this patch is to fix it.

Instructions x(v|s)r(d|s)pi[zmp]? and fri[npzm] use fixed rounding
directions without referencing current rounding mode.

Also, the SETRNDi, SETRND, BCLRn, MTFSFI, MTFSB0, MTFSB1, MTFSFb,
MTFSFI, MTFSFI_rec, MTFSF, MTFSF_rec should also fix the RM flag.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D81360
2020-07-30 02:10:49 +00:00
Tony 5aa2fd88cf [AMDGPU] DWARF proposal changes for expression context
- Clarify what context is used in DWARF expression evaluation.

- Define location descriptions to fully resolve the context and so
  include the context in their result.

- As a consequence of location descriptions being fully resoved,
  change address spaces so only a swizzled and unswizzled private
  address space is defined. The lane is now part of the location
  description context.

- Clarify how call frame information is used to fully resolve
  expressions that specify registers.

Reviewed By: scott.linder

Differential Revision: https://reviews.llvm.org/D70523
2020-07-30 01:59:22 +00:00
Matt Arsenault 7d0b32c268 GlobalISel: Use result of find rather than rechecking map 2020-07-29 21:26:20 -04:00
Matt Arsenault 66c572af55 GlobalISel: Handle assorted no-op intrinsics
SelectionDAGBuilder just drops these, so do the same.
2020-07-29 21:26:20 -04:00
Jonas Devlieghere 9a3dbc9723 [lldb] Move finish_swig logic into a function in the binding dir
Move the finish_swig logic into a function in the bindings directory. By
making this a function I can reuse the logic internally where we ship
two Python versions and therefore need to finish the bindings twice.
2020-07-29 17:59:56 -07:00
Richard Smith a648834313 PR46729: Reject explicit and partial specializations with C linkage. 2020-07-29 17:44:32 -07:00
Juneyoung Lee 111a02decd [JumpThreading] Fold br(freeze(undef))
This patch makes JumpThreading fold br(freeze(undef)) if the freeze instruction
is only used by the branch.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D84818
2020-07-30 09:38:50 +09:00
Vedant Kumar 618a0c0d3b [profile] Add InstrProfilingInternal.c.o to Darwin kext builtins
Fixes a build failure in the Darwin kernel. Tested with:

% nm -m ./lib/libclang_rt.cc_kext_x86_64_osx.a | grep lprofSetProfileDumped

rdar://66249602
2020-07-29 17:23:28 -07:00
Julian Lettner 44e7d44997 [Darwin][compiler-rt] kern.osproductversion unavailable pre macOS 10.13
Add a fallback for `sysctl kern.osproductversion` for XNU 17 (macOS
10.13) and below, which do not provide this property.

Unfortunately, this means we have to take the detour via Darwin kernel
version again (at least for the fallback).

Reviewed By: delcypher

Differential Revision: https://reviews.llvm.org/D84892
2020-07-29 17:18:10 -07:00
Matt Arsenault 0da582d9b6 GlobalISel: Handle llvm.roundeven
I still think it's highly questionable that we have two intrinsics
with identical behavior and only vary by the name of the libcall used
if it happens to be lowered that way, but try to reduce the feature
delta between SDAG and GlobalISel for recently added intrinsics. I'm
not sure which opcode should be considered the canonical one, but
lower roundeven back to round.
2020-07-29 20:01:12 -04:00
Mircea Trofin 71059257bd [llvm][NFC] TensorSpec abstraction for ML evaluator
Further abstracting the specification of a tensor, to more easily
support different types and shapes of tensor, and also to perform
initialization up-front, at TFModelEvaluator construction time.

Differential Revision: https://reviews.llvm.org/D84685
2020-07-29 16:29:21 -07:00
Matt Morehouse 005991a3fe [DFSan] Remove dfsan_use_fast16labels from abilist.
Its implementation was scrapped in the final fast16labels
instrumentation patch.
2020-07-29 23:18:07 +00:00
Francis Visoiu Mistrih 926c14798d Revert "build: always add support for assembly targets on Darwin"
This reverts commit d8e8e32d85.

This breaks the build on GreenDragon:
http://green.lab.llvm.org/green/job/clang-stage1-RA/13171/console
2020-07-29 15:41:04 -07:00
Jonas Devlieghere 6587ff77ea [lldb] Fix llvm-lit in standalone builds
LLVM's make_paths_relative uses Python3_EXECUTABLE which isn't set in
standalone LLDB builds.
2020-07-29 15:38:40 -07:00
Alex Lorenz dc22182d1f [darwin] build and link with a separate compiler-rt builtins library
for device simulators

This change separates out the iOS/tvOS/watchOS simulator slices from the "libclang_rt.<os>.a"
fat archive, by moving them out to their own "libclang_rt.<os>sim.a" static archive.
This allows us to build and to link with an arm64 device simulator slice for the simulators running
on Apple Silicons, and to distribute it in one archive alongside the Intel simulator slices.

Differential Revision: https://reviews.llvm.org/D84564
2020-07-29 15:32:30 -07:00
Hiroshi Yamauchi ae7589e1f1 Revert "[PGO] Include the mem ops into the function hash."
This reverts commit 120e66b341.

Due to a buildbot failure.
2020-07-29 15:04:57 -07:00
shafik 6700f4b9fe [LLDB] Add checks for ValueObjectSP in Cocoa summary providers
We saw a crash recently (rdar://problem/65276489) that looks related to an invalid ValueObjectSP in a summary providers in Cocoa.cpp e.g. NSBundleSummaryProvider(...).
This adds checks before we use them usually by calling NSStringSummaryProvider.

Differential Revision: https://reviews.llvm.org/D84272
2020-07-29 14:47:18 -07:00
Craig Topper b1c1825b99 [X86] Remove unused argument from HandleAVX512Operand in the assembly parser. 2020-07-29 14:23:01 -07:00
Arthur Eubanks 0dcd4a21d5 [opt][NewPM] Fix typo
From https://reviews.llvm.org/D84872.
2020-07-29 14:20:01 -07:00
Sanjay Patel fef513f5cc [InstSimplify] fold min/max intrinsic with undef operand 2020-07-29 17:03:50 -04:00
Sanjay Patel 5cd695dd7f [InstSimplify] fold min/max with opposite of limit value 2020-07-29 17:03:50 -04:00
Saleem Abdulrasool d8e8e32d85 build: always add support for assembly targets on Darwin
When attempting to build compiler-rt on a developer transition kit, the
build would fail due to `.S` files not being handled properly by the
Ninja generator.  Rather than conditionalising on Xcode, conditionalise
to Darwin.  Because we know that the system compiler is clang based, it
will always properly handle the pre-processing based on the extension.

Differential Revision: https://reviews.llvm.org/D84333
2020-07-29 14:01:02 -07:00
Hiroshi Yamauchi 120e66b341 [PGO] Include the mem ops into the function hash.
To avoid hash collisions when the only difference is in mem ops.

Differential Revision: https://reviews.llvm.org/D84782
2020-07-29 13:59:40 -07:00
Arthur Eubanks 01aa14784b [NewPM][opt] Revert to legacy PM when any codegen passes are specified
This reduces the number of check-llvm failures by 500.

Ideally we'd have a codegen version of PassRegistry.def, or have all the
codegen passes ported and put into PassRegistry.def. But since that
doesn't exist yet, hardcode the list of codegen IR passes.

There are still codegen passes missing from this list, I'll add them
later as I stumble upon them.

Reviewed By: asbirlea, ychen

Differential Revision: https://reviews.llvm.org/D84872
2020-07-29 13:55:11 -07:00
Johannes Doerfert b08abf4c80 [OpenMP] Fix D83281 issue on windows by allowing `dso_local` in CHECK [2/1]
The problem with 8723280b68 was that the
`dso_local` is *before* the void not after. Hope this works.
2020-07-29 15:47:45 -05:00
cgyurgyik e14a7ff762 [libc] Adds fuzz test for strstr and alphabetizes string fuzz CMakeList.
Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D84611
2020-07-29 16:35:59 -04:00
Philip Reames 755f91f12c [Statepoint] Enable cross block relocates w/vreg lowering
This change is mechanical, it just removes the restriction and updates tests.  The key building blocks were submitted in 31342eb and 8fe2abc.

Note that this (and preceeding changes) entirely subsumes D83965.  I did includes a couple of it's tests.

From the codegen changes, an interesting observation: this doesn't actual reduce spilling, it just let's the register allocator do it's job.  That results in a slightly different overall result which has both pros and cons over the eager spill lowering.  (i.e. We'll have some perf tuning to do once this is stable.)
2020-07-29 13:32:51 -07:00