- Nov 11, 2023
-
-
Kazu Hirata authored
Identified with clangd.
-
Kazu Hirata authored
Identified with clangd.
-
Kazu Hirata authored
Identified with clangd.
-
Craig Topper authored
This allows us to reuse isel patterns from SelectionDAG. This is similar to what is done on AArch64.
-
Fangrui Song authored
-
Björn Pettersson authored
If the code has a call to an implicitly declared function, an expression could end up referencing declarations without valid source locations. So when doing the exprIsValidOutside check we could end up calling SourceManager::isPointWithin using invalid source locations, and then a debug build would crash with an assertion failure in SourceManager::isBeforeInTranslationUnit. This patch make sure that we deal with the invalid locations (by considering a ReferencedDecl with invalid location as not being inside the Scope).
-
Fangrui Song authored
-
Craig Topper authored
-
Craig Topper authored
-
Craig Topper authored
This improves the code for -riscv-experimental-rv64-legal-i32
-
Craig Topper authored
[RISCV] Add test case showing unnecessary zext of shift amounts with -riscv-experimental-rv64-legal-i32. NFC
-
Walter Erquinigo authored
lldb's AppleDWARFIndex is created with a few `llvm::AppleAcceleratorTable` variables, but they only hold pointers to the underlying data, which doesn't prevent the data owner (lldb's DataBufferHeap) from being disposed. Because of this, an asan build of lldb was showing an error in which a jitted accelerator table was being fred before read, which made my lldb fall in an infinite loop trying to parse corrupted accel table data. This issue only happens when I'm using a jitted execution and not when debugging a precompiled binary, probably because in the jit case the underlying data has to necessarily be copied via gdb-remote instead of mmaping a debug info file. The correct fix seems to also store the underlying storage along with the accelerator tables in AppleDWARFIndex.
-
spaceotter authored
Allows the barrier elimination code to be run from C++ as well. The code from transforms dialect is copied as-is, the pass and populate functions have beed added at the end. Co-authored-by:Eric Eaton <eric@nod-labs.com>
-
Shoaib Meenai authored
This is a hacky fix to get the bots green, because just reverting the original commit causes more failures. This should be replaced with a proper fix by the author.
-
Shoaib Meenai authored
This reverts commit 8ee07a4b. The revert is breaking AMDGPU backend tests (which I didn't have enabled), and I don't want to risk breakages over the weekend, so just revert for now.
-
Shoaib Meenai authored
This reverts commit 3bb7ecc5. The revert breaks AMDGPU backend tests (which I didn't have enabled locally), and I don't want to risk more breakages before the weekend, so just restore things as they were.
-
Shoaib Meenai authored
This reverts commit cd7ba9f3. This is causing test failures on builds without assertions: /data/users/smeenai/llvm-project/clang/test/Analysis/builtin_signbit.cpp:14:21: error: CHECK-BE32-NEXT: expected string not found in input // CHECK-BE32-NEXT: entry: ^ Bots are also failing, e.g. https://lab.llvm.org/buildbot/#/builders/67/builds/13266/steps/7/logs/stdio
-
Shoaib Meenai authored
This reverts commit 82f68a99. cd7ba9f3 needs to be reverted to fix test failures on builds without assertions, and this one needs to be reverted first for that.
-
Vidhush Singhal authored
Changes the size of allocations automatically. For now, implements the case when a single range from start of the allocation is alive and the allocation can be reduced.
-
jimingham authored
If `unique` is true, I was redoing the uniqueness check for the secondary listeners, which is racy since a "duplicate" event could come in between deciding to send the event to the main listener and checking for the shadow listener, and then the two streams would get out of sync. There's not a good way to write a direct test for this, but the test_shadow_listeners test has been flakey and this is the only racy part of that system I can find. So the test would be that that test_shadow_listeners becomes not flakey.
-
Jonas Devlieghere authored
Read the MD5 checksum from DWARF line tables and store it in the corresponding support files. This is a re-land after fixing an off-by-one error in LLDB's ParseSupportFilesFromPrologue (fixed in #71984).
-
Johannes Doerfert authored
If we have more than one reduction variable we need to be consistent wrt. indexing. In 3de645ef we broke this as the buffer type was reduced to a singleton but the index computation was not adjusted to account for that offset. This fixes it by interleaving the reduction variables properly in a array-of-struct style. We can revert it back to struct-of-array in a follow up if turns out to be a problem. I doubt it since half the accesses should benefit from the locallity this layout offers and only the other half were consecutive before.
-
Quinn Dawkins authored
Fixes asan failures in https://lab.llvm.org/buildbot/#/builders/5/builds/38191 introduced by #71964.
-
Jonas Devlieghere authored
This fixes a subtle and previously harmless off-by-one bug in ParseSupportFilesFromPrologue. The function accounts for the start index being one-based for DWARF v4 and earlier and zero-based for DWARF v5 and later. However, the same care wasn't taken for the end index. This bug existed unnoticed because GetFileByIndex gracefully handles an invalid index. However, the bug manifested itself after #71458, which added a call to getFileNameEntry which requires the index to be valid. No test as the bug cannot be observed without the changes from #71458. Once that PR is merged, this will be covered by all the DWARF v5 tests.
-
Jay Foad authored
SIInstrInfo::commuteInstructionImpl should accept indices to commute in either order. This simplifies SIFoldOperands::tryAddToFoldList where OtherIdx, CommuteIdx0 and CommuteIdx1 are no longer needed.
-
William Junda Huang authored
[SampleProfile] Fix bug where remapper returns empty string and crashing Sample Profile loader (#71479) Normally SampleContext does not allow using an empty StirngRef to construct an object, this is to prevent bugs reading the profile. However empty names may be emitted by a function which its name is intentionally set to empty, or a bug in the remapper that returns an empty string. Regardless, converting it to FunctionId first will prevent the assert, and that assert check is unnecessary, which will be addressed in another patch
-
Owen Pan authored
Also fixed a bug in `isStartOfName()` and cleaned up some old test cases. Fixed #71563. This is a rework of #71755.
-
Alexander Yermolovich authored
Fixed a bug where when --dwarf-output-path is specified and DW_AT_dwo_name contains part of the path the output path would contain both. Which lead to llvm-bolt crash, because the path didn't exist. Example: llvm-bolt .... --dwarf-output-path=/some/path/ DW_AT_dwo_name ("objects/o1/split.dwo") It would try to write .dwo file to /some/path/objects/o1/split.dwo.dwo instead of to /some/path/split.dwo.dwo -
Fangrui Song authored
For an odr-violation error due to a source file linked into two DSOs, or one DSO and the main executable, it can be difficult to identify the DSO name. Let's print the module name in the error report. ``` echo 'extern long var; int main() { return var; }' > a.cc echo 'long var;' > b.cc clang++ -fpic -fsanitize=address -shared b.cc -o b.so clang++ -fsanitize=address a.cc b.cc ./b.so -o a ``` w/o this patch: ``` ==1375386==ERROR: AddressSanitizer: odr-violation (0x56067cb06240): [1] size=8 'var' b.cc [2] size=8 'var' b.cc ... ``` w/ this patch: ``` ==1375386==ERROR: AddressSanitizer: odr-violation (0x56067cb06240): [1] size=8 'var' b.cc in /tmp/c/a [2] size=8 'var' b.cc in ./b.so ``` In addition, update the `report_globals=2` message to include the module name ``` ==1451005==Added Global[0x7fcfe59ae040]: beg=0x7fcfe59ae140 size=8/32 name=var source=b.cc module=./b.so dyn_init=0 odr_indicator=0x55754f939260 ``` -
Craig Topper authored
Testing together since they should come paired. Instruction selection will be a separate PR.
-
Joseph Huber authored
Summary: This patch reworks how we handle global constructors in OpenMP. Previously, we emitted individual kernels that were all registered and called individually. In order to provide more generic support, this patch moves all handling of this to the target backend and the runtime plugin. This has the benefit of supporting the GNU extensions for constructors an destructors, removing a class of failures related to shared library destruction order, and allows targets other than OpenMP to use the same support without needing to change the frontend. This is primarily done by calling kernels that the backend emits to iterate a list of ctor / dtor functions. For x64, this is automatic and we get it for free with the standard `dlopen` handling. For AMDGPU, we emit `amdgcn.device.init` and `amdgcn.device.fini` functions which handle everything atuomatically and simply need to be called. For NVPTX, a patch https://github.com/llvm/llvm-project/pull/71549 provides the kernels to call, but the runtime needs to set up the array manually by pulling out all the known constructor / destructor functions. One concession that this patch requires is the change that for GPU targets in OpenMP offloading we will use `llvm.global_dtors` instead of using `atexit`. This is because `atexit` is a separate runtime function that does not mesh well with the handling we're trying to do here. This should be equivalent in all cases except for cases where we would need to destruct manually such as: ``` struct S { ~S() { foo(); } }; void foo() { static S s; } ``` However this is broken in many other ways on the GPU, so it is not regressing any support, simply increasing the scope of what we can handle. This changes the handling of ctors / dtors. This patch now outputs a information message regarding the deprecation if the old format is used. This will be completely removed in a later release. Depends on: https://github.com/llvm/llvm-project/pull/71549
-
Alex Langford authored
Similar to my previous patch (#71613) where I changed `GetItemAtIndexAsString`, this patch makes the same change to `GetItemAtIndexAsDictionary`. `GetItemAtIndexAsDictionary` now returns a std::optional that is either `std::nullopt` or is a valid pointer. Therefore, if the optional is populated, we consider the pointer to always be valid (i.e. no need to check pointer validity).
-
Peiming Liu authored
-
lntue authored
-
Ryosuke Niwa authored
Fix WebKit static analyzers to support ref and deref methods to be defined on different classes. (#69985)
-
Min-Yih Hsu authored
Print comments into assembly output if we're using `emit-asm`.
-
Haojian Wu authored
-
Quinn Dawkins authored
A number of the warp distribution patterns work by rewriting a warp op in place by moving a contained op outside. This notifies the rewriter that the warp op is changing in this case.
-
Mingming Liu authored
Revert "[Support]Look up in top-level subcommand as a fallback when looking options for a custom subcommand (#71975) …ooking options for a custom subcommand. (#71776)" This reverts commit b88308b1. The build-bot is unhappy (https://lab.llvm.org/buildbot/#/builders/186/builds/13096), `GroupingAndPrefix` fails after `TopLevelOptInSubcommand` (the newly added test). Revert while I look into this (might be related with test sharding but not sure) ``` [----------] 3 tests from CommandLineTest [ RUN ] CommandLineTest.TokenizeWindowsCommandLine2 [ OK ] CommandLineTest.TokenizeWindowsCommandLine2 (0 ms) [ RUN ] CommandLineTest.TopLevelOptInSubcommand [ OK ] CommandLineTest.TopLevelOptInSubcommand (0 ms) [ RUN ] CommandLineTest.GroupingAndPrefix #0 0x00ba8118 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x594118) #1 0x00ba5914 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x591914) #2 0x00ba89c4 SignalHandler(int) (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x5949c4) #3 0xf7828530 __default_sa_restorer /build/glibc-9MGTF6/glibc-2.31/signal/../sysdeps/unix/sysv/linux/arm/sigrestorer.S:67:0 #4 0x00af91f0 (anonymous namespace)::CommandLineParser::ResetAllOptionOccurrences() (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x4e51f0) #5 0x00af8e1c llvm::cl::ResetCommandLineParser() (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x4e4e1c) #6 0x0077cda0 (anonymous namespace)::CommandLineTest_GroupingAndPrefix_Test::TestBody() (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x168da0) #7 0x00bc5adc testing::Test::Run() (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x5b1adc) #8 0x00bc6cc0 testing::TestInfo::Run() (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x5b2cc0) #9 0x00bc7880 testing::TestSuite::Run() (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x5b3880) #10 0x00bd7974 testing::internal::UnitTestImpl::RunAllTests() (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x5c3974) #11 0x00bd6ebc testing::UnitTest::Run() (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x5c2ebc) #12 0x00bb1058 main (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/unittests/Support/./SupportTests+0x59d058) #13 0xf78185a4 __libc_start_main /build/glibc-9MGTF6/glibc-2.31/csu/libc-start.c:342:3 ```
-
Dominik Adamski authored
Function __kmpc_push_num_threads should be called only if we specify number of threads for host parallel region. Number of threads specified by the user should be passed as one of arguments of __kmpc_parallel_51 function.
-