- Mar 02, 2021
-
-
Ta-Wei Tu authored
-
Nemanja Ivanovic authored
The VSX-only overloads (for 8-byte element vectors) are missing. Add the missing overloads and convert element numbering to modulo arithmetic to match GCC and XLC.
-
Peter Steinfeld authored
It's possible to define a procedure whose interface depends on a procedure which has an interface that depends on the original procedure. Such a circular definition was causing the compiler to fall into an infinite loop when resolving the name of the second procedure. It's also possible to create circular dependency chains of more than two procedures. I fixed this by adding the function HasCycle() to the class DeclarationVisitor and calling it from DeclareProcEntity() to detect procedures with such circularly defined interfaces. I marked the associated symbols of such procedures by calling SetError() on them. When processing subsequent procedures, I called HasError() before attempting to analyze their interfaces. Unfortunately, this did not work. With help from Tim, we determined that the SymbolSet used to track the erroneous symbols was instantiated using a "<" operator which was defined using the location of the name of the procedure. But...
-
Nemanja Ivanovic authored
These interfaces are not covered in the ELFv2 ABI but are rather implemented to emulate those available in GCC/XLC. However, the ones in the other compilers are documented to perform modulo arithmetic on the element number. This patch just brings clang inline with the other compilers at -O0 (with optimization, clang already does the right thing).
-
Jian Cai authored
Currently ARM backend validates the range of branch targets before the layout of fragments is finalized. This causes build failure if symbolic expressions are used, with the exception of a single symbolic value. For example, "b.w ." works but "b.w . + 2" currently fails to assemble. This fixes the issue by delaying this check (in ARMAsmParser::validateInstruction) of b.w instructions until the symbol expressions are resolved (in ARMAsmBackend::adjustFixupValue). Link: https://github.com/ClangBuiltLinux/linux/issues/1286 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D97568
-
Kamlesh Kumar authored
and soft-float for both rv32 and rv64. Differential Revision: https://reviews.llvm.org/D80690
-
Yuanfang Chen authored
Fix typo `release` -> `reset`
-
Sam Clegg authored
A couple of small changes to match the ELF linker in preparation for adding support string mergings. Differential Revision: https://reviews.llvm.org/D97654
-
Sam Clegg authored
Part of ongoing conversion work started in https://reviews.llvm.org/D80361. Differential Revision: https://reviews.llvm.org/D97651
-
Yuanfang Chen authored
Remove source_mgr remark diagnose kind.
-
Yuanfang Chen authored
The situation with inline asm/MC error reporting is kind of messy at the moment. The errors from MC layout are not reliably propagated and users have to specify an inlineasm handler separately to get inlineasm diagnose. The latter issue is not a correctness issue but could be improved. * Kill LLVMContext inlineasm diagnose handler and migrate it to use DiagnoseInfo/DiagnoseHandler. * Introduce `DiagnoseInfoSrcMgr` to diagnose SourceMgr backed errors. This covers use cases like inlineasm, MC, and any clients using SourceMgr. * Move AsmPrinter::SrcMgrDiagInfo and its instance to MCContext. The next step is to combine MCContext::SrcMgr and MCContext::InlineSrcMgr because in all use cases, only one of them is used. * If LLVMContext is available, let MCContext uses LLVMContext's diagnose handler; if LLVMContext is not available, MCContext uses its own default diagnose handler which just prints SMDiagnostic. * Change a few clients(Clang, llc, lldb) to use the new way of reporting. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D97449
-
Luís Marques authored
-
Med Ismail Bennani authored
This patch reverts the following commits: - 5a9c3491 - 46796762 - 2cff3dec - 182f0d1a - d62a53aa Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
MaheshRavishankar authored
Add canonicalizers to subtensor_insert operations need canonicalizers that propagate the constant arguments within offsets, sizes and strides. Also add pattern to propogate tensor_cast operations. Differential Revision: https://reviews.llvm.org/D97704
-
Jonas Devlieghere authored
-
Nikita Popov authored
The current narrowing code for G_PHI can only handle the case where the size is a multiple of the narrow size. If this is not the case, fall back to SDAG instead of asserting. Original patch by shepmaster. Differential Revision: https://reviews.llvm.org/D92446
-
Yaxun (Sam) Liu authored
Only test it with x86 since other target may have an ABI making it difficult to test. Change-Id: I85423c8bbbbbb8f24cb3ea4cb64a408069b4d61c
-
Nathan James authored
Added an option to control whether to apply the fixes found in notes attached to clang tidy errors or not. Diagnostics may contain multiple notes each offering different ways to fix the issue, for that reason the default behaviour should be to not look at fixes found in notes. Instead offer up all the available fix-its in the output but don't try to apply the first one unless `-fix-notes` is supplied. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D84924
-
Matt Arsenault authored
Generic code should probably not introduce G_INSERT/G_EXTRACT. The mirror unpackRegs should also be removed, but AMDGPU still has a use remaining which needs to be fixed.
-
Jessica Paquette authored
Remove a rule which allows larger scalar types than the destination vector element type. This appears to be irrelevant now that we have G_BUILD_VECTOR_TRUNC. Plus, making a G_BUILD_VECTOR which satisfies this introduces a verifier failure anyway. Differential Revision: https://reviews.llvm.org/D97727
-
Artem Belevich authored
`noreturn` complicates control flow and tends to trigger a known bug in ptxas if the assert is used within loops in sufficiently complicated code. https://bugs.llvm.org/show_bug.cgi?id=27738 Differential Revision: https://reviews.llvm.org/D97708
-
David Green authored
This pass has for a while performed Tail predication as well as VPT block optimizations. Rename the pass to make that clear.
-
Amara Emerson authored
def of the adrp before the ldr. Apparently this pass used to have liveness analysis but it was removed for scompile time reasons. This workaround prevents the LOH from being emitted unless the ADD and LDR are adjacent. Fixes https://github.com/JuliaLang/julia/issues/39820 Differential Revision: https://reviews.llvm.org/D97571
-
Nathan James authored
Adds an option, `PreferResetCall`, currently defaulted to `false`, to the check. When `true` the check will refactor by calling the `reset` member function. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D97630
-
Stella Stamenova authored
These warnings are raised when compiling with gcc due to either having too few or too many commas, or in the case of lldb, the possibility of a nullptr. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D97586
-
David Green authored
-
Yaxun (Sam) Liu authored
Change-Id: I86b534223d63bf8bb8f49af5a64b300efbeba77b
-
Fangrui Song authored
`__llvm_prf_vnodes` and `__llvm_prf_names` are used by runtime but not referenced via relocation in the translation unit. With `-z start-stop-gc` (D96914 https://sourceware.org/bugzilla/show_bug.cgi?id=27451), the linker no longer lets `__start_/__stop_` references retain them. Place `__llvm_prf_vnodes` and `__llvm_prf_names` in `llvm.used` to make them retained by the linker. This patch changes most existing `UsedVars` cases to `CompilerUsedVars` to reflect the ideal state - if the binary format properly supports section based GC (dead stripping), `llvm.compiler.used` should be sufficient. `__llvm_prf_vnodes` and `__llvm_prf_names` are switched to `UsedVars` since we want them to be unconditionally retained by both compiler and linker. Behaviors on other COFF/Mach-O are not affected. Differential Revision: https://reviews.llvm.org/D97649
-
Med Ismail Bennani authored
This patch should fi the build issue on the windows bots: https://lab.llvm.org/buildbot/#/builders/83/builds/4214/steps/5/logs/stdio Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Anirudh Prasad authored
- This patch adds in the distinction between jg[*] and jl[*] pc-relative mnemonics based on the variant/dialect. - Under the hlasm variant, we use the jl[*] family of mnemonics and under the att (GNU as) variant, we use the jg[*] family of mnemonics. - jgnop which was added in https://reviews.llvm.org/D92185, is now restricted to att variant. jlnop is introduced and restricted to hlasm variant. - The br[*]l additional mnemonics are mapped to either jl[*]/jg[*] based on the variant. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D97581
-
Yaxun (Sam) Liu authored
Currently clang uses stub function to launch kernel. This is inconvenient to interop with C++ programs since the stub function has different name as kernel, which is required by ROCm debugger. This patch emits a variable symbol which has the same name as the kernel and uses it to register and launch the kernel. This allows C++ program to launch a kernel by using the original kernel name. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D86376
-
Sanjay Patel authored
This set of transforms should be extended to handle vector types.
-
Richard Smith authored
Some of the parts of this work were reverted; stop defining the feature test macro for now. This reverts commit b4c63ef6.
-
Nico Weber authored
This adds support for `-undefined dynamic_lookup`, and for `-undefined warning` and `-undefined suppress` with `-flat_namespace`. We just replace undefined symbols with a DynamicLookup when we hit them. With this, `check-llvm` passes when using ld64.lld.darwinnew as host linker. Differential Revision: https://reviews.llvm.org/D97642
-
Krystian Kuzniarek authored
clang-format documentation states that having enabled FixNamespaceComments one may expect below code: c++ namespace a { foo(); } to be turned into: c++ namespace a { foo(); } // namespace a In reality, no "// namespace a" was added. The problem was too high value of kShortNamespaceMaxLines, which is used while deciding whether a namespace is long enough to be formatted. As with 9163fe2a, clang-format idempotence is preserved. Differential Revision: https://reviews.llvm.org/D87587 -
Björn Schäpers authored
... without an active column limit. Before line comments were not touched at all with ColumnLimit == 0. Differential Revision: https://reviews.llvm.org/D96896
-
Nico Weber authored
-flat_namespace makes lld emit binaries that use name lookup that's more in line with other POSIX systems: Instead of looking up symbols as (dylib,name) pairs by dyld, they're instead looked up just by name. -flat_namespace has three effects: 1. MH_TWOLEVEL and MH_NNOUNDEFS are no longer set in the Mach-O header 2. All symbols use BIND_SPECIAL_DYLIB_FLAT_LOOKUP as ordinal 3. When a dylib is added to the link, its dependent dylibs are also added, so that lld can verify that no undefined symbols remain at the end of a link with -flat_namespace. These transitive dylibs are added for symbol resolution, but they are not emitted in LC_LOAD_COMMANDs. -undefined with -flat_namespace still isn't implemented. Before this change, it was impossible to hit that combination because -flat_namespace caused a diagnostic. Now that it no longer does, emit a dedicated temporary diagnostic when both flags are used. Differential Revision: https://reviews.llvm.org/D97641
-
Nico Weber authored
For -flat_namespace, lld needs to load dylibs in LC_LOAD_DYLIB. The current setup meant that libSystem.dylib would cause a LC_LOAD_DYLIB with libSystem.B.dylib, but that didn't exist in our libsysroot for tests. So just drop the .B. See https://reviews.llvm.org/D97641#2595237 and https://reviews.llvm.org/D97641#2595270
-
Nico Weber authored
-
peter klausler authored
Implement the related character intrinsic functions SCAN and VERIFY. Differential Revision: https://reviews.llvm.org/D97580
-