- Aug 27, 2020
-
-
AndreyChurbanov authored
Patch by mati865@gmail.com Differential Revision: https://reviews.llvm.org/D86552 (cherry picked from commit 1596ea80)
-
Brad Smith authored
(cherry picked from commit a45ccc98)
-
Francesco Petrogalli authored
The version of `st1d` that operates with vector plus immediate addressing mode uses the alias `st1d { <Zn>.d }, <Pg>, [<Za>.d]` for rendering `st1d { <Zn>.d }, <Pg>, [<Za>.d, #0]`. The disassembler was generating `<Zn>.s` instead of `<Zn>.d>`. Differential Revision: https://reviews.llvm.org/D86633 -
Hans Wennborg authored
Text by Saleem!
-
- Aug 26, 2020
-
-
Craig Topper authored
[X86] Correct the implementation of the testFeature macro in getIntelProcessorTypeAndSubtype to do a proper bit test. Instead of ANDing with a one hot mask representing the bit to be tested, we were ANDing with just the bit number. This tests multiple bits none of them the correct one. This caused skylake-avx512, cascadelake and cooperlake to all be misdetected. Based on experiments with the Intel SDE, it seems that all of these CPUs are being detected as being cooperlake. This is bad since its the newest CPU of the 3. (cherry picked from commit df9a9bb7)
-
Fangrui Song authored
* For .cfi_*, GCC/GNU as emits SHT_PROGBITS type .eh_frame sections. * Since rL252300, clang emits SHT_X86_64_UNWIND type .eh_frame sections (originated from Solaris, documented in the x86-64 psABI). * Some assembly use `.section .eh_frame,"a",@unwind` to generate SHT_X86_64_UNWIND .eh_frame sections. In a non-relocatable link, input .eh_frame are combined and there is only one SyntheticSection .eh_frame in the output section, so the "section type mismatch" diagnostic does not fire. In a relocatable link, there is no SyntheticSection .eh_frame. .eh_frame of mixed types can trigger the diagnostic. This patch fixes it by adding another special case 0x70000001 (= SHT_X86_64_UNWIND) to canMergeToProgbits(). ld.lld -r gcc.o clang.o => error: section type mismatch for .eh_frame There was a discussion "RFC: Usefulness of SHT_X86_64_UNWIND" on the x86-64-abi mailing list. Folks are not wild about making the psABI value 0x70000001 into gABI, but a few think defining 0x70000001 for .eh_frame may be a good idea for a new architecture. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D85785 (cherry picked from commit 88498f44) -
Hans Wennborg authored
to make the test more stable, as suggested by mmoroz. (cherry picked from commit 84215033)
-
Francesco Petrogalli authored
-
Teresa Johnson authored
Summary: Documents interaction of linker option added in D71913 with LTO visibility. Reviewers: pcc Subscribers: inglorion, hiraditya, steven_wu, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75655 (cherry picked from commit 72bdb41a)
-
Fangrui Song authored
-gdwarf-5 -fdebug-types-section may produce multiple .debug_info sections. All except one are type units (.debug_types before DWARF v5). When constructing .gdb_index, we should ignore these type units. We use a simple heuristic: the compile unit does not have the SHF_GROUP flag. (This needs to be revisited if people place compile unit .debug_info in COMDAT groups.) This issue manifests as a data race: because an object file may have multiple .debug_info sections, we may concurrently construct `LLDDwarfObj` for the same file in multiple threads. The threads may access `InputSectionBase::data()` concurrently on the same input section. `InputSectionBase::data()` does a lazy uncompress() and rewrites the member variable `rawData`. A thread running zlib `inflate()` (transitively called by uncompress()) on a buffer with `rawData` tampered by another thread may fail with `uncompress failed: zlib error: Z_DATA_ERROR`. Even if no data race occurred in an optimistic run, if there are N .debug_info, one CU entry and its address ranges will be replicated N times. The result .gdb_index can be much larger than a correct one. The new test gdb-index-dwarf5-type-unit.s actually has two compile units. This cannot be produced with regular approaches (it can be produced with -r --unique). This is used to demonstrate that the .gdb_index construction code only considers the last non-SHF_GROUP .debug_info Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D85579 (cherry picked from commit fb141292)
-
Hans Wennborg authored
-
- Aug 25, 2020
-
-
QingShan Zhang authored
We hit the compiling time reported by https://bugs.llvm.org/show_bug.cgi?id=46877 and the reason is the same as D77319. So we need to remove the dead node we created to avoid increase the problem size of DAGCombiner. Reviewed By: Spatel Differential Revision: https://reviews.llvm.org/D86183 (cherry picked from commit 960cbc53)
-
Hans Wennborg authored
https://bugs.llvm.org/attachment.cgi?id=23891 by Alexey Bataev.
-
Johannes Doerfert authored
When we implement OpenMP GPU reductions we use type punning a lot during the shuffle and reduce operations. This is not always compatible with language rules on aliasing. So far we generated TBAA which later allowed to remove some of the reduce code as accesses and initialization were "known to not alias". With this patch we avoid TBAA in this step, hopefully for all accesses that we need to. Verified on the reproducer of PR46156 and QMCPack. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D86037
-
Johannes Doerfert authored
Replace the `ident_t` handling in Clang with the methods offered by the OMPIRBuilder. This cuts down on the clang code as well as the differences between the two, making further transitions easier. Tests have changed but there should not be a real functional change. The most interesting difference is probably that we stop generating local ident_t allocations for now and just use globals. Given that this happens only with debug info, the location part of the `ident_t` is probably bigger than the test anyway. As the location part is already a global, we can avoid the allocation, memcpy, and store in favor of a constant global that is slightly bigger. This can be revisited if there are complications. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D80735
-
Richard Smith authored
friend declarations and declarations found in inline namespaces within the target context. (cherry picked from commit 04ba1856)
-
Ryan Prichard authored
Currently, this function is present in the dynsym table of libunwind.so (on ELF targets). Make the function static instead. In the previous release (LLVM 10.x), this function was instead a lambda function inside LocalAddressSpace::findUnwindSections, and because LocalAddressSpace was marked with _LIBUNWIND_HIDDEN, the lambda function was also a hidden symbol. Differential Revision: https://reviews.llvm.org/D86372 (cherry picked from commit 3c1b2e33)
-
Brad Smith authored
(cherry picked from commit bf3577ef)
-
Brad Smith authored
[clang][Driver] Implement AddClangSystemIncludeArgs and HasNativeLLVMSupport for the OpenBSD clang driver. If not overridden, AddClangSystemIncludeArgs's implementation is empty, so by default, no system include args are added to the Clang driver. This means that invoking Clang without the frontend must include a manual -I/usr/include flag, which is inconsistent behavior. Therefore, override and implement this method to match. Some boilerplate is also borrowed for handling of the other driver flags. While we are here, also override and enable HasNativeLLVMSupport. Patch by: 3405691582 (dana koch) Differential Revision: https://reviews.llvm.org/D86412 (cherry picked from commit 2b37174b)
-
Dimitry Andric authored
When `Target::GetEntryPointAddress()` calls `exe_module->GetObjectFile()->GetEntryPointAddress()`, and the returned `entry_addr` is valid, it can immediately be returned. However, just before that, an `llvm::Error` value has been setup, but in this case it is not consumed before returning, like is done further below in the function. In https://bugs.freebsd.org/248745 we got a bug report for this, where a very simple test case aborts and dumps core: ``` * thread #1, name = 'testcase', stop reason = breakpoint 1.1 frame #0: 0x00000000002018d4 testcase`main(argc=1, argv=0x00007fffffffea18) at testcase.c:3:5 1 int main(int argc, char *argv[]) 2 { -> 3 return 0; 4 } (lldb) p argc Program aborted due to an unhandled Error: Error value was Success. (Note: Success values must still be checked prior to being destroyed). Thread 1 received signal SIGABRT, Aborted. thr_kill () at thr_kill.S:3 3 thr_kill.S: No such file or directory. (gdb) bt #0 thr_kill () at thr_kill.S:3 #1 0x00000008049a0004 in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52 #2 0x0000000804916229 in abort () at /usr/src/lib/libc/stdlib/abort.c:67 #3 0x000000000451b5f5 in fatalUncheckedError () at /usr/src/contrib/llvm-project/llvm/lib/Support/Error.cpp:112 #4 0x00000000019cf008 in GetEntryPointAddress () at /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:267 #5 0x0000000001bccbd8 in ConstructorSetup () at /usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:67 #6 0x0000000001bcd2c0 in ThreadPlanCallFunction () at /usr/src/contrib/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp:114 #7 0x00000000020076d4 in InferiorCallMmap () at /usr/src/contrib/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp:97 #8 0x0000000001f4be33 in DoAllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp:604 #9 0x0000000001fe51b9 in AllocatePage () at /usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:347 #10 0x0000000001fe5385 in AllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Target/Memory.cpp:383 #11 0x0000000001974da2 in AllocateMemory () at /usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2301 #12 CanJIT () at /usr/src/contrib/llvm-project/lldb/source/Target/Process.cpp:2331 #13 0x0000000001a1bf3d in Evaluate () at /usr/src/contrib/llvm-project/lldb/source/Expression/UserExpression.cpp:190 #14 0x00000000019ce7a2 in EvaluateExpression () at /usr/src/contrib/llvm-project/lldb/source/Target/Target.cpp:2372 #15 0x0000000001ad784c in EvaluateExpression () at /usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:414 #16 0x0000000001ad86ae in DoExecute () at /usr/src/contrib/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp:646 #17 0x0000000001a5e3ed in Execute () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandObject.cpp:1003 #18 0x0000000001a6c4a3 in HandleCommand () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:1762 #19 0x0000000001a6f98c in IOHandlerInputComplete () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2760 #20 0x0000000001a90b08 in Run () at /usr/src/contrib/llvm-project/lldb/source/Core/IOHandler.cpp:548 #21 0x00000000019a6c6a in ExecuteIOHandlers () at /usr/src/contrib/llvm-project/lldb/source/Core/Debugger.cpp:903 #22 0x0000000001a70337 in RunCommandInterpreter () at /usr/src/contrib/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:2946 #23 0x0000000001d9d812 in RunCommandInterpreter () at /usr/src/contrib/llvm-project/lldb/source/API/SBDebugger.cpp:1169 #24 0x0000000001918be8 in MainLoop () at /usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:675 #25 0x000000000191a114 in main () at /usr/src/contrib/llvm-project/lldb/tools/driver/Driver.cpp:890``` Fix the incorrect error catch by only instantiating an `Error` object if it is necessary. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D86355 (cherry picked from commit 1ce07cd6)
-
Fangrui Song authored
PR46970: for `alias = aliasee`, the alias can be used in relocation processing and on ARM st_type does affect Thumb interworking. It is thus desirable for the alias to get the same st_type. Note that the st_size field should not be inherited because some tools use st_size=0 as a heuristic to detect aliases. Retaining st_size can thwart such heuristics and cause aliases to be preferred over the original symbols. Differential Revision: https://reviews.llvm.org/D86263 (cherry picked from commit 9670029b) The test symbol-assign-type.s was rewritten to not depend on 'split-file'.
-
Fangrui Song authored
(cherry picked from commit ac46bc35)
-
Kang Zhang authored
D77531 has a type for mfsprg, it should be mtsprg. This patch is to fix this typo. (cherry picked from commit 95e18b2d)
-
Mott, Jeffrey T authored
We're (temporarily) disabling ExtInt for the '__atomic' builtins so we can better design their behavior later. The idea is until we do an audit/design for the way atomic builtins are supposed to work with _ExtInt, we should leave them restricted so they don't limit our future options, such as by binding us to a sub-optimal implementation via ABI. Example after this change: $ cat test.c void f(_ExtInt(64) *ptr) { __atomic_fetch_add(ptr, 1, 0); } $ clang -c test.c test.c:2:22: error: argument to atomic builtin of type '_ExtInt' is not supported __atomic_fetch_add(ptr, 1, 0); ^ 1 error generated. Differential Revision: https://reviews.llvm.org/D84049 (cherry picked from commit ca77ab49) -
Bas Zalmstra authored
The global variable outputSections in the COFF writer was not cleared between runs which caused successive calls to lld::coff::link to generate invalid binaries. These binaries when loaded would result in "invalid win32 applications" and/or "bad image" errors. Differential Revision: https://reviews.llvm.org/D86401 (cherry picked from commit 54f5a4ea)
-
Josh Stone authored
D80298 made Timer::total atomic, but this requires linking libatomic on some targets. Reviewed By: aaronpuchert Differential Revision: https://reviews.llvm.org/D85691 (cherry picked from commit b26b32b5)
-
- Aug 21, 2020
-
-
Francesco Petrogalli authored
-
- Aug 20, 2020
-
-
Francesco Petrogalli authored
-
Hans Wennborg authored
Otherwise the docs-lld-html target fails to build using recent Sphinx with the following not very helpful error message: An error happened in rendering the page index. Reason: TemplateNotFound() It turns out the values in the html_sidebars dictionary always need to be lists now. See https://github.com/sphinx-doc/sphinx/issues/6186
-
sameeran joshi authored
Summary: Fixes bug : https://bugs.llvm.org/show_bug.cgi?id=46931 This commit add a new flag -DLLVM_ENABLE_SPHINX=ON to cmake command to generate sphinx documentation, along with new cmake targets `docs-flang-html`. `ninja docs-flang-html` - generates sphinx documentation. Generated release notes are present in <builddir>/tools/flang/docs/html/ folder. Reviewers: richard.barton.arm, DavidTruby Tags: #flang Differential Revision: https://reviews.llvm.org/D85470 (cherry picked from commit 2fc86ccd)
-
Brad Smith authored
(cherry picked from commit 5fe17132)
-
Sam Elliott authored
This fixes the "Unable to insert indirect branch" fatal error sometimes seen when generating position-independent code. Patch by msizanoen1 Reviewed By: jrtc27 Differential Revision: https://reviews.llvm.org/D84833 (cherry picked from commit 5f9ecc5d)
-
Brad Smith authored
(cherry picked from commit 592b8996)
-
Brad Smith authored
(cherry picked from commit d9ff48d0)
-
Amy Huang authored
When turning on -debug-info-kind=constructor we ran into a "fragment covers entire variable" error during thinlto. The fragment is currently always emitted if there is no type size, but sometimes the variable has a forward declared struct type which doesn't have a size. This changes the code to get the type size from the GlobalVariable instead. Differential Revision: https://reviews.llvm.org/D85572 (cherry picked from commit 54b6cca0)
-
- Aug 19, 2020
-
-
Sterling Augustine authored
Although it works fine with glibc, as currently implemented the frameheader cache is incompatible with certain platforms with slightly different locking semantics inside dl_iterate_phdr. Therefore only enable it when it is turned on explicitly with a configure-time option. Differential Revision: https://reviews.llvm.org/D86163 (cherry picked from commit a20f5fe7)
-
Brad Smith authored
(cherry picked from commit f5fdb614)
-
Brad Smith authored
(cherry picked from commit f4aba9d7)
-
Brad Smith authored
(cherry picked from commit 430db35b)
-