Nathan James [Thu, 13 Feb 2020 20:20:37 +0000 (20:20 +0000)]
Fix crash in InfinteLoopCheck
Frederic Bastien [Thu, 13 Feb 2020 20:07:22 +0000 (12:07 -0800)]
[NVPTX, LSV] Move the LSV optimization pass to later when the graph is cleaner
This allow it to recognize more loads as being consecutive when the load's address are complex at the start.
Differential Revision: https://reviews.llvm.org/D74444
Alexey Bataev [Thu, 13 Feb 2020 20:05:19 +0000 (15:05 -0500)]
[OPENMP50][DOCS]Claim iterators and add reference to array shaping
patch, NFC.
Alexey Bataev [Thu, 13 Feb 2020 20:02:11 +0000 (15:02 -0500)]
[OPENMP50][DOCS]Update list of supported constructs, NFC.
Wawha [Thu, 13 Feb 2020 19:58:57 +0000 (20:58 +0100)]
Test commit to validate invitation
Reid Kleckner [Thu, 13 Feb 2020 19:56:50 +0000 (11:56 -0800)]
Fix MSVC buildbots after ast_type_traits namespace removal
Vedant Kumar [Thu, 13 Feb 2020 19:53:15 +0000 (11:53 -0800)]
Revert "Recommit "[SCCP] Remove forcedconstant, go to overdefined instead""
This reverts commit
bb310b3f73dde5551bc2a0d564e88f7c831dfdb3. This
breaks the stage2 ASan build, see:
https://bugs.llvm.org/show_bug.cgi?id=44898
rdar://
59431448
Alexandre Ganea [Thu, 13 Feb 2020 19:46:30 +0000 (14:46 -0500)]
[clang-tidy] Fix performance-noexcept-move-constructor-fix test on non-English locale
When running on Windows under the following locale:
D:\llvm-project>python
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getlocale()
('French_Canada', '1252')
This patch fixes the following issue:
# command stderr:
Traceback (most recent call last):
File "D:/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py", line 249, in <module>
main()
File "D:/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py", line 245, in main
run_test_once(args, extra_args)
File "D:/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py", line 162, in run_test_once
diff_output.decode() +
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 2050: invalid continuation byte
This is caused by diff reporting no EOL on the last line, and unfortunately this is written in French with accentuation on my locale.
Differential Revision: https://reviews.llvm.org/D74498
Greg Clayton [Thu, 13 Feb 2020 19:43:07 +0000 (11:43 -0800)]
Fix buildbots that create shared libraries from GSYM library by adding a dependency on LLVMDebugInfoDWARF.
Alex Brachet [Thu, 13 Feb 2020 19:39:16 +0000 (14:39 -0500)]
[libc] Add Convenience syscall Template Function
Summary: This patch adds a convenience template function so we don't need to cast all types to `long` manually when calling `__llvm_libc::syscall`.
Reviewers: sivachandra, MaskRay, gchatelet
Reviewed By: sivachandra
Subscribers: libc-commits, tschuett
Differential Revision: https://reviews.llvm.org/D74530
Greg Clayton [Thu, 13 Feb 2020 19:35:43 +0000 (11:35 -0800)]
Fix buildbots by not using "and" and "not".
Ted Woodward [Thu, 13 Feb 2020 19:16:46 +0000 (13:16 -0600)]
Clean up hexagon builder after object-emission removal
Original commit:
https://reviews.llvm.org/rG7683a084de6bd2637f2351f53389df8b610566cf
Denis Khalikov [Thu, 13 Feb 2020 18:29:13 +0000 (13:29 -0500)]
[mlir][spirv] Add ConvertGpuLaunchFuncToVulkanCallsPass
Implement a pass to convert gpu.launch_func op into a sequence of
Vulkan runtime calls. The Vulkan runtime API surface is huge so currently we
don't expose separate external functions in IR for each of them, instead we
expose a few external functions to wrapper libraries which manages
Vulkan runtime.
Differential Revision: https://reviews.llvm.org/D74549
Alex Brachet [Thu, 13 Feb 2020 19:02:20 +0000 (14:02 -0500)]
[libc][NFC] clang-format syscall.h.in
Reviewers: sivachandra
Reviewed By: sivachandra
Subscribers: MaskRay, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D74570
LLVM GN Syncbot [Thu, 13 Feb 2020 18:52:48 +0000 (18:52 +0000)]
[gn build] Port
19602b71949
Greg Clayton [Wed, 12 Feb 2020 00:05:59 +0000 (16:05 -0800)]
Add a DWARF transformer class that converts DWARF to GSYM.
Summary:
The DWARF transformer is added as a class so it can be unit tested fully.
The DWARF is converted to GSYM format and handles many special cases for functions:
- omit functions in compile units with 4 byte addresses whose address is UINT32_MAX (dead stripped)
- omit functions in compile units with 8 byte addresses whose address is UINT64_MAX (dead stripped)
- omit any functions whose high PC is <= low PC (dead stripped)
- StringTable builder doesn't copy strings, so we need to make backing copies of strings but only when needed. Many strings come from sections in object files and won't need to have backing copies, but some do.
- When a function doesn't have a mangled name, store the fully qualified name by creating a string by traversing the parent decl context DIEs and then. If we don't do this, we end up having cases where some function might appear in the GSYM as "erase" instead of "std::vector<int>::erase".
- omit any functions whose address isn't in the optional TextRanges member variable of DwarfTransformer. This allows object file to register address ranges that are known valid code ranges and can help omit functions that should have been dead stripped, but just had their low PC values set to zero. In this case we have many functions that all appear at address zero and can omit these functions by making sure they fall into good address ranges on the object file. Many compilers do this when the DWARF has a DW_AT_low_pc with a DW_FORM_addr, and a DW_AT_high_pc with a DW_FORM_data4 as the offset from the low PC. In this case the linker can't write the same address to both the high and low PC since there is only a relocation for the DW_AT_low_pc, so many linkers tend to just zero it out.
Reviewers: aprantl, dblaikie, probinson
Subscribers: mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74450
Reid Kleckner [Wed, 12 Feb 2020 19:34:13 +0000 (11:34 -0800)]
Remove clang::ast_type_traits namespace in favor of clang
DynTypedNode and ASTNodeKind are implemented as part of the clang AST
library, which uses the main clang namespace. There doesn't seem to be a
need for this extra level of namespacing.
I left behind aliases in the ast_type_traits namespace for out of tree
clients of these APIs. To provide aliases for the enumerators, I used
this pattern:
namespace ast_type_traits {
constexpr TraversalKind TK_AsIs = ::clang::TK_AsIs;
}
I think the typedefs will be useful for migration, but we might be able
to drop these enumerator aliases.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D74499
Alexey Bataev [Thu, 13 Feb 2020 17:55:41 +0000 (12:55 -0500)]
[OPENMP50]Add support for hint clause in atomic directive.
According to OpenMP 5.0, hint clause is alowed to be used in atomic
directives.
Matt Arsenault [Mon, 10 Feb 2020 02:34:32 +0000 (21:34 -0500)]
AMDGPU/GlobalISel: Add missing tests for cmpxchg selection
Yuanfang Chen [Wed, 12 Feb 2020 07:01:35 +0000 (23:01 -0800)]
Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`"""
This reverts commit
80a34ae31125aa46dcad47162ba45b152aed968d with fixes.
Previously, since bots turning on EXPENSIVE_CHECKS are essentially turning on
MachineVerifierPass by default on X86 and the fact that
inline-asm-avx-v-constraint-32bit.ll and inline-asm-avx512vl-v-constraint-32bit.ll
are not expected to generate functioning machine code, this would go
down to `report_fatal_error` in MachineVerifierPass. Here passing
`-verify-machineinstrs=0` to make the intent explicit.
Yuanfang Chen [Thu, 13 Feb 2020 18:08:05 +0000 (10:08 -0800)]
Revert "Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`""""
This reverts commit
bb51d243308dbcc9a8c73180ae7b9e47b98e68fb.
Yuanfang Chen [Wed, 12 Feb 2020 07:01:35 +0000 (23:01 -0800)]
Revert "Revert "Reland "[Support] make report_fatal_error `abort` instead of `exit`"""
This reverts commit
80a34ae31125aa46dcad47162ba45b152aed968d with fixes.
On bots llvm-clang-x86_64-expensive-checks-ubuntu and
llvm-clang-x86_64-expensive-checks-debian only,
llc returns 0 for these two tests unexpectedly. I tweaked the RUN line a little
bit in the hope that LIT is the culprit since this change is not in the
codepath these tests are testing.
llvm\test\CodeGen\X86\inline-asm-avx-v-constraint-32bit.ll
llvm\test\CodeGen\X86\inline-asm-avx512vl-v-constraint-32bit.ll
Greg Clayton [Thu, 13 Feb 2020 16:44:07 +0000 (08:44 -0800)]
Fix lldb-vscode logging and enable logging for all lldb-vscode tests.
Summary:
This patch fixes logging to log incoming packets which was removed during a refactor.
We also enable logging to a "vscode.txt" file for each lldb-vscode test by creating the log file in the build artifacts directory for each test. This allows users to see the packets for their tests if needed and the log file is in a directory that will be removed after tests have been run.
Reviewers: labath, aadsm, serhiy.redko, jankratochvil, xiaobai, wallace
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74566
Nikita Popov [Wed, 12 Feb 2020 21:25:27 +0000 (22:25 +0100)]
[MemorySSA] Don't verify MemorySSA unless VerifyMemorySSA enabled
MemorySSA is often taking up an unreasonable fraction of runtime in
assertion enabled builds. Turns out that there is one code-path that
runs verifyMemorySSA() even if VerifyMemorySSA is not enabled. This
patch makes it conditional as well.
Differential Revision: https://reviews.llvm.org/D74505
Matt Arsenault [Thu, 13 Feb 2020 01:28:38 +0000 (20:28 -0500)]
AMDGPU: Use v_perm_b32 to implement bswap
Also greatly improve i64 lowering. LegalizeIntegerTypes does the
correct narrowing if i64 isn't legal. Just workaround this for
SelectionDAG by making i64 legal and splitting in the patterns.
Yuanfang Chen [Thu, 13 Feb 2020 17:27:52 +0000 (09:27 -0800)]
[openmp][cmake] passing option argument correctly
From the context, it looks like the test should not be run with `check-all`,
but it does. It turns out option argument resolving to True/False which
could not be passed down as is. There is one such example in
AddLLVM.cmake.
Greg Clayton [Thu, 13 Feb 2020 17:32:19 +0000 (09:32 -0800)]
Fix buildbots by disabling this new test until I can fix it.
This tests works on Darwin. I will need to check windows and linux.
Alexey Bataev [Thu, 13 Feb 2020 17:26:39 +0000 (12:26 -0500)]
[OPENMP][DOCS]Update status of support constructs, NFC.
Ted Woodward [Thu, 13 Feb 2020 17:17:27 +0000 (11:17 -0600)]
Add REQUIRES: x86 so this won't be run if x86 is not available.
Alexey Bataev [Wed, 12 Feb 2020 21:12:53 +0000 (16:12 -0500)]
[OPENMP50]Add cancellation support in taskloop-based directives.
According to OpenMP 5.0, cancel and cancellation point constructs are
supported in taskloop directive. Added support for cancellation in
taskloop, master taskloop and parallel master taskloop.
Fangrui Song [Wed, 12 Feb 2020 22:08:42 +0000 (14:08 -0800)]
[ELF] Fix a null pointer dereference when --emit-relocs and --strip-debug are used together
Fixes https://bugs.llvm.org//show_bug.cgi?id=44878
When --strip-debug is specified, .debug* are removed from inputSections
while .rel[a].debug* (incorrectly) remain.
LinkerScript::addOrphanSections() requires the output section of a relocated
InputSectionBase to be created first.
.debug* are not in inputSections ->
output sections .debug* are not created ->
getOutputSectionName(.rel[a].debug*) dereferences a null pointer.
Fix the null pointer dereference by deleting .rel[a].debug* from inputSections as well.
Reviewed By: grimar, nickdesaulniers
Differential Revision: https://reviews.llvm.org/D74510
Tatyana Krasnukha [Thu, 13 Feb 2020 16:33:08 +0000 (19:33 +0300)]
[lldb-vscode] Ensure that target matches the executable file
This commit fixes an issue with lldb-vscode failing to run programs that
use different architecture/platform than the "empty" in the target.
Original implementation was creating a default target without specifying
the target architecture, platform or program, and then would set
executable file through SBLaunchInfo, assuming that this would update
architecture and platform accordingly. However this wasn't really
happening, and architecture and platform would remain at whatever values
were in the "empty" target. The simple solution is to create target
already for a desired architecture and platform.
Function request_attach is updated in a similar fashion.
This commit also adds new JSON properties to "launch" and "attach"
packets to allow user to override desired platform and architecture.
This might be especially important for cases where information in ELF is
not enough to derive those values correctly.
New code has a behavior similar to LLDB MI [1], where typically IDE would
specify target file with -file-exec-and-symbols, and then only do -exec-run
command that would launch the process. In lldb-vscode those two actions are
merged into one request_launch function. Similarly in the interpreter
session, user would first do "file" command, then "process launch"
Differential Revision: https://reviews.llvm.org/D70847
Signed-off-by: Anton Kolesov <anton.kolesov@synopsys.com>
Greg Clayton [Wed, 29 Jan 2020 22:11:40 +0000 (14:11 -0800)]
Stop emitting a breakpoint for each location in a breakpoint when responding to breakpoint commands.
Summary: The VS Code DAP expects on response for each breakpoint that was requested. If we responsd with multiple entries for one breakpoint the VS Code UI gets out of date. Currently the VS code DAP doesn't handle one breakpoint with multiple locations. If this ever gets fixed we can modify our code.
Reviewers: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D73665
John Brawn [Thu, 13 Feb 2020 14:52:33 +0000 (14:52 +0000)]
[ARM] Fix infinite loop when lowering STRICT_FP_EXTEND
If the target has FP64 but not FP16 then we have custom lowering for FP_EXTEND
and STRICT_FP_EXTEND with type f64. However if the extend is from f32 to f64 the
current implementation will cause in infinite loop for STRICT_FP_EXTEND due to
emitting a merge_values of the original node which after replacement becomes a
merge_values of itself.
Fix this by not doing anything for f32 to f64 extend when we have FP64, though
for STRICT_FP_EXTEND we have to do the strict-to-nonstrict mutation as that
doesn't happen automatically for opcodes with custom lowering.
Differential Revision: https://reviews.llvm.org/D74559
Alexey Bataev [Thu, 13 Feb 2020 14:21:15 +0000 (09:21 -0500)]
[OPENMP50]Fix handling of clauses in parallel master taskloop directive.
We need to capture correctly the value of num_tasks clause and should
not try to emit the if clause at all in the task region.
Stephan Herhut [Fri, 7 Feb 2020 12:22:10 +0000 (13:22 +0100)]
[MLIR][GPU] Implement initial mapping from loop.parallel to gpu.launch.
Summary:
To unblock other work, this implements basic lowering based on mapping
attributes that have to be provided on all loop.parallel. The lowering
does not yet support reduce.
Differential Revision: https://reviews.llvm.org/D73893
Sanjay Patel [Thu, 13 Feb 2020 15:50:03 +0000 (10:50 -0500)]
[VectorCombine] adjust tests for extract-binop; NFC
We want the extra-use tests to be consistent with the
earlier single-use tests and be as cheap as possible
in vector form to show cost model edge cases. So use
i8 and extract from element 0 since that should be
cheap for all x86 targets.
Alexey Bataev [Thu, 13 Feb 2020 15:29:22 +0000 (10:29 -0500)]
[OPENMP]Fix the test, NFC.
Sanjay Patel [Thu, 13 Feb 2020 15:06:25 +0000 (10:06 -0500)]
[VectorCombine] add more extract-binop tests; NFC
See D74495.
Francesco Petrogalli [Thu, 13 Feb 2020 14:50:22 +0000 (14:50 +0000)]
[llvm][lldb] Update links to ABI for the Arm Architecture. [NFC]
Sean Fertile [Thu, 13 Feb 2020 14:22:47 +0000 (09:22 -0500)]
[PowerPC][NFC] Small cleanup to restore CR field code in PPCFrameLowering.
Skip the loop over the CalleSavedInfos in 'restoreCalleeSavedRegisters' when
the register is a CR field and we are not targeting 32-bit ELF. This is safe
because:
1) The helper function 'restoreCRs' returns if the target is not 32-bit ELF,
making all the code in the loop related to CR fields dead for every other
subtarget. This code is only called on ELF right now, but the patch
to extend it for AIX also needs to skip 'restoreCRs'.
2) The loop will not otherwise modify the iterator, so the iterator
manipulations at the bottom of the loop end up setting 'I' to its
current value.
This simplifciation allows us to remove one argument from 'restoreCRs'.
Also add a helper function to determine if a register is one of the
callee saved condition register fields.
Nico Weber [Thu, 13 Feb 2020 14:31:50 +0000 (09:31 -0500)]
attempt to fix check-clang on windows after
c49866ac
Pavel Labath [Sun, 2 Feb 2020 09:27:40 +0000 (10:27 +0100)]
[lldb] Introduce "RegInfoBasedABI"
Summary:
This patch creates a new subclass of the ABI class in order to abstract away the
mechanism in which we "augment" register information. This enables alternate
augmentation strategies to be introduced.
All existing ABI classes have been modified to inherit from RegInfoBasedABI, but
they will be refactored in subsequent patches.
Reviewers: JDevlieghere, jasonmolenda
Subscribers: sdardis, nemanjai, kbarton, jrtc27, atanasyan, jsji, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74243
Simon Pilgrim [Thu, 13 Feb 2020 13:56:23 +0000 (13:56 +0000)]
Move FIXME to start of comment so visual studio actually tags it. NFC.
Simon Pilgrim [Thu, 13 Feb 2020 13:53:45 +0000 (13:53 +0000)]
[X86][SSE] Add i686-SSE2 bswap vector tests
Nico Weber [Thu, 13 Feb 2020 13:51:42 +0000 (08:51 -0500)]
[gn build] Fix sync script on renames like "Foo.cpp" -> "LLVMFoo.cpp"
Before, the script used `git log -SFoo.cpp` to find a commit where
the number of occurrences of "Foo.cpp" changed -- but since
a patch with
+ LLVMFoo.cpp
- Foo.cpp
contains the same number of instances of "Foo.cpp", the script
incorrectly skipped this type of rename.
As fix, look for '\bFoo\.cpp\b' instead and pass --pickaxe-regex
so that we can grep for word boundaries.
To test, check out
7531a5039fd (which renamed in llvm/lib/IR
RemarkStreamer.cpp to LLVMRemarkStreamer.cpp) and look at the output of
the script. Before this change, it correctly assigned the addition
of LLVMRemarkStreamer.cpp to
7531a5039fd but incorrectly assigned
the removal of RemarkStreamer.cpp to b8a847c. With this, it
correctly assigns both to
7531a5039fd.
Jeremy Morse [Thu, 13 Feb 2020 14:24:33 +0000 (14:24 +0000)]
[debuginfo-tests][Dexter] Fix some Windows-unfriendly Dexter behaviours
These are some minor things that I've run into on Windows, largely in
error handling paths:
* Giving --lldb-executable on Windows triggers a "useless option" code
path, which touches an attribute that only exists in the
list_debuggers tool. Switch this to use hasattr, which will work in
all subtools.
* We were over-decoding some text reporting errors, but only in an
exception path
* The path to lldb on Windows needs to be quoted (even though dexter
isn't making use of it).
Differential Revision: https://reviews.llvm.org/D74546
Kirill Bobyrev [Thu, 13 Feb 2020 13:17:30 +0000 (14:17 +0100)]
[clangd] Expose Code Completion score to the client
Summary:
Make it possible for the client to adjust the ranking by using the score Clangd
calculates for the completion items.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74547
Raphael Isemann [Thu, 13 Feb 2020 12:40:22 +0000 (13:40 +0100)]
[lldb] Replace assertTrue(a == b, "msg") with assertEquals(a, b, "msg") in the test suite
Summary:
The error message from the construct `assertTrue(a == b, "msg") ` are nearly always completely useless for actually debugging the issue.
This patch is just replacing this construct (and similar ones like `assertTrue(a != b, ...)` with the proper call to assertEqual or assertNotEquals.
This patch was mostly written by a shell script with some manual verification afterwards:
```
lang=python
import sys
def sanitize_line(line):
if line.strip().startswith("self.assertTrue(") and " == " in line:
line = line.replace("self.assertTrue(", "self.assertEquals(")
line = line.replace(" == ", ", ", 1)
if line.strip().startswith("self.assertTrue(") and " != " in line:
line = line.replace("self.assertTrue(", "self.assertNotEqual(")
line = line.replace(" != ", ", ", 1)
return line
for a in sys.argv[1:]:
with open(a, "r") as f:
lines = f.readlines()
with open(a, "w") as f:
for line in lines:
f.write(sanitize_line(line))
```
Reviewers: labath, JDevlieghere
Reviewed By: labath
Subscribers: abidh, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D74475
Alexander Belyaev [Wed, 12 Feb 2020 09:12:28 +0000 (10:12 +0100)]
Add '#include <functional>` to PassManager.h.
Summary:
On some platforms the build fails "std::function is not found". The include is used in
PassManager::IRPrinterConfig::enableIRPrinting.
Differential Revision: https://reviews.llvm.org/D74469
Pavel Labath [Thu, 13 Feb 2020 13:29:50 +0000 (14:29 +0100)]
[lldb] Fix lldb-dotest
to account for the new location of test files from
99451b445.
serge-sans-paille [Wed, 12 Feb 2020 07:57:19 +0000 (08:57 +0100)]
Fix integration of pass plugins with llvm dylib
Call llvm_process_pass_plugin from clang when in standalone mode.
Differential Revision: https://reviews.llvm.org/D74464
serge-sans-paille [Thu, 13 Feb 2020 11:03:33 +0000 (12:03 +0100)]
Rework go bindings so that validation works fine
Basically change the layout to please `go build` and remove references to
`llvm-go`.
Update llvm/test/Bindings/Go/ to use the system go compiler
Differential Revision: https://reviews.llvm.org/D74540
Qiu Chaofan [Thu, 13 Feb 2020 12:59:50 +0000 (20:59 +0800)]
[PowerPC] Exploit VSX rounding instrs for rint
Exploit native VSX rounding instruction, x(v|s)r(d|s)pic, which does
rounding using current rounding mode.
According to C standard library, rint may raise INEXACT exception while
nearbyint won't.
Reviewed By: lkail
Differential Revision: https://reviews.llvm.org/D72685
Gabor Marton [Thu, 13 Feb 2020 11:11:24 +0000 (12:11 +0100)]
[analyzer] StdLibraryFunctionsChecker: Use platform dependent EOF and UCharMax
Summary:
Both EOF and the max value of unsigned char is platform dependent. In this
patch we try our best to deduce the value of EOF from the Preprocessor,
if we can't we fall back to -1.
Reviewers: Szelethus, NoQ
Subscribers: whisperity, xazax.hun, kristof.beyls, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalh
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74473
Jeremy Morse [Thu, 13 Feb 2020 12:43:28 +0000 (12:43 +0000)]
[debuginfo-tests] Fix Dexter process creation failure on Windows
When writing the Windows dbgeng driver for Dexter, I couldn't work out why it
would either launch a process and leave it free running, or if I started the
process suspended, never do anything with it. The result was a hack to create
and attach processes manually. This has been flaking out on Reids Windows
buildbot, and clearly wasn't a good solution.
Digging into this, it turns out that the "normal" cdb / windbg behaviour of
breaking whenever we attach to a process is not the default: it has to be
explicitly requested from the debug engine. This patch does so (by setting
DEBUG_ENGOPT_INITIAL_BREAK in the engine options), after which we can simply
call "CreateProcessAndAttach2" and everything automagically works.
No test for this behaviour: everything was just broken before.
Differential Revision: https://reviews.llvm.org/D74409
Haojian Wu [Thu, 13 Feb 2020 12:26:42 +0000 (13:26 +0100)]
[clangd] Print the Spelled RefKind.
stozer [Thu, 13 Feb 2020 10:40:51 +0000 (10:40 +0000)]
Re-revert: Recover debug intrinsics when killing duplicated/empty blocks
This reverts commit
61b35e4111160fe834a00c33d040e01150b576ac.
This commit causes a timeout in chromium builds; likely to have a
similar cause to the previous timeout issue caused by this commit (see
6ded69f294a9 for more details). It is possible that there is no way to
fix this bug that will not cause this issue; further investigations as
to the efficiency of handling large amounts of debug info will be
necessary.
Haojian Wu [Thu, 13 Feb 2020 11:38:47 +0000 (12:38 +0100)]
Fix the mac buildbot failure.
Christof Douma [Thu, 13 Feb 2020 11:08:46 +0000 (11:08 +0000)]
[clang] stop baremetal driver to append .a to lib
When the clang baremetal driver selects the rt.builtins static library
it prefix with "-l" and appends ".a". The result is a nonsense option
which lld refuses to accept.
Differential Revision: https://reviews.llvm.org/D73904
Change-Id: Ic753b6104e259fbbdc059b68fccd9b933092d828
Daniel Kiss [Thu, 13 Feb 2020 10:42:39 +0000 (10:42 +0000)]
[AArch64] Fix BTI landing pad generation.
In some cases BTI landing pad is inserted even compatible instruction
was there already. Meta instruction does not count in this case
therefore skip them in the check for first instructions in the function.
Differential revision: https://reviews.llvm.org/D74492
Kerry McLaughlin [Thu, 13 Feb 2020 10:11:22 +0000 (10:11 +0000)]
[AArch64][SVE] Add mul/mla/mls lane & dup intrinsics
Summary:
Implements the following intrinsics:
- @llvm.aarch64.sve.dup
- @llvm.aarch64.sve.mul.lane
- @llvm.aarch64.sve.mla.lane
- @llvm.aarch64.sve.mls.lane
Reviewers: c-rhodes, sdesmalen, dancgr, efriedma, rengolin
Reviewed By: sdesmalen
Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74222
Guillaume Chatelet [Thu, 13 Feb 2020 10:18:28 +0000 (11:18 +0100)]
Fix unneeded semi column
David Green [Wed, 12 Feb 2020 20:51:39 +0000 (20:51 +0000)]
[ARM] Fix ReconstructShuffle for bigendian
Simon pointed out that this function is doing a bitcast, which can be
incorrect for big endian. That makes the lowering of VMOVN in MVE
wrong, but the function is shared between Neon and MVE so both can
be incorrect.
This attempts to fix things by using the newly added VECTOR_REG_CAST
instead of the BITCAST. As it may now be used on Neon, I've added the
relevant patterns for it there too. I've also added a quick dag combine
for it to remove them where possible.
Differential Revision: https://reviews.llvm.org/D74485
David Green [Wed, 12 Feb 2020 18:18:23 +0000 (18:18 +0000)]
[ARM] Extra vmovn tests to show BE differences. NFC
Roman Lebedev [Thu, 13 Feb 2020 09:45:15 +0000 (12:45 +0300)]
[NFC][llvm-exegesis] Docs/help: opcode-index=-1 means measure everything
Peter Smith [Thu, 13 Feb 2020 08:42:17 +0000 (08:42 +0000)]
[LLD][ELF][ARM] Do not substitute BL/BLX for non STT_FUNC symbols.
Recommit of
0b4a047bfbd11fe1f5abda8da0e2391c1918162a
(reverted in
c29003813ab9bd6ea7b6de40ea8f1fe21979f13f) to incorporate
subsequent fix and add a warning when LLD's interworking behavior has
changed.
D73474 disabled the generation of interworking thunks for branch
relocations to non STT_FUNC symbols. This patch handles the case of BL and
BLX instructions to non STT_FUNC symbols. LLD would normally look at the
state of the caller and the callee and write a BL if the states are the
same and a BLX if the states are different.
This patch disables BL/BLX substitution when the destination symbol does
not have type STT_FUNC. This brings our behavior in line with GNU ld which
may prevent difficult to diagnose runtime errors when switching to lld.
This change does change how LLD handles interworking of symbols that do not
have type STT_FUNC from previous versions including the 10.0 release. This
brings LLD in line with ld.bfd but there may be programs that have not been
linked with ld.bfd that depend on LLD's previous behavior. We emit a warning
when the behavior changes.
A summary of the difference between 10.0 and 11.0 is that for symbols
that do not have a type of STT_FUNC LLD will not change a BL to a BLX or
vice versa. The table below enumerates the changes
| relocation | STT_FUNC | bit(0) | in | 10.0- out | 11.0+ out |
| R_ARM_CALL | no | 1 | BL | BLX | BL |
| R_ARM_CALL | no | 0 | BLX | BL | BLX |
| R_ARM_THM_CALL | no | 1 | BLX | BL | BLX |
| R_ARM_THM_CALL | no | 0 | BL | BLX | BL |
Differential Revision: https://reviews.llvm.org/D73542
Pavel Labath [Thu, 13 Feb 2020 09:26:58 +0000 (10:26 +0100)]
[lldb] Clean up ProcessGDBRemote::DidLaunchOrAttach
- reduce indentation by removing the defensive
GetID()!=INVALID_PROCESS_ID check -- this function is only called when
an attach or launch succeeds
- replace LLDB_LOGF with LLDB_LOG
Haojian Wu [Tue, 11 Feb 2020 15:37:37 +0000 (16:37 +0100)]
[clangd] Query constructors in the index during rename.
Summary:
Though this is not needed when using clangd's own index, other indexes
(e.g. kythe) need it, as classes and their constructors are different
symbols, otherwise we will miss renaming constructors.
Reviewers: kbobyrev
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D74411
Richard Smith [Thu, 13 Feb 2020 08:35:27 +0000 (00:35 -0800)]
Don't call memcpy(p, 0, 0).
Found by UBSan, reported by Kostya. Thanks!
Igor Kudrin [Wed, 29 Jan 2020 14:28:46 +0000 (21:28 +0700)]
[DebugInfo] Fix dumping CIE ID in .eh_frame sections.
We do not keep the actual value of the CIE ID field, because it is
predefined, and use a constant when dumping a CIE record. The issue
was that the predefined value is different for .debug_frame and
.eh_frame sections, but we always printed the one which corresponds
to .debug_frame. The patch fixes that by choosing an appropriate
constant to print.
See the following for more information about .eh_frame sections:
https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
Differential Revision: https://reviews.llvm.org/D73627
Abdurrahman Akkas [Thu, 13 Feb 2020 08:23:37 +0000 (09:23 +0100)]
[mlir] Add elementAttr to TypedArrayAttrBase.
In code generators, one can automate the translation of typed ArrayAttrs
if element attribute translators are already implemented. However, the
type of the element attribute is lost at the construction of
TypedArrayAttrBase. With this change one can inspect the element type
and generate the translation logic automatically, which will reduce the
code repetition.
Differential Revision: https://reviews.llvm.org/D73579
Kern Handa [Thu, 13 Feb 2020 08:20:50 +0000 (09:20 +0100)]
[NFC][mlir] Adding some helpful EDSC intrinsics
Differential Revision: https://reviews.llvm.org/D74119
Pavel Labath [Thu, 13 Feb 2020 08:18:10 +0000 (09:18 +0100)]
[lldb] Make gdbremote.py utility py2and3 compatible
River Riddle [Thu, 13 Feb 2020 07:56:07 +0000 (23:56 -0800)]
[mlir][DeclarativeParser] Move operand type resolution into a functor to
share code.
This reduces the duplication for the two different cases.
River Riddle [Thu, 13 Feb 2020 07:51:38 +0000 (23:51 -0800)]
[mlir][ODS][NFC] Mark OpaqueType as a buildable type.
This allows for using it in the declarative assembly form, among other
things.
Johannes Doerfert [Thu, 13 Feb 2020 06:39:55 +0000 (00:39 -0600)]
[OpenMP][FIX] Collect blocks to be outlined after finalization
Finalization can introduce new blocks we need to outline as well so it
makes sense to identify the blocks that need to be outlined after
finalization happened. There was also a minor unit test adjustment to
account for the fact that we have a single outlined exit block now.
Fangrui Song [Thu, 13 Feb 2020 05:48:45 +0000 (21:48 -0800)]
[ELF][test] Change -o %t to -o /dev/null if the output is not needed
Sterling Augustine [Thu, 13 Feb 2020 05:22:34 +0000 (21:22 -0800)]
Explicitly state the output file.
Summary:
Even though this test is a check for failure, lld still attempts
to open the final output file, which fails when the default "a.out"
file is used and the current directory is read-only. Specifying an
output file works around this problem.
Reviewers: espindola
Subscribers: emaste, MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74523
Vladimir Vereschaka [Thu, 13 Feb 2020 04:51:05 +0000 (20:51 -0800)]
Revert "Replace std::foo with std::foo_t in LLVM."
This reverts commit
a4384c756bd8a819051009b5b273b2a34be8261b.
These changes break LLVM build on Windows builders.
See https://reviews.llvm.org/rGa4384c756bd8a819051009b5b273b2a34be8261b
for details.
Craig Topper [Thu, 13 Feb 2020 04:39:30 +0000 (20:39 -0800)]
[X86] Add test RUN lines to show cases where we use 512-bit vcmppd/ps with garbage upper bits for 128/256-bit strict_fsetcc
On KNL targets, we widen 128/256-bit strict_fsetcc nodes to
512-bits without forcing the upper bits to zero. This can cause
spurious exceptions due to garbage upper bits. This behavior was
inherited from the non-strict case where the spurious exception
isn't a problem.
Yonghong Song [Thu, 13 Feb 2020 04:00:20 +0000 (20:00 -0800)]
[BPF] explicit warning of not supporting dynamic stack allocation
Currently, BPF does not support dynamic static allocation.
For a program like below:
extern void bar(int *);
void foo(int n) {
int a[n];
bar(a);
}
The current error message looks like:
unimplemented operand
UNREACHABLE executed at /.../llvm/lib/Target/BPF/BPFISelLowering.cpp:199!
Let us make error message explicit so it will be clear to the user
what is the problem. With this patch, the error message looks like:
fatal error: error in backend: Unsupported dynamic stack allocation
...
Differential Revision: https://reviews.llvm.org/D74521
Johannes Doerfert [Thu, 13 Feb 2020 02:52:23 +0000 (20:52 -0600)]
Reapply "[OpenMP][IRBuilder] Perform finalization (incl. outlining) late"
Reapply
8a56d64d7620b3764f10f03f3a1e307fcdd72c2f with minor fixes.
The problem was that cancellation can cause new edges to the parallel
region exit block which is not outlined. The CodeExtractor will encode
the information which "exit" was taken as a return value. The fix is to
ensure we do not return any value from the outlined function, to prevent
control to value conversion we ensure a single exit block for the
outlined region.
This reverts commit
3aac953afa34885a72df96f2b703b65f85cbb149.
Serguei Katkov [Wed, 12 Feb 2020 07:28:25 +0000 (14:28 +0700)]
[Statepoint] Remove redundant clear of call target on register
Patchable statepoint is lowered into sequence of nops, so zeroed call target
should not be on register. It is better to use getTargetConstant instead
of getConstant to select zero constant for call target.
Reviewers: reames
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D74465
Austin Kerbow [Wed, 12 Feb 2020 22:52:48 +0000 (14:52 -0800)]
[AMDGPU][GlobalISel] Handle 64byte EltSIze in getRegSplitParts
Reviewers: arsenm
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74518
Melanie Blower [Thu, 13 Feb 2020 03:05:18 +0000 (19:05 -0800)]
Fix regression due to reviews.llvm.org/D74436 by adding option ffp-contract=off to RUN line
Nico Weber [Thu, 13 Feb 2020 02:18:25 +0000 (21:18 -0500)]
Fix ReST syntax on link to "Bisecting LLVM code" page
Patch from nicolas17 (Nicolás Alvarez)!
Differential Revision: https://reviews.llvm.org/D74422
Frank Laub [Thu, 13 Feb 2020 01:59:57 +0000 (17:59 -0800)]
[MLIR][Affine] Add affine.parallel op
Summary:
As discussed in https://llvm.discourse.group/t/rfc-add-affine-parallel/350, this is the first in a series of patches to bring in support for the `affine.parallel` operation.
This first patch adds the IR representation along with custom printer/parser implementations.
Reviewers: bondhugula, herhut, mehdi_amini, nicolasvasilache, rriddle, earhart, jbruestle
Reviewed By: bondhugula, nicolasvasilache, rriddle, earhart, jbruestle
Subscribers: jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74288
Fangrui Song [Wed, 12 Feb 2020 00:07:06 +0000 (16:07 -0800)]
[AsmPrinter][ELF] Emit local alias for ExternalLinkage dso_local GlobalAlias
Amy Huang [Thu, 13 Feb 2020 00:59:17 +0000 (16:59 -0800)]
Revert "[X86][SSE] lowerShuffleAsBitRotate - lower to vXi8 shuffles to ROTL on pre-SSSE3 targets"
This reverts commit
11c16e71598d51f15b4cfd0f719c4dabcc0bebf7 because it
causes a crash in chromium code. See
https://reviews.llvm.org/rG11c16e71598d51f15b4cfd0f719c4dabcc0bebf7.
Johannes Doerfert [Thu, 13 Feb 2020 00:50:22 +0000 (18:50 -0600)]
Revert "[OpenMP][IRBuilder] Perform finalization (incl. outlining) late"
This reverts commit
8a56d64d7620b3764f10f03f3a1e307fcdd72c2f.
Will be recommitted once the clang test problem is addressed.
Matt Arsenault [Fri, 7 Feb 2020 16:08:52 +0000 (11:08 -0500)]
AMDGPU/GlobalISel: Select G_CTTZ_ZERO_UNDEF
Directly select this rather than going through the intermediate
instruction, which may provide some combine value in the future.
Matt Arsenault [Fri, 7 Feb 2020 02:54:41 +0000 (21:54 -0500)]
AMDGPU/GlobalISel: Select G_CTLZ_ZERO_UNDEF
Directly select this rather than going through the intermediate
instruction, which may provide some combine value in the future.
Matt Arsenault [Thu, 6 Feb 2020 21:11:45 +0000 (16:11 -0500)]
AMDGPU/GlobalISel: Fix mapping G_ICMP with constrained result
When SI_IF is inserted, it constrains the source register with a
register class, which was quite likely a G_ICMP. This was incorrectly
treating it as a scalar, and then applyMappingImpl would end up
producing invalid MIR since this was unexpected.
Also fix not using all VGPR sources for vcc outputs.
Matt Arsenault [Fri, 8 Nov 2019 02:26:17 +0000 (18:26 -0800)]
PPC: Prepare tests for switch of default denormal-fp-math
These tests fail when the default is switched to assume IEEE denormal
handling. I'm not sure if PPC really has a way to control the denormal
input handling.
Caroline Lebar [Thu, 13 Feb 2020 00:14:30 +0000 (16:14 -0800)]
Replace std::foo with std::foo_t in LLVM.
This patch is replacements missed in my last change doing this across LLVM.
No functional change, although I think there was a missing typename
in struct conjunction that is now fixed.
Mitch Phillips [Thu, 13 Feb 2020 00:06:42 +0000 (16:06 -0800)]
[GWP-ASan] [NFC] Change enum from ANDROID->BIONIC.
Yuanfang Chen [Wed, 12 Feb 2020 23:43:44 +0000 (15:43 -0800)]
[Fuzzer] Rename ExecuteCommandWithPopen to ExecuteCommandNon-Fushsia target will keep using popen/pclose implementation. OnFuchsia, Two-args version of `ExecuteCommand` is a simple wrapper of theone-arg version. (Hopefully) Fix D73329 build on Fuchsia.
Johannes Doerfert [Mon, 10 Feb 2020 20:28:47 +0000 (14:28 -0600)]
[OpenMP][IRBuilder] Perform finalization (incl. outlining) late
In order to fix PR44560 and to prepare for loop transformations we now
finalize a function late, which will also do the outlining late. The
logic is as before but the actual outlining step happens now after the
function was fully constructed. Once we have loop transformations we
can apply them in the finalize step before the outlining.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D74372
John McCall [Wed, 12 Feb 2020 23:40:00 +0000 (18:40 -0500)]
Fix a reentrance bug with deserializing ObjC type parameters.
This is a longstanding bug that seems to have been hidden by
a combination of (1) the normal flow being to deserialize the
interface before deserializing its parameter and (2) a precise
ordering of work that was apparently recently disturbed,
perhaps by my abstract-serialization work or Bruno's ObjC
module merging work.
Fixes rdar://
59153545.