- May 12, 2023
-
-
Chuanqi Xu authored
ASTReader after we start writing This is intended to mitigate https://github.com/llvm/llvm-project/issues/61447. Before the patch, it takes 5s to compile test.cppm in the above reproducer. After the patch it takes 3s to compile it. Although this patch didn't solve the problem completely, it should mitigate the problem for sure. Noted that the behavior of the patch is consistent with the comment of the originally empty function ASTReader::finalizeForWriting. So the change should be consistent with the original design.
-
Tomasz Kuchta authored
This patch adds a support for the libc strnlen() function in DFSAN Reviewed by: browneee Differential Revision: https://reviews.llvm.org/D149459
-
Fangrui Song authored
Python>=3.6 has been the requirement since D93097 (2020). Remove old workarounds. Remove unused imports from compiler-rt/test/memprof/lit.cfg.py Reviewed By: serge-sans-paille Differential Revision: https://reviews.llvm.org/D150410
-
Vitaly Buka authored
Fix crash on CHECK in ThreadArgRetval::Finish().
-
Vitaly Buka authored
Avoids reports with msan -fno-inline.
-
Lang Hames authored
These are an attempt to more systematically test the features covered by the MCJIT regression tests (though these tests apply to lli's default mode, which is now -jit-kind=orc). This first batch of tests includes a basic smoke test (trivial-return-zero), tests for single function calls and data references, and alignment handling.
-
Jessica Paquette authored
Allows us to knock out a couple more includes from the header file. Also clang-format SuffixTree.cpp while we're here. Also use SuffixTreeNode::EmptyIdx in a couple more places.
-
Joshua Cao authored
The old LoopUnswitch pass unswitched selects, but the changes were never ported to the new SimpleLoopUnswitch. We unswitch by turning: ``` S = select %cond, %a, %b ``` into: ``` head: br %cond, label %then, label %tail then: br label %tail tail: S = phi [ %a, %then ], [ %b, %head ] ``` Unswitch selects are always nontrivial, since the successors do not exit the loop and the loop body always needs to be cloned. Unswitch selects always need to freeze the conditional if the conditional could be poison or undef. Selects don't propagate poison/undef, and branches on poison/undef causes UB. Reland 1 - Fix the insertion of freeze instructions. The original implementation inserts a dead freeze instruction that is not used by the unswitched branch. Reland 2 - Include https://reviews.llvm.org/D149560 in the same patch, which was originally reverted along with this patch. The patch prevents unswitching of selects with a vector conditional. This could have been caught in SimpleLoopUnswitch/crash.ll if it included tests for nontrivial unswitching. This reland also adds a run for the test file with nontrivial unswitching. Reviewed By: nikic, kachkov98, vitalybuka Differential Revision: https://reviews.llvm.org/D138526
-
Jessica Paquette authored
All we need is the suffix indices. Just store those instead. Also improve code readability a little while we're here.
-
Jessica Paquette authored
- Move comment to top of file - Remove unused vector include
-
LLVM GN Syncbot authored
-
Jessica Paquette authored
Add: - SuffixTreeNode.h - SuffixTreeNode.cpp The SuffixTree file was getting too long.
-
Jessica Paquette authored
This makes it clearer that EmptyIdx is related to the node. Also add an allocator for the root so that in the main SuffixTree code we don't see gross stuff like a nullptr parent etc.
-
Jie Fu authored
/data/llvm-project/compiler-rt/lib/xray/../../include/xray/xray_records.h:48:24: error: default member initializer for bit-field is a C++20 extension [ -Werror,-Wc++20-extensions] bool ConstantTSC : 1 = false; ^ /data/llvm-project/compiler-rt/lib/xray/../../include/xray/xray_records.h:49:23: error: default member initializer for bit-field is a C++20 extension [ -Werror,-Wc++20-extensions] bool NonstopTSC : 1 = false; ^ 2 errors generated. -
Kai Sasaki authored
Element-wise exp(log) can be canonicalized as no-op. Reviewed By: eric-k256 Differential Revision: https://reviews.llvm.org/D150342
-
jinge90 authored
and also adds description for default fp environment. Reviewed By:rjmccall, sepavloff Differential Revision: https://reviews.llvm.org/D146188
-
John Demme authored
MemRefMem2Ref was unnecessarily including a header from Complex and not including it as a cmake dep (causing some builds to fail).
-
Vitaly Buka authored
-
Vitaly Buka authored
Looks like code assumes that it will be always set, but it's not true: https://reviews.llvm.org/D150420. This is temporarily suppression to enabled stricter msan on a bot.
-
Neumann Hon authored
Revert "[SystemZ][z/OS] Save (and restore) R3 to avoid clobbering parameter when call stack frame extension is invoked" This reverts commit 1aec3d15.
-
Weining Lu authored
-
Vitaly Buka authored
LLParser::parseInstruction speculatively getUIntVal() but uses that only in some branches. APFloatVal, TyVal and StrVal were already initialized, when UIntVal and APSIntVal were not.
-
Jianjian GUAN authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D150350
-
Vitaly Buka authored
Avoids reports with msan -fno-inline.
-
Eli Kobrin authored
I tried to build libFuzzer for RISC-V and succeeded. All the libFuzzer targets were successfully built. I tested this on the small hello world code with a few branches to check the instrumentation; all of them were covered by libFuzzer on RISC-V arch. So I suppose it makes sense to enable libFuzzer build for RISC-V. Reviewed By: phosek, thetruestblue, MaskRay Differential Revision: https://reviews.llvm.org/D147788
-
Neumann Hon authored
[SystemZ][z/OS] Save (and restore) R3 to avoid clobbering parameter when call stack frame extension is invoked When the stack frame extension routine is used, the contents of r3 is overwritten. However, if r3 is live in the prologue (ie. one of the function's parameters resides in r3), it needs to be saved. We save r3 in r0 if r0 is available (ie. r0 is not used as temporary storage for r4), and in the corresponding stack slot for the third parameter otherwise. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D150332
-
Jessica Paquette authored
Following guidelines in https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html This allows us to * Quickly discern between leaf and internal nodes * Be more idiomatic with the rest of LLVM * Save some size on node structs * Reduce the number of allocations (because end indices for internal nodes no longer need to be pointers to be compatible with leaf nodes) Also object orientify the code some more. This allows for more asserts and checks. This shouldn't impact code size on the MachineOutliner. - All unit tests pass (outliner lit + llvm-unit) - No code size changes on CTMark @ -Oz for AArch64
-
Nico Weber authored
-
Akira Hatanaka authored
up at runtime using dlsym Calling dlsym with RTLD_DEFAULT can be very slow as all images in the process are searched for the symbol. Differential Revision: https://reviews.llvm.org/D150397
-
Vitaly Buka authored
It uses to initialize the class. If so, it returns uninitalized value. This is UB and msan with -fno-inline will complain.
-
Craig Topper authored
-
Craig Topper authored
We were missing any support for ISD::INTRINSIC_W_CHAIN/INTRINSIC_VOID used for memory operations. For ISD::PREFETCH and target memory nodes we didn't add the subclass data. This patch handles all MemIntrinsicSDNode in one place and adds the missing subclass data. Note. Unlike load/stores we don't add the memory VT in AddNodeIDCustom or getMemIntrinsicNode. Not sure why. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D150387
-
Vitaly Buka authored
-
Vitaly Buka authored
I can't figure out how to reproduce this for test, but I see the case on random binaries. The known issue is with GLIBC, others may have a workaround, e.g. Bionic, https://cs.android.com/android/platform/superproject/+/master:bionic/libc/bionic/pthread_exit.cpp;l=149 see signals blocked above. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D150401
-
Vitaly Buka authored
Fixes false leaks on thread retval. Reviewed By: thurston Differential Revision: https://reviews.llvm.org/D150165
-
Mircea Trofin authored
ThinLTO imports (which appear as `available_externally`) that survive inlining get deleted. With today's inliner that's reasonable, because the way the function would be inlined into in other modules would be the same - because of the bottom-up traversal assumption, and the fact that the inliner doesn't take into account surrounding context [*]. The ModuleInliner invalidates the first assumption, and the ML inliner the second. This patch adds a way to opt-in a module to keep its variant of an imported function, even if it survived past inlining. [*] Almost. Deferred inlining is an exception which can lead to (empirically) infrequent discrepancies. Differential Revision: https://reviews.llvm.org/D150148
-
Vitaly Buka authored
Fixes false leaks on thread retval. Reviewed By: thurston Differential Revision: https://reviews.llvm.org/D150106
-
Peiming Liu authored
Reviewed By: wrengr Differential Revision: https://reviews.llvm.org/D150405
-
Adrian Vogelsgesang authored
`DoubleAPFloat` has a `unique_ptr<APFloat[]>` member. In `DoubleAPFloat::operator=` and `DoubleAPFloat::get{First,Second}`, the methods of this unique_ptr are getting instantiated. At that point `APFloat` is still only a forward declaration. This triggers undefined behavior. So far, we were probaly just lucky and the code compiled fine. However, with C++23 `std::unique_ptr` became constexpr, and clang (and other compilers) are now diagnosing this latent bug as an error. This commit fixes the issue by moving the function definitions out of the class definition of `DoubleAPFloat`, after the declaration of `APFloat`. A similar issue exists in `ModuleSummaryIndex.h`, the fix is pretty much identical. Fixes #59784 Differential Revision: https://reviews.llvm.org/D149854 -
Valentin Clement authored
Update _OPENACC definition to be consistent with the flang-new driver. Currently set to 202011 which is OpenACC 3.1 specification and is the current parser/semantic status. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D150400
-