Commit Graph

7560 Commits

Author SHA1 Message Date
Nico Weber d100b5dd01 Teach `llvm-pdbutil pretty -native` about `-injected-sources`
`pretty -native -injected-sources -injected-source-content` works with
this patch, and produces identical output to the dia version.

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

llvm-svn: 366236
2019-07-16 18:04:26 +00:00
Sam McCall 1781c28a0d Remove username from git-llvm script, erroneously added in 366197
llvm-svn: 366198
2019-07-16 10:14:53 +00:00
Kyrylo Tkachov eb72138340 [AArch64] Implement __jcvt intrinsic from Armv8.3-A
The jcvt intrinsic defined in ACLE [1] is available when ARM_FEATURE_JCVT is defined.

This change introduces the AArch64 intrinsic, wires it up to the instruction and a new clang builtin function.
The __ARM_FEATURE_JCVT macro is now defined when an Armv8.3-A or higher target is used.
I've implemented the target detection logic in Clang so that this feature is enabled for architectures from armv8.3-a onwards (so -march=armv8.4-a also enables this, for example).

make check-all didn't show any new failures.

[1] https://developer.arm.com/docs/101028/latest/data-processing-intrinsics

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

llvm-svn: 366197
2019-07-16 09:27:39 +00:00
Heejin Ahn 9f96a58ccc [WebAssembly] Rename except_ref type to exnref
Summary:
We agreed to rename `except_ref` to `exnref` for consistency with other
reference types in
https://github.com/WebAssembly/exception-handling/issues/79. This also
renames WebAssemblyInstrExceptRef.td to WebAssemblyInstrRef.td in order
to use the file for other reference types in future.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 366145
2019-07-15 22:49:25 +00:00
Matt Arsenault 0277249955 TableGen/GlobalISel: Fix handling of truncstore patterns
This was failing to import the AMDGPU truncstore patterns. The
truncating stores from 32-bit to 8/16 were then somehow being
incorrectly selected to a 4-byte store.

A separate check is emitted for the LLT size in comparison to the
specific memory VT, which looks strange to me but makes sense based on
the hierarchy of PatFrags used for the default truncstore PatFrags.

llvm-svn: 366129
2019-07-15 21:15:20 +00:00
Matt Arsenault d00d857801 TableGen: Add address space to matchers
Currently AMDGPU uses a CodePatPred to check address spaces from the
MachineMemOperand. Introduce a new first class property so that the
existing patterns can be easily modified to uses the new generated
predicate, which will also be handled for GlobalISel.

I would prefer these to match against the pointer type of the
instruction, but that would be difficult to get working with
SelectionDAG compatbility. This is much easier for now and will avoid
a painful tablegen rewrite for all the loads and stores.

I'm also not sure if there's a better way to encode multiple address
spaces in the table, rather than putting the number to expect.

llvm-svn: 366128
2019-07-15 20:59:42 +00:00
Evgeniy Stepanov c5e7f56249 ARM MTE stack sanitizer.
Add "memtag" sanitizer that detects and mitigates stack memory issues
using armv8.5 Memory Tagging Extension.

It is similar in principle to HWASan, which is a software implementation
of the same idea, but there are enough differencies to warrant a new
sanitizer type IMHO. It is also expected to have very different
performance properties.

The new sanitizer does not have a runtime library (it may grow one
later, along with a "debugging" mode). Similar to SafeStack and
StackProtector, the instrumentation pass (in a follow up change) will be
inserted in all cases, but will only affect functions marked with the
new sanitize_memtag attribute.

Reviewers: pcc, hctim, vitalybuka, ostannard

Subscribers: srhines, mehdi_amini, javed.absar, kristof.beyls, hiraditya, cryptoad, steven_wu, dexonsmith, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 366123
2019-07-15 20:02:23 +00:00
Nico Weber 62cc16dac2 gn build: Add a note on how to locally tell git to ignore build dir
llvm-svn: 366072
2019-07-15 15:14:09 +00:00
Johannes Doerfert 8eb86a15c5 [GitSVN][NFC] Mark dry-run commits as such in the log output
Summary: This helps to avoid worries about the "dry run flag" while testing.

