Commit Graph

350945 Commits

Author SHA1 Message Date
Craig Topper ca376782ff [LoopVectorize] Move testing for SVML vectorization of exp2f_finite/exp2_finite from svml-calls.ll to svml-calls-finite.ll where the finite versions of log, pow, and exp already were. 2020-04-08 18:13:55 -07:00
Craig Topper f3d3cec648 [InstCombine] Avoid a call to deprecated version of CreateCall.
Passing a Value * to CreateCall has to call getPointerElementType
to find the type of the pointer.

In this case we can rely on the fact that Intrinsic::getDeclaration
returns a Function * and use that version of CreateCall.
2020-04-08 17:41:16 -07:00
Johannes Doerfert 0985554b70 [Attributor][NFC] Split AbstractAttributes out of Attributor.cpp
Attributor.cpp became quite big and we need to start provide structure.
The Attributor code is now in Attributor.cpp and the classes derived
from AbstractAttribute are in AttributorAttributes.cpp. Minor changes
were required but no intended functional changes.

We also minimized includes as part of this.

Reviewed By: baziotis

Differential Revision: https://reviews.llvm.org/D76873
2020-04-08 19:02:14 -05:00
River Riddle 21605a1207 [mlir] Mark ClassID::getID as LLVM_EXTERNAL_VISIBILITY to ensure only one version exists
Summary: ClassID is used as a type id and must be unique in the face of shared libraries to ensure correctness. This fixes failures related to BUILD_SHARED_LIBs on macos.

Differential Revision: https://reviews.llvm.org/D77764
2020-04-08 16:51:48 -07:00
Christopher Tetreault fe69eb1196 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: espindola, efriedma, sdesmalen

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77275
2020-04-08 16:29:36 -07:00
Christopher Tetreault 49fd24fe9e 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: hfinkel, efriedma, sdesmalen

Reviewed By: efriedma

Subscribers: wuzish, nemanjai, hiraditya, kbarton, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77266
2020-04-08 16:10:55 -07:00
Jonas Devlieghere b0bdaf9ba2 [lldb/Python] Add lldbconfig module to make the lldb module configurable
Using the approach suggested by Pavel in D77588, this patch introduces a
new lldbconfig module that lives next to the lldb module. It makes it
possible to make the lldb module configurable before importing it. More
specifically it makes it possible to delay initializing the debugger,
which is needed for testing the reproducer.

Differential revision: https://reviews.llvm.org/D77661
2020-04-08 15:59:24 -07:00
Jonathan Roelofs 223154d267 [mlir] Remove need for static global ctors from mlir-translate
Summary: https://bugs.llvm.org/show_bug.cgi?id=45436

Reviewers: mehdi_amini, mravishankar, antiagainst, rriddle, stephenneuendorffer

Reviewed By: mehdi_amini, rriddle, stephenneuendorffer

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77515
2020-04-08 16:52:33 -06:00
Eric Fiselier bf90b8fc25 [libc++] Fix failing concepts tests 2020-04-08 18:25:07 -04:00
Christopher Tetreault 155740cc33 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, rriddle, efriedma

Reviewed By: sdesmalen

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77263
2020-04-08 15:15:41 -07:00
Eric Christopher ff1658b167 Fix -Wdeprecated-copy warning in XcodeSDK. 2020-04-08 15:12:53 -07:00
Eric Fiselier 601f763182 [libcxx] Adds [concept.same]
Patch from Christopher Di Bella (cjdb@google.com)
Reviewed as https://reviews.llvm.org/D74291

Adds `std::same_as` to libc++. Since there aren't clang-format rules for
//requires-expressions//, I'll need to disable the formatter in certain areas.
2020-04-08 18:00:13 -04:00
Amara Emerson befc788cfa GlobalISel: Add a setInstrAndDebugLoc(MachineInstr&) convenience helper to MachineIRBuilder. NFC.
This saves doing two separate calls to set the Instr and DebugLoc from an existing MI.
2020-04-08 14:38:33 -07:00
River Riddle 67bdda6350 [mlir][NFC] Wrap static DenseMap inside of a function to avoid the need for a global static initializer
This also helps to abstract away the exact implementation details of the loopup method if we wish to change it in the future.
2020-04-08 14:18:35 -07:00
Matt Arsenault e49e33b610 CodeGen: Use Register in MachineInstrBuilder 2020-04-08 17:03:53 -04:00
Nicolas Vasilache 6fb6a4d7f9 [mlir][Linalg] Add a test for a fused Linalg pass based on DRR to go from matmul to vectors
This revision builds a simple "fused pass" consisting of 2 levels of tiling, memory promotion and vectorization using linalg transformations written as composable pattern rewrites.
2020-04-08 16:54:40 -04:00
River Riddle c6e917d2d3 [mlir][NFC] Remove cl::opts for LoopUnroll now that the pass uses PassOptions
instead.

