- Sep 22, 2023
-
-
jeanPerier authored
Implement automatic deallocation of unsaved local alloctables when reaching the end of their scope of block as described in Fortran 2018 9.7.3.2 point 2. and 3. Uses genDeallocateIfAllocated used for intent(out) deallocation and the "function context" already used for finalization at end of scope.
-
David Green authored
-
Bruno Cardoso Lopes authored
When dealing with short-circuiting coroutines (e.g. expected), the deferred calls that resolve the get_return_object are currently being emitted after we delete the coroutine frame. This was caught by ASAN when using optimizations -O1 and above: optimizations after inlining would place the __coro_gro in the heap, and subsequent delete of the coroframe followed by the conversion -> BOOM. This patch forbids the GRO to be placed in the coroutine frame, by adding a new metadata node that can be attached to `alloca` instructions. Fix #49843
-
Jeff Bailey authored
For file handling, we need more definitions from linux/stat.h, so this pulls them in. It also adjusts other definitions to match the kernel's exactly [NFC] so that it's easy to verify that there's been no divergence one day when it's time to use linux/stat.h directly. Tested: check-libc
-
Balazs Benics authored
Variadic arguments were not considered as taint sink arguments. I also decided to extend the list of exec-like functions. (Juliet CWE78_OS_Command_Injection__char_connect_socket_execl)
-
Kazu Hirata authored
-
Vitaly Buka authored
-
Amara Emerson authored
-
Amara Emerson authored
-
Diego Caballero authored
`vector.extract/insert` ops only support constant indices. This PR is extending them so that arbitrary values can be used instead. This work is part of the RFC: https://discourse.llvm.org/t/rfc-psa-remove-vector-extractelement-and-vector-insertelement-ops-in-favor-of-vector-extract-and-vector-insert-ops Differential Revision: https://reviews.llvm.org/D155034
-
Carl Ritson authored
Always output values of wait_vdst and wait_exp in assembly even when they are zero. While we normally avoid outputing default/zero parameters in assembly, the values of these parameters still imply wait behaviour when zero. Outputing zero values makes the intent more obvious to human readers, and avoid any future ambiguity if we choose to change the defaults to something other than zero. Fixes #66383
-
Vitaly Buka authored
Looks simpler.
-
Aart Bik authored
-
Vitaly Buka authored
Now we copy only tags we will print. CHECKs in GetTagCopy and GetShortTagCopy ensure that.
-
Arthur Eubanks authored
We only want to treat globals as potentially far away, not other things like constants in the constant pool. This matches the object file emission that only puts the large section flag on globals. Remove FIXME since the remaining differences are accesses to 0 sized globals which are intentional.
-
Vitaly Buka authored
-
Fangrui Song authored
-
Bill Wendling authored
Place the architecuture-specific logic to clear registers in a single place and call it via a TargetInstrInfo method. This will allow one to add instructions to clear registers holding the stack protector guard value before return, but do it in non-architecture-specific code.
-
jeffreytan81 authored
We noticed some performance issue while in lldb-vscode for grabing the name of the SBValue. Profiling shows SBValue::GetName() can cause synthetic children provider of shared/unique_ptr to deference underlying object and complete it type. This patch lazily moves the dereference from synthetic child provider's Update() method to GetChildAtIndex() so that SBValue::GetName() won't trigger the slow code path. Here is the culprit slow code path: ``` ... frame #59: 0x00007ff4102e0660 liblldb.so.15`SymbolFileDWARF::CompleteType(this=<unavailable>, compiler_type=0x00007ffdd9829450) at SymbolFileDWARF.cpp:1567:25 [opt] ... frame #67: 0x00007ff40fdf9bd4 liblldb.so.15`lldb_private::ValueObject::Dereference(this=0x0000022bb5dfe980, error=0x00007ffdd9829970) at ValueObject.cpp:2672:41 [opt] frame #68: 0x00007ff41011bb0a liblldb.so.15`(anonymous namespace)::LibStdcppSharedPtrSyntheticFrontEnd::Update(this=0x000002298fb94380) at LibStdcpp.cpp:403:40 [opt] frame #69: 0x00007ff41011af9a liblldb.so.15`lldb_private::formatters::LibStdcppSharedPtrSyntheticFrontEndCreator(lldb_private::CXXSyntheticChildren*, std::shared_ptr<lldb_private::ValueObject>) [inlined] (anonymous namespace)::LibStdcppSharedPtrSyntheticFrontEnd::LibStdcppSharedPtrSyntheticFrontEnd(this=0x000002298fb94380, valobj_sp=<unavailable>) at LibStdcpp.cpp:371:5 [opt] ... frame #78: 0x00007ff40fdf6e42 liblldb.so.15`lldb_private::ValueObject::CalculateSyntheticValue(this=0x000002296c66a500) at ValueObject.cpp:1836:27 [opt] frame #79: 0x00007ff40fdf1939 liblldb.so.15`lldb_private::ValueObject::GetSyntheticValue(this=<unavailable>) at ValueObject.cpp:1867:3 [opt] frame #80: 0x00007ff40fc89008 liblldb.so.15`ValueImpl::GetSP(this=0x0000022c71b90de0, stop_locker=0x00007ffdd9829d00, lock=0x00007ffdd9829d08, error=0x00007ffdd9829d18) at SBValue.cpp:141:46 [opt] frame #81: 0x00007ff40fc7d82a liblldb.so.15`lldb::SBValue::GetSP(ValueLocker&) const [inlined] ValueLocker::GetLockedSP(this=0x00007ffdd9829d00, in_value=<unavailable>) at SBValue.cpp:208:21 [opt] frame #82: 0x00007ff40fc7d817 liblldb.so.15`lldb::SBValue::GetSP(this=0x00007ffdd9829d90, locker=0x00007ffdd9829d00) const at SBValue.cpp:1047:17 [opt] frame #83: 0x00007ff40fc7da6f liblldb.so.15`lldb::SBValue::GetName(this=0x00007ffdd9829d90) at SBValue.cpp:294:32 [opt] ... ``` Differential Revision: https://reviews.llvm.org/D159542
-
Jian Cai authored
This moves the C++ code generated from supplemental patterns before op replacement. It is necessary if the supllemental patterns need to access the source op.
-
Vitaly Buka authored
Please review them one by one in order, and let me know which are OK. It's mostly code shuffling. The goal is to make HWASA collect all needed info the first, and printout later. This way we avoid the printing changes HWASAN metadata.
-
Ziqing Luo authored
- Use Strategy to determine whether to fix a parameter - Fix the `Strategy` construction so that only variables on the graph are assigned the `std::span` strategy Reviewed by: t-rasmud (Rashmi Mudduluru), NoQ (Artem Dergachev) Differential revision: https://reviews.llvm.org/D157441
-
Joseph Huber authored
Summary: The parser class for stdio currently accepts different argument providers. In-tree this is only used for a fuzzer test, however, the proposed implementation of the GPU handling of printf / scanf will require custom argument handlers. This makes the current approach of using a preprocessor macro messier. This path proposed folding this logic into a template instantiation. The downside to this is that because the implementation of the parser class is placed into an implementation file we need to manually instantiate the needed templates which will slightly bloat binary size. Alternatively we could remove the implementation file, or key off of the `libc` external packaging macro so it is not present in the installed version.
-
Amy Kwan authored
This aims to fix the shared library build for the clang-ppc64le-linux-multistage bot.
-
Vitaly Buka authored
-
Jason Molenda authored
`watch set expression` was passing the OptionGroupWatchpoint enum in to Target where the LLDB_WATCH_TYPE_* bitfield was expected. Modify matched READ|WRITE and resulted in a test failure in TestWatchTaggedAddress.py. David temporarily changed the test to expect this incorrect output; this fixes the bug and updates the test case to test it for correctness again.
-
Amy Huang authored
Implement the _Count* and _Copy* Windows ARM intrinsics: ``` double _CopyDoubleFromInt64(__int64) float _CopyFloatFromInt32(__int32) __int32 _CopyInt32FromFloat(float) __int64 _CopyInt64FromDouble(double) unsigned int _CountLeadingOnes(unsigned long) unsigned int _CountLeadingOnes64(unsigned __int64) unsigned int _CountLeadingSigns(long) unsigned int _CountLeadingSigns64(__int64) unsigned int _CountLeadingZeros(unsigned long) unsigned int _CountLeadingZeros64(unsigned __int64) unsigned int _CountOneBits(unsigned long) unsigned int _CountOneBits64(unsigned __int64) ``` Full list of intrinsics here: [https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics](https://learn.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics) Bug: [65405](https://github.com/llvm/llvm-project/issues/65405)
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Louis Dionne authored
Since GCC now supports -nostdlib++, we can remove some complexity in the test configurations and do the same as Clang. However, we can't fully remove the GCC test configuration for libc++ because we apparently need to explicitly link against libm for some tests to work.
-
Vitaly Buka authored
-
Louis Dionne authored
We don't support these compilers anymore so these Lit annotations were never used.
-
Chia-hung Duan authored
Instead of using hardware specific instruction, using simple loop over volatile variable gives similar and more predicatable waiting time. Also fine tune the waiting time to fit with the average time in malloc/free operations. Reviewed By: cferris Differential Revision: https://reviews.llvm.org/D156951
-
Vladislav Khmelevsky authored
According to ARMv8-a architecture reference manual B2.10.5 software must avoid having any explicit memory accesses between exclusive load and associated store instruction. Otherwise exclusive monitor might clear the exclusivity without application-related cause which may result in the deadloop. Disable instrumentation for such functions, since between exclusive load and store there might be branches and we would insert instrumentation snippet which contains loads and stores. The better solution would be to analyze with BFS finding the exact BBs between load and store and not instrumenting them. Or even better to recognize such sequences and replace them with more complex one, e.g. loading value non exclusively, and for the brach where exclusive store is made make exclusive load and store sequentially, but for now just disable instrumentation for such functions completely. Differential Revision: https://reviews.llvm.org/D159520
-
ChiaHungDuan authored
-
Artem Belevich authored
Some critical code paths we have depend on efficient byte extraction from data loaded as integers. By default LLVM tries to extract bytes by storing/loading from stack, which is very inefficient on GPU.
-
Louis Dionne authored
Otherwise this can mess up the test results which inspect stdout.
-
Louis Dionne authored
-
Florian Hahn authored
-
Jim Ingham authored
bots as well. I'll have to figure out a different way to test this.
-