- Mar 04, 2021
-
-
Stefan Gränitz authored
This reverts commit 900f0761 and attempts an actual fix: All failing tests for llvm-jitlink use the `-noexec` flag. The inputs they operate on are not meant for execution on the host system. Looking e.g. at the MachO_test_harness_harnesss.s test, llvm-mc generates input machine code with "x86_64-apple-macosx10.9". My previous attempt in bbdb4c8c disabled the debug support plugin for Windows targets, but what we would actually want is to disable it on Windows HOSTS. With the new patch here, I don't do exactly that, but instead follow the approach for the EH frame plugin and include the `-noexec` flag in the condition. It should have the desired effect when it comes to the test suite. It appears a little workaround'ish, but should work reliably for now. I will discuss the issue with Lang and see if we can do better. Thanks @thakis again for the temporary fix.
-
Soumi Manna authored
unsigned variable 'IntNo' has been declared but not been defined inside function EmitWebAssemblyBuiltinExpr(). static code analysis tool complains about uninitialized variable "IntNo" since this enters to default branch without setting any intrinsics and calls Function *Callee = CGM.getIntrinsic(IntNo). This patch fixes the problem by adding default cases in switch statements.
-
Jez Ng authored
We previously defaulted to x86_64 and an unknown platform, which was fine when we only supported one arch and did no platform checks, but that will no longer be true going ahead. Therefore, we should require those flags to be specified whenever the linker is invoked. Note that LLD-ELF and ld64 both infer the arch from their input object files, but the usefulness of that is questionable since clang will always specify these flags, and most of the time `lld` will be invoked via clang. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D97799
-
Jez Ng authored
The option-iterating loop should be reserved for options whose command-line order is important. I think LLD-ELF follows a similar design. Reviewed By: #lld-macho, smeenai Differential Revision: https://reviews.llvm.org/D97797
-
Whitney Tsang authored
predictable. Reviewed By: Meinersbur, bmahjour Differential Revision: https://reviews.llvm.org/D97747
-
Alexey Bataev authored
Tests with the default costs for boolean and/or reductions. Differential Revision: https://reviews.llvm.org/D97793
-
Philip Reames authored
Probably should have done this before landing, but I forgot. Basic idea is to avoid using the SCEV predicate when it doesn't buy us anything. Also happens to set us up for handling non-add recurrences in the future if desired.
-
Philip Reames authored
We had equivalent code for both CallInst and InvokeInst, but never cared about the result type.
-
Philip Reames authored
LSR goes to some lengths to schedule IV increments such that %iv and %iv.next never need to overlap. This is fairly fundamental to LSRs cost model. LSR assumes that an addrec can be represented with a single register. If %iv and %iv.next have to overlap, then that assumption does not hold. The bug - which this patch is fixing - is that LSR only does this scheduling for IVs which it inserts, but it's cost model assumes the same for existing IVs that it reuses. It will rewrite existing IV users such that the no-overlap property holds, but will not actually reschedule said IV increment. As you can see from the relatively lack of test updates, this doesn't actually impact codegen much. The main reason for doing it is to make a follow up patch series which improves post-increment use and scheduling easier to follow. Differential Revision: https://reviews.llvm.org/D97219
-
Jonas Paulsson authored
Even though the implementation in emitAtomicCmpSwapW() was correct, it made Valgrind report an error. Instead of using a RISBG on CmpVal, an LL[CH]R can be made on the OldVal, and the problem is avoided. Review: Ulrich Weigand Differential Revision: https://reviews.llvm.org/D97604
-
Peter Steinfeld authored
We were allowing procedures with the MODULE prefix to be declared at the global scope. This is prohibited by C1547 and was causing an internal check of the compiler to fail. I fixed this by adding a check. I also added a test that would trigger a crash without this change. Differential Revision: https://reviews.llvm.org/D97875
-
Hanhan Wang authored
Different from the definition in Tensorflow and TOSA, the output is [N,H,W,C,M]. This can make transforms easier in LinAlg because the indexing maps are plain. E.g., to determine if the fill op has dependency between the depthwise conv op, the current pipeline only recognizes the dep if they are all projected affine map. Reviewed By: asaadaldien Differential Revision: https://reviews.llvm.org/D97798
-
Florian Hahn authored
This is a NFC with respect to the generated code. But it fixes a crash when using -debug, because of the position in the enum CALL_RVMARKER nodes were treated as memops. That caused a crash when printing CALL_RVMARKER nodes.
-
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` (LLD 13 (D96914); GNU ld 2.37 https://sourceware.org/bugzilla/show_bug.cgi?id=27451), the linker does not let `__start_/__stop_` references retain their sections. 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 COFF/Mach-O are not affected. Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D97649
-
Fangrui Song authored
-
Zequan Wu authored
Differential Revision: https://reviews.llvm.org/D97101
-
Sam McCall authored
- highlight references to protocols in class/protocol/extension decls - support multi-token selector highlights in semantic + xref highlights (method calls and declarations only) - In `@interface I(C)`, I now references the interface and C the category - highlight uses of interfaces as types - added semantic highlightings of protocol names (as "interface") and category names (as "namespace"). These are both standard kinds, maybe "extension" will be standardized... - highlight `auto` as "class" when it resolves to an ObjC pointer - don't highlight `self` as a variable even though the AST models it as one Not fixed: uses of protocols in type names (needs some refactoring of unrelated code first) Differential Revision: https://reviews.llvm.org/D97617
-
George Balatsouras authored
As a preparation step for fast8 support, we need to update the tests to pass in both modes. That requires generalizing the shadow width and remove any hard coded references that assume it's always 2 bytes. Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D97723
-
Petr Hosek authored
This avoid potential conflict with other internal variables. Differential Revision: https://reviews.llvm.org/D97838
-
Louis Dionne authored
-
Stanislav Mekhanoshin authored
Honor always_inline attribute when processing -amdgpu-inline-max-bb. It was lost during the ports of the heuristic. There is no reason to honor inline hint, but not always inline. Differential Revision: https://reviews.llvm.org/D97790
-
Mehdi Amini authored
This offers the ability to create a JIT and invoke a function by passing ctypes pointers to the argument and the result. Differential Revision: https://reviews.llvm.org/D97523
-
Mehdi Amini authored
This adds minimalistic bindings for the execution engine, allowing to invoke the JIT from the C API. This is still quite early and experimental and shouldn't be considered stable in any way. Differential Revision: https://reviews.llvm.org/D96651
-
Hongtao Yu authored
Previously we errored out when disassembling illegal instructions and there would be no profile generated. In fact illegal instructions are not uncommon and we'd better skip them and print "unknown" instead of erroring out. This matches the behavior of llvm-objdump (see disassembleObject in llvm-objdump.cpp). Reviewed By: wlei, wenlei Differential Revision: https://reviews.llvm.org/D97776
-
Choongwoo Han authored
Currently, getSourceFile accesses file system to check if two paths are the same file with a thread lock, which is a huge performance bottleneck in some cases. Currently, it's accessing file system size(files) * size(files) times. Thus, cache file status information, which reduces file system access to size(files) times. When I tested it with two binaries and 16 cpu cores, it saved over 70% of time. Binary 1: 56 secs -> 3 secs Binary 2: 17 hours -> 4 hours Differential Revision: https://reviews.llvm.org/D97061
-
Elia Geretto authored
This patch modifies the x86_64 XRay trampolines to fix the CFI information generated by the assembler. One of the main issues in correcting the CFI directives is the `ALIGNED_CALL_RAX` macro, which makes the CFA dependent on the alignment of the stack. However, this macro is not really necessary because some additional assumptions can be made on the alignment of the stack when the trampolines are called. The code has been written as if the stack is guaranteed to be 8-bytes aligned; however, it is instead guaranteed to be misaligned by 8 bytes with respect to a 16-bytes alignment. For this reason, always moving the stack pointer by 8 bytes is sufficient to restore the appropriate alignment. Trampolines that are called from within a function as a result of the builtins `__xray_typedevent` and `__xray_customevent` are necessarely called with the stack properly aligned so, in this case too, `ALIGNED_CALL_RAX` can be eliminated. Fixes: https://bugs.llvm.org/show_bug.cgi?id=49060 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D96785
-
Louis Dionne authored
A comment was left for when we would require CMake >= 3, which we do now. I expect this should be a NFC. Differential Revision: https://reviews.llvm.org/D97341
-
Louis Dionne authored
We always build the libraries in a Standard mode that supports noexcept, so there's no need to use the _NOEXCEPT macro. Differential Revision: https://reviews.llvm.org/D97700
-
Hanhan Wang authored
Reviewed By: stella.stamenova Differential Revision: https://reviews.llvm.org/D97851
-
MaheshRavishankar authored
Since Linalg operations have regions by default which are not isolated from above, add an another method to the interface that will take a BlockAndValueMapping to remap the values within the region as well. Differential Revision: https://reviews.llvm.org/D97709
-
Philip Reames authored
-
Philip Reames authored
This is almost purely NFC, it just fits more obviously in the flow of the code now that we've standardized on the index different approach. The non-NFC bit is that because of canceling the VariableOffsets in the subtract, we can now handle the case where both sides involve a common variable offset. This isn't an "interesting" improvement; it just happens to fall out of the natural code structure. One subtle point - the placement of this above the BaseAlias check is important in the original code as this can return NoAlias even when we can't find a relation between the bases otherwise. Also added some enhancement TODOs noticed while understanding the existing code. Note: This is slightly different than the LGTMed version. I fixed the "inbounds" issue Nikita noticed with the original code in e6e5ef40 and rebased this to include the same fix. Differential Revision: https://reviews.llvm.org/D97520
-
Baptiste Saleil authored
VirtRegRewriter may sometimes fail to correctly apply the kill flag where necessary, which causes unecessary code gen on PowerPC. This patch fixes the way masks for defined lanes are computed and the way mask for used lanes is computed. Contact albion.fung@ibm.com instead of author for problems related to this commit. Differential Revision: https://reviews.llvm.org/D92405
-
Philip Reames authored
This was pointed out in review of D97520 by Nikita, but existed in the original code as well. The basic issue is that a decomposed GEP expression describes (potentially) more than one getelementptr. The "inbounds" derived UB which justifies this aliasing rule requires that the entire offset be composed of "inbounds" geps. Otherwise, as can be seen in the recently added and changes in this patch test, we can end up with a large commulative offset with only a small sub-offset actually being "inbounds". If that small sub-offset lies within the object, the result was unsound. We could potentially be fancier here, but for the moment, simply be conservative when any of the GEPs parsed aren't inbounds.
-
Philip Reames authored
-
Louis Dionne authored
https://llvm.org/PR47602 https://llvm.org/PR47601 Differential Revision: https://reviews.llvm.org/D97808
-
Philip Reames authored
-
Arnold Schwaighofer authored
Before we used the same argument as the entry point. The resume partial function might want to use a different ABI for its context argument Differential Revision: https://reviews.llvm.org/D97333
-
Benjamin Kramer authored
Differential Revision: https://reviews.llvm.org/D97860
-
Nathan James authored
... For removal in next release cycle. The clang warning that does the same thing is enabled by default and typically emits better diagnostics making this check surplus to requirements. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D97491
-