Commit Graph

289262 Commits

Author SHA1 Message Date
Simon Pilgrim b0a3be04ec [X86] Add vector masked load/store scheduler classes (PR32857)
Split off from existing vector load/store classes to remove InstRW overrides.

llvm-svn: 331760
2018-05-08 12:17:55 +00:00
Gabor Horvath 3cd0aa3b7e [ASTMatchers] Overload isConstexpr for ifStmts
Differential Revision: https://reviews.llvm.org/D46233

llvm-svn: 331759
2018-05-08 11:53:32 +00:00
Sander de Smalen d8e76494fc [AArch64][SVE] Asm: Support for LD1R load-and-replicate scalar instructions.
Reviewers: fhahn, rengolin, samparker, SjoerdMeijer, javed.absar

Reviewed By: fhahn

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

llvm-svn: 331758
2018-05-08 10:46:55 +00:00
Simon Pilgrim 210286ed8f [X86] Add SchedWriteFTest/SchedWriteVecTest TEST scheduler classes
Split off from SchedWriteVecLogic to remove InstRW overrides.

llvm-svn: 331757
2018-05-08 10:28:03 +00:00
Simon Dardis e0982cca98 [mips] Mark various memory instructions as being in microMIPS (NFC)
Reviewers: atanasyan, abeserminji, smaksimovic

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

llvm-svn: 331756
2018-05-08 10:16:21 +00:00
Sander de Smalen 20eede7093 [AArch64] Disallow vector operand if FPR128 Q register is required.
Patch https://reviews.llvm.org/D41445 changed the behaviour of 'isReg()'
to also return 'true' if the parsed register operand is a vector
register. Code in the AsmMatcher checks if a register is a subclass of the
expected register class. However, even though both parsed registers map
to the same physical register, the 'v' register is of kind 'NeonVector',
where 'q' is of type Scalar, where isSubclass() does not distinguish
between the two cases.

The solution is to use an AsmOperand instead of the register directly,
and use the PredicateMethod to distinguish the two operands.

This fixes for example:
  ldr v0, [x0]    // 'v0' is an invalid operand for this instruction
  ldr q0, [x0]    // valid

Reviewers: aemerson, Gerolf, SjoerdMeijer, javed.absar

Reviewed By: aemerson

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

llvm-svn: 331755
2018-05-08 10:01:04 +00:00
Simon Dardis 7563624fcb [mips] Correct clo/clz predicates
Reviewers: smaksimovic, abeserminji, atanasyan

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

llvm-svn: 331754
2018-05-08 09:50:37 +00:00
Simon Pilgrim 3366dcfe1f Fix 'not all control paths return a value' MSVC warnings. NFCI.
llvm-svn: 331753
2018-05-08 09:40:32 +00:00
Peter Smith 24d906630b [LLD][ELF][AArch64] Increase test coverage of AArch64ErrataFix [NFC]
In the recognise test convert some ST1 multiple structure to ST1 single
structure to test the isST1SingleOpcode() function.

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

llvm-svn: 331752
2018-05-08 09:36:24 +00:00
Peter Smith f6ed9dd41d [LLD][ELF] Add test cases to improve code coverage of Thunks [NFC]
Add two test cases to improve the code coverage of ThunkSection creation
when there are no existing ThunkSections in range. There are two test
cases, one where a new section can be created and another to trigger the
"InputSection too large for range extension thunk" error message. A recent
code coverage report showed that this section of code wasn't covered by a
test case.

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

llvm-svn: 331751
2018-05-08 09:26:06 +00:00
Krasimir Georgiev f2ca41dbba [clang-format] Add raw string formatting to release notes
Reviewers: hans

Reviewed By: hans

Subscribers: cfe-commits

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

llvm-svn: 331750
2018-05-08 09:25:12 +00:00
Jeremy Morse 4f799c027e [X86] Mark all byval parameters as aliased
This is a fix for PR30290: by marking all byval stack slots as being aliased,
the instruction scheduler is more conservative about rescheduling memory
accesses to such stack slots as an LLVM Value* might alias it. This fixes
errors such as in the patched test case, where reads and writes to a data
structure are illegally mixed.

This could be fixed better in the future with better analysis for the
instruction scheduler to know what Values alias what stack slots.

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

