Commit Graph

301217 Commits

Author SHA1 Message Date
Simon Atanasyan db81c7b9c9 [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
2018-10-15 22:43:23 +00:00
Nicolai Haehnle 6d92ca61f9 StructurizeCFG,AMDGPU: Test case of a redundant phi and codegen consequences
Change-Id: I9681f9e41ca30f82576f3d1f965c3a550a34b171
llvm-svn: 344569
2018-10-15 22:37:46 +00:00
Chris Bieneman 31073637a7 [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
2018-10-15 22:36:59 +00:00
Lang Hames 9f342d9038 [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
2018-10-15 22:36:22 +00:00
Lang Hames 8f9a2446e0 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
2018-10-15 22:27:03 +00:00
Lang Hames 6e66b2a6a3 [ORC] Switch to DenseMap/DenseSet for ORC symbol map/set types.
llvm-svn: 344565
2018-10-15 22:27:02 +00:00
Erik Pilkington fbca8d5495 NFC: Fix a -Wsign-conversion warning
llvm-svn: 344564
2018-10-15 22:03:53 +00:00
Craig Topper 2909a3d9d0 [X86] Fix a bad bitcast in the load form of vXi16 uniform shift patterns for EVEX encoded instructions.
llvm-svn: 344563
2018-10-15 21:51:32 +00:00
Craig Topper 548e8b5b47 [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
2018-10-15 21:51:29 +00:00
Craig Topper 125c54ba10 [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
2018-10-15 21:51:26 +00:00
Craig Topper da0e544953 [X86] Regenerate avx2-intrinsics-x86.ll to compress the 32 vs 64 bit mode checks.
llvm-svn: 344560
2018-10-15 21:51:22 +00:00
Sanjay Patel e407540ec5 [InstCombine] add tests for bitwise logic --> select; NFC
llvm-svn: 344559
2018-10-15 21:43:53 +00:00
Sebastian Pop 542e522b87 [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
2018-10-15 21:43:11 +00:00
Adrian Prantl 212e23d015 Convert code to use early exits in prepraration for future changes. (NFC)
llvm-svn: 344557
2018-10-15 21:35:45 +00:00
Petr Hosek d3265358b4 [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
2018-10-15 21:30:32 +00:00
Chris Bieneman db49209c90 [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
2018-10-15 21:20:02 +00:00
Simon Pilgrim 095a7fe635 [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
2018-10-15 21:15:58 +00:00
Chris Bieneman 09fcbbd85c [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
2018-10-15 21:14:19 +00:00
Konstantin Zhuravlyov 94dfcc2eb2 AMDGPU: Generate .amdgcn_target for object code v3
Differential Revision: https://reviews.llvm.org/D53221

llvm-svn: 344552
2018-10-15 20:37:47 +00:00
Sean Fertile 831a1336ff 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
2018-10-15 20:20:28 +00:00
Jordan Rupprecht 6fb774e223 [llvm-objcopy] NFC: update TODO test comment
llvm-svn: 344550
2018-10-15 20:15:58 +00:00
Leonard Chan 0f11b73f96 [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
2018-10-15 20:00:03 +00:00
Leonard Chan 88ccbd7543 added fix
llvm-svn: 344548
2018-10-15 19:59:52 +00:00
Stella Stamenova 7a8865cea8 [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
2018-10-15 19:51:21 +00:00
Marshall Clow 5c61b9d0cf Mark a couple of test cases as 'C++17-only' pending the resolution of PR#39232
llvm-svn: 344546
2018-10-15 19:46:03 +00:00
Vedant Kumar 15718a6190 [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
2018-10-15 19:22:20 +00:00
Sean Fertile 795cc9332b [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
2018-10-15 19:05:57 +00:00
Stella Stamenova abe3c7d841 [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
2018-10-15 18:51:28 +00:00
Lang Hames 28332c415c [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
2018-10-15 18:34:36 +00:00
Sanjay Patel 4cf1da0e02 [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
2018-10-15 18:05:34 +00:00
Artem Dergachev 4c9eb0fac4 [analyzer] Add doxygen comments for the new CXXAllocatorCall APIs.
Forgot to squeeze this into r344539.

llvm-svn: 344540
2018-10-15 18:01:34 +00:00
Artem Dergachev fcf107d411 [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
2018-10-15 17:53:18 +00:00
Artem Dergachev 65b4d7ddd9 [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
2018-10-15 17:47:56 +00:00
Artem Dergachev 38b21d91ff [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
2018-10-15 17:43:23 +00:00
Nick Desaulniers 9d0df31bed 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
2018-10-15 17:39:00 +00:00
Marshall Clow 323e01d46f 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
2018-10-15 17:33:20 +00:00
Sanjay Patel 8bd74785f0 [DAGCombiner] allow undef elts in vector fmul matching
llvm-svn: 344534
2018-10-15 16:54:07 +00:00
Sam McCall bc8aee15a2 [clangd] Revert include path change in Dexp. NFC
llvm-svn: 344533
2018-10-15 16:47:45 +00:00
Sanjay Patel 89e2197c33 [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
2018-10-15 16:47:01 +00:00
Sanjay Patel 7cf5733f7f [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
2018-10-15 16:44:00 +00:00
Leonard Chan 99bda375a1 [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
2018-10-15 16:07:02 +00:00
Marshall Clow 06ba9f5246 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
2018-10-15 16:06:37 +00:00
Sanjay Patel 9e7e0fd828 [DAGCombiner] allow undef elts in vector fma matching
llvm-svn: 344528
2018-10-15 15:56:39 +00:00
Sanjay Patel 475a53649e [x86] add tests for fma with undef elts; NFC
llvm-svn: 344527
2018-10-15 15:47:37 +00:00
Sean Fertile d900dd0c23 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
2018-10-15 15:43:00 +00:00
Sanjay Patel 4e970ff022 [DAGCombiner] allow undef elts in vector fma matching
llvm-svn: 344525
2018-10-15 15:38:38 +00:00
Fedor Sergeev a01be0f217 Revert "[NewPM] teach -passes= to emit meaningful error messages"
This reverts r344519 due to failures in pipeline-parsing test.

llvm-svn: 344524
2018-10-15 15:36:08 +00:00
Sanjay Patel b06ac18ee9 [x86] add tests for fma with undef elts; NFC
llvm-svn: 344523
2018-10-15 15:28:44 +00:00
Lang Hames cb1f0cf54b [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
2018-10-15 15:26:47 +00:00
Haojian Wu 397704ca40 [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
2018-10-15 15:12:40 +00:00