- Jun 07, 2021
-
-
Daniil Seredkin authored
If FP reassociation (fast-math) is allowed, then LLVM is free to do the following transformation pow(x, y) * pow(x, z) -> pow(x, y + z). This patch adds this transformation and tests for it. See more https://bugs.llvm.org/show_bug.cgi?id=47205 It handles two cases 1. When operands of fmul are different instructions %4 = call reassoc float @llvm.pow.f32(float %0, float %1) %5 = call reassoc float @llvm.pow.f32(float %0, float %2) %6 = fmul reassoc float %5, %4 --> %3 = fadd reassoc float %1, %2 %4 = call reassoc float @llvm.pow.f32(float %0, float %3) 2. When operands of fmul are the same instruction %4 = call reassoc float @llvm.pow.f32(float %0, float %1) %5 = fmul reassoc float %4, %4 --> %3 = fadd reassoc float %1, %1 %4 = call reassoc float @llvm.pow.f32(float %0, float %3) Differential Revision: https://reviews.llvm.org/D102574
-
KareemErgawy authored
Implements better naming for results of spv.mlir.addressof ops by making it inherit from OpAsmOpInterface and implementing the associated getAsmResultName(...) hook. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D103594
-
Adam Czachorowski authored
During code completion, lookupInDeclContext() calls CodeCompletionDeclConsumer::FoundDecl(),which can mutate StoredDeclsMap, over which lookupInDeclContext() iterates. This can lead to invalidation of iterators and an assert()-crash. Example code where this happens: #include <list> int main() { std::list<int>; std::^ } with code completion on ^ with -std=c++20. I do not have a repro case that does not need standard library. This fix stores pointers to NamedDecls in a temporary vector, then visits them outside of the main loop, when StoredDeclsMap iterators are gone. Differential Revision: https://reviews.llvm.org/D103472 -
Simon Pilgrim authored
-
Nico Weber authored
-
Kadir Cetinkaya authored
TestTU now prints errors to llvm::errs and aborts on failures via llvm_unreachable, rather than executing ASSERT_FALSE. We'd like to make use of these testing libraries in different test suits that might be compiling with a different gtest version than LLVM has. Differential Revision: https://reviews.llvm.org/D103685
-
Bradley Smith authored
Use llvm.experimental.vector.insert instead of storing into an alloca when generating code for these intrinsics. This defers the codegen of the generated vector to instruction selection, allowing existing shufflevector style optimizations to apply. Additionally, introduce a new target transform that can recognise fixed predicate patterns in the svbool variants of these intrinsics. Differential Revision: https://reviews.llvm.org/D103082
-
Matthias Springer authored
Add helper functions to quickly check for zero low/high padding. Differential Revision: https://reviews.llvm.org/D103781
-
Florian Hahn authored
-
Florian Hahn authored
Explicitly specify contract behavior, so the tests are independent of the current default of the flag.
-
Matthias Springer authored
* Add hasUnitStride and hasZeroOffset to OffsetSizeAndStrideOpInterface. These functions are useful for various patterns. E.g., some vectorization patterns apply only for tensor ops with zero offsets and/or unit stride. * Add getConstantIntValue and isEqualConstantInt helper functions, which are useful for implementing the two above functions, as well as various patterns. Differential Revision: https://reviews.llvm.org/D103763
-
Pushpinder Singh authored
This global struct used to hold various flags for monitoring the initialization of hsa. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D103795
-
Stuart Brady authored
Reviewed By: svenvh Differential Revision: https://reviews.llvm.org/D97725
-
Liqiang Tao authored
This patch abstract Calls in Inliner:run() to InlineOrder. With this patch, it's possible to customize the inlining order, e.g. use queue or priority queue. Reviewed By: kazu Differential Revision: https://reviews.llvm.org/D103315
-
Nico Weber authored
Also adjust a few comments, and move the DylibFile comment talking about umbrella next to the parameter again. Differential Revision: https://reviews.llvm.org/D103783
-
Dmitry Polukhin authored
This diff adds testcase for the issue fixed in https://reviews.llvm.org/D77468 but regression test was not added in the diff. On Clang 9 it caused crash in cland during code completion. Test Plan: check-clang-unit Differential Revision: https://reviews.llvm.org/D103722
-
Guillaume Chatelet authored
Differential Revision: https://reviews.llvm.org/D103251
-
Florian Hahn authored
-
Simon Pilgrim authored
-
Jingu Kang authored
This pass transforms loops that contain a conditional branch with induction variable. For example, it transforms left code to right code: newbound = min(n, c) while (iv < n) { while(iv < newbound) { A A if (iv < c) B B C C } } if (iv != n) { while (iv < n) { A C } } Differential Revision: https://reviews.llvm.org/D102234 -
Andrew Savonichev authored
This fixes PR49198: Wrong usage of __dso_handle in user code leads to a compiler crash. When Init is an address of the global itself, we need to track it across RAUW. Otherwise the initializer can be destroyed if the global is replaced. Differential Revision: https://reviews.llvm.org/D101156
-
Florian Hahn authored
This patch marks the induction increment of the main induction variable of the vector loop as NUW when not folding the tail. If the tail is not folded, we know that End - Start >= Step (either statically or through the minimum iteration checks). We also know that both Start % Step == 0 and End % Step == 0. We exit the vector loop if %IV + %Step == %End. Hence we must exit the loop before %IV + %Step unsigned overflows and we can mark the induction increment as NUW. This should make SCEV return more precise bounds for the created vector loops, used by later optimizations, like late unrolling. At the moment quite a few tests still need to be updated, but before doing so I'd like to get initial feedback to make sure I am not missing anything. Note that this could probably be further improved by using information from the original IV. Attempt of modeling of the assumption in Alive2: https://alive2.llvm.org/ce/z/H_DL_g Part of a set of fixes required for PR50412. Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D103255
-
Jay Foad authored
This looks like a mistake when the tests were committed in r363946. There were two sets of tests for the f32 variant of these instructions, instead of one set for f16 and one set for f32. Differential Revision: https://reviews.llvm.org/D103699
-
Tobias Gysi authored
Replace the uses of deprecated Structured Op Interface methods in ComprehensiveBufferize.cpp. This patch is based on https://reviews.llvm.org/D103394. Differential Revision: https://reviews.llvm.org/D103520
-
Ole Strohm authored
This fixes the missing address space on `this` in the implicit move assignment operator. The function called here is an abstraction around the lines that have been removed which also sets the address space correctly. This is copied from CopyConstructor, CopyAssignment and MoveConstructor, all of which use this function, and now MoveAssignment does too. Fixes: PR50259 Reviewed By: svenvh Differential Revision: https://reviews.llvm.org/D103252
-
Pushpinder Singh authored
Previous logic was to always use the first kernarg pool found to allocate kernel args. This patch changes this to use only the kernarg pool which has non-zero size. This logic is also reworked to not use any globals. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D103600
-
Esme-Yi authored
error: ambiguous overload for 'operator==' (operand types are 'llvm::yaml::Hex16' and 'llvm::XCOFF::MagicNumber') Is64Bit = Obj.Header.Magic == XCOFF::XCOFF64; -
Esme-Yi authored
Summary: The patch implements the mapping of the Yaml information to XCOFF object file to enable the yaml2obj tool for XCOFF. Currently only 32-bit is supported. Reviewed By: jhenderson, shchenz Differential Revision: https://reviews.llvm.org/D95505
-
Nico Weber authored
Differential Revision: https://reviews.llvm.org/D103779
-
Nico Weber authored
Differential Revision: https://reviews.llvm.org/D103775
-
Nico Weber authored
The flag to set it is called `-install_name`, and it's called `installName` in tbd files. No behavior change. Differential Revision: https://reviews.llvm.org/D103776
-
Nico Weber authored
Also simply a conditional and de-alias a variable. Minor cleanups, no behavior change. Differential Revision: https://reviews.llvm.org/D103774
-
Jianzhou Zhao authored
dfsan does not use sanitizer allocator as others. In practice, we let it use glibc's allocator since tcmalloc needs more work to be working with dfsan well. With glibc, we observe large memory leakage. This could relate to two things: 1) glibc allocator has limitation: for example, tcmalloc can reduce memory footprint 2x easily 2) glibc may call unmmap directly as an internal system call by using system call number. so DFSan has no way to release shadow spaces for those unmmap. Using sanitizer allocator addresses the above issues 1) its memory management is close to tcmalloc 2) we can register callback when sanitizer allocator calls unmmap, so dfsan can release shadow spaces correctly. Our experiment with internal server-based application proved that with the change, in a-few-day run, memory usage leakage is close to what tcmalloc does w/o dfsan. This change mainly follows MSan's code. 1) define allocator callbacks at dfsan_allocator.h|cpp 2) mark allocator APIs to be discard 3) intercept allocator APIs 4) make dfsan_set_label consistent with MSan's SetShadow when setting 0 labels, define dfsan_release_meta_memory when unmap is called 5) add flags about whether zeroing memory after malloc/free. dfsan works at byte-level, so bit-level oparations can cause reading undefined shadow. See D96842. zeroing memory after malloc helps this. About zeroing after free, reading after free is definitely UB, but if user code does so, it is hard to debug an overtainting caused by this w/o running MSan. So we add the flag to help debugging. This change will be split to small changes for review. Before that, a question is "this code shares a lot of with MSan, for example, dfsan_allocator.* and dfsan_new_delete.*. Does it make sense to unify the code at sanitizer_common? will that introduce some maintenance issue?" Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D101204
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
David Green authored
-
David Green authored
-
Simon Pilgrim authored
Add missing v16f32/v8f64 costs and adjust other costs as well based off the SkylakeServer model
-
Craig Topper authored
We should be exiting when the shift amount is greater than the bit width regardless of whether it is a power of 2. Reported by Simon Pilgrim here https://reviews.llvm.org/D96661 This requires getting a shift amount that is out of bounds that wasn't already optimized by SelectionDAG. This would be pretty trick to construct a test for. Or it would require a non-power of 2 shift amount and a mask that has runs of ones and zeros of the next lowest power of 2 from that shift amount. I tried a little to produce a test for this, but didn't get it to work.
-
Simon Pilgrim authored
Non-Strict v2f32->v2i64 cases have already early-returned to be handled by legalization.
-