These were missed when the opts were replaced, and are unused.
2020-04-08 13:24:09 -07:00
Erich Keane 30588a7395 Make target features check work with ctor and dtor-
The problem was reported in PR45468, applying target features to an
always_inline constructor/destructor runs afoul of GlobalDecl
construction assert when checking for target-feature compatibility.

The core problem is fixed by using the version of the check that takes a
FunctionDecl rather than the GlobalDecl. However, while writing the
test, I discovered that source locations weren't properly set for this
check on ctors/dtors. This patch also fixes constructors and CALLED destructors.

Unfortunately, it doesn't seem too possible to get a meaningful source
location for a 'cleanup' destructor, so those are still 'frontend' level
errors unfortunately. A fixme was added to the test to cover that
situation.
2020-04-08 13:19:55 -07:00
Louis Dionne eceae25f6d [libc++] CI: Always build for both i386 and x86_64 in the back-deployment script 2020-04-08 16:11:20 -04:00
River Riddle 400ad6f95d [mlir] Eliminate the remaining usages of cl::opt instead of PassOption.
Summary: Pass options are a better choice for various reasons and avoid the need for static constructors.

Differential Revision: https://reviews.llvm.org/D77707
2020-04-08 13:05:08 -07:00
LLVM GN Syncbot 072ec965e1 [gn build] Port 8b67853a83 2020-04-08 20:00:26 +00:00
Kirill Naumov 8b67853a83 [CFGPrinter] Adding heat coloring to CFGPrinter
This patch introduces the heat coloring of the Control Flow Graph which is based
on the relative "hotness" of each BB. The patch is a part of sequence of three
patches, related to graphs Heat Coloring.

Reviewers: rcorcs, apilipenko, davidxl, sfertile, fedor.sergeev, eraman, bollu

Differential Revision: https://reviews.llvm.org/D77161
2020-04-08 19:59:51 +00:00
Raul Tambre 878d96011a [clang][CodeGen] Handle throw expression in conditional operator constant folding
Summary:
We're smart and do constant folding when emitting conditional operators.
Thus we emit the live value as a lvalue. This doesn't work if the live value is a throw expression.
Handle this by emitting the throw and returning the dead value as the lvalue.

Fixes PR28184.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77502
2020-04-08 12:32:21 -07:00
Vedant Kumar 0605f5fbe7 unittest: Disable MachineInstrClone.CopyCallSiteInfo entirely
Somehow, details about the host architecture are creeping into the bogus
target set up in MFCommon.inc, causing call site info to be disabled:

http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/41476
http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/17987