Reviewers: jyknight, rnk, mehdi_amini

Subscribers: bollu, llvm-commits

Tags: #llvm

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

llvm-svn: 366023
2019-07-14 18:24:19 +00:00
James Y Knight 8b76e622b3 Fix some minor coding-style issues in git-llvm.
llvm-svn: 365918
2019-07-12 16:41:28 +00:00
James Y Knight 541faedd66 Allow the 'git-llvm' tool to push to svn from the split repositories
for 'test-suite', 'lnt', 'zorg', and 'www'.

This is done by looking at the pathname of the git remote named
'origin', which is not 100% reliable, but should work in most cases.

llvm-svn: 365917
2019-07-12 16:40:46 +00:00
Bryant Wong 421c7918dc [gn] Tag unneeded variable.
When only building targets without assembly parsers (e.g. `llvm_targets_to_build
= ["NVPTX"]`), `all_targets` is empty and causes GN to warn about an
assigned-but-unused variable.

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

llvm-svn: 365897
2019-07-12 13:09:39 +00:00
Alexey Bader 07cbeaa118 [LIT] Emit timeout error message only if timeout was reached
Summary:
This improves readability of LIT output: previously
error messages gets emitted that say that there was no error:

error: command reached timeout: False

Patch by Alexey Sachkov.

Reviewers: ddunbar, mgorny, modocache

Reviewed By: mgorny

Subscribers: delcypher, llvm-commits

Tags: #llvm

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

llvm-svn: 365895
2019-07-12 12:48:43 +00:00
Alex Lorenz 8955be68cf NFC: lit: python3 compatibility for functions
usePlatformSdkOnDarwin/findPlatformSdkVersionOnMacOS

These functions should decode subprocess output

llvm-svn: 365852
2019-07-12 00:48:53 +00:00
David Bolvansky fcffa7c201 [UpdateTestChecks] Emit warning when invalid test paths
Summary:
Recently I ran into the following issue:

./update_test_checks.py /path/not-existing-file.ll

The script was silent and I was suprised why the real test file hadn't been updated.

Solution:
Emit warning if we detect this problem.



Reviewers: lebedev.ri, spatel, jdoerfert, nikic

Reviewed By: lebedev.ri, spatel, jdoerfert, nikic

Subscribers: jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 365818
2019-07-11 20:14:22 +00:00
Nico Weber e5d5b5c2ac gn build: Merge r365792
llvm-svn: 365795
2019-07-11 17:09:35 +00:00
Nico Weber 0e4386e9e7 gn build: Merge r365773
llvm-svn: 365787
2019-07-11 15:01:50 +00:00
Nico Weber 5f5237c276 gn build: Merge r365687
llvm-svn: 365689
2019-07-10 19:20:17 +00:00
Nico Weber 8ceee915f3 gn build: Merge r365585
llvm-svn: 365633
2019-07-10 14:05:13 +00:00
Peter Collingbourne 67a06d9495 gn build: Merge r365536.
llvm-svn: 365572
2019-07-09 22:37:51 +00:00
Peter Collingbourne 3ea053ad50 gn build: Merge r365532.
llvm-svn: 365571
2019-07-09 22:37:41 +00:00
Peter Collingbourne d9f7162d4b gn build: Merge r365541.
llvm-svn: 365570
2019-07-09 22:37:25 +00:00
Peter Collingbourne fa7eea9e4e gn build: Merge r365531.
llvm-svn: 365569
2019-07-09 22:37:09 +00:00
Peter Collingbourne 3ce33947d4 gn build: Merge r365503.
llvm-svn: 365530
2019-07-09 18:30:38 +00:00
Nico Weber 6241035684 gn build: Merge r365453
llvm-svn: 365481
2019-07-09 13:58:18 +00:00
Vitaly Buka 29949a65b6 Update gn files
llvm-svn: 365361
2019-07-08 17:50:22 +00:00
Vitaly Buka b636c26389 Update gn files
llvm-svn: 365354
2019-07-08 17:15:57 +00:00
Joel E. Denny 1602058c04 [lit] Parse command-line options from LIT_OPTS
Similar to `FILECHECK_OPTS` for FileCheck, `LIT_OPTS` makes it easy to
adjust lit behavior when running the test suite via ninja.  For
example:

