Lang Hames [Wed, 9 May 2018 01:38:13 +0000 (01:38 +0000)]
[RuntimeDyld][MachO] Properly handle thumb to thumb calls within a section.
Previously thumb bits were only checked for external relocations (thumb to arm
code and vice-versa). This patch adds detection for thumb callees in the same
section asthe (also thumb) caller.
The MachO/Thumb test case is updated to cover this, and redundant checks
(handled by the MachO/ARM test) are removed.
llvm-svn: 331838
Nico Weber [Wed, 9 May 2018 01:15:38 +0000 (01:15 +0000)]
Make CMakeLists.txt formatting more consistent with the rest of LLVM.
llvm-svn: 331837
Nico Weber [Wed, 9 May 2018 01:15:06 +0000 (01:15 +0000)]
fix path to llvm-cfi-verify unittests in docs
llvm-svn: 331836
Nico Weber [Wed, 9 May 2018 01:07:02 +0000 (01:07 +0000)]
Make llvm-cfi-verify CMakeLists.txt formatting more consistent with the rest of LLVM.
llvm-svn: 331835
Adrian Prantl [Wed, 9 May 2018 01:00:01 +0000 (01:00 +0000)]
Remove \brief commands from doxygen comments.
This is similar to the LLVM change https://reviews.llvm.org/D46290.
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.
Patch produced by
for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done
for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
Differential Revision: https://reviews.llvm.org/D46320
llvm-svn: 331834
Petr Hosek [Wed, 9 May 2018 00:58:12 +0000 (00:58 +0000)]
Set CMAKE_BUILD_WITH_INSTALL_RPATH for Fuchsia runtimes
This doesn't make any difference since we don't use RPATH/RUNPATH
on Fuchsia but it avoids the CMake error when re-linking libraries
while building with Ninja.
Differntial Revision: https://reviews.llvm.org/D46610
llvm-svn: 331833
Heejin Ahn [Wed, 9 May 2018 00:53:50 +0000 (00:53 +0000)]
Support a funclet operand bundle in LowerInvoke
Summary:
The current LowerInvoke pass cannot handle invoke instructions with a
funclet bundle operand. The order of operands for an invoke instruction
is {call arguments, callee, funclet operand (if any), normal dest,
unwind dest}. The current code assumes there is no funclet operand and
incorrectly includes a funclet operand into call arguments.
Reviewers: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46242
llvm-svn: 331832
Vitaly Buka [Wed, 9 May 2018 00:44:26 +0000 (00:44 +0000)]
[sanitizer] Remove unneeded blank lines
llvm-svn: 331831
Nico Weber [Wed, 9 May 2018 00:42:17 +0000 (00:42 +0000)]
Inline contents of LLVM_XRAY_TOOLS variable into its only use.
No behavior change.
https://reviews.llvm.org/D46402
llvm-svn: 331830
Vitaly Buka [Wed, 9 May 2018 00:41:53 +0000 (00:41 +0000)]
[sanitizer] Update .clang-format in compiler-rt
Historically style is Google, but we never used AllowShortIfStatementsOnASingleLine.
llvm-svn: 331829
Sriraman Tallam [Wed, 9 May 2018 00:20:45 +0000 (00:20 +0000)]
Fix test by adding -triple=x86_64-unknown-linux
llvm-svn: 331828
Petr Hosek [Wed, 9 May 2018 00:07:42 +0000 (00:07 +0000)]
[CMake] Use CMAKE_OBJCOPY and CMAKE_STRIP to externalize debug info
Don't hardcode objcopy and strip names, rather use CMAKE_OBJCOPY and
CMAKE_STRIP variables which allows users to override the tools used
such as using llvm-objcopy and llvm-strip instead of binutils versions.
Differential Revision: https://reviews.llvm.org/D46611
llvm-svn: 331827
Petr Hosek [Wed, 9 May 2018 00:05:28 +0000 (00:05 +0000)]
[CMake] Include llvm-strip in Fuchsia toolchain distribution
Now that llvm-strip is available, include it in the Fuchsia toolchain.
Differential Revision: https://reviews.llvm.org/D46612
llvm-svn: 331826
Matt Morehouse [Tue, 8 May 2018 23:45:05 +0000 (23:45 +0000)]
[libFuzzer] Guard symbolization with try-lock.
Summary:
When out-of-memory or timeout occurs, threads can be stopped during
symbolization, thereby causing a deadlock when the OOM/TO handlers
attempt symbolization. We avoid this deadlock by skipping symbolization
if another thread is symbolizing.
Reviewers: kcc
Reviewed By: kcc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46605
llvm-svn: 331825
Davide Italiano [Tue, 8 May 2018 23:28:15 +0000 (23:28 +0000)]
[SimplifyCFG] Fix a crash when folding PHIs.
We enter MergeBlockIntoPredecessor with a block looking like this:
for.inc.us-lcssa: ; preds = %cond.end
%k.1.lcssa.ph = phi i32 [ %conv15, %cond.end ]
%t.3.lcssa.ph = phi i32 [ %k.1.lcssa.ph, %cond.end ]
br label %for.inc, !dbg !66
[note the first arg of the PHI being a PHI].
FoldSingleEntryPHINodes gets rid of both PHIs (calling, eraseFromParent).
But right before we call the function, we push into IncomingValues the
only argument of the PHIs, and shortly after we try to iterate over
something which has been invalidated before :(
The fix its not trying to remove PHIs which have an incoming value
coming from the same BB we're looking at.
Fixes PR37300 and rdar://problem/
39910460
Differential Revision: https://reviews.llvm.org/D46568
llvm-svn: 331824
Sriraman Tallam [Tue, 8 May 2018 23:19:50 +0000 (23:19 +0000)]
New option -z keep-text-section-prefix to keep text sections with prefixes separate.
Separate output sections for selected text section prefixes to enable TLB optimizations and for readablilty.
Differential Revision: https://reviews.llvm.org/D45841
llvm-svn: 331823
Roman Lebedev [Tue, 8 May 2018 23:15:58 +0000 (23:15 +0000)]
Partially revert r331456: [clang-tidy] Remove AnalyzeTemporaryDtors option.
That broke every single .clang-tidy config out there
which happened to specify AnalyzeTemporaryDtors option:
YAML:5:24: error: unknown key 'AnalyzeTemporaryDtors'
AnalyzeTemporaryDtors: false
^~~~~
Error parsing <...>/.clang-tidy: Invalid argument
More so, that error isn't actually a error, the
clang-tidy does not exit with $? != 0, it continues
with the default config.
Surely this breakage isn't the intended behavior.
But if it is, feel free to revert this commit.
llvm-svn: 331822
Peter Collingbourne [Tue, 8 May 2018 22:59:05 +0000 (22:59 +0000)]
MC: Remove dead code. NFCI.
We should never emit an SHT_DYNSYM into an object file.
llvm-svn: 331821
Daniel Sanders [Tue, 8 May 2018 22:58:35 +0000 (22:58 +0000)]
[globalisel] Correct r331816 to check the opcode before calling getOperand().
Fix a silly mistake in my pre-commit changes for r331816. It should check what
opcode the insn is before extracting the operands.
NFC at the moment since the caller already checked the opcode.
llvm-svn: 331820
Roman Tereshin [Tue, 8 May 2018 22:53:09 +0000 (22:53 +0000)]
[GlobalISel][Legalizer] More concise and faster widenScalar, NFC
Refactoring LegalizerHelper::widenScalar member function reducing its
size by approximately a factor of 2 and (hopefuly) making it more
straightforward and regular by introducing widenScalarSrc and
widenScalarDst helper methods.
The new widenScalar* methods mutate the instructions in place instead
of recreating them from scratch and removing the originals. The
compile time implications of this were measured on sqlite3
amalgamation, targeting AArch64 in -O0:
LegalizerHelper::widenScalar: > 25% faster
Legalizer::runOnMachineFunction: ~ 4.0 - 4.5% faster
Also adding MachineOperand::setCImm and refactoring out
MachineIRBuilder::recordInsertion methods to make the change possible.
Reviewers: aditya_nandakumar, bogner, javed.absar, t.p.northover, ab, dsanders, arsenm
Reviewed By: aditya_nandakumar
Subscribers: wdng, rovka, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D46414
llvm-svn: 331819
Volodymyr Sapsai [Tue, 8 May 2018 22:50:35 +0000 (22:50 +0000)]
Revert "Emit an error when mixing <stdatomic.h> and <atomic>"
It reverts commit r331379 because turned out `__ALLOW_STDC_ATOMICS_IN_CXX__`
doesn't work well in practice.
llvm-svn: 331818
Rumeet Dhindsa [Tue, 8 May 2018 22:37:57 +0000 (22:37 +0000)]
Add support for LTO plugin option obj-path
Differential Revision: https://reviews.llvm.org/D46598
llvm-svn: 331817
Daniel Sanders [Tue, 8 May 2018 22:26:39 +0000 (22:26 +0000)]
[globalisel] Add a combiner helpers for extending loads and use them in a pre-legalize combiner for AArch64
Summary: Depends on D45541
Reviewers: ab, aditya_nandakumar, bogner, rtereshin, volkan, rovka, javed.absar, aemerson
Reviewed By: aemerson
Subscribers: aemerson, rengolin, mgorny, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D45543
llvm-svn: 331816
Craig Topper [Tue, 8 May 2018 22:01:43 +0000 (22:01 +0000)]
[X86] Mark builtins 'const' where possible
I attempted to go through all the builtins and marked them const if they didn't touch memory or other hidden state.
I don't know how to test this or if it really matters.
Differential Revision: https://reviews.llvm.org/D46349
llvm-svn: 331814
Jessica Paquette [Tue, 8 May 2018 22:00:57 +0000 (22:00 +0000)]
Revert "[X86][CET] Shadow stack fix for setjmp/longjmp"
This reverts commit
30962eca38ef02666ebcdded72a94f2cd0292d68.
This commit has been causing test asan failures on a build bot.
http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/45108/
Original commit: https://reviews.llvm.org/D46181
llvm-svn: 331813
Erich Keane [Tue, 8 May 2018 21:26:21 +0000 (21:26 +0000)]
Fix float->int conversion warnings when near barriers.
As Eli brought up here: https://reviews.llvm.org/D46535
I'd previously messed up this fix by missing conversions
that are just slightly outside the range. This patch fixes
this by no longer ignoring the return value of
convertToInteger. Additionally, one of the error messages
wasn't very sensical (mentioning out of range value, when it
really was not), so it was cleaned up as well.
llvm-svn: 331812
Yaxun Liu [Tue, 8 May 2018 21:02:12 +0000 (21:02 +0000)]
[HIP] Add hip offload kind
There are quite differences in HIP action builder and action job creation,
which justifies to define a separate offload kind.
Differential Revision: https://reviews.llvm.org/D46471
llvm-svn: 331811
Jessica Paquette [Tue, 8 May 2018 20:58:32 +0000 (20:58 +0000)]
Add a mno-outline flag to disable the MachineOutliner
Since we're working on turning the MachineOutliner by default under -Oz for
AArch64, it makes sense to have an -mno-outline flag available. This currently
doesn't do much (it basically just undoes -moutline).
When the MachineOutliner is on by default under AArch64, this flag should
set -mllvm -enable-machine-outliner=never.
llvm-svn: 331810
Martin Storsjo [Tue, 8 May 2018 20:56:04 +0000 (20:56 +0000)]
[AsmPrinter] Allow emitting codeview for any windows target
Before SVN r244158, codeview debug info was emitted always
emitted for msvc if debug info was enabled, but that commit
added a module flag.
Since it's still restricted by the flag, we can allow it
for any target if the user requests it, not only msvc (and
windows-itanium, added in SVN r287567).
Add a test for emitting it for a mingw target.
Differential Revision: https://reviews.llvm.org/D46303
llvm-svn: 331809
Martin Storsjo [Tue, 8 May 2018 20:55:58 +0000 (20:55 +0000)]
[llvm-rc] Add support for all missing dialog controls
Differential Revision: https://reviews.llvm.org/D46507
llvm-svn: 331808
Martin Storsjo [Tue, 8 May 2018 20:55:23 +0000 (20:55 +0000)]
[Driver] Don't add -dwarf-column-info when using -gcodeview on non-msvc targets
-dwarf-column-info is omitted if -gcodeview is specified for msvc
targets at the moment, but since -gcodeview is an option that can be
specified for any target, there's little reason to restrict this
handling to msvc targets.
This allows getting proper codeview debug info by passing -gcodeview
for e.g. MinGW targets as well.
Differential Revision: https://reviews.llvm.org/D46287
llvm-svn: 331807
Jessica Paquette [Tue, 8 May 2018 20:53:19 +0000 (20:53 +0000)]
Change -foutline to -moutline
Nitpicky, but the MachineOutliner is a machine-level pass, and so we should
reflect that by using "m" instead of "n".
Figured we should get this in before people get used to the letter f. :)
llvm-svn: 331806
Simon Pilgrim [Tue, 8 May 2018 20:24:45 +0000 (20:24 +0000)]
Fix Wdocumentation warning. NFCI.
llvm-svn: 331805
Rumeet Dhindsa [Tue, 8 May 2018 20:12:07 +0000 (20:12 +0000)]
Update ThinLTO Indexing logic
Instead of writing empty index for file, this patch tracks the state of files in ObjectToIndexFileState. If the files are not indexed , only then we emit the empty files
Differential Revision: https://reviews.llvm.org/D46480
llvm-svn: 331803
Stephane Sezer [Tue, 8 May 2018 19:46:29 +0000 (19:46 +0000)]
Add missing newlines to cl::extrahelp uses
llvm-svn: 331802
Max Moroz [Tue, 8 May 2018 19:26:51 +0000 (19:26 +0000)]
[Coverage] Take filenames into account when loading function records.
Summary:
Don't skip functions with the same name but from different files.
That change makes it possible to generate code coverage reports from
different binaries compiled from different sources even if there are functions
with non-unique names. Without that change, code coverage for such functions is
missing except of the first function processed.
Reviewers: vsk, morehouse
Reviewed By: vsk
Subscribers: llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D46478
llvm-svn: 331801
Daniel Neilson [Tue, 8 May 2018 19:08:12 +0000 (19:08 +0000)]
Changing constants in a test (NFC)
Summary:
Changing the lengths of the atomic memory intrinsics in a test to make sure
that they don't get lowered into loads/stores if/when expansion of these
occurs in selectiondag.
llvm-svn: 331800
Hideki Saito [Tue, 8 May 2018 18:57:34 +0000 (18:57 +0000)]
[LV] Fix for PR37248, Broadcast codegen incorrectly assumed vector loop body is single basic block
Summary:
Broadcast code generation emitted instructions in pre-header, while the instruction they are dependent on in the vector loop body.
This resulted in an IL verification error ---- value used before defined.
Reviewers: rengolin, fhahn, hfinkel
Reviewed By: rengolin, fhahn
Subscribers: dcaballe, Ka-Ka, llvm-commits
Differential Revision: https://reviews.llvm.org/D46302
llvm-svn: 331799
Tim Renouf [Tue, 8 May 2018 18:53:04 +0000 (18:53 +0000)]
[AMDGPU] Provide machine -> name mapping
Summary:
AMDGPU stores a numerical code for the particular GPU variant in EFlags
in the ELF file. This commit provides a mapping from that number into
the machine name for use by objdump-type tools.
Change-Id: Id37fc0bebad443bd89c0080985ce298c4e7e9319
Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D46587
llvm-svn: 331798
Lei Huang [Tue, 8 May 2018 18:52:06 +0000 (18:52 +0000)]
[Power9]Legalize and emit code for truncate and convert QP to HW and Byte
Legalize and emit code for truncate and convert float128 to (un)signed short
and (un)signed char.
Differential Revision: https://reviews.llvm.org/D46194
llvm-svn: 331797
Matt Arsenault [Tue, 8 May 2018 18:43:44 +0000 (18:43 +0000)]
AMDGPU: Fix broken check lines in test
llvm-svn: 331796
Matt Arsenault [Tue, 8 May 2018 18:43:34 +0000 (18:43 +0000)]
AMDGPU: Don't use undef in a test
llvm-svn: 331795
Stephane Sezer [Tue, 8 May 2018 18:43:27 +0000 (18:43 +0000)]
[docs] Fix a typo in KaleidoscopeJIT tutorial
Summary: Just a missing end quote.
Reviewers: lhames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46136
llvm-svn: 331794
Matt Arsenault [Tue, 8 May 2018 18:43:25 +0000 (18:43 +0000)]
AMDGPU: Fix broken dynamic vector indexing for packed types
The intention of this was to multiply by 16, not shift by 16.
llvm-svn: 331793
Matt Arsenault [Tue, 8 May 2018 18:43:05 +0000 (18:43 +0000)]
DAG: Use correct shift width type
llvm-svn: 331792
Vitaly Buka [Tue, 8 May 2018 18:35:11 +0000 (18:35 +0000)]
[sanitizer] Read file to InternalMmapVectorNoCtor
llvm-svn: 331791
Lei Huang [Tue, 8 May 2018 18:34:00 +0000 (18:34 +0000)]
[Power9]Legalize and emit code for truncate and convert Quad-Precision to Word
Legalize and emit code for:
* xscvqpswz : VSX Scalar truncate & Convert Quad-Precision to Signed Word
* xscvqpuwz : VSX Scalar truncate & Convert Quad-Precision to Unsigned Word
Differential Revision: https://reviews.llvm.org/D45635
llvm-svn: 331790
Vitaly Buka [Tue, 8 May 2018 18:32:53 +0000 (18:32 +0000)]
[sanitizer] Close fd on ReadFromFile error
llvm-svn: 331789
Changpeng Fang [Tue, 8 May 2018 18:32:35 +0000 (18:32 +0000)]
AMDGPU: Use eraseFromParent to delete am instruction when it is no longer needed.
Reviewer: Nicolai
Differential Revision:
https://reviews.llvm.org/D46438
llvm-svn: 331788
Lei Huang [Tue, 8 May 2018 18:23:31 +0000 (18:23 +0000)]
[Power9]Legalize and emit code for truncate and convert QP to DW
Legalize and emit code for:
* xscvqpsdz : VSX Scalar truncate & Convert Quad-Precision to Signed Dword
* xscvqpudz : VSX Scalar truncate & Convert Quad-Precision to Unsigned Dword
Differential Revision: https://reviews.llvm.org/D45553
llvm-svn: 331787
Zachary Turner [Tue, 8 May 2018 18:20:10 +0000 (18:20 +0000)]
[lit] Fix running tests that require 'examples'.
Differential Revision: https://reviews.llvm.org/D46514
Patch by Nikolai Kosjar.
llvm-svn: 331786
Vitaly Buka [Tue, 8 May 2018 17:59:44 +0000 (17:59 +0000)]
[sanitizer] Fix InternalMmapVectorNoCtor reserve and resize
Remap on reserve of more than the current size.
Don't remap on downsize.
llvm-svn: 331784
Guozhi Wei [Tue, 8 May 2018 17:58:32 +0000 (17:58 +0000)]
[CodeGenPrepare] Move Extension Instructions Through Logical And Shift Instructions
CodeGenPrepare pass move extension instructions close to load instructions in different BB, so they can be combined later. But the extension instructions can't move through logical and shift instructions in current implementation. This patch enables this enhancement, so we can eliminate more extension instructions.
Differential Revision: https://reviews.llvm.org/D45537
llvm-svn: 331783
Rui Ueyama [Tue, 8 May 2018 17:50:54 +0000 (17:50 +0000)]
Refactor BitcodeCompiler::add(). NFC.
This change makes it explicit that the main loop iterates over a
parallel array, Syms and ObjSyms.
llvm-svn: 331780
Rui Ueyama [Tue, 8 May 2018 17:50:43 +0000 (17:50 +0000)]
Fix a bug that a copy of a large vector was created. NFC.
llvm-svn: 331779
Lei Huang [Tue, 8 May 2018 17:36:40 +0000 (17:36 +0000)]
[PowerPC] Unify handling for conversion of FP_TO_INT feeding a store
Existing DAG combine only handles conversions for FP_TO_SINT:
"{f32, f64} x { i32, i16 }"
This patch simplifies the code to handle:
"{ FP_TO_SINT, FP_TO_UINT } x { f64, f32 } x { i64, i32, i16, i8 }"
Differential Revision: https://reviews.llvm.org/D46102
llvm-svn: 331778
Greg Clayton [Tue, 8 May 2018 17:19:24 +0000 (17:19 +0000)]
Add support to object files for accessing the .debug_types section
In an effort to make the .debug_types patch smaller, breaking out the part that reads the .debug_types from object files into a separate patch
Differential Revision: https://reviews.llvm.org/D46529
llvm-svn: 331777
Alexander Shaposhnikov [Tue, 8 May 2018 17:12:54 +0000 (17:12 +0000)]
[llvm-objcopy] Fix exit code
Set the exit code to 1 if no arguments are specified.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D46547
llvm-svn: 331776
Stanislav Mekhanoshin [Tue, 8 May 2018 16:53:02 +0000 (16:53 +0000)]
[AMDGPU] Added checks for dpp_ctrl value
- Report error for invalid dpp_ctrl values.
- Changed the way it is reported, now the error will be emitted into
asm and will work with release build as well.
- Added dpp_ctrl value verifier for codegen.
- Added symbolic constants for dpp_ctrl.
Differential Revision: https://reviews.llvm.org/D46565
llvm-svn: 331775
Simon Atanasyan [Tue, 8 May 2018 16:11:40 +0000 (16:11 +0000)]
[ELF][MIPS] Fix test case in attempt to restore Windows build-bot. NFC
llvm-svn: 331774
Simon Pilgrim [Tue, 8 May 2018 15:55:14 +0000 (15:55 +0000)]
[X86] Tag PCONFIG instruction with WriteSystem scheduler class
llvm-svn: 331773
Simon Atanasyan [Tue, 8 May 2018 15:34:06 +0000 (15:34 +0000)]
[ELF][MIPS] Fix calculation of GP relative relocations in case of relocatable output
Some MIPS relocations depend on "gp" value. By default, this value has
0x7ff0 offset from a .got section. But relocatable files produced by a
compiler or a linker might redefine this default value and we have to
use it for a calculation of the relocation result. When we generate EXE
or DSO it's trivial. Generating a relocatable output is more difficult
case because the linker does calculate relocations in this case and
cannot store individual "gp" values used by each input object file.
As a workaround we add the "gp" value to the relocation addend.
This fixes https://llvm.org/pr31149
Differential revision: https://reviews.llvm.org/D45972
llvm-svn: 331772
Stefan Maksimovic [Tue, 8 May 2018 15:12:29 +0000 (15:12 +0000)]
[mips][msa] Pattern match the splat.d instruction
Introduced a new pattern for matching splat.d explicitly.
Both splat.d and splati.d can now be generated from the @llvm.mips.splat.d
intrinsic depending on whether an immediate value has been passed.
Differential Revision: https://reviews.llvm.org/D45683
llvm-svn: 331771
Simon Pilgrim [Tue, 8 May 2018 14:55:16 +0000 (14:55 +0000)]
[X86] Split off WriteIMul64 from WriteIMul schedule class (PR36931)
This fixes a couple of BtVer2 missing instructions that weren't been handled in the override.
NOTE: There are still a lot of overrides that still need cleaning up!
llvm-svn: 331770
Simon Pilgrim [Tue, 8 May 2018 14:20:25 +0000 (14:20 +0000)]
[llvm][x86] SandyBridge/IvyBridge don't support BMI1/BMI2
llvm-svn: 331769
Alexey Bataev [Tue, 8 May 2018 14:16:57 +0000 (14:16 +0000)]
[OPENMP, NVPTX] Fix linkage of the global entries.
The linkage of the global entries must be weak to enable support of
redefinition of the same target regions in multiple compilation units.
llvm-svn: 331768
Simon Pilgrim [Tue, 8 May 2018 13:51:45 +0000 (13:51 +0000)]
[X86] Split WriteIDiv into div/idiv 8/16/32/64 implementations (PR36930)
I've created the necessary classes but there are still a lot of overrides that need cleaning up.
NOTE: The Znver1 model was missing some div/idiv variants in the instregex patterns and wasn't setting the resource cycles at all in the overrides.
llvm-svn: 331767
Sven van Haastregt [Tue, 8 May 2018 13:47:43 +0000 (13:47 +0000)]
[OpenCL] Factor out language version printing
Generate a printable OpenCL language version number in a single place
and select between the OpenCL C or OpenCL C++ version accordingly.
Differential Revision: https://reviews.llvm.org/D46382
llvm-svn: 331766
Simon Pilgrim [Tue, 8 May 2018 13:30:58 +0000 (13:30 +0000)]
[llvm-mca][x86] Add div/idiv, mul/imul and inc/dec/neg/nop instruction tests
llvm-svn: 331765
Jonas Devlieghere [Tue, 8 May 2018 13:28:34 +0000 (13:28 +0000)]
[test] Re-enable TestUnicodeSymbols
Re-enable TestUnicodeSymbols now that we use the in-tree dsymutil. This
was disabled because the hashing of unicode symbols was out of sync
between llvm (dsymutil) and lldb.
llvm-svn: 331764
Roman Lebedev [Tue, 8 May 2018 13:14:21 +0000 (13:14 +0000)]
[clang-tidy] Profile is a per-AST (per-TU) data.
Summary:
As discussed in D45931, currently, profiling output of clang-tidy is somewhat not great.
It outputs one profile at the end of the execution, and that profile contains the data
from the last TU that was processed. So if the tool run on multiple TU's, the data is
not accumulated, it is simply discarded.
It would be nice to improve this.
This differential is the first step - make this profiling info per-TU,
and output it after the tool has finished processing each TU.
In particular, when `ClangTidyASTConsumer` destructor runs.
Next step will be to add a CSV (JSON?) printer to store said profiles under user-specified directory prefix.
Reviewers: alexfh, sbenza
Reviewed By: alexfh
Subscribers: Eugene.Zelenko, mgorny, xazax.hun, mgrang, klimek, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D46504
llvm-svn: 331763
Aleksei Sidorin [Tue, 8 May 2018 12:45:21 +0000 (12:45 +0000)]
[ASTImporter] Properly import SourceLocations of Attrs
Patch by Rafael Stahl!
Differential Revision: https://reviews.llvm.org/D46115
llvm-svn: 331762
Martin Storsjo [Tue, 8 May 2018 12:33:54 +0000 (12:33 +0000)]
[llvm-rc] Update a stale comment. NFC.
The tokenizer handles comments since SVN r315207.
llvm-svn: 331761
Simon Pilgrim [Tue, 8 May 2018 12:17:55 +0000 (12:17 +0000)]
[X86] Add vector masked load/store scheduler classes (PR32857)
Split off from existing vector load/store classes to remove InstRW overrides.
llvm-svn: 331760
Gabor Horvath [Tue, 8 May 2018 11:53:32 +0000 (11:53 +0000)]
[ASTMatchers] Overload isConstexpr for ifStmts
Differential Revision: https://reviews.llvm.org/D46233
llvm-svn: 331759
Sander de Smalen [Tue, 8 May 2018 10:46:55 +0000 (10:46 +0000)]
[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
Simon Pilgrim [Tue, 8 May 2018 10:28:03 +0000 (10:28 +0000)]
[X86] Add SchedWriteFTest/SchedWriteVecTest TEST scheduler classes
Split off from SchedWriteVecLogic to remove InstRW overrides.
llvm-svn: 331757
Simon Dardis [Tue, 8 May 2018 10:16:21 +0000 (10:16 +0000)]
[mips] Mark various memory instructions as being in microMIPS (NFC)
Reviewers: atanasyan, abeserminji, smaksimovic
Differential Revision: https://reviews.llvm.org/D46388
llvm-svn: 331756
Sander de Smalen [Tue, 8 May 2018 10:01:04 +0000 (10:01 +0000)]
[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
Simon Dardis [Tue, 8 May 2018 09:50:37 +0000 (09:50 +0000)]
[mips] Correct clo/clz predicates
Reviewers: smaksimovic, abeserminji, atanasyan
Differential Revision: https://reviews.llvm.org/D46125
llvm-svn: 331754
Simon Pilgrim [Tue, 8 May 2018 09:40:32 +0000 (09:40 +0000)]
Fix 'not all control paths return a value' MSVC warnings. NFCI.
llvm-svn: 331753
Peter Smith [Tue, 8 May 2018 09:36:24 +0000 (09:36 +0000)]
[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
Peter Smith [Tue, 8 May 2018 09:26:06 +0000 (09:26 +0000)]
[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
Krasimir Georgiev [Tue, 8 May 2018 09:25:12 +0000 (09:25 +0000)]
[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
Jeremy Morse [Tue, 8 May 2018 09:18:01 +0000 (09:18 +0000)]
[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
Alexander Ivchenko [Tue, 8 May 2018 09:04:07 +0000 (09:04 +0000)]
[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
Martin Storsjo [Tue, 8 May 2018 08:47:37 +0000 (08:47 +0000)]
[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
Hans Wennborg [Tue, 8 May 2018 08:22:58 +0000 (08:22 +0000)]
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
Eric Fiselier [Tue, 8 May 2018 07:56:05 +0000 (07:56 +0000)]
[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
Tobias Grosser [Tue, 8 May 2018 07:24:05 +0000 (07:24 +0000)]
[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
Gabor Buella [Tue, 8 May 2018 07:12:34 +0000 (07:12 +0000)]
[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
Gabor Buella [Tue, 8 May 2018 07:11:05 +0000 (07:11 +0000)]
[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
Bjorn Pettersson [Tue, 8 May 2018 06:59:47 +0000 (06:59 +0000)]
[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
Gabor Buella [Tue, 8 May 2018 06:49:41 +0000 (06:49 +0000)]
[x86] Introduce the pconfig intrinsic
Reviewers: craig.topper, zvi
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D46431
llvm-svn: 331740
Gabor Buella [Tue, 8 May 2018 06:47:36 +0000 (06:47 +0000)]
[x86] Introduce the pconfig instruction
Reviewers: craig.topper, zvi
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D46430
llvm-svn: 331739
Fangrui Song [Tue, 8 May 2018 06:21:12 +0000 (06:21 +0000)]
[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
Walter Lee [Tue, 8 May 2018 05:58:57 +0000 (05:58 +0000)]
[asan] Fix bug introduced by r331647
unmap_shadow_on_exit was inadvertently flipped for non-RTEMS.
llvm-svn: 331737
Vitaly Buka [Tue, 8 May 2018 04:57:08 +0000 (04:57 +0000)]
[sanitizer] Add InternalMmapVector::swap
llvm-svn: 331736
Vitaly Buka [Tue, 8 May 2018 04:56:57 +0000 (04:56 +0000)]
[sanitizer] Fix error checking in ThreadLister
llvm-svn: 331735
Igor Kudrin [Tue, 8 May 2018 04:39:00 +0000 (04:39 +0000)]
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