- Mar 26, 2024
-
-
Parth Arora authored
Previously, linker was unnecessarily including a PROVIDE symbol which was referenced by another unused PROVIDE symbol. For example, if a linker script contained the below code and 'not_used_sym' provide symbol is not included, then linker was still unnecessarily including 'foo' PROVIDE symbol because it was referenced by 'not_used_sym'. This commit fixes this behavior. PROVIDE(not_used_sym = foo) PROVIDE(foo = 0x1000) This commit fixes this behavior by using dfs-like algorithm to find all the symbols referenced in provide expressions of included provide symbols. This commit also fixes the issue of unused section not being garbage-collected if a symbol of the section is referenced by an unused PROVIDE symbol. Closes #74771 Closes #84730 Co-authored-by:Fangrui Song <i@maskray.me>
-
jimingham authored
Make the correct (5 argument) form of the command definition be the primary one suggested in the docs (#86593) This has been available for years now, so it should be safe to always use it.
-
Fangrui Song authored
Fixes: 36146d2b When `doParseFile template defintion` in InputFiles.cpp is optimized out, we will get a link failure. Actually, we can move the file parsing loop from Driver.too to InputFiles.cpp and merge it with parseArmCMSEImportLib.
-
Slava Zakharin authored
This commit adds required files into the offload build closure, which means adding RT_API_ATTRS and other markers. The implementation does not work for CUDA yet, because of std::variant,swap,reverse usage. These issues will be resolved separately (e.g. by using libcudacxx header files).
-
Iman Hosseini authored
The link to DLTI dialect was broken.
-
Craig Topper authored
-
Fangrui Song authored
-
Craig Topper authored
These instructions use the destination operand as a source, not only as a passthru for mask/tail.
-
Jonas Devlieghere authored
This reverts commit 930f6468 as it's failing on the Linux bots.
-
Craig Topper authored
-
jimingham authored
The idea behind the address-expression is that it handles all the common expressions that produce addresses. It handles actual valid expressions that return a scalar, and it handles useful cases that the various source languages don't support. At present, the fallback handles: <symbol_name>{+-}<offset> which isn't valid C but is very handy. This patch adds handling of: $<reg_name> and $<reg_name>{+-}<offset> That's kind of pointless in C because the C expression parser handles that expression already. But some languages don't have a straightforward way to represent register values like this (swift) so having this fallback is quite a quality of life improvement. I added a test which tests that I didn't mess up either of these fallbacks, though it doesn't test the actually handling of registers that I added, since the expression parser for C succeeds in that case and returns before this code gets run. I will add a test on the swift fork for that checks that this works the same way for a swift frame after this check. -
Eric authored
This reverts commit 0bbada93. The update of Clang in the CI broke due to the new LLVM version naming. It needs to look for the clang 18.1 package instead of 18. Since it couldn't find 18 it used 17 as fallback. This gives ODR violations which caused the output for the module test to be wrong. (It didn't crash which would be a lot more obvious to debug.) The clang-tidy selection was fixed by https://github.com/llvm/llvm-project/pull/81362. That patch also makes clang-19 work with clang-tidy-19 out of the box. The time-out have not been addressed; that is a CI issue and not an issue with this test. They run in 200-ish s so they are slow but far below the 1500s threshold. (Due to a dependency in this test it can't be split in multiple tests.)
-
Amir Ayupov authored
Provide secondary entry points for `EntryDiscriminator` call info field in YAML profile. Increases BAT section size to: - large binary: 39655300 bytes (1.03x the original), - medium binary: 3834328 bytes (0.65x), - small binary: 924 bytes (0.64x). Depends on: https://github.com/llvm/llvm-project/pull/76911 Test Plan: - Updated bolt-address-translation{,-yaml}.test - Added openssl test: https://github.com/rafaelauler/bolt-tests/pull/30 Reviewers: dcci, rafaelauler, maksfb, ayermolo Reviewed By: rafaelauler Pull Request: https://github.com/llvm/llvm-project/pull/86218
-
Nathan Lanza authored
This chunk of code currently runs only if the optimization mode is O3 AND the EnableGEPOpt flag is set. Given that this is the only use case for the EnableGEPOpt flag, the guarding against O3 is kinda pointless. IF the user wants to enable it then the flag should be sufficient. Reviewers: TNorthover, aeubanks Reviewed By: aeubanks Pull Request: https://github.com/llvm/llvm-project/pull/86588
-
Tom Stellard authored
This was inadvertently changed in 2120f574.
-
Farzon Lotfi authored
completes #86187 - fix hlsl_intrinsic to cover the correct cases - move to using `__builtin_elementwise_sqrt` - add lowering of `Intrinsic::sqrt` to dxilop 24.
-
Farzon Lotfi authored
Completes #83626 - `CGBuiltin.cpp` - modify `getDotProductIntrinsic` to be able to emit `dot2`, `dot3`, and `dot4` intrinsics based on element count - `IntrinsicsDirectX.td` - for floating point add `dot2`, `dot3`, and `dot4` inntrinsics -`DXIL.td` add dxilop intrinsic lowering for `dot2`, `dot3`, & `dot4`. - `DXILOpLowering.cpp` - add vector arg flattening for dot product. - `DXILOpBuilder.h` - modify `createDXILOpCall` to take a smallVector instead of an iterator - `DXILOpBuilder.cpp` - modify `createDXILOpCall` by moving the small vector up to the calling function in `DXILOpLowering.cpp`. - Moving one function up gives us access to the `CallInst` and `Function` which were needed to distinguish the dot product intrinsics and get the operands without using the iterator.
-
Jason Molenda authored
It is possible to gather code coverage in a firmware environment, where the __LLVM_COV segment will not be mapped in memory but does exist in the binary, see https://llvm.org/devmtg/2020-09/slides/PhippsAlan_EmbeddedCodeCoverage_LLVM_Conf_Talk_final.pdf The __LLVM_COV segment in the binary happens to be at the same address as the __DATA segment, so if lldb treats this segment as loaded, it shadows the __DATA segment and address->symbol resolution can fail. For these non-userland code cases, we need to mark __LLVM_COV as not a loadable segment. rdar://124475661
-
Krzysztof Parzyszek authored
/usr/bin/ld: CMakeFiles/ClangReplInterpreterTests.dir/InterpreterExtensi onsTest.cpp.o: undefined reference to symbol '_ZN4llvm14TargetRegistry12 lookupTargetENS_9StringRefERNSt7__cxx1112basic_stringIcSt11char_traitsIc ESaIcEEE' /usr/bin/ld: /work/kparzysz/git/llvm.org/b/x86/lib/libLLVMMC.so.19.0git: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status The missing symbol is `llvm::TargetRegistry::lookupTarget`, which interestingly enough is in MC. Add `MC` to the list of LLVM dependencies.
-
Jonas Devlieghere authored
This implements coalescing of progress events using a timeout, as discussed in the RFC on Discourse [1]. This PR consists of two commits which, depending on the feedback, I may split up into two PRs. For now, I think it's easier to review this as a whole. 1. The first commit introduces a new generic `Alarm` class. The class lets you to schedule a function (callback) to be executed after a given timeout expires. You can cancel and reset a callback before its corresponding timeout expires. It achieves this with the help of a worker thread that sleeps until the next timeout expires. The only guarantee it provides is that your function is called no sooner than the requested timeout. Because the callback is called directly from the worker thread, a long running callback could potentially block the worker thread. I intentionally kept the implementation as simple as possible while addressing the needs for the `ProgressManager` use case. If we want to rely on this somewhere else, we can reassess whether we need to address those limitations. 2. The second commit uses the Alarm class to coalesce progress events. To recap the Discourse discussion, when multiple progress events with the same title execute in close succession, they get broadcast as one to `eBroadcastBitProgressCategory`. The `ProgressManager` keeps track of the in-flight progress events and when the refcount hits zero, the Alarm class is used to schedule broadcasting the event. If a new progress event comes in before the alarm fires, the alarm is reset (and the process repeats when the new progress event ends). If no new event comes in before the timeout expires, the progress event is broadcast. [1] https://discourse.llvm.org/t/rfc-improve-lldb-progress-reporting/75717/
-
Andrei Golubev authored
Using range.size() "as is" means we accumulate 'size_t' values into 'int32_t' variable. This may produce narrowing conversion warnings (particularly, on MSVC). The surrounding code seems to cast <x>.size() to 'int32_t' so following this practice seems safe enough. Co-authored-by:Ovidiu Pintican <ovidiu.pintican@intel.com>
-
Kazu Hirata authored
This patch replaces: #if EXPENSIVE_CHECKS with: #ifdef EXPENSIVE_CHECKS to follow the existing conventions.
-
Eric authored
The OSS fuzz build has been broken for a while because of changes to the cmake configuration. This patch fixes the issues by defaulting to libunwind as the default runtime
-
Craig Topper authored
-
Cyndy Ishida authored
-
Chris B authored
PR #86242 introduced a copy-paste error that caused some tests to fail by mapping the wrong pass name to a pass. This resolves the issue and fixes the failing tests.
-
Kazu Hirata authored
There are two ways to create in-memory instances of IndexedAllocationInfo -- deserialization of the raw MemProf data and that of the indexed MemProf data. With: commit 74799f42 Author: Kazu Hirata <kazu@google.com> Date: Sat Mar 23 19:50:15 2024 -0700 we compute CallStackId for each call stack in IndexedAllocationInfo while deserializing the raw MemProf data. This patch does the same while deserilizing the indexed MemProf data. As with the patch above, this patch does not add any use of CallStackId yet.
-
Cyndy Ishida authored
-
Justin Fargnoli authored
-
Balaji V. Iyer authored
When the result is not a vectorType, there is an assert. This patch will do the check and bail when the result is not a VectorType.
-
Shilei Tian authored
This patch tries to fold `G_CTTZ` if possible.
-
Craig Topper authored
-
Philip Reames authored
This builds on the previously added absolute difference cases, and adds the reduction at the end. This is mostly interesting for examining impact of extend placement when changing the abdu lowering.
-
Philip Reames authored
Test copied from aarch64 with minimal adaption. We likely need addition coverage, but this is a reasonable starting point.
-
Joseph Huber authored
Summary: This patch factors common functions out of the `Plugin` interface prior to its removal in a future patch. This simply temporarily renames it to `PluginTy` so that we could re-use `Plugin::check` internally as this needs to be defined statically per plugin now. We can refactor this later. The future patch will delete `PluginTy` and `PluginTy::get` entirely. This simply tries to minimize a few changes to make it easier to land.
-
Jeffrey Byrnes authored
[AMDGPU] Use correct VGPR threshold for flagging ExcessRP regions in unified register file case (#85860) `ST.getMaxNumVGPRs(MF)` lowers to `AMDGPUBaseInfo.cpp:getTotalNumVGPRs` which returns 512 for gfx90a. This is subsequently limited by `AMDGPUBaseInfo:getAddressableNumVGPRs()`, which also returns 512 for gfx90a. The ISA states we can have a total of 512 registers, but a maximum of only 256 of each of AGPR and VGPR (gfx90a 3.6.4). Therefore, in unified register file case, `ST.getMaxNumVGPRs(MF)` calculates the maximum number of combined VGPR + AGPR. But, it is currently used as the limit for accvgpr and as the limit for archvgpr. This patch uses it as the combined limit, and accounts for the maximum addressable arch/acc VGPRs when calculating the per RegClass limits. It is not unreasonable to think other clients of getTotalNumVGPRs are using it in the wrong way.
-
Christian Sigg authored
-
Cyndy Ishida authored
This reverts commit b7d8c618. And This reverts commit 2d40f179. It caused a build failure i'll need to reproduce. ` error: could not convert ‘Rule’ from ‘llvm::Regex’ to ‘llvm::Expected<llvm::Regex>’`
-
Craig Topper authored
Ternary operations cannot have a merge op in addition to their 3 sources so there is no need for this option.
-
Keith Smiley authored
This target doesn't build on macOS (even with the upstream make based build system) so this encodes that in the build without requiring non-linux users to disable it manually with the starlark flag. The flag is still respected for linux users.
-