- Dec 02, 2021
-
-
Djordje Todorovic authored
When doing load/store promotion within LICM, if we cannot prove that it is safe to sink the store we won't hoist the load, even though we can prove the load could be dereferenced and moved outside the loop. This patch implements the load promotion by moving it in the loop preheader by inserting proper PHI in the loop. The store is kept as is in the loop. By doing this, we avoid doing the load from a memory location in each iteration. Please consider this small example: loop { var = *ptr; if (var) break; *ptr= var + 1; } After this patch, it will be: var0 = *ptr; loop { var1 = phi (var0, var2); if (var1) break; var2 = var1 + 1; *ptr = var2; } This addresses some problems from [0]. [0] https://bugs.llvm.org/show_bug.cgi?id=51193 Differential revision: https://reviews.llvm.org/D113289 -
Florian Hahn authored
This also removes the existing memset_pattern.ll test, which was relying on GVN. It is also covered by the new test directly.
-
Simon Pilgrim authored
[DAG][PowerPC] Enable initial ISD::BITCAST SimplifyDemandedBits/SimplifyMultipleUseDemandedBits big-endian handling This patch begins extending handling for peeking through bitcast nodes to big-endian targets as well as the existing little-endian case. Differential Revision: https://reviews.llvm.org/D114676
-
Djordje Todorovic authored
-
David Green authored
The ranges in isLegalAddressImm were off by one, not allowing the maximum values for unscaled offsets. Differential Revision: https://reviews.llvm.org/D114636
-
Frederic Cambus authored
Notes generated in NetBSD core files provide additional information about processes. These notes are described in core.5, which can be viewed here: https://man.netbsd.org/core.5 Differential Revision: https://reviews.llvm.org/D114635
-
Florian Hahn authored
Add support for memset_pattern{4,8} similar to the existing memset_pattern16 handling. Reviewed By: ab Differential Revision: https://reviews.llvm.org/D114883 -
Nikita Popov authored
This fixes the assertion failure reported in https://reviews.llvm.org/D114889#3166417, by making RecursivelyDeleteTriviallyDeadInstructionsPermissive() more permissive. As the function accepts a WeakTrackingVH, even if originally only Instructions were inserted, we may end up with different Value types after a RAUW operation. As such, we should not assume that the vector only contains instructions. Notably this matches the behavior of the RecursivelyDeleteTriviallyDeadInstructions() function variant which accepts a single value rather than vector.
-
Frederic Cambus authored
All supported FreeBSD platforms do not have GCC in base anymore. Differential Revision: https://reviews.llvm.org/D114530
-
David Green authored
-
Kiran Chandramohan authored
For unimplemented patterns we revert to using TODO hard failures instead of notifyMatchFailure. For fir.select_type revert to using mlir::emiterror. For the fir.embox TODO on a type with len params we cannot add a test since the type cannot be converted to llvm. Adding negative tests using not and checking for the error message. TODO exits with an error in a build without assertion but aborts in a build with assertions. Abort requires using not with the --crash option. The two different usages of not is handled by using a custom command %not_todo_cmd which is converted to not or not --crash depending on the presence or absence of assertions. Using llvm-config to check the presence of assertions. Reviewed By: clementval, awarzynski Differential Revision: https://reviews.llvm.org/D114371
-
Simon Moll authored
This reverts commit 27c9e8b4. Bugs exposed by AddressSanitizer have been reproduced and fixed locally: * commit e37000f3 * commit 435d44bf
-
Florian Hahn authored
-
Fangrui Song authored
binutils 2.38 will adopt this behavior https://sourceware.org/bugzilla/show_bug.cgi?id=28639 Reviewed By: ikudrin Differential Revision: https://reviews.llvm.org/D114910
-
Florian Hahn authored
`memcpy_chk` can be treated like `memcpy`, with the exception that it may not return (if it aborts the program). See D114793 for a similar patch for `memset_chk`. Reviewed By: xbolva00 Differential Revision: https://reviews.llvm.org/D114863
-
Simon Moll authored
There is custom expansion code for packed VFMK Pseudos in the VE backend. This code erased the Pseudo without telling ExpandPostRAPseudos about it, causing the generic expansion function to access the erased Pseudo. This bug triggered in the test/CodeGen/VE/VELIntrinsics/vfmk.ll test with asan-enabled builds. Detected by: sanitizer-x86_64-linux-fast (https://lab.llvm.org/buildbot/#/builders/5/builds/15393)
-
Lang Hames authored
This should fix the build failure at https://lab.llvm.org/buildbot#builders/110/builds/8359
-
Kirill Bobyrev authored
[clangd] IncludeClenaer: Don't mark forward declarations of a class if it's declared in the main file This will mark more headers that are unrelated to used symbol but contain its forawrd declaration. E.g. the following are examples of headers forward declaring `llvm::StringRef`: - clang/include/clang/Basic/Cuda.h - llvm/include/llvm/Support/SHA256.h - llvm/include/llvm/Support/TrigramIndex.h - llvm/include/llvm/Support/RandomNumberGenerator. - ... and more (~50 in total) This patch is a reduced version of D112707 which was controversial. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D114864
-
Valentin Clement authored
This patch adds the FIR builder to generate the numeric intrinsic runtime call. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: rovka Differential Revision: https://reviews.llvm.org/D114477 Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
mleair <leairmark@gmail.com>
-
Nikita Popov authored
Deprecate LLVMAddAlias in favor of LLVMAddAlias2, which accepts a value type and an address space. Previously these were extracted from the pointer type. Differential Revision: https://reviews.llvm.org/D114860
-
Nikita Popov authored
This has been fixed by D114889, as noted in the comments.
-
mydeveloperday authored
Responding to a Discord call to help {D113977} and heavily inspired by the unlanded {D34225} add some support to help coroutinues from not being formatted from ```for co_await(auto elt : seq)``` to ``` for co_await(auto elt : seq) ``` Because of the dominance of clang-format in the C++ community, I don't think we should make it the blocker that prevents users from embracing the newer parts of the standard because we butcher the layout of some of the new constucts. Reviewed By: HazardyKnusperkeks, Quuxplusone, ChuanqiXu Differential Revision: https://reviews.llvm.org/D114859 -
Vitaly Buka authored
It's a weak function which may be undefined.
-
Jon Chesterfield authored
-
David Green authored
Given a min(max(fptosi, INT_MIN), INT_MAX) with the correct constants, we can now generate a fptosi.sat. But in the arm backend, the constant can be treated as high cost, pulling it out of the basic block in a way that the DAG combine can no longer see it. This teaches it again that it is a low cost constant, not worth hoisting out. Recommitted from 0e98659e with a fix for APInt comparison. Differential Revision: https://reviews.llvm.org/D114380
-
Lang Hames authored
This allows JITDylibs to be removed from the ExecutionSession. Calling ExecutionSession::removeJITDylib will disconnect the JITDylib from the ExecutionSession and clear it (removing all trackers associated with it). The JITDylib object will then be destroyed as soon as the last JITDylibSP pointing at it is destroyed.
-
Lang Hames authored
GeneratorsMutex should prevent lookups from proceeding through the generators of a single JITDylib concurrently (since this could result in redundant attempts to generate definitions). Mutation of the generators list itself should be done under the session lock.
-
Lang Hames authored
This keeps the tracker alive for the lifetime of the MR. This is needed so that we can check whether the tracker has become defunct before posting results (or failure) for the MR.
-
Austin Kerbow authored
Using a BufferSize of one for memory ProcResources will result in better ILP since it more accurately models the dependencies between memory ops and their consumers on an in-order processor. After this change, the scheduler will treat the data edges from loads as blocking so that stalls are guaranteed when waiting for data to be retreaved from memory. Since we don't actually track waitcnt here, this should do a better job at modeling their behavior. Practically, this means that the scheduler will trigger the 'STALL' heuristic more often. This type of change needs to be evaluated experimentally. Preliminary results are positive. Fixes: SWDEV-282962 Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D114777
-
skc7 authored
Reviewed By: yaxunl, sameerds Differential Revision: https://reviews.llvm.org/D114849
-
Phoebe Wang authored
We have reasonable fast sqrt and accurate rsqrt for half type due to the limited fractions. So neither do we need multi steps refinement for rsqrt nor replace sqrt by rsqrt. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D114844
-
Phoebe Wang authored
Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D114843
-
Jonas Devlieghere authored
This test is failing on the sanitized bot because of a heap-use-after-free. Disabling the test to turn the bot green again. rdar://85954489.
-
Igor Kudrin authored
When a comdat symbol is defined in both bitcode and regular object files, which are contained in the same archive, the linker could lose the flag that the symbol is used in the regular object file and allow LTO to internalize it, which led to "error: undefined symbol". The issue was introduced in D79300. Differential Revision: https://reviews.llvm.org/D114801
-
Jacques Pienaar authored
When an attribute is optional & is given an additional constraint in rewrite pattern that could lead to dereferencing null Attribute. Avoid cases where the constraints checks attribute but has no check if null. This should be improved to be more uniformly guarded.
-
Christudasan Devadasan authored
Along with vector RC flags, this scalar flag will make various regclass queries like `isVGPR` more accurate. Regclasses other than vectors are currently set with the new flag even though certain unallocatable classes aren't truly scalars. It would be ok as long as they remain unallocatable. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D110053
-
Joe Loser authored
Implement P1989R2 which adds a range constructor for `string_view`. Adjust `operator/=` in `path` to avoid atomic constraints caching issue getting provoked from this PR. Add defaulted template argument to `string_view`'s "sufficient overloads" to avoid mangling issues in `clang-cl` builds. It is a MSVC mangling bug that this works around. Differential Revision: https://reviews.llvm.org/D113161
-
Vitaly Buka authored
-
Jonas Devlieghere authored
Don't make DYLD_INSERT_LIBRARIES conditional on the host triple containing x86.
-
Philip Reames authored
-