- Mar 04, 2021
-
-
Johannes Doerfert authored
If we know already more than available from a use, we don't need to invest time on it.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Kito Cheng authored
According to ISO/IEC TS 18661-3:2015 _FloatN is interchange floating point type, extended floating-point type is _FloatNx. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2342.pdf Reviewed By: SjoerdMeijer Differential revision: https://reviews.llvm.org/D97759
-
Siva Chandra Reddy authored
-
Evgeniy Brevnov authored
This is an attempt to improve handling of partial overlaps in case of unaligned begin\end. Existing implementation just bails out if it encounters such cases. Even when it doesn't I believe existing code checking alignment constraints is not quite correct. It tries to ensure alignment of the "later" start/end offset while should be preserving relative alignment between earlier and later start/end. The idea behind the change is simple. When start/end is not aligned as we wish instead of bailing out let's adjust it as necessary to get desired alignment. I'll update with performance results as measured by the test-suite...it's still running... Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D93530
-
Alan Baker authored
Add clspv as a new target for libclc. clspv is an open-source compiler that compiles OpenCL C to Vulkan SPIR-V. Compiles for the spir target. The clspv target differs from the the spirv target in the following ways: * fma is modified to use uint2 instead of ulong for mantissas. This results in lower performance fma, but provides a implementation that can be used on more Vulkan devices where 64-bit integer support is less common. * Use of a software implementation of nextafter because the generic implementation depends on nextafter being a defined builtin function for which clspv has no definition. * Full optimization of the library (-O3) and no conversion to SPIR-V This library is close to what would be produced by running opt -O3 < builtins.opt.spirv-mesa3d-.bc > builtins.opt.clspv--.bc and continuing the build from that point. Reviewer: jvesely Differential Revision: https://reviews.llvm.org/D94013
-
Siva Chandra Reddy authored
This knob is useful for downstream users who want that some of their libc functions to not be intercepted. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D97740
-
Christopher Di Bella authored
Implements parts of: - P0898R3 Standard Library Concepts - P1754 Rename concepts to standard_case for C++20, while we still can Depends on D96660 Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D96683 -
Serguei Katkov authored
statepoint intrinsic can be used in invoke context, so it should be handled in visitCallBase to cover both call and invoke. Reviewers: reames, dantrushin Reviewed By: reames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D97833
-
Wang, Pengfei authored
Add option /guard:ehcont Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D96709
-
Jason Molenda authored
Add calls into LanguageRuntime when finding the unwind method to use out of the 0th (currently executing) stack frame. Allow for the LanguageRuntimes to indicate if this stack frames should be treated like a zeroth-frame -- symbolication should be done based on the saved pc address, not decremented like normal ABI function calls. Add methods to RegisterContext and StackFrame to get a pc value suitable for symbolication, to reduce the number of places in lldb where we decrement the saved pc values before symbolication. <rdar://problem/70398009> Differential Revision: https://reviews.llvm.org/D97644
-
Arthur O'Dwyer authored
This is just a shorter synonym for `__identity<T>::type`. Use it consistently throughout, where possible. There is still some metaprogramming in <memory> and <variant> where `__identity` is being used _without_ immediately calling `::type` on it; but this is the unusual case, and it will become even less usual as we start deliberately protecting certain types against deduction (e.g. D97742). Differential Revision: https://reviews.llvm.org/D97862
-
Christopher Di Bella authored
Implements parts of: - P0898R3 Standard Library Concepts - P1754 Rename concepts to standard_case for C++20, while we still can Depends on D96657 Reviewed By: ldionne, Mordante, #libc Differential Revision: https://reviews.llvm.org/D96660 -
Aart Bik authored
Found with exhaustive testing, it is possible that a while loop appears in between chainable for loops. As long as we don't scalarize reductions in while loops, this means we need to terminate the chain at the while. This also refactors the reduction code into more readable helper methods. Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D97886
-
Juneyoung Lee authored
-
Juneyoung Lee authored
This patch is an update to LangRef by describing lifetime intrinsics' behavior by following the description of MIR's LIFETIME_START/LIFETIME_END markers at StackColoring.cpp (https://github.com/llvm/llvm-project/blob/eb44682d671d66e422b02595a636050582a4d84a/llvm/lib/CodeGen/StackColoring.cpp#L163) and the discussion in llvm-dev. In order to explicitly define the meaning of an object lifetime, I added 'Object Lifetime' subsection. Reviewed By: nlopes Differential Revision: https://reviews.llvm.org/D94002
-
River Riddle authored
The support for attributes closely maps that of Types (basically 1-1) given that Attributes are defined in exactly the same way as Types. All of the current ODS TypeDef classes get an Attr equivalent. The generation of the attribute classes themselves share the same generator as types. Differential Revision: https://reviews.llvm.org/D97589
-
Craig Topper authored
[RISCV] Make use of the required features in BuiltinInfo to store that V extension builtins require 'experimental-v'. Use that to print the diagnostic in SemaChecking instead of listing all of the builtins in a switch. With the required features, IR generation will also be able to error on this. Checking this here allows us to have a RISCV focused error message. Reviewed By: HsiangKai Differential Revision: https://reviews.llvm.org/D97826
-
Fangrui Song authored
IR symbol table does not parse inline asm. A symbol only referenced by inline asm is not in the IR symbol table, so LTO does not know that the definition (in another translation unit) is referenced and may internalize it, even if that definition has `__attribute__((used))` (which lowers to `llvm.compiler.used` on ELF targets since D97446). ``` // cabac.c __attribute__((used)) const uint8_t ff_h264_cabac_tables[...] = {...}; // h264_cabac.c asm("lea ff_h264_cabac_tables(%rip), %0" : ...); ``` `__attribute__((used))` is the recommended way to tell the compiler there may be inline asm references, so the usage is perfectly fine. This patch conservatively sets the `FB_used` bit on `llvm.compiler.used` symbols to work around the IR symbol table limitation. Note: before D97446, Clang never emitted symbols in the `llvm.compiler.used` list, so this change does not punish any Clang emitted global object. Without the patch, `ff_h264_cabac_tables` may be assi... -
Steven Wan authored
On AIX, the default arch level should match the minimum supported arch level of the OS version. Differential Revision: https://reviews.llvm.org/D97823
-
River Riddle authored
This better matches the actual IR concept that is being modeled, and is consistent with how the rest of PDL is structured. Differential Revision: https://reviews.llvm.org/D95718
-
River Riddle authored
This type represents a range of positional values. It will be used in followup revisions to add support for variadic constructs to PDL, such as operand and result ranges. Differential Revision: https://reviews.llvm.org/D95717
-
Xun Li authored
See pr46990(https://bugs.llvm.org/show_bug.cgi?id=46990). LICM should not sink store instructions to loop exit blocks which cross coro.suspend intrinsics. This breaks semantic of coro.suspend intrinsic which return to caller directly. Also this leads to use-after-free if the coroutine is freed before control returns to the caller in multithread environment. This patch disable promotion by check whether loop contains coro.suspend intrinsics. This is a resubmit of D86190. Disabling LICM for loops with coroutine suspension is a better option not only for correctness purpose but also for performance purpose. In most cases LICM sinks memory operations. In the case of coroutine, sinking memory operation out of the loop does not improve performance since coroutien needs to get data from the frame anyway. In fact LICM would hurt coroutine performance since it adds more entries to the frame. Differential Revision: https://reviews.llvm.org/D96928
-
Fangrui Song authored
`__llvm_prf_nm` is compressed if zlib is available. In addition, its size may not be that stable.
-
Jin Lin authored
The compiler needs to mark register $x0 as live in for the following case. $x1 = ADDXri $sp, 16, 0 BL @spam, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit killed $x1, implicit-def $sp, implicit-def dead $x0 Reviewed By: paquette Differential Revision: https://reviews.llvm.org/D95267 -
River Riddle authored
-
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/D97884
-
Zequan Wu authored
Differential Revision: https://reviews.llvm.org/D97436
-
River Riddle authored
The current implementation of Value involves a pointer int pair with several different kinds of owners, i.e. BlockArgumentImpl*, Operation *, TrailingOpResult*. This design arose from the desire to save memory overhead for operations that have a very small number of results (generally 0-2). There are, unfortunately, many problematic aspects of the current implementation that make Values difficult to work with or just inefficient. Operation result types are stored as a separate array on the Operation. This is very inefficient for many reasons: we use TupleType for multiple results, which can lead to huge amounts of memory usage if multi-result operations change types frequently(they do). It also means that simple methods like Value::getType/Value::setType now require complex logic to get to the desired type. Value only has one pointer bit free, severely limiting the ability to use it in things like PointerUnion/PointerIntPair. Given that we store the kind of a Value along with the "owner" pointer, we only leave one bit free for users of Value. This creates situations where we end up nesting PointerUnions to be able to use Value in one. As noted above, most of the methods in Value need to branch on at least 3 different cases which is both inefficient, possibly error prone, and verbose. The current storage of results also creates problems for utilities like ValueRange/TypeRange, which want to efficiently store base pointers to ranges (of which Operation* isn't really useful as one). This revision greatly simplifies the implementation of Value by the introduction of a new ValueImpl class. This class contains all of the state shared between all of the various derived value classes; i.e. the use list, the type, and the kind. This shared implementation class provides several large benefits: * Most of the methods on value are now branchless, and often one-liners. * The "kind" of the value is now stored in ValueImpl instead of Value This frees up all of Value's pointer bits, allowing for users to take full advantage of PointerUnion/PointerIntPair/etc. It also allows for storing more operation results as "inline", 6 now instead of 2, freeing up 1 word per new inline result. * Operation result types are now stored in the result, instead of a side array This drops the size of zero-result operations by 1 word. It also removes the memory crushing use of TupleType for operations results (which could lead up to hundreds of megabytes of "dead" TupleTypes in the context). This also allowed restructured ValueRange, making it simpler and one word smaller. This revision does come with two conceptual downsides: * Operation::getResultTypes no longer returns an ArrayRef<Type> This conceptually makes some usages slower, as the iterator increment is slightly more complex. * OpResult::getOwner is slightly more expensive, as it now requires a little bit of arithmetic From profiling, neither of the conceptual downsides have resulted in any perceivable hit to performance. Given the advantages of the new design, most compiles are slightly faster. Differential Revision: https://reviews.llvm.org/D97804
-
Jez Ng authored
-
Sanjay Patel authored
This is a mess, but this is hopefully no-functional-change. The 'Prev' descriptor is only used for min/max recurrences or when starting a match from a phi, so it should not be a factor when propagating FMF for fmul/fadd. The API is confusing (and should be reduced in subsequent steps) because the "UnsafeAlgebraInst" appears to actually be a placeholder for a recurrence that does NOT have FMF, but we still want to treat it as reassociative.
-
Stefan Gränitz authored
-
David Blaikie authored
-
Louis Dionne authored
Apple back-deployment testing is currently failing because Green Dragon is down. To avoid stalling the whole CI pipeline because of that, I am temporarily disabling those jobs until Green Dragon is back, or even better we have found a different way to store those small artifacts.
-
MaheshRavishankar authored
The SubTensorInsertOp has a requirement that dest type and result type match. Just folding the tensor.cast operation violates this and creates verification errors during canonicalization. Also fix other canonicalization methods that werent inserting casts properly. Differential Revision: https://reviews.llvm.org/D97800
-
Florian Hahn authored
Make sure we preserve info about passed arguments as implicit uses, to make sure later passes still have access to this information. This fixes a mis-compile where the machine-combiner would pick an incorrect free register.
-
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
-