Simon Atanasyan [Tue, 16 Oct 2018 14:29:27 +0000 (14:29 +0000)]
[driver][mips] Support MIPS R6 target triples
This change adds support for the following MIPS target triples:
mipsisa32r6-linux-gnu
mipsisa32r6el-linux-gnu
mipsisa64r6-linux-gnuabi64
mipsisa64r6el-linux-gnuabi64
mipsisa64r6-linux-gnuabin32
mipsisa64r6el-linux-gnuabin32
Patch by Yun Qiang Su.
Differential revision: https://reviews.llvm.org/D50850
llvm-svn: 344608
Pavel Labath [Tue, 16 Oct 2018 14:29:14 +0000 (14:29 +0000)]
cxa_demangle: make demangler's parsing functions overridable
Summary:
This uses CRTP (for performance reasons) to allow a user the override
demangler functions to implement custom parsing logic. The motivation
for this is LLDB, which needs to occasionaly modify the mangled names.
One such instance is already implemented via the TypeCallback member,
but this is very specific functionality which does not help with any
other use case. Currently we have a use case for modifying the
constructor flavours, which would require adding another callback. This
approach does not scale.
With CRTP, the user (LLDB) can override any function it needs without
any special support from the demangler library. After LLDB is ported to
use this instead of the TypeCallback mechanism, the callback can be
removed.
More context can be found in D50599.
Reviewers: erik.pilkington, rsmith
Subscribers: christof, ldionne, llvm-commits, libcxx-commits
Differential Revision: https://reviews.llvm.org/D52992
llvm-svn: 344607
Ayal Zaks [Tue, 16 Oct 2018 14:25:02 +0000 (14:25 +0000)]
[LV] Add test checks when vectorizing loops under opt for size; NFC
Landing this as a separate part of https://reviews.llvm.org/D50480, recording
current behavior more accurately, to clarify subsequent diff ([LV] Vectorizing
loops of arbitrary trip count without remainder under opt for size).
llvm-svn: 344606
Jan Kratochvil [Tue, 16 Oct 2018 11:38:22 +0000 (11:38 +0000)]
Fix: Assertion failed: (!m_first_die || m_first_die == m_die_array.front()), function ExtractDIEsRWLocked
xbolva00 bugreported $subj in: https://reviews.llvm.org/D46810#1247410
It can happen only from the line:
m_die_array.back().SetEmptyChildren(true);
In the case DW_TAG_compile_unit has DW_CHILDREN_yes but there is only 0 (end of
list, no children present). Therefore the assertion can fortunately happen only
with a hand-crafted DWARF or with DWARF from some suboptimal compilers.
Differential Revision: https://reviews.llvm.org/D53255
llvm-svn: 344605
Eric Liu [Tue, 16 Oct 2018 10:41:17 +0000 (10:41 +0000)]
[clangd] Allow disble down traversals from root.
Summary:
This is useful for symbo scope proximity, where down traversals from
the global scope if not desired.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D53317
llvm-svn: 344604
Simon Atanasyan [Tue, 16 Oct 2018 10:19:06 +0000 (10:19 +0000)]
[driver][mips] Adjust target triple's environment accordingly to provided ABI name
For MIPS we need to adjust not only architecture name accordingly to ABI
provided by the `-mabi` command line option, but also modify triple's
environment. For example, for `mips-linux-gnu` triple and `-mabi=n32`
option a correct final triple is `mips64-linux-gnuabin32`.
llvm-svn: 344603
Simon Pilgrim [Tue, 16 Oct 2018 10:06:15 +0000 (10:06 +0000)]
[LegalizeDAG] ExpandLegalINT_TO_FP - cleanup UINT_TO_FP i64 -> f64 expansion.
Use SrcVT/DestVT types, correct shift type and AND instead of ZERO_EXTEND_IN_REG.
Part of prep work for D52965
llvm-svn: 344602
Max Kazantsev [Tue, 16 Oct 2018 09:58:09 +0000 (09:58 +0000)]
[NFC] Introduce ICFLoopSafetyInfo
This is an alternative implementation of LoopSafetyInfo that uses the implicit
control flow tracking to give precise answers on queries "whether or not this
block contains throwing instructions". This rules out false-positive answers on
LoopSafetyInfo's queries.
This patch only introduces the new implementation. It is not currently used in
any pass. The enabling patches will go separately, through review.
The plan is to completely replace all uses of LoopSafetyInfo with
ICFLoopSafetyInfo in the future, but to avoid introducing functional problems,
we will do it pass by pass.
llvm-svn: 344601
Simon Pilgrim [Tue, 16 Oct 2018 09:50:16 +0000 (09:50 +0000)]
[X86] Fix Skylake ReadAfterLd for PADDrm etc.
Missed in rL343868 as due to their custom InstrRW.
llvm-svn: 344600
Renato Golin [Tue, 16 Oct 2018 09:37:52 +0000 (09:37 +0000)]
[VPlan] Script to extract VPlan digraphs from log
The vectoriser's debug log prints VPlan digraphs, but it's a bit
cumbersome to extract them and render them into PNG images. This script
does exactly that, being careful enough to extract all individual plans,
name them appropriately and save in either .dot or .png files.
Example usage:
$ opt -O3 -debug-only=loop-vectorize file.ll -S -o /dev/null 2> debug.log
$ $LLVM_SRC/utils/extract_vplan.py < debug.log
Exporting VF1UF1 to DOT: VPlanVF1UF1.dot
Exporting VF24UF1 to DOT: VPlanVF24UF1.dot
$ $LLVM_SRC/utils/extract_vplan.py --png < debug.log
Exporting VF1UF1 to PNG via dot: VPlanVF1UF1.png
Exporting VF24UF1 to PNG via dot: VPlanVF24UF1.png
$ xdot VPlanVF1UF1.dot
Differential Revision: https://reviews.llvm.org/D53142
llvm-svn: 344599
Simon Pilgrim [Tue, 16 Oct 2018 09:21:58 +0000 (09:21 +0000)]
Fix buildbots - update clang-interpreter to use Legacy ORC classes introduced in rL344572.
llvm-svn: 344598
Peter Smith [Tue, 16 Oct 2018 09:21:17 +0000 (09:21 +0000)]
[ARM][AArch64] Pass through endian flags to assembler and linker.
The big-endian arm32 Linux builds are currently failing when the
-mbig-endian flag is used but the binutils default on the system is little
endian. This also holds when -mlittle-endian is used and the binutils
default is big endian.
The patch always passes through -EL or -BE to the assembler and linker,
taking into account the target and the -mbig-endian and -mlittle-endian
flag.
Fixes pr38770
Differential Revision: https://reviews.llvm.org/D52784
llvm-svn: 344597
Max Kazantsev [Tue, 16 Oct 2018 09:11:25 +0000 (09:11 +0000)]
[NFC] Remove obsolete method headerMayThrow
llvm-svn: 344596
Sam McCall [Tue, 16 Oct 2018 09:05:13 +0000 (09:05 +0000)]
[clangd] Fix threading bugs in (not-yet-used) BackgroundIndex, re-enable test.
Summary:
One relatively boring bug: forgot to notify the CV after enqueue.
One much more fun bug: the thread member could access instance variables before
they were initialized. Although the thread was last in the init list, QueueCV
etc were listed after Thread in the class, so their default constructors raced
with the thread itself.
We have to get very unlucky to lose this race, I saw it 0.02% of the time.
Reviewers: ioeric
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D53313
llvm-svn: 344595
Sam McCall [Tue, 16 Oct 2018 08:53:52 +0000 (08:53 +0000)]
[clangd] Optionally use dex for the preamble parts of the dynamic index.
Summary:
Reuse the old -use-dex-index experiment flag for this.
To avoid breaking the tests, make Dex deduplicate symbols, addressing an old FIXME.
Reviewers: hokein
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D53288
llvm-svn: 344594
Yvan Roux [Tue, 16 Oct 2018 08:47:36 +0000 (08:47 +0000)]
Add target requirement to profile remap test.
Fix bots which don't have x86_64 target built (ARM/AArch64).
Differential Revision: https://reviews.llvm.org/D53272
llvm-svn: 344593
Max Kazantsev [Tue, 16 Oct 2018 08:31:05 +0000 (08:31 +0000)]
[NFC] Make LoopSafetyInfo abstract to allow alternative implementations
llvm-svn: 344592
Aleksandar Beserminji [Tue, 16 Oct 2018 08:27:28 +0000 (08:27 +0000)]
[mips][micromips] Fix how values in .gcc_except_table are calculated
When a landing pad is calculated in a program that is compiled
for micromips, it will point to an even address. Such an error will
cause a segmentation fault, as the instructions in micromips are
aligned on odd addresses. This patch sets the last bit of the offset
where a landing pad is, to 1, which will effectively be
an odd address and point to the instruction exactly.
Differential Revision: https://reviews.llvm.org/D52985
llvm-svn: 344591
Max Kazantsev [Tue, 16 Oct 2018 08:07:14 +0000 (08:07 +0000)]
[NFC] Encapsulate work with BlockColors in LoopSafetyInfo
llvm-svn: 344590
David Stenberg [Tue, 16 Oct 2018 08:06:48 +0000 (08:06 +0000)]
[DebugInfo][LCSSA] Rewrite pre-existing debug values outside loop
Summary:
Extend LCSSA so that debug values outside loops are rewritten to
use the PHI nodes that the pass creates.
This fixes PR39019. In that case, we ran LCSSA on a loop that
was later on vectorized, which left us with something like this:
for.cond.cleanup:
%add.lcssa = phi i32 [ %add, %for.body ], [ %34, %middle.block ]
call void @llvm.dbg.value(metadata i32 %add,
ret i32 %add.lcssa
for.body:
%add =
[...]
br i1 %exitcond, label %for.cond.cleanup, label %for.body
which later resulted in the debug.value becoming undef when
removing the scalar loop (and the location would have probably
been wrong for the vectorized case otherwise).
As we now may need to query the AvailableVals cache more than
once for a basic block, FindAvailableVals() in SSAUpdaterImpl is
changed so that it updates the cache for blocks that we do not
create a PHI node for, regardless of the block's number of
predecessors. The debug value in the attached IR reproducer
would not be properly rewritten without this.
Debug values residing in blocks where we have not inserted any
PHI nodes are currently left as-is by this patch. I'm not sure
what should be done with those uses.
Reviewers: mattd, aprantl, vsk, probinson
Reviewed By: mattd, aprantl
Subscribers: jmorse, gbedwell, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D53130
llvm-svn: 344589
Max Kazantsev [Tue, 16 Oct 2018 07:50:14 +0000 (07:50 +0000)]
[NFC] Move block throw check inside allLoopPathsLeadToBlock
llvm-svn: 344588
Max Kazantsev [Tue, 16 Oct 2018 06:34:53 +0000 (06:34 +0000)]
[NFC] Turn isGuaranteedToExecute into a method
llvm-svn: 344587
Sam McCall [Tue, 16 Oct 2018 06:32:14 +0000 (06:32 +0000)]
[clangd] Disable timeouting test while investigating
llvm-svn: 344586
Alexander Shaposhnikov [Tue, 16 Oct 2018 05:40:18 +0000 (05:40 +0000)]
[llvm-objcopy] Factor out Buffer
In this diff we move out the hierarchy of buffers from Object.h/Object.cpp
into separate files since it is not ELF-specific and will be reused later.
After this change Object.h/Object.cpp are almost exclusively ELF-specific.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D53298
llvm-svn: 344585
Max Kazantsev [Tue, 16 Oct 2018 05:26:21 +0000 (05:26 +0000)]
[SCEV] Limit AddRec "simplifications" to avoid combinatorial explosions
SCEV's transform that turns `{A1,+,A2,+,...,+,An}<L> * {B1,+,B2,+,...,+,Bn}<L>` into
a single AddRec of size `2n+1` with complex combinatorial coefficients can easily
trigger exponential growth of the SCEV (in case if nothing gets folded and simplified).
We tried to restrain this transform using the option `scalar-evolution-max-add-rec-size`,
but its default value seems to be insufficiently small: the test attached to this patch
with default value of this option `16` has a SCEV of >3M symbols (when printed out).
This patch reduces the simplification limit. It is not a cure to combinatorial
explosions, but at least it reduces this corner case to something more or less
reasonable.
Differential Revision: https://reviews.llvm.org/D53282
Reviewed By: sanjoy
llvm-svn: 344584
Simon Atanasyan [Tue, 16 Oct 2018 05:18:36 +0000 (05:18 +0000)]
[mips] Group similar commands in the test case. NFC
llvm-svn: 344583
Artem Dergachev [Tue, 16 Oct 2018 03:36:55 +0000 (03:36 +0000)]
Re-apply r344546 "Mark a couple of test cases as 'C++17-only'..."
Reverted too much in r344580.
llvm-svn: 344582
Vedant Kumar [Tue, 16 Oct 2018 03:31:33 +0000 (03:31 +0000)]
Use assertEqual to improve test failure logging
Some tests in test/functionalities/tail_call_frames are failing on
non-Darwin platforms. Use assertEqual to improve logging on failure.
llvm-svn: 344581
Artem Dergachev [Tue, 16 Oct 2018 02:40:42 +0000 (02:40 +0000)]
Revert r344529 "Implement the first part of the calendar support for C++20"
Revert r344535 "Wrap up the new chrono literals in an #ifdef..."
Revert r344546 "Mark a couple of test cases as 'C++17-only'..."
Some of the buildbot failures were masked by another error,
and this one was probably missed.
llvm-svn: 344580
Petr Hosek [Tue, 16 Oct 2018 02:06:08 +0000 (02:06 +0000)]
[XRay] Use fully qualified name for LogWriter
This avoids the build error in newer versions of GCC.
llvm-svn: 344579
Petr Hosek [Tue, 16 Oct 2018 01:24:46 +0000 (01:24 +0000)]
[XRay] Encapsulate all FD log related logic into a class
This abstracts away the file descriptor related logic which makes it
easier to port XRay to platform that don't use file descriptors or
file system for writing the log data, such as Fuchsia.
Differential Revision: https://reviews.llvm.org/D52161
llvm-svn: 344578
Sebastian Pop [Tue, 16 Oct 2018 00:42:07 +0000 (00:42 +0000)]
[hot-cold-split] fix failing testcases
llvm-svn: 344577
Louis Dionne [Tue, 16 Oct 2018 00:31:32 +0000 (00:31 +0000)]
[libcxx] Remove custom CMake code targeting Mac OS 10.6
libc++ has dropped support for Mac OS 10.6 for a while, and we don't
have any testers set up for that OS.
This commit puts in an error message so that people can reach out to
the libc++ maintainers in case support for 10.6 is still expected (as
opposed to silently failing in weird ways). We can completely drop
support for 10.6 and remove the error message some time in the future
when we're sure that nobody is relying on it.
llvm-svn: 344576
Heejin Ahn [Tue, 16 Oct 2018 00:09:12 +0000 (00:09 +0000)]
[WebAssembly] LSDA info generation
Summary:
This adds support for LSDA (exception table) generation for wasm EH.
Wasm EH mostly follows the structure of Itanium-style exception tables,
with one exception: a call site table entry in wasm EH corresponds to
not a call site but a landing pad.
In wasm EH, the VM is responsible for stack unwinding. After an
exception occurs and the stack is unwound, the control flow is
transferred to wasm 'catch' instruction by the VM, after which the
personality function is called from the compiler-generated code. (Refer
to WasmEHPrepare pass for more information on this part.)
This patch:
- Changes wasm.landingpad.index intrinsic to take a token argument, to
make this 1:1 match with a catchpad instruction
- Stores landingpad index info and catch type info MachineFunction in
before instruction selection
- Lowers wasm.lsda intrinsic to an MCSymbol pointing to the start of an
exception table
- Adds WasmException class with overridden methods for table generation
- Adds support for LSDA section in Wasm object writer
Reviewers: dschuff, sbc100, rnk
Subscribers: mgorny, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D52748
llvm-svn: 344575
Alexey Bataev [Tue, 16 Oct 2018 00:09:06 +0000 (00:09 +0000)]
[OPENMP][NVPTX]Increment iterator only when it is used, NFC.
llvm-svn: 344574
Craig Topper [Mon, 15 Oct 2018 23:34:58 +0000 (23:34 +0000)]
[X86] Remove some isel patterns that shouldn't be possible.
These included a bitcast of a load from v4f32 to v2f64, but DAG combine should have already changed the type of the load to remove the cast.
llvm-svn: 344573
Lang Hames [Mon, 15 Oct 2018 22:56:10 +0000 (22:56 +0000)]
[ORC] Rename ORC layers to make the "new" ORC layers the default.
This commit adds a 'Legacy' prefix to old ORC layers and utilities, and removes
the '2' suffix from the new ORC layers. If you wish to continue using the old
ORC layers you will need to add a 'Legacy' prefix to your classes. If you were
already using the new ORC layers you will need to drop the '2' suffix.
The legacy layers will remain in-tree until the new layers reach feature
parity with them. This will involve adding support for removing code from the
new layers, and ensuring that performance is comperable.
llvm-svn: 344572
Simon Atanasyan [Mon, 15 Oct 2018 22:43:23 +0000 (22:43 +0000)]
[mips] Fix handling of GNUABIN32 environment in a target triple
The `GNUABIN32` environment in a target triple implies using the N32
ABI. This patch adds support for this environment and switches on N32
ABI if necessary.
Patch by Patch by YunQiang Su.
Differential revision: https://reviews.llvm.org/D51464
llvm-svn: 344570
Nicolai Haehnle [Mon, 15 Oct 2018 22:37:46 +0000 (22:37 +0000)]
StructurizeCFG,AMDGPU: Test case of a redundant phi and codegen consequences
Change-Id: I9681f9e41ca30f82576f3d1f965c3a550a34b171
llvm-svn: 344569
Chris Bieneman [Mon, 15 Oct 2018 22:36:59 +0000 (22:36 +0000)]
[CMake] Fix a missing LLVM_ENABLE_IDE from r344555
This is just one place I missed swapping CMAKE_CONFIGURATION_TYPES with LLVM_ENABLE_IDE.
llvm-svn: 344568
Lang Hames [Mon, 15 Oct 2018 22:36:22 +0000 (22:36 +0000)]
[ORC] Rename MultiThreadedSimpleCompiler to ConcurrentIRCompiler.
The new name is a better fit: This class does not actually spawn any new
threads for compilation, it is just safe to call from multiple threads
concurrently.
The "Simple" part of the name did not convey much either, so it was
dropped.
llvm-svn: 344567
Lang Hames [Mon, 15 Oct 2018 22:27:03 +0000 (22:27 +0000)]
Change a TerminatorInst* to an Instruction* in HotColdSplitting.cpp.
r344558 added an assignment to a TerminatorInst* from
BasicBlock::getTerminatorInst(), but BasicBlock::getTerminatorInst() returns an
Instruction* rather than a TerminatorInst* since r344504 so this fails to
compile.
Changing the variable to an Instruction* should get the bots building again.
llvm-svn: 344566
Lang Hames [Mon, 15 Oct 2018 22:27:02 +0000 (22:27 +0000)]
[ORC] Switch to DenseMap/DenseSet for ORC symbol map/set types.
llvm-svn: 344565
Erik Pilkington [Mon, 15 Oct 2018 22:03:53 +0000 (22:03 +0000)]
NFC: Fix a -Wsign-conversion warning
llvm-svn: 344564
Craig Topper [Mon, 15 Oct 2018 21:51:32 +0000 (21:51 +0000)]
[X86] Fix a bad bitcast in the load form of vXi16 uniform shift patterns for EVEX encoded instructions.
llvm-svn: 344563
Craig Topper [Mon, 15 Oct 2018 21:51:29 +0000 (21:51 +0000)]
[X86] Add test cases showing failure to fold load into vpsrlw when EVEX encoded instructions are used.
There's a bad bitcast being used in the isel patterns for the vXi16 shift instructions.
llvm-svn: 344562
Craig Topper [Mon, 15 Oct 2018 21:51:26 +0000 (21:51 +0000)]
[X86] Disable the peephole pass on avx2-intrinsics-x86.ll and avx512bw-intrinsics.ll to ensure any load folding tests are testing isel not load folding tables.
llvm-svn: 344561
Craig Topper [Mon, 15 Oct 2018 21:51:22 +0000 (21:51 +0000)]
[X86] Regenerate avx2-intrinsics-x86.ll to compress the 32 vs 64 bit mode checks.
llvm-svn: 344560
Sanjay Patel [Mon, 15 Oct 2018 21:43:53 +0000 (21:43 +0000)]
[InstCombine] add tests for bitwise logic --> select; NFC
llvm-svn: 344559
Sebastian Pop [Mon, 15 Oct 2018 21:43:11 +0000 (21:43 +0000)]
[hot-cold-split] fix static analysis of cold regions
Make the code of blockEndsInUnreachable to match the function
blockEndsInUnreachable in CodeGen/BranchFolding.cpp. I also have
added a note to make sure the code of this function will not be
modified unless the back-end version is also modified.
An early return before outlining has been added to avoid
outlining the full function body when the first block in the
function is marked cold.
The static analysis of cold code has been amended to avoid
marking the whole function as cold by back-propagation
because the back-propagation would mark blocks with return
statements as cold.
The patch adds debug statements to help discover these problems.
Differential Revision: https://reviews.llvm.org/D52904
llvm-svn: 344558
Adrian Prantl [Mon, 15 Oct 2018 21:35:45 +0000 (21:35 +0000)]
Convert code to use early exits in prepraration for future changes. (NFC)
llvm-svn: 344557
Petr Hosek [Mon, 15 Oct 2018 21:30:32 +0000 (21:30 +0000)]
[Driver] Support direct split DWARF emission for Fuchsia
This enables the driver support for direct split DWARF emission for
Fuchsia in addition to Linux.
Differential Revision: https://reviews.llvm.org/D53248
llvm-svn: 344556
Chris Bieneman [Mon, 15 Oct 2018 21:20:02 +0000 (21:20 +0000)]
[CMake] Use LLVM_ENABLE_IDE instead of CMAKE_CONFIGURATION_TYPES
There are several places where we use CMAKE_CONFIGURATION_TYPES to determine if we are using an IDE generator and in turn decide not to generate some of the convenience targets (like all the install-* and check-llvm-* targets). This decision is made because IDEs don't always deal well with the thousands of targets LLVM can generate.
This approach does not work for Visual Studio 15's new CMake integration. Because VS15 uses a Ninja generator, it isn't a multi-configuration build, and generating all these extra targets mucks up the UI and adds little value.
With this change we still don't generate these targets by default for Visual Studio and Xcode generators, and LLVM_ENABLE_IDE becomes a switch that can be enabled on the VS15 CMake builds, to improve the IDE experience.
This is a re-land of r340435, with a few minor fix-ups. The issues causing the revert were addressed in r344218, r344219, and r344553.
llvm-svn: 344555
Simon Pilgrim [Mon, 15 Oct 2018 21:15:58 +0000 (21:15 +0000)]
[AARCH64] Improve vector popcnt lowering with ADDLP
AARCH64 equivalent to D53257 - uses widening pairwise adds on vXi8 CTPOP to support i16/i32/i64 vectors.
This is a blocker for generic vector CTPOP expansion (P32655) - this will remove the aarch64 diff from D53258.
Differential Revision: https://reviews.llvm.org/D53259
llvm-svn: 344554
Chris Bieneman [Mon, 15 Oct 2018 21:14:19 +0000 (21:14 +0000)]
[CMake] Change the default value of LLVM_ENABLE_IDE
There really aren't any generator behaviors that we need to take `CMAKE_EXTRA_GENERATOR` into account for. Where we need to take different behaviors for IDEs is mostly in enabling or disabling certain build system features that are optional but trip up the IDE UIs. Like the generation of lots of utility targets.
By changing the LLVM_ENABLE_IDE default to only being on for multi-configuration generators, we allow gating where it will impact the UI presentation, while also supporting optionally disabling the generation if your tooling workflow encounters problems. Presently being able to manually disable extra target generation is useful for Visual Studio 2017's CMake integration where the IDE has trouble displaying and working with the large number of optional targets.
llvm-svn: 344553
Konstantin Zhuravlyov [Mon, 15 Oct 2018 20:37:47 +0000 (20:37 +0000)]
AMDGPU: Generate .amdgcn_target for object code v3
Differential Revision: https://reviews.llvm.org/D53221
llvm-svn: 344552
Sean Fertile [Mon, 15 Oct 2018 20:20:28 +0000 (20:20 +0000)]
Revert "[PPC64] Add split - stack support."
This reverts commit https://reviews.llvm.org/rL344544, which causes failures on
a undefined behaviour sanitizer bot -->
lld/ELF/Arch/PPC64.cpp:849:35: runtime error: left shift of negative value -1
llvm-svn: 344551
Jordan Rupprecht [Mon, 15 Oct 2018 20:15:58 +0000 (20:15 +0000)]
[llvm-objcopy] NFC: update TODO test comment
llvm-svn: 344550
Leonard Chan [Mon, 15 Oct 2018 20:00:03 +0000 (20:00 +0000)]
[Fixed Point Arithmetic] Fix for clang-tools-extra warning
Fix for warnings generated on unhandled enum value `STK_FixedPoint`.
Differential Revision: https://reviews.llvm.org/D53299
llvm-svn: 344549
Leonard Chan [Mon, 15 Oct 2018 19:59:52 +0000 (19:59 +0000)]
added fix
llvm-svn: 344548
Stella Stamenova [Mon, 15 Oct 2018 19:51:21 +0000 (19:51 +0000)]
[lldbsuite] Make the names of test classes unique
Summary:
If the names are not unique, the tests overwrite each other's results and logs. This also causes failures on platforms where the files are locked for writing.
The names of the class/test pairs *have to* always be unique. The easiest way to achieve that is to name each class differently (usually the same as the file name).
Reviewers: jasonmolenda, asmith
Subscribers: clayborg, nemanjai, kbarton, lldb-commits
Differential Revision: https://reviews.llvm.org/D53297
llvm-svn: 344547
Marshall Clow [Mon, 15 Oct 2018 19:46:03 +0000 (19:46 +0000)]
Mark a couple of test cases as 'C++17-only' pending the resolution of PR#39232
llvm-svn: 344546
Vedant Kumar [Mon, 15 Oct 2018 19:22:20 +0000 (19:22 +0000)]
[CodeExtractor] Erase debug intrinsics in outlined thunks (fix PR22900)
Variable updates within the outlined function are invisible to
debuggers. This could be improved by defining a DISubprogram for the
new function. For the moment, simply erase the debug intrinsics instead.
This fixes verifier failures about function-local metadata being used in
the wrong function, seen while testing the hot/cold splitting pass.
rdar://
45142482
Differential Revision: https://reviews.llvm.org/D53267
llvm-svn: 344545
Sean Fertile [Mon, 15 Oct 2018 19:05:57 +0000 (19:05 +0000)]
[PPC64] Add split - stack support.
This support is slightly different then the X86_64 implementation in that calls
to __morestack don't need to get rewritten to calls to __moresatck_non_split
when a split-stack caller calls a non-split-stack callee. Instead the size of
the stack frame requested by the caller is adjusted prior to the call to
__morestack. The size the stack-frame will be adjusted by is tune-able through a
new --split-stack-adjust-size option.
Differential Revision: https://reviews.llvm.org/D52099
llvm-svn: 344544
Stella Stamenova [Mon, 15 Oct 2018 18:51:28 +0000 (18:51 +0000)]
[lldbsuite] Disable Test128BitsInteger on Windows
Summary: This test is failing on Windows because lldb does not support JIT on Windows.
Reviewers: davide, asmith
Reviewed By: davide
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D53226
llvm-svn: 344543
Lang Hames [Mon, 15 Oct 2018 18:34:36 +0000 (18:34 +0000)]
[ADT] Fix a bug in DenseSet's initializer_list constructor.
Without this fix, DenseSet crashes with an assertion if constructed with an
initializer_list whose length is not a power of two.
llvm-svn: 344542
Sanjay Patel [Mon, 15 Oct 2018 18:05:34 +0000 (18:05 +0000)]
[SelectionDAG] allow FP binops in SimplifyDemandedVectorElts
This is intended to make the backend on par with functionality that was
added to the IR version of SimplifyDemandedVectorElts in:
rL343727
...and the original motivation is that we need to improve demanded-vector-elements
in several ways to avoid problems that would be exposed in D51553.
Differential Revision: https://reviews.llvm.org/D52912
llvm-svn: 344541
Artem Dergachev [Mon, 15 Oct 2018 18:01:34 +0000 (18:01 +0000)]
[analyzer] Add doxygen comments for the new CXXAllocatorCall APIs.
Forgot to squeeze this into r344539.
llvm-svn: 344540
Artem Dergachev [Mon, 15 Oct 2018 17:53:18 +0000 (17:53 +0000)]
[analyzer] Teach CallEvent about C++17 aligned operator new().
In C++17, when class C has large alignment value, a special case of
overload resolution rule kicks in for expression new C that causes the aligned
version of operator new() to be called. The aligned new has two arguments:
size and alignment. However, the new-expression has only one "argument":
the construct-expression for C(). This causes a false positive in
core.CallAndMessage's check for matching number of arguments and number
of parameters.
Update CXXAllocatorCall, which is a CallEvent sub-class for operator new calls
within new-expressions, so that the number of arguments always matched
the number of parameters.
rdar://problem/
44738501
Differential Revision: https://reviews.llvm.org/D52957
llvm-svn: 344539
Artem Dergachev [Mon, 15 Oct 2018 17:47:56 +0000 (17:47 +0000)]
[analyzer] NFC: RetainCountChecker: Don't dump() symbols into program point tags.
We don't need a separate node for every symbol, because whenever the first
symbol leaks, a bug is emitted, the analysis is sinked, and the checker
callback immediately returns due to State variable turning into null,
so we never get to see the second leaking symbol.
Additionally, we are no longer able to break normal analysis while experimenting
with debug dumps.
Differential Revision: https://reviews.llvm.org/D52804
llvm-svn: 344538
Artem Dergachev [Mon, 15 Oct 2018 17:43:23 +0000 (17:43 +0000)]
[python] [tests] Disable python binding tests under LLVM_USE_SANITIZER=Address
They don't work yet.
Patch by Dan Liew!
rdar://problem/
45242886
Differential Revision: https://reviews.llvm.org/D53239
llvm-svn: 344537
Nick Desaulniers [Mon, 15 Oct 2018 17:39:00 +0000 (17:39 +0000)]
Revert 344389 "Revert r344375 "[Driver] check for exit code from SIGPIPE""
Summary:
Add preprocessor guards for UNIX.
This reverts commit r344389.
Reviewers: rnk, majnemer, jfb
Reviewed By: rnk
Subscribers: cfe-commits, pirama, srhines
Differential Revision: https://reviews.llvm.org/D53210
llvm-svn: 344536
Marshall Clow [Mon, 15 Oct 2018 17:33:20 +0000 (17:33 +0000)]
Wrap up the new chrono literals in an #ifdef so that old versions of clang don't complain. I'm looking at you, clang 5.0.1
llvm-svn: 344535
Sanjay Patel [Mon, 15 Oct 2018 16:54:07 +0000 (16:54 +0000)]
[DAGCombiner] allow undef elts in vector fmul matching
llvm-svn: 344534
Sam McCall [Mon, 15 Oct 2018 16:47:45 +0000 (16:47 +0000)]
[clangd] Revert include path change in Dexp. NFC
llvm-svn: 344533
Sanjay Patel [Mon, 15 Oct 2018 16:47:01 +0000 (16:47 +0000)]
[DAGCombiner] refactor folds for fadd (fmul X, -2.0), Y; NFCI
The transform doesn't work if the vector constant has undef elements.
llvm-svn: 344532
Sanjay Patel [Mon, 15 Oct 2018 16:44:00 +0000 (16:44 +0000)]
[AArch64] add tests for fmul x, -2.0 with undef elts; NFC
Also, add tests with commuted operands. There was no coverage for that case.
llvm-svn: 344531
Leonard Chan [Mon, 15 Oct 2018 16:07:02 +0000 (16:07 +0000)]
[Fixed Point Arithmetic] FixedPointCast
This patch is a part of https://reviews.llvm.org/D48456 in an attempt to
split them up. This contains the code for casting between fixed point types
and other fixed point types.
The method for converting between fixed point types is based off the convert()
method in APFixedPoint.
Differential Revision: https://reviews.llvm.org/D50616
llvm-svn: 344530
Marshall Clow [Mon, 15 Oct 2018 16:06:37 +0000 (16:06 +0000)]
Implement the first part of the calendar support for C++20. This is still incomplete; there will be more patches coming. Reviewed as D51762
llvm-svn: 344529
Sanjay Patel [Mon, 15 Oct 2018 15:56:39 +0000 (15:56 +0000)]
[DAGCombiner] allow undef elts in vector fma matching
llvm-svn: 344528
Sanjay Patel [Mon, 15 Oct 2018 15:47:37 +0000 (15:47 +0000)]
[x86] add tests for fma with undef elts; NFC
llvm-svn: 344527
Sean Fertile [Mon, 15 Oct 2018 15:43:00 +0000 (15:43 +0000)]
Revert "[CodeGenCXX] Treat 'this' as noalias in constructors"
This reverts commit https://reviews.llvm.org/rL344150 which causes
MachineOutliner related failures on the ppc64le multistage buildbot.
llvm-svn: 344526
Sanjay Patel [Mon, 15 Oct 2018 15:38:38 +0000 (15:38 +0000)]
[DAGCombiner] allow undef elts in vector fma matching
llvm-svn: 344525
Fedor Sergeev [Mon, 15 Oct 2018 15:36:08 +0000 (15:36 +0000)]
Revert "[NewPM] teach -passes= to emit meaningful error messages"
This reverts r344519 due to failures in pipeline-parsing test.
llvm-svn: 344524
Sanjay Patel [Mon, 15 Oct 2018 15:28:44 +0000 (15:28 +0000)]
[x86] add tests for fma with undef elts; NFC
llvm-svn: 344523
Lang Hames [Mon, 15 Oct 2018 15:26:47 +0000 (15:26 +0000)]
[ADT] Adds equality operators for DenseMap and DenseSet, and an initializer_list
constructor for DenseMap (DenseSet already had an initializer_list constructor).
These changes make it easier to migrate existing code that uses std::map and
std::set (which support initializer_list construction and equality comparison)
to DenseMap and DenseSet.
llvm-svn: 344522
Haojian Wu [Mon, 15 Oct 2018 15:12:40 +0000 (15:12 +0000)]
[clangd] Add createIndex in dexp
Summary:
This would allow easily injecting our internal customization.
Also updates the stale "symbol-collection-file" flag.
Reviewers: sammccall
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D53292
llvm-svn: 344521
Sam McCall [Mon, 15 Oct 2018 15:04:03 +0000 (15:04 +0000)]
[clangd] Use SyncAPI in more places in tests. NFC
llvm-svn: 344520
Fedor Sergeev [Mon, 15 Oct 2018 15:00:18 +0000 (15:00 +0000)]
[NewPM] teach -passes= to emit meaningful error messages
Summary:
All the PassBuilder::parse interfaces now return descriptive StringError
instead of a plain bool. It allows to make -passes/aa-pipeline parsing
errors context-specific and thus less confusing.
TODO: ideally we should also make suggestions for misspelled pass names,
but that requires some extensions to PassBuilder.
Reviewed By: philip.pfaffe, chandlerc
Differential Revision: https://reviews.llvm.org/D53246
llvm-svn: 344519
Sid Manning [Mon, 15 Oct 2018 14:44:52 +0000 (14:44 +0000)]
[ELF][HEXAGON] Let input determine e_flag.
Differential Revision: https://reviews.llvm.org/D53204
llvm-svn: 344518
Aleksandar Beserminji [Mon, 15 Oct 2018 14:39:12 +0000 (14:39 +0000)]
[mips][micromips] Fix overlaping FDEs error
When compiling static executable for micromips, CFI symbols
are incorrectly labeled as MICROMIPS, which cause
".eh_frame_hdr refers to overlapping FDEs." error.
This patch does not label CFI symbols as MICROMIPS, and FDEs do not
overlap anymore. This patch also exposes another bug, which is fixed
here: https://reviews.llvm.org/D52985
Differential Revision: https://reviews.llvm.org/D52987
llvm-svn: 344516
Aleksandar Beserminji [Mon, 15 Oct 2018 14:36:48 +0000 (14:36 +0000)]
[mips][micromips] Revert "Fix overlaping FDEs error"
This reverts r344511.
llvm-svn: 344515
George Rimar [Mon, 15 Oct 2018 14:21:43 +0000 (14:21 +0000)]
[LLD][ELF] - Check options before processing the -v/-version options.
This is https://bugs.llvm.org/show_bug.cgi?id=39289.
Currently both gold and bfd report errors about invalid options values
even with -v/-versions. But LLD does not.
This makes complicated to check the options available when LLD is used.
Patch makes LLD behavior to be consistent with GNU linkers.
Differential revision: https://reviews.llvm.org/D53278
llvm-svn: 344514
Sam McCall [Mon, 15 Oct 2018 13:34:10 +0000 (13:34 +0000)]
[clangd] Minimal implementation of automatic static index (not enabled).
Summary:
See tinyurl.com/clangd-automatic-index for design and goals.
Lots of limitations to keep this patch smallish, TODOs everywhere:
- no serialization to disk
- no changes to dynamic index, which now has a much simpler job
- no partitioning of symbols by file to avoid duplication of header symbols
- no reindexing of edited files
- only a single worker thread
- compilation database is slurped synchronously (doesn't scale)
- uses memindex, rebuilds after every file (should be dex, periodically)
It's not hooked up to ClangdServer/ClangdLSPServer yet: the layering
isn't clear (it should really be in ClangdServer, but ClangdLSPServer
has all the CDB interactions).
Reviewers: ioeric
Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D53032
llvm-svn: 344513
Simon Pilgrim [Mon, 15 Oct 2018 13:20:41 +0000 (13:20 +0000)]
[ARM][NEON] Improve vector popcnt lowering with PADDL (PR39281)
As I suggested on PR39281, this patch uses PADDL pairwise addition to widen from the vXi8 CTPOP result to the target vector type.
This is a blocker for moving more x86 code to generic vector CTPOP expansion (P32655 + D53258) - ARM's vXi64 CTPOP currently expands, which would generate a vXi64 MUL but ARM's custom lowering expands the general MUL case and vectors aren't well handled in LegalizeDAG - improving the CTPOP lowering was a lot easier than fixing the MUL lowering for this one case......
Differential Revision: https://reviews.llvm.org/D53257
llvm-svn: 344512
Aleksandar Beserminji [Mon, 15 Oct 2018 12:59:17 +0000 (12:59 +0000)]
[mips][micromips] Fix overlaping FDEs error
When compiling static executable for micromips, CFI symbols
are incorrectly labeled as MICROMIPS, which cause
".eh_frame_hdr refers to overlapping FDEs." error.
This patch does not label CFI symbols as MICROMIPS, and FDEs do not
overlap anymore. This patch also exposes another bug, which is fixed
here: https://reviews.llvm.org/D52985
Differential Revision: https://reviews.llvm.org/D52987
llvm-svn: 344511
Haojian Wu [Mon, 15 Oct 2018 12:39:45 +0000 (12:39 +0000)]
[clangd] Remove an unused include header, NFC.
llvm-svn: 344510
Eric Liu [Mon, 15 Oct 2018 12:37:23 +0000 (12:37 +0000)]
[CodeComplete] Make sure keyword 'template' is added even when code pattern is disabled.
Reviewers: sammccall, hokein
Subscribers: arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D53284
llvm-svn: 344509
Haojian Wu [Mon, 15 Oct 2018 12:32:49 +0000 (12:32 +0000)]
[clangd] dump xrefs information in dexp tool.
Reviewers: sammccall
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D53019
llvm-svn: 344508
Haojian Wu [Mon, 15 Oct 2018 11:46:26 +0000 (11:46 +0000)]
[clangd] Fix some references missing in dynamic index.
Summary:
Previously, SymbolCollector postfilters all references at the end to
find all references of interesting symbols.
It was incorrect when indxing main AST where we don't see locations
of symbol declarations and definitions in the main AST (as those are in
preamble AST).
The fix is to do earily check during collecting references.
Reviewers: sammccall
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D53273
llvm-svn: 344507