llvm-svn: 331749
2018-05-08 09:18:01 +00:00
Alexander Ivchenko c47f799289 [X86][CET] Shadow stack fix for setjmp/longjmp
This patch adds a shadow stack fix when compiling
setjmp/longjmp with the shadow stack enabled. This
allows setjmp/longjmp to work correctly with CET.

Patch by mike.dvoretsky

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

llvm-svn: 331748
2018-05-08 09:04:07 +00:00
Martin Storsjo 4021cee996 [llvm-rc] Don't strictly require quotes around external file names
Regardless of what docs may say, existing resource files in the
wild can use this syntax.

Rename a file used in an existing test, to make it usable for unquoted
paths.

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

llvm-svn: 331747
2018-05-08 08:47:37 +00:00
Hans Wennborg 5e6e6cc721 Object: Find terminator correctly when reading long filenames in GNU archives (PR37244)
The code was previously relying on there being a null terminator
somewhere in (or after) the string table, something made less likely by
r330786.

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

llvm-svn: 331746
2018-05-08 08:22:58 +00:00
Eric Fiselier 98a1cab694 [C++2a] Implement operator<=>: Fix another bug in the code gen tests.
Sorry for the failures. I'm quite new at writing code gen tests, and
I'm not sure the best way to make them portable.

llvm-svn: 331745
2018-05-08 07:56:05 +00:00
Tobias Grosser 1c88d41020 [test] Replace undef with true/false to make test case less fragile
This test case does not require undef to be present in branch
conditions. Replace these undef values with true/false values to clarify
the control-flow required to reach the loop under testing.

llvm-svn: 331744
2018-05-08 07:24:05 +00:00
Gabor Buella 5e52fa9035 [x86] Introduce the encl[u|s|v] intrinsics
Reviewers: craig.topper, zvi

Reviewed By: craig.topper

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

llvm-svn: 331743
2018-05-08 07:12:34 +00:00
Gabor Buella 4a02bf945e [x86] Introduce the enclv instruction
Summary:
and use the -msgx flag as a requirement
for the SGX instructions.

Reviewers: craig.topper, zvi

Reviewed By: craig.topper

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

llvm-svn: 331742
2018-05-08 07:11:05 +00:00
Bjorn Pettersson 51cebc98f3 [LCSSA] Do not remove used PHI nodes in formLCSSAForInstructions
Summary:
In formLCSSAForInstructions we speculatively add new PHI
nodes, that sometimes ends up without having any uses. It
has been discovered that sometimes an added PHI node can
appear as being unused in one iteration of the Worklist,
although it can end up being used by a PHI node added in
a later iteration. We now check, a second time, that the
PHI node still is unused before we remove it. This avoids
an assert about "Trying to remove a phi with uses." for the
added test case.

Reviewers: davide, mzolotukhin, mattd, dberlin

Reviewed By: mzolotukhin, dberlin

Subscribers: dberlin, mzolotukhin, davide, bjope, uabelho, llvm-commits

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

llvm-svn: 331741
2018-05-08 06:59:47 +00:00
Gabor Buella b0f310d51d [x86] Introduce the pconfig intrinsic
Reviewers: craig.topper, zvi

Reviewed By: craig.topper

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

llvm-svn: 331740
2018-05-08 06:49:41 +00:00
Gabor Buella 2b5e96004b [x86] Introduce the pconfig instruction
Reviewers: craig.topper, zvi

Reviewed By: craig.topper

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

llvm-svn: 331739
2018-05-08 06:47:36 +00:00
Fangrui Song bd088560a8 [DebugInfo] Accept `S` in augmentation strings in CIE.
glibc libc.a(sigaction.o) compiled from sysdeps/unix/sysv/linux/x86_64/sigaction.c uses "zRS".

llvm-svn: 331738
2018-05-08 06:21:12 +00:00
Walter Lee 47bc8f1239 [asan] Fix bug introduced by r331647
unmap_shadow_on_exit was inadvertently flipped for non-RTEMS.

llvm-svn: 331737
2018-05-08 05:58:57 +00:00
Vitaly Buka 4e76d7fcb6 [sanitizer] Add InternalMmapVector::swap
llvm-svn: 331736
2018-05-08 04:57:08 +00:00
Vitaly Buka 4199dbd633 [sanitizer] Fix error checking in ThreadLister
llvm-svn: 331735
2018-05-08 04:56:57 +00:00
Igor Kudrin 47db4e6e5b Revert "[sanitizer] Be more accurate when calculating the previous instruction address on ARM."
This reverts commit r331626 because it causes build bot failures:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/5069

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