```
$ LIT_OPTS='--time-tests -vv --filter=threadprivate' \
  ninja check-clang-openmp
```

Reviewed By: probinson

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

llvm-svn: 365313
2019-07-08 12:18:40 +00:00
Alex Bradbury 1606a86464 [UpdateTestChecks] Skip over .Lfunc_begin for RISC-V
This mirrors the change made for X86 in rL336987. Without this patch,
update_llc_test_checks will completely skip functions with personality
functions.

llvm-svn: 365297
2019-07-08 08:34:16 +00:00
Nico Weber 8721001558 gn build: Merge r355546
Found by inspection; the sync script doesn't sync .ipp files.

llvm-svn: 365280
2019-07-07 16:49:44 +00:00
Nico Weber 18d138e6ac gn build: Merge r365273
llvm-svn: 365279
2019-07-07 16:44:07 +00:00
Nico Weber 7e06362061 gn build: Sort sync script output
llvm-svn: 365278
2019-07-07 16:40:29 +00:00
Nico Weber d22fd0e4ec gn build: Sort cxx_sources in libcxx build file
Since these are in a custom list, `gn format` doesn't automatically sort
them.

Now their order matches the CMake build.

No additions or deletions, this just sorts the files that are there.

llvm-svn: 365277
2019-07-07 16:36:11 +00:00
Nico Weber 3e9ef48440 gn build: Merge r365258 and follow-ups r365263, r365264
llvm-svn: 365276
2019-07-07 15:43:32 +00:00
David Majnemer 617df204b5 [CodeGen] Add larger vector types for i32 and f32
Some out of tree backend require larger vector type. Since maintaining the changes out of tree is difficult due to the many manual changes needed when adding a new type we are adding it even if no backend currently use it.

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

Patch by Thomas Raoux!

llvm-svn: 365274
2019-07-07 04:47:37 +00:00
Nico Weber df173bf9bc gn build: Merge r365203
llvm-svn: 365213
2019-07-05 15:14:06 +00:00
Nico Weber 1126f1a6de gn build: Merge r365179
llvm-svn: 365185
2019-07-05 11:34:48 +00:00
Peter Collingbourne 8da0286c9c gn build: Merge r365130.
llvm-svn: 365167
2019-07-05 01:11:20 +00:00
Peter Collingbourne 08525c53b3 gn build: Merge r365103.
llvm-svn: 365166
2019-07-05 01:11:18 +00:00
Peter Collingbourne dbd9ca48a1 gn build: Merge r365007.
llvm-svn: 365165
2019-07-05 01:11:16 +00:00
Peter Collingbourne 53b272b352 gn build: Merge r365091.
llvm-svn: 365164
2019-07-05 01:11:14 +00:00
Simon Tatham c74322a11b [TableGen] Allow DAG isel patterns to override default operands.
When a Tablegen instruction description uses `OperandWithDefaultOps`,
isel patterns for that instruction don't have to fill in the default
value for the operand in question. But the flip side is that they
actually //can't// override the defaults even if they want to.

This will be very inconvenient for the Arm backend, when we start
wanting to write isel patterns that generate the many MVE predicated
vector instructions, in the form with predication actually enabled. So
this small Tablegen fix makes it possible to write an isel pattern
either with or without values for a defaulted operand, and have the
default values filled in only if they are not overridden.