Disable the test to unblock the bots until I can figure this out.
2020-04-08 12:16:22 -07:00
Vedant Kumar 381bdd546c unittest: Disable MachineInstrClone.CopyCallSiteInfo on Windows
A bot error (http://45.33.8.238/win/12463/step_11.txt) reports 'unknown
file: error: SEH exception with code 0x3221225477 thrown in the test
body', but I don't know what causes this.

It looks like this has come up before, but afaict the root causes could
be different:

  https://reviews.llvm.org/rL329195, and in
  http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180910/587425.html

I tried testing locally with UBSan, but that didn't uncover anything.
2020-04-08 12:11:53 -07:00
Fangrui Song 969b91af73 [Driver] Default arm-linux-androideabi to -z max-page-size=4096
Similar to D55029. The requirement arises when discussing increasing
default max-page-size for lld ARM (D77330).

For the record, the default max-page-size on the 3 commonly used linkers:

* GNU ld since 2014 (https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=7572ca8989ead4c3425a1500bc241eaaeffa2c89) defaults to 65536
* GNU gold remains 4096
* lld<=10 uses 4096. lld from 11 onwards will use 65536 (D77330)

Reviewed By: srhines, thieta

Differential Revision: https://reviews.llvm.org/D77746
2020-04-08 12:05:28 -07:00
Louis Dionne 82bec93181 [libc++] Update the documentation for running Lit to reflect reality
Our documentation for running LIT is basically wrong, since it doesn't
mention `llvm-lit`, and nothing works without it. Note that this
documentation improvement reflects the current reality outside of
the recent efforts on improving the test suite. My goal is to document
the current way of running the test suite, so that everybody agrees on
how things currently work. As the configuration system for libc++ gets
simplified, we can come back and keep this documentation up to date to
reflect those changes.

Differential Revision: https://reviews.llvm.org/D77673
2020-04-08 15:04:16 -04:00
Michael Wyman 3d4d25fb4d First test commit - empty 2020-04-08 11:31:51 -07:00
Matt Arsenault c42cc7fd24 CodeGen: Use Register in MachineSSAUpdater 2020-04-08 14:29:01 -04:00
Artem Belevich d2e498b172 [CUDA] Improve testing of libdevice detection.
Added new testcases for libdevice in CUDA-9+ and removed unused checks.

Differential Revision: https://reviews.llvm.org/D77688
2020-04-08 11:19:45 -07:00
Artem Belevich a9627b7ea7 [CUDA] Add partial support for recent CUDA versions.
Generate PTX using newer versions of PTX and allow using sm_80 with CUDA-11.
None of the new features of CUDA-10.2+ have been implemented yet, so using these
versions will still produce a warning.

Differential Revision: https://reviews.llvm.org/D77670
2020-04-08 11:19:44 -07:00
Artem Belevich 33386b20aa [CUDA] Simplify GPU variant handling. NFC.
Instead of hardcoding individual GPU mappings in multiple functions, keep them
all in one table and use it to look up the mappings.

We also don't care about 'virtual' architecture much, so the API is trimmed down
down to a simpler GPU->Virtual arch name lookup.

Differential Revision: https://reviews.llvm.org/D77665
2020-04-08 11:19:43 -07:00
Davide Italiano d51b38f1b3 [DWARF] Not all the constant variables are "static".
Fixes rdar://problem/61402307

Differential Revision: https://reviews.llvm.org/D77698
2020-04-08 11:07:19 -07:00
Vedant Kumar 48e65fc630 MachineFunction: Copy call site info when duplicating insts
Summary:
Preserve call site info for duplicated instructions. We copy over the
call site info in CloneMachineInstrBundle to avoid repeated calls to
copyCallSiteInfo in CloneMachineInstr.

(Alternatively, we could copy call site info higher up the stack, e.g.
into TargetInstrInfo::duplicate, or even into individual backend passes.
However, I don't see how that would be safer or more general than the
current approach.)

Reviewers: aprantl, djtodoro, dstenb

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77685
2020-04-08 11:06:14 -07:00
Walter Erquinigo be3f8a8e1b [commands] Support autorepeat in SBCommands
Summary:
This adds support for commands created through the API to support autorepeat.
This covers the case of single word and multiword commands.

Comprehensive tests are included as well.

Reviewers: labath, clayborg

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D77444
2020-04-08 10:54:14 -07:00
Walter Erquinigo 8e40987e18 Fix e796c77b26
Failure:
http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/14556/testReport/junit/lldb-api/tools_lldb-vscode_breakpoint-events/TestVSCode_breakpointEvents_py/

Diff:
[lldb-vscode] Correctly return source mapped breakpoints for setBreakpoints request
https://reviews.llvm.org/D76968

It failed a test TestVSCode_breakpointEvents that only runs Darwin that needed to be updated to match the current logic.
The change is simple.
2020-04-08 10:48:01 -07:00
Matt Arsenault 586769cce2 DAG: Use Register 2020-04-08 13:44:31 -04:00
Sean Fertile d0b57b41f4 [PowerPC][AIX][NFC] Replace deprecated getByValAlign call.
Replace call to deprecated 'getByValAlign()' with
'getNonZeroByValAlign()'.
2020-04-08 13:27:39 -04:00
Paula Toth 66d00feb18 [libc][NFC] Make all top of file comments consistent.
Summary:
Made all header files consistent based of this documentation: https://llvm.org/docs/CodingStandards.html#file-headers.
And did the same for all source files top of file comments.

Reviewers: sivachandra, abrachet

Reviewed By: sivachandra, abrachet

Subscribers: MaskRay, tschuett, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D77533
2020-04-08 10:18:37 -07:00
Simon Pilgrim 94121c60d6 [InstCombine] Regenerate phi-preserve-ir-flags.ll test checks to fix issue reported on D77354 2020-04-08 18:13:24 +01:00
zoecarver b25ec45809 Fix __is_pointer builtin type trait to work with Objective-C pointer types.
Summary: 5ade17e broke __is_pointer for Objective-C pointer types. This patch fixes the builtin and re-applies the change to type_traits.

Tags: #clang, #libc

Differential Revision: https://reviews.llvm.org/D77519
2020-04-08 10:02:53 -07:00
Simon Pilgrim c8dfd0008b [PowerPC] Regenerate optcmp.ll test checks to fix issue reported on D77354 2020-04-08 18:00:43 +01:00
Walter Erquinigo e796c77b26 [lldb-vscode] Correctly return source mapped breakpoints for setBreakpoints request
Summary:
When using source maps for a breakpoint, in order to find the actual source that breakpoint has resolved, we
need to use a query similar to what CommandObjectSource::DumpLinesInSymbolContexts does, which is the logic
used by the CLI to display the source line at a given breakpoint. That's necessary because from a breakpoint
location you only have an address, which points to the original source location, not the source mapped one.

in the setBreakpoints request handler, we haven't been doing such query and we were returning the original
source location, which was breaking the UX of VSCode, as many breakpoints were being set but not displayed
in the source file next to each line. Besides, clicking the source path of a breakpoint in the breakpoints
view in the debug tab was not working for this case, as VSCode was trying to open a non-existent file, thus
showing an error to the user.

Ideally, we should do the query mentioned above to find the actual source location to respond to the IDE,
however, that query is expensive and users can have an arbitrary number of breakpoints set. As a simpler fix,
the request sent by VSCode already contains the full source path, which exists because the user set it from
the IDE itself, so we can simply reuse it instead of querying from the SB API.

I wrote a test for this, and found out that I had to move SetSourceMapFromArguments after RunInitCommands in
lldb-vscode.cpp, because an init command used in all tests is `settings clear -all`, which would clear the
source map unless specified after initCommands. And in any case, I think it makes sense to have initCommands
run before anything the debugger would do.

Reviewers: clayborg, kusmour, labath, aadsm

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D76968
2020-04-08 09:52:59 -07:00
Uday Bondhugula ae8ebeca51 [MLIR] Fix test case typos in unroll.mlir
Fix check line typos in test/Dialect/Affine/unroll.mlir.

Differential Revision: https://reviews.llvm.org/D77738
2020-04-08 22:21:07 +05:30
zoecarver 7a0dc1a9e7 [libc++] Remove std::optional from ObjC is_scalar test.
std::optional requires C++17. Instead of only running the test above
C++14, this commit removes uses of std::optional from the test (it's
already tested in block.objc.pass.mm).
2020-04-08 09:44:49 -07:00
Simon Pilgrim ca5af4b649 [PowerPC] Fix fold-rlwinm.mir typos in checks to fix issue reported on D77354 2020-04-08 17:42:07 +01:00
Fangrui Song a27a7b98cd [ELF] --warn-backrefs: don't warn if -u/--export-dynamic-symbol
Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D77630
2020-04-08 09:33:22 -07:00
Nikita Popov 4007e5f32e [RDA] Try to fix build, again (NFC) 2020-04-08 18:30:53 +02:00
Simon Pilgrim 68c6d7e11c [PowerPC] Fix fold-frame-offset-using-rr.mir typos in checks to fix issue reported on D77354
Extra spaces, copy+paste duplicates and missing test name check
2020-04-08 17:18:01 +01:00
Nikita Popov b5d941ea58 [RDA] Try to fix build (NFC)
fuchsia-x86_64-linux builder fails with:

/b/fuchsia-x86_64-linux/llvm.src/llvm/include/llvm/ADT/TinyPtrVector.h:85:15:
error: no matching conversion for C-style cast from 'nullptr_t' to 'llvm::ReachingDef'
    RHS.Val = (EltTy)nullptr;

Let's see whether adding an explicit nullptr_t constructor helps.
2020-04-08 18:15:01 +02:00