summaryrefslogtreecommitdiff
path: root/llvm/utils
AgeCommit message (Collapse)Author
2025-11-23[TableGen] Remove unnecessary use of MVT::SimpleTy. NFCHEADmainCraig Topper
This was missed in 0ef522ff68fff4266bf85e7b7a507a16a8fd34ee
2025-11-22[TableGen] Use MVT instead of MVT::SimpleValueType. NFC (#169180)Craig Topper
This improves type safety and is less verbose. Use SimpleTy only where an integer is needed like switches or emitting a VBR. --------- Co-authored-by: Sergei Barannikov <barannikov88@gmail.com>
2025-11-23[TableGen] Constify CodeGenInstruction where possible (NFC) (#169193)Sergei Barannikov
2025-11-22[llvm] Remove unused local variables (NFC) (#169171)Kazu Hirata
Identified with bugprone-unused-local-non-trivial-variable.
2025-11-21[NFC][LLDB] Make it possible to detect if the compiler used in tests ↵Dan Liew
supports -fbounds-safety (#169112) This patch makes it possible to detect in LLDB shell and API tests if `-fbounds-safety` is supported by the compiler used for testing. The motivation behind this is to allow upstreaming https://github.com/swiftlang/llvm-project/pull/11835 but with the tests disabled in upstream because the full implementation of -fbounds-safety isn't available in Clang yet. For shell tests when -fbounds-safety is available the `clang-bounds-safety` feature is available which means tests can be annotated with `# REQUIRES: clang-bounds-safety`. API tests that need -fbounds-safety support in the compiler can use the new `@skipUnlessBoundsSafety` decorator. rdar://165225507
2025-11-21[OpenMP] Introduce "loop sequence" as directive association (#168934)Krzysztof Parzyszek
OpenMP 6.0 introduced a `fuse` directive, and with it a "loop sequence" as the associated code. What used to be "loop association" has become "loop-nest association". Rename Association::Loop to LoopNest, add Association::LoopSeq to represent the "loop sequence" association. Change the association of fuse from "block" to "loop sequence".
2025-11-20[gn] port c9f573463ebd (TargetLibraryInfo.inc)Nico Weber
2025-11-19[lit] Add LIT_CURRENT_TESTCASE environment variable when running tests (#168762)Andrew Haberlandt
I'm not aware of any way for `%run` wrapper scripts like `iosssim_run.py` ([ref](https://github.com/llvm/llvm-project/blob/d2c7c6064259320def7a74e111079725958697d4/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py#L4)) to know what testcase they are currently running. This can be useful if these wrappers need to create a (potentially remote) temporary directory for each test case. This adds the `LIT_CURRENT_TESTCASE` environment variable to both the internal shell and the external shell, containing the full name of the current test being run.
2025-11-19[NFC][TableGen] Use `IfGuardEmitter` in CallingConvEmitter (#168763)Rahul Joshi
Use `IfGuardEmitter` in CallingConvEmitter. Additionally refactor the code a bit to extract duplicated code to emit the CC function prototype into a helper function.
2025-11-19[Analysis] Move TargetLibraryInfo data to TableGen (#165009)Kai Nacke
The collection of library function names in TargetLibraryInfo faces similar challenges as RuntimeLibCalls in the IR component. The number of function names is large, there are numerous customizations based on the triple (including alternate names), and there is a lot of replicated data in the signature table. The ultimate goal would be to capture all lbrary function related information in a .td file. This PR brings the current .def file to TableGen, almost as a 1:1 replacement. However, there are some improvements which are not possible in the current implementation: - the function names are now stored as a long string together with an offset table. - the table of signatures is now deduplicated, using an offset table for access. The size of the object file decreases about 34kB with these changes. The hash table of all function names is still constructed dynamically. A static table like for RuntimeLibCalls is the next logical step. The main motivation for this change is that I have to add a large number of custom names for z/OS (like in RuntimeLibCalls.td), and the current infrastructur does not support this very well.
2025-11-19[gn build] Port 8fce476c8122LLVM GN Syncbot
2025-11-19[gn] port 0ae2bccde45 moreNico Weber
2025-11-19[TableGen] Use size_t for SubRegIndicesSize (NFC) (#168728)Kazu Hirata
This patch changes the type of SubRegIndicesSize to size_t. The original type deduced for "auto" is a signed type, but size_t, an unsigned type, is safe here according to the usage.
2025-11-19[gn] port e47e9f3b7b136 (nvptx SDNodeInfo)Nico Weber
2025-11-19[gn] port 0ae2bccde45 (arm SDNodeInfo)Nico Weber
2025-11-19[gn] port 2675dcd72d02ee1ac (lldb-server PlatformOptions.inc)Nico Weber
2025-11-19[gn] port 22a2cae5d6735 (AttrIsTypeDependent.inc)Nico Weber
2025-11-19[NFC][lldb] move DiagnosticsRendering to Host (#168696)Charles Zablit
NFC patch which moves `DiagnosticsRendering` from `Utility` to `Host`. This refactoring is needed for https://github.com/llvm/llvm-project/pull/168603. It adds a method to check whether the current terminal supports Unicode or not. This will be OS dependent and a better fit for `Host`. Since `Utility` cannot depend on `Host`, `DiagnosticsRendering` must live in `Host` instead.
2025-11-19[gn] port c62fc065b4c1Nico Weber
2025-11-19[gn] "port" 5efce7392f3f (arm 32-bit asm compiler-rt)Nico Weber
2025-11-19[NFC][TableGen] Add IfGuardEmitter and adopt it in InstrInfoEmitter (#168616)Rahul Joshi
Add a RAII `IfGuardEmitter` to insert simple #if guards and adopt it in InstrInfoEmitter.
2025-11-19[llvm] Use llvm::size (NFC) (#168675)Kazu Hirata
Note that llvm::size only works on types that allow std::distance in O(1).
2025-11-19[ORC] Remove now unused EPCDebugObjectRegistrar (NFC) (#167868)Stefan Gränitz
EPCDebugObjectRegistrar is unused now that the ELF debugger support plugin uses AllocActions https://github.com/llvm/llvm-project/pull/167866
2025-11-18Exclude from profcheck a vplan test under phase ordering (#168669)Mircea Trofin
2025-11-19[TableGen] Silence a warning (NFC)Jie Fu
/llvm-project/llvm/utils/TableGen/Common/CodeGenTarget.cpp:286:12: error: variable 'SkippedInsts' set but not used [-Werror,-Wunused-but-set-variable] unsigned SkippedInsts = 0; ^ 1 error generated.
2025-11-19TableGen: Support target specialized pseudoinstructions (#159880)Matt Arsenault
Allow a target to steal the definition of a generic pseudoinstruction and remap the operands. This works by defining a new instruction, which will simply swap out the emitted entry in the InstrInfo table. This is intended to eliminate the C++ half of the implementation of PointerLikeRegClass. With RegClassByHwMode, the remaining usecase for PointerLikeRegClass are the common codegen pseudoinstructions. Every target maintains its own copy of the generic pseudo operand definitions anyway, so we can stub out the register operands with an appropriate class instead of waiting for runtime resolution. In the future we could probably take this a bit further. For example, there is a similar problem for ADJCALLSTACKUP/DOWN since they depend on target register definitions for the stack pointer register.
2025-11-18[NFC][TableGen] Adopt CodeGenHelpers in CodeGenMapTable (#168592)Rahul Joshi
Adopt `IfDefEmitter` and `NamespaceEmitter` in CodeGenMapTable.cpp
2025-11-18[NFC][TableGen] Remove `close` member from various CodeGenHelpers (#167904)Rahul Joshi
Always rely on local scopes to enforce the lifetime of these helper objects and by extension where the "closing" of various C++ code constructs happens.
2025-11-18[TableGen][NFCI] Change TableGenMain() to take function_ref. (#167888)Ivan Kosarev
It was switched from a function pointer to std::function in TableGen: Make 2nd arg MainFn of TableGenMain(argv0, MainFn) optional. f675ec6165ab6add5e57cd43a2e9fa1a9bc21d81 but there's no mention of any particular reason for that.
2025-11-18[CMake] Declare all parts of *GenRegisterInfo.inc as outputs. (#168405)Ivan Kosarev
This tells the build system to check and regenerate the *GenRegisterInfo*.inc files, should any of them be missing for whatever reason. A follow-up from <https://github.com/llvm/llvm-project/pull/167700>.
2025-11-18Extend MemoryEffects to Support Target-Specific Memory Locations (#148650)CarolineConcatto
This patch introduces preliminary support for additional memory locations. They are: target_mem0 and target_mem1 and they model memory locations that cannot be represented with existing memory locations. It was a solution suggested in : https://discourse.llvm.org/t/rfc-improving-fpmr-handling-for-fp8-intrinsics-in-llvm/86868/6 Currently, these locations are not yet target-specific. The goal is to enable the compiler to express read/write effects on these resources.
2025-11-18[gn build] Port 3ce893f83450LLVM GN Syncbot
2025-11-18[gn build] PortLLVM GN Syncbot
2025-11-18[ORC] Move DebugObjectManagerPlugin into Debugging/ELFDebugObjectPlugin ↵Stefan Gränitz
(NFC) (#168343) In 4 years the plugin wasn't adapted to other object formats. This patch makes it specific for ELF, which will allow to remove some abstractions down the line. It also moves the plugin from LLVMOrcJIT into LLVMOrcDebugging, which didn't exist back then.
2025-11-18[gn build] Port 17f0afe40ae8LLVM GN Syncbot
2025-11-18[gn build] Port 49d5bb0ad0cbLLVM GN Syncbot
2025-11-18[gn build] Port 472e4ab0b02dLLVM GN Syncbot
2025-11-18[gn build] Port 1425d75c7116LLVM GN Syncbot
2025-11-17[gn] port 320c18a066b29 (systemz SDNodeInfo)Nico Weber
2025-11-17[gn] port 43dacd07f660064 (ppc SDNodeInfo)Nico Weber
2025-11-17[gn] port 900c51791979 (amdgpu SDNodeInfo)Nico Weber
2025-11-17[LLVM-Tablegen] Pretty Printing Arguments in LLVM Intrinsics (#162629)Dharuni R Acharya
This patch adds LLVM infrastructure to support pretty printing of the intrinsic arguments. The motivation is to improve the readability of LLVM intrinsics and facilitate easy modifications and debugging of LLVM IR. This feature adds a property `ArgInfo<ArgIndex, [ArgName<"argName">, ImmArgPrinter<"functionName">]>` to the intrinsic arguments to print self-explanatory inline comments for the arguments. The addition of pretty print support can provide a simple, low-overhead feature that enhances the usability of LLVM intrinsics without disrupting existing workflows. Link to the RFC, where this feature was discussed: https://discourse.llvm.org/t/rfc-pretty-printing-immediate-arguments-in-llvm-intrinsics/88536 --------- Signed-off-by: Dharuni R Acharya <dharunira@nvidia.com> Co-authored-by: Rahul Joshi <rjoshi@nvidia.com>
2025-11-16[gn build] Port 8b55d774631bLLVM GN Syncbot
2025-11-16[SelectionDAG] Verify SDTCisVT and SDTCVecEltisVT constraints (#150125)Sergei Barannikov
Teach `SDNodeInfoEmitter` TableGen backend to process `SDTypeConstraint` records and emit tables for them. The tables are used by `SDNodeInfo::verifyNode()` to validate a node being created. This PR only adds validation code for `SDTCisVT` and `SDTCVecEltisVT` constraints to keep it smaller. Pull Request: https://github.com/llvm/llvm-project/pull/150125
2025-11-16[gn build] Port 17408f70d1bfLLVM GN Syncbot
2025-11-14[gn] Let tablegen() add root_build_dir to include search pathNico Weber
See https://github.com/llvm/llvm-project/pull/167700#issuecomment-3535440851
2025-11-14[gn] port c29b29bb6a7f (_LIBCPP_ASSERTION_SEMANTIC_DEFAULT)Nico Weber
2025-11-14RuntimeLibcalls: Move VectorLibrary handling into TargetOptions (#167996)Matt Arsenault
This fixes the -fveclib flag getting lost on its way to the backend. Previously this was its own cl::opt with a random boolean. Move the flag handling into CommandFlags with other backend ABI-ish options, and have clang directly set it, rather than forcing it to go through command line parsing. Prior to de68181d7f, codegen used TargetLibraryInfo to find the vector function. Clang has special handling for TargetLibraryInfo, where it would directly construct one with the vector library in the pass pipeline. RuntimeLibcallsInfo currently is not used as an analysis in codegen, and needs to know the vector library when constructed. RuntimeLibraryAnalysis could follow the same trick that TargetLibraryInfo is using in the future, but a lot more boilerplate changes are needed to thread that analysis through codegen. Ideally this would come from an IR module flag, and nothing would be in TargetOptions. For now, it's better for all of these sorts of controls to be consistent.
2025-11-14[utils] don't warn when setting rlimit fails on Solaris (#167921)Henrik G. Olsson
Solaris doesn't define RLIMIT_NPROC, so this is expected to fail there. This fixes a test failure in llvm/utils/lit/tests/verbosity.py on Solaris due to this unexpected warning being included in the lit output.
2025-11-14[TableGen] Split *GenRegisterInfo.inc. (#167700)Ivan Kosarev
Reduces memory usage compiling backend sources, most notably for AMDGPU by ~98 MB per source on average. AMDGPUGenRegisterInfo.inc is tens of megabytes in size now, and is even larger downstream. At the same time, it is included in nearly all backend sources, typically just for a small portion of its content, resulting in compilation being unnecessarily memory-hungry, which in turn stresses buildbots and wastes their resources. Splitting .inc files also helps avoiding extra ccache misses where changes in .td files don't cause changes in all parts of what previously was a single .inc file. It is thought that rather than building on top of the current single-output-file design of TableGen, e.g., using `split-file`, it would be more preferable to recognise the need for multi-file outputs and give it a proper first-class support directly in TableGen.