If all the defaulted operands come at the end of the instruction's
operand list, there's a natural way to match them up to the arguments
supplied in the pattern: consume pattern arguments until you run out,
then fill in any missing instruction operands with their default
values. But if defaulted and non-defaulted operands are interleaved,
it's less clear what to do. This does happen in existing targets (the
first example I came across was KILLGT, in the AMDGPU/R600 backend),
and of course they expect the previous behaviour (that the default for
those operands is used and a pattern argument is not consumed), so for
backwards compatibility I've stuck with that.

Reviewers: nhaehnle, hfinkel, dmgreen

Subscribers: mehdi_amini, javed.absar, tpr, kristof.beyls, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 365114
2019-07-04 08:43:20 +00:00
Francis Visoiu Mistrih e0308279cb [Bitcode] Move Bitstream to a separate library
This moves Bitcode/Bitstream*, Bitcode/BitCodes.h to Bitstream/.

This is needed to avoid a circular dependency when using the bitstream
code for parsing optimization remarks.

Since Bitcode uses Core for the IR part:

libLLVMRemarks -> Bitcode -> Core

and Core uses libLLVMRemarks to generate remarks (see
IR/RemarkStreamer.cpp):

Core -> libLLVMRemarks

we need to separate the Bitstream and Bitcode part.

For clang-doc, it seems that it doesn't need the whole bitcode layer, so
I updated the CMake to only use the bitstream part.

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

llvm-svn: 365091
2019-07-03 22:40:07 +00:00
Vitaly Buka 28c2458928 Fix GN build
llvm-svn: 364942
2019-07-02 16:08:10 +00:00
Nico Weber c0b0f35788 gn build: Merge r364866
llvm-svn: 364908
2019-07-02 11:20:40 +00:00
Jinsong Ji ee6539341b [UpdateTestChecks][PowerPC] Avoid empty string when scrubbing loop comments
Summary:
SCRUB_LOOP_COMMENT_RE was introduced in https://reviews.llvm.org/D31285
This works for some loops.

However, we may generate lines with loop comments only.
And since we don't scrub leading white spaces, this will leave an empty
line there, and FileCheck will complain it.

eg: llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll:27:15:
error: found empty check string with prefix 'CHECK:'
; CHECK-NEXT:

This prevented us from using the `update_llc_test_checks.py` for quite some cases.

We should still keep the comment token there, so that we can safely
scrub the loop comment without breaking FileCheck.

Reviewers: timshen, hfinkel, lebedev.ri, RKSimon

Subscribers: nemanjai, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 364775
2019-07-01 14:37:48 +00:00
Andrew Ng d74f2d0a86 [benchmark] Disable CMake get_git_version
Disabled CMake get_git_version as it is meaningless for this in-tree
build, and hardcoded a null version.

Not using get_git_version avoids a refresh of the git index that is
executed by get_git_version. Refreshing the index can take a
considerable amount of time if the index needs to be refreshed
(particularly with the mono repo). This situation can arise when
building shared source on a host in VMs.

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

llvm-svn: 364742
2019-07-01 10:58:20 +00:00
Mike Spertus bb0b44deaa Clean up MSVC visualization of LLVM pointer types
Create separate natvis ptr and int views for PointerIntPair.
These are convenient in watch Windows and will be used by 
Clang visualizers to be checked in shortly

Also, removed deref views as the MSVC na format has
done the same thing natively since MSVC2013.

llvm-svn: 364723
2019-06-30 21:54:34 +00:00
Jinsong Ji 7d78e5cc81 [UpdateChecks] Add support for armv7-apple-darwin
armv7-apple-darwin was not supported well, the script can't generate
checks.

https://reviews.llvm.org/D60601/new/#inline-568671

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

llvm-svn: 364668
2019-06-28 18:07:19 +00:00
Reid Kleckner 8007ff1ab1 [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.*
These lit configuration files are really Python source code. Using the
.py file extension helps editors and tools use the correct language
mode. LLVM and Clang already use this convention for lit configuration,
this change simply applies it to all of compiler-rt.

Reviewers: vitalybuka, dberris

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

llvm-svn: 364591
2019-06-27 20:56:04 +00:00