llvm-svn: 331734
2018-05-08 04:39:00 +00:00
Frederic Riss 1739b7d076 Really test type lookup in TestCppTypeLookup.py
Summary:
... and fix one bug found this way. Currently, the test works not because
types are looked up correctly, but because by injecting local variables
we also materialize the types for Clang. If we disable the local variable
injection, then one check fails.

The reason of the failure is that FindTypes is run with max_matches==1
and this value is passed down to the symbol lookup functions. When the
search is performed only on the basename (like it's the case for an
entity defined in the root namespace), then the search will stop after
having found one match on the basename. But that match might be in a
namespace, we were really just looking up the basename in the accelerator
tables.

The solution is to not pass max_matches down, but to search without a
limit and let RemoveMismatchedTypes do its job afterwards. Note the
patch includes 2 hunks with the same change, but only the latter is
tested. I couldn't find a way to create a testcase for the other
branch of the if ('image lookup -t' allows me to get there, but it
only ever returns one type anyway).

Reviewers: clayborg, jingham

Subscribers: lldb-commits

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

llvm-svn: 331719
2018-05-08 03:08:46 +00:00
Roman Tereshin d2421f9445 [MachineVerifier][GlobalISel] Verifying generic extends and truncates
Making sure we don't truncate / extend pointers, don't try to change
vector topology or bitcast vectors to scalars or back, and most
importantly, don't extend to a smaller type or truncate to a large
one.

Reviewers: qcolombet t.p.northover aditya_nandakumar

Reviewed By: qcolombet

Subscribers: rovka, kristof.beyls, llvm-commits

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

llvm-svn: 331718
2018-05-08 02:48:15 +00:00
Petr Hosek 403793e7b5 [CMake] Pass additional CMake flags in Fuchsia cache files
This allows passing additional CMake flags to builtins and runtimes
build through Fuchsia cache files.

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

llvm-svn: 331717
2018-05-08 02:47:13 +00:00
Eric Fiselier 4ed0fe04ef [C++2a] operator<=>: Fix incorrect use of Twine.
llvm-svn: 331713
2018-05-08 02:28:47 +00:00
Roman Tereshin 5e51fac39a [MIRParser][GlobalISel] Parsing vector pointer types (<M x pA>)
MIParser wasn't able to parse LLTs like `<4 x p0>`, fixing that.

Reviewers: qcolombet t.p.northover aditya_nandakumar

Reviewed By: qcolombet

Subscribers: rovka, kristof.beyls, llvm-commits

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

llvm-svn: 331712
2018-05-08 02:02:50 +00:00
Dean Michael Berris afdaaba272 [XRay][compiler-rt] Add llvm-mca assembler annotations for XRay (NFC)
This change adds some assembler comments to facilitate analysis with
llvm-mca. In particular, we're interested in identifying and later
optimising (reducing) the cost of the key functions in the XRay
implementation using both static analysis (with llvm-mca, etc.) and
dynamic analysis (perf profiling, etc.) of microbenchmarks.

llvm-svn: 331711
2018-05-08 01:57:51 +00:00
Kostya Serebryany 356e584d91 [dfsan] update the abilist for the sanitizer coverage; also remove the fuzz target from this list
llvm-svn: 331710
2018-05-08 01:52:40 +00:00
Teresa Johnson 59da890c96 [NewPM] Emit inliner NoDefinition missed optimization remark
Summary: Makes this consistent with the old PM.

Reviewers: eraman

Subscribers: mehdi_amini, llvm-commits

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

llvm-svn: 331709
2018-05-08 01:45:46 +00:00
Fangrui Song 95851515d7 Add a CIE with length 0 unconditionally.
Summary: This is not technically required, but glibc unwind-dw2-fde.c classify_object_over_fdes expects there is a CIE record length 0 as a terminator.

Reviewers: ruiu, espindola

Subscribers: emaste, arichardson, llvm-commits

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

llvm-svn: 331708
2018-05-08 01:19:16 +00:00
Eric Fiselier c5fb858053 [C++2a] Implement operator<=>: Address bugs and post-commit review comments after r331677.
This patch addresses some mostly trivial post-commit review comments received
on r331677.

Additionally, this patch fixes an assertion in `getNarrowingKind` caused by
the use of an uninitialized value from `checkThreeWayNarrowingConversion`.

llvm-svn: 331707
2018-05-08 00:52:19 +00:00
Richard Trieu fb00bde419 Move test input file into same directory as test. NFC
llvm-svn: 331706
2018-05-08 00:29:21 +00:00
Sam Clegg 25d8e68b87 [WebAssembly] MC: Use existing MCSymbol.Index field rather than inventing extra mapping
MCSymbol has getIndex/setIndex which are implementation defined
and on other platforms are used to store the symbol table
index.  It makes sense to use this rather than invent a new
mapping.

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

llvm-svn: 331705
2018-05-08 00:08:21 +00:00
Sam Clegg 22c568ba73 [MC] ELFObjectWriter: Removing unneeded variable and cast
Differential Revision: https://reviews.llvm.org/D46289

llvm-svn: 331704
2018-05-07 23:52:17 +00:00
Rui Ueyama cdf8d06426 Rename a local variable whose scope is very narrow. NFC.
llvm-svn: 331703
2018-05-07 23:43:48 +00:00
Chandler Carruth 029cea90fa Revert r330742: Let TableGen write output only if it changed, instead of doing so in cmake.
This change causes us to re-run tablegen for every single target on
every single build. This is much, much worse than the problem being
fixed AFAICT.

On my system, it makes a clean rebuild of `llc` with nothing changed go
from .5s to over 8s. On systems with less parallelism, slower file
systems, or high process startup overhead this will be even more
extreme.

The only way I see this could be a win is in clean builds where we churn
the filesystem. But I think incremental rebuild is more important, and
so if we want to re-instate this, it needs to be done in a way that
doesn't trigger constant re-runs of tablegen.

llvm-svn: 331702
2018-05-07 23:41:48 +00:00
Vitaly Buka e2953dcbf7 [sanitizer] Simplify ThreadLister interface
Reviewers: eugenis

Subscribers: kubamracek, llvm-commits

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

llvm-svn: 331701
2018-05-07 23:29:48 +00:00
Rui Ueyama ac403ef7f0 Improve error message for --plugin-opt=thinlto-prefix-replace.
llvm-svn: 331700
2018-05-07 23:24:25 +00:00
Rui Ueyama d432f216d1 Rename Config::ThinLTOIndexOnlyObjectFiles -> Config::ThinLTOIndexOnlyArg.
llvm-svn: 331699
2018-05-07 23:24:16 +00:00
Rui Ueyama 397dffd81b Split BitcodeCompiler::init() into two functions. NFC.
Previously, code to initialize Backend and code to initialize Conf are
intermingled in init(), though they don't depend on each other.

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

llvm-svn: 331698
2018-05-07 23:24:07 +00:00
Eric Fiselier 2ab957e67b Fix failing codegen test on non-x86_64 platforms
llvm-svn: 331697
2018-05-07 23:15:34 +00:00
Rumeet Dhindsa 4fb5119215 Add support for thinlto option ( thinlto-emit-imports-files) to emit import files for thinlink.
Differential Revision: https://reviews.llvm.org/D46400

llvm-svn: 331696
2018-05-07 23:14:12 +00:00
Roman Tereshin 10bc5ad622 Follow Up on [MachineVerifier][GlobalISel] NFC, Improving MO printing and refactoring visitMachineInstrBefore
Fixing accidentally broken CodeGen/X86/verifier-generic-types-1.mir test

llvm-svn: 331695
2018-05-07 23:14:00 +00:00
Roman Tereshin d29fc89222 [MachineVerifier][GlobalISel] Checking that generic instrs have LLTs on all vregs
Every generic machine instruction must have generic virtual registers
only, that is, have a low-level type attached to each operand.

Previously MachineVerifier would catch a type missing on an operand
only if the previous operand for the the same type index exists and
have a type attached to it and it will report it as a type mismatch.
This is incosistent behaviour and a misleading error message.

This commit makes sure MachineVerifier explicitly checks that the
types are there for every operand and if not provides a
straightforward error message.

Reviewers: qcolombet t.p.northover bogner ab

Reviewed By: qcolombet

Subscribers: rovka, kristof.beyls, llvm-commits

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

llvm-svn: 331694
2018-05-07 22:31:47 +00:00