Commit Graph

328473 Commits

Author SHA1 Message Date
George Rimar 9f6cf2a081 Revert r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."
It broke BB:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18655/steps/test/logs/stdio

llvm-svn: 373599
2019-10-03 14:04:47 +00:00
George Rimar 32cbabfecb [yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections.
SHT_LLVM_ADDRSIG is described here:
https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table

This patch teaches tools to dump them and to parse the YAML declarations of such sections.

Differential revision: https://reviews.llvm.org/D68333

llvm-svn: 373598
2019-10-03 13:57:08 +00:00
Roman Lebedev c780645736 [NFC][InstCombine] Some tests for sub-of-negatible pattern
As we have previously estabilished, `sub` is an outcast,
and should be considered non-canonical iff it can be converted to `add`.

It can be converted to `add` if it's second operand can be negated.
So far we mostly only do that for constants and negation itself,
but we should be more through.

llvm-svn: 373597
2019-10-03 13:36:00 +00:00
Djordje Todorovic de6b59cd20 [llvm-locstats] Copy the script only when needed; NFC
llvm-svn: 373596
2019-10-03 13:18:14 +00:00
Guillaume Chatelet d400d45150 [Alignment][NFC] Remove StoreInst::setAlignment(unsigned)
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, bollu, jdoerfert

Subscribers: hiraditya, asbirlea, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D68268

llvm-svn: 373595
2019-10-03 13:17:21 +00:00
George Rimar 6079498c51 [llvm-readobj] - Stop using a precompiled binary in all.test
Having a precompiled binary here is excessive.
I also added a few missing tags.

Differential revision: https://reviews.llvm.org/D68386

llvm-svn: 373594
2019-10-03 13:13:23 +00:00
Yitzhak Mandelbaum e80e889695 [libTooling] Add various Stencil combinators for expressions.
Summary:
This revision adds three new Stencil combinators:
* `expression`, which idiomatically constructs the source for an expression,
  including wrapping the expression's source in parentheses if needed.
* `deref`, which constructs an idiomatic dereferencing expression.
* `addressOf`, which constructs an idiomatic address-taking expression.

Reviewers: gribozavr

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68315

llvm-svn: 373593
2019-10-03 13:01:00 +00:00
Guillaume Chatelet c79099e0f4 [Alignment][Clang][NFC] Add CharUnits::getAsAlign
Summary:
This is a prerequisite to removing `llvm::GlobalObject::setAlignment(unsigned)`.
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: jholewinski, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68274

llvm-svn: 373592
2019-10-03 13:00:29 +00:00
Simon Atanasyan f6551ddfce [mips] Push `fixup_Mips_LO16` fixup for `jialc` and `jic` instructions
llvm-svn: 373591
2019-10-03 12:08:26 +00:00
Simon Atanasyan bf333421da [llvm-readobj][mips] Remove non-standard --misp-xxx flags
llvm-readobj "non-standard" flags `--mips-plt-got`, `--mips-abi-flags`,
`--mips-reginfo`, and `--mips-options` are superseded by the `--arch-specific`
flag and can be removed now.

llvm-svn: 373590
2019-10-03 12:08:11 +00:00
Simon Atanasyan afe7197f13 [mips] Use llvm-readobj `-A` flag in test cases. NFC
llvm-svn: 373589
2019-10-03 12:08:04 +00:00
Simon Atanasyan 952d71b794 [llvm-readobj][mips] Display MIPS specific info under --arch-specific flag
Old options `--mips-plt-got`, `--mips-abi-flags`, '--mips-reginfo`,
and `--mips-options` wiil be deleted in a separate patch.

llvm-svn: 373588
2019-10-03 12:07:07 +00:00
Simon Atanasyan 8c6bed4396 [llvm-readobj][mips] Do not show an error if GOT is missed
It is not an error if a file does not contain GOT.

llvm-svn: 373587
2019-10-03 12:06:56 +00:00
Nico Weber ead8577aff gn build: Revert 373554 "gn build: (manually) merge r373551"
r373551 was reverted in r373581.

llvm-svn: 373586
2019-10-03 11:57:39 +00:00
Sander de Smalen 4f99b6f0fe [AArch64] Static (de)allocation of SVE stack objects.
Adds support to AArch64FrameLowering to allocate fixed-stack SVE objects.

The focus of this patch is purely to allow the stack frame to
allocate/deallocate space for scalable SVE objects. More dynamic
allocation (at compile-time, i.e. determining placement of SVE objects
on the stack), or resolving frame-index references that include
scalable-sized offsets, are left for subsequent patches.

SVE objects are allocated in the stack frame as a separate region below
the callee-save area, and above the alignment gap. This is done so that
the SVE objects can be accessed directly from the FP at (runtime)
VL-based offsets to benefit from using the VL-scaled addressing modes.

The layout looks as follows:

     +-------------+
     | stack arg   |   
     +-------------+
     | Callee Saves|
     |   X29, X30  |       (if available)
     |-------------| <- FP (if available)
     |     :       |   
     |  SVE area   |   
     |     :       |   
     +-------------+
     |/////////////| alignment gap.
     |     :       |   
     | Stack objs  |
     |     :       |   
     +-------------+ <- SP after call and frame-setup

SVE and non-SVE stack objects are distinguished using different
StackIDs. The offsets for objects with TargetStackID::SVEVector should be
interpreted as purely scalable offsets within their respective SVE region.

Reviewers: thegameg, rovka, t.p.northover, efriedma, rengolin, greened

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D61437

llvm-svn: 373585
2019-10-03 11:33:50 +00:00
Simon Pilgrim 1cd399c915 Silence static analyzer getAs<RecordType> null dereference warnings. NFCI.
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<RecordType> directly and if not assert will fire for us.

llvm-svn: 373584
2019-10-03 11:22:48 +00:00
Simon Pilgrim 44bc1186e4 Fix uninitialized variable warning. NFCI
llvm-svn: 373583
2019-10-03 11:22:00 +00:00
Simon Pilgrim b327dc1966 Fix uninitialized variable warning. NFCI
llvm-svn: 373582
2019-10-03 11:21:46 +00:00
Kristina Brooks 43817e1915 Revert 373551 (CodeExpander.cpp CMake issue)
Fix buildbots and revert the CodeExpander commit.

(See http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190930/699857.html )

llvm-svn: 373581
2019-10-03 11:04:48 +00:00
Guillaume Chatelet b3af236fb5 [Alignment][NFC] Allow constexpr Align
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68329

llvm-svn: 373580
2019-10-03 10:53:10 +00:00
Kristina Brooks abc35f1bd8 Revert 373555: libLLVM+modules failure with CMake 3.10.2
This reverts rL373555. I've sent an email out regarding the issue.

Commit on GitHub:
45f682f471

llvm-svn: 373579
2019-10-03 10:48:37 +00:00
Raphael Isemann b941cdd6bc [clang][NFC] Fix misspellings in ExternalASTMerger.h
llvm-svn: 373577
2019-10-03 09:55:13 +00:00
Sylvestre Ledru 68eef2bcd0 Update the FAQ: remove stuff related to the previous license +
update info about the portability of LLVM.

llvm-svn: 373576
2019-10-03 09:43:54 +00:00
Pavel Labath 0577a0cedb "Fix" TestFileHandle.py on non-darwin platforms
This test exposed a very long standing issue that the python file
objects returned by the FILE* typemap were unusable on non-darwin
platforms. The reason they work on darwin is that they rely on a
non-standard extension to fetch the "mode" of a FILE* object. On other
platforms, this code was #ifdefed out, and so we were returning an empty
mode.

As there's no portable way to get this information, I just change the
non-darwin path to return "r+", which should permit both reading and
writing operations on the object. If the underlying file descriptor
turns out to be incompatible with this mode, the operating system should
return EBADF (or equivalent), instead of the "file not open for XXX"
error from python.

llvm-svn: 373573
2019-10-03 08:44:33 +00:00
Pavel Labath ecd849ed56 Fix a use-after-free in GDBRemoteCommunicationServerLLGS
Although it's called "GetString", StreamString::GetString actually
returns a StringRef. Creating a json object with a StringRef does not
make a copy, which means the StringRef will be dangling as soon as the
underlying stream is destroyed. Add a .str() to force the json object to
hold a copy of the string.

This fixes nearly every test on linux.

llvm-svn: 373572
2019-10-03 07:59:26 +00:00
Clement Courbet c0292744da [llvm-exegesis][NFC] Rename ExegesisTarget::decrementLoopCounterAndLoop()
Summary: To decrementLoopCounterAndJump, and explicitely take the jump target.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68375

llvm-svn: 373571
2019-10-03 07:56:56 +00:00
Fangrui Song c4b5e594b4 Fix libc++ pretty printer test for Python 3 after D67238 (take 2)
In both Python 2 and Python 3, gdb.Value.string returns a 'str'. We just
need to delete a `encode("utf-8")` which would return a 'bytes' in
Python 3.

llvm-svn: 373570
2019-10-03 06:19:50 +00:00
Craig Topper 3a6950d3f0 [X86] Add test case for v8i64->v8i8 truncate with avx512 and prefer-vector-width/min-legal-vector-width=256. NFC
With vpmovqb, we should be able to do better here until we get
AVX512VBMI on Cannonlake/Icelake.

llvm-svn: 373569
2019-10-03 06:18:45 +00:00
Matt Arsenault efb5a24ab0 AMDGPU/GlobalISel: Don't re-get subtarget
It's already available in the class.

llvm-svn: 373568
2019-10-03 05:46:10 +00:00
Matt Arsenault 1c135a39aa AMDGPU/GlobalISel: Expand G_BITCAST legality
llvm-svn: 373567
2019-10-03 05:46:08 +00:00
Craig Topper eb420aa379 [X86] Add DAG combine to turn (bitcast (vbroadcast_load)) into just a vbroadcast_load if the scalar size is the same.
This improves broadcast load folding of i64 elements on 32-bit
targets where i64 isn't legal.

Previously we had to represent these as vXf64 vbroadcast_loads and
a bitcast to vXi64. But we didn't have any isel patterns
looking for that.

This also allows us to remove or simplify some isel patterns that
were looking for bitcasted vbroadcast_loads.

llvm-svn: 373566
2019-10-03 05:30:02 +00:00
Serge Pavlov 110a24fb44 Fix driver tests when `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is `ON`
Some Driver tests relied on the default resource direcory having per-os per-arch
subdirectory layout, and when clang is built with `-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON`,
those test fail, because clang by default assumes per-target subdirectories.

Explicitly set `-resource-dir` flag to point to a tree with per-os per-arch layout.

See also: D45604, D62469

Differential Revision: https://reviews.llvm.org/D66981

Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>.

llvm-svn: 373565
2019-10-03 04:52:46 +00:00
Lawrence D'Anna f913fd6eb0 factor out an abstract base class for File
Summary:
This patch factors out File as an abstract base
class and moves most of its actual functionality into
a subclass called NativeFile.   In the next patch,
I'm going to be adding subclasses of File that
don't necessarily have any connection to actual OS files,
so they will not inherit from NativeFile.

This patch was split out as a prerequisite for
https://reviews.llvm.org/D68188

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D68317

llvm-svn: 373564
2019-10-03 04:31:46 +00:00
Lawrence D'Anna 96898eb6a9 SBDebugger::SetInputFile, SetOutputFile, etc.
Summary:
Add new methods to SBDebugger to set IO files as SBFiles instead of
as FILE* streams.

In future commits, the FILE* methods will be deprecated and these
will become the primary way to set the debugger I/O streams.

Reviewers: JDevlieghere, jasonmolenda, labath

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D68181

llvm-svn: 373563
2019-10-03 04:04:48 +00:00
Lawrence D'Anna 5750453020 new api class: SBFile
Summary:
SBFile is a scripting API wrapper for lldb_private::File

This is the first step in a project to enable arbitrary python
io.IOBase file objects -- including those that override the read()
and write() methods -- to be used as the main debugger IOStreams.

Currently this is impossible because python file objects must first
be converted into FILE* streams by SWIG in order to be passed into
the debugger.

full prototype: https://github.com/smoofra/llvm-project/tree/files

Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath

Reviewed By: labath

Subscribers: labath, mgorny, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D67793

llvm-svn: 373562
2019-10-03 04:01:07 +00:00
Yaxun Liu f13b8d4fe9 [HIP] Support -emit-llvm for device compilation
Sometimes it is useful to compile HIP device code to LLVM BC. It is not convenient to use clang -cc1 since
there are lots of options needed.

This patch allows clang driver to compile HIP device code to LLVM BC with -emit-llvm -c.

Differential Revision: https://reviews.llvm.org/D68284

llvm-svn: 373561
2019-10-03 03:27:43 +00:00
Craig Topper f849f41469 [X86] Add broadcast load folding patterns to NoVLX VPMULLQ/VPMAXSQ/VPMAXUQ/VPMINSQ/VPMINUQ patterns.
More fixes for PR36191.

llvm-svn: 373560
2019-10-03 03:16:27 +00:00
Craig Topper 241c72ddd9 [X86] Remove a couple redundant isel patterns that look to have been copy/pasted from right above them. NFC
llvm-svn: 373559
2019-10-03 03:16:21 +00:00
GN Sync Bot d7f93154b3 gn build: Merge r373556
llvm-svn: 373558
2019-10-03 02:43:27 +00:00
Nico Weber 6713f8235b Revert 373538 and follow-ups 373549 and 373552.
They break tests on (at least) macOS.

llvm-svn: 373556
2019-10-03 02:38:43 +00:00
Daniel Sanders 45f682f471 [gicombiner] Make rL373551 compatible with older cmakes
Newer cmakes appear to be more flexible w.r.t object libraries. Convert to
a static library so that it works with older cmakes too

llvm-svn: 373555
2019-10-03 01:49:04 +00:00
Nico Weber f79f68975d gn build: (manually) merge r373551
llvm-svn: 373554
2019-10-03 01:32:51 +00:00
Richard Smith 5258202a81 PR43519: don't inject a diagnostic when constant-evaulation of a
pointer-to-member call can't determine a callee.

We will have produced a diagnostic already if the callee is known to be
unevaluatable, and diagnosing here rejects valid code during potential
constant expression checking.

llvm-svn: 373553
2019-10-03 01:20:27 +00:00
Puyan Lotfi 30c8df02ba Fixing broken builds due to r373538, issues with filepath and hexagon toolchain.
It appears there are some issues with the hexagon toolchain, and also the file
path for the library file. If this doesn't fix the remaining breakages I will
attempt a revert.

llvm-svn: 373552
2019-10-03 01:19:51 +00:00
Daniel Sanders eb27b5de53 [gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion
Summary:
This will handle expansion of C++ fragments in the declarative combiner
including custom predicates, and escapes into C++ to aid the migration
effort.

Reviewers: bogner, volkan

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68288

llvm-svn: 373551
2019-10-03 01:04:42 +00:00
GN Sync Bot 81f2da4d09 gn build: Merge r373538
llvm-svn: 373550
2019-10-03 00:47:13 +00:00
Puyan Lotfi 8581f860c7 Fixing broken builds due to r373538 due to test that should have been deleted.
test/InterfaceStubs/object.cpp should have been deleted.

llvm-svn: 373549
2019-10-03 00:41:13 +00:00
Richard Smith 69e9d84b1a Mark P0784R7 as complete and start defining its feature-test macro.
Note that this only covers the language side of this feature. (The
library side has its own feature test macro.)

llvm-svn: 373548
2019-10-03 00:39:37 +00:00
Richard Smith b542602c5f For P0784R7: support placement new-expressions in constant evaluation.
For now, we restrict this support to use from within the standard
library implementation, since we're required to make parts of the
standard library that use placement new work, but not permitted to
make uses of placement new from user code work.

llvm-svn: 373547
2019-10-03 00:39:35 +00:00
Richard Smith 19ad523971 For P0784R7: allow direct calls to operator new / operator delete from
std::allocator::{allocate,deallocate} in constant evaluation.

llvm-svn: 373546
2019-10-03 00:39:33 +00:00