summaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-split/llvm-split.cpp
AgeCommit message (Collapse)Author
2025-09-09MC: Use Triple form of lookupTarget in more places (#157591)Matt Arsenault
2025-08-05[offload][SYCL] Add Module splitting by categories. (#131347)Maksim Sabianin
This patch adds Module splitting by categories. The splitting algorithm is the necessary step in the SYCL compilation pipeline. Also it could be reused for other heterogenous targets. The previous attempt was at #119713. In this patch there is no dependency in `TransformUtils` on "IPO" and on "Printing Passes". In this patch a module splitting is self-contained and it doesn't introduce linking issues.
2025-03-12[TargetRegistry] Accept Triple in createTargetMachine() (NFC) (#130940)Nikita Popov
This avoids doing a Triple -> std::string -> Triple round trip in lots of places, now that the Module stores a Triple.
2025-03-11Revert "[offload][SYCL] Add SYCL Module splitting (#119713)"Joseph Huber
This reverts commit bfeea10460d155d9b3484bed25b5dc60a9755c90.
2025-03-11[offload][SYCL] Add SYCL Module splitting (#119713)Maksim Sabianin
This patch adds SYCL Module splitting - the necessary step in the SYCL compilation pipeline. Only 2 splitting modes are being added in this patch: by kernel and by source.
2024-12-17[llvm-split][nfc] Harmonize help and error message (#120062)serge-sans-paille
Somme error / help message refer to options with a single dash while help refer to options with a double dash.
2024-07-03[llvm][transforms] Add a new algorithm to SplitModule (#95941)Ilia Sergachev
The new round-robin algorithm overrides the hash-based distribution of functions to modules. It achieves a more even number of functions per module when the number of functions is close to the number of requested modules. It's not in use by default and is available under a new flag.
2024-04-22[llvm-split] Correctly deallocate TargetMachinepvanhout
Should fix the ASAN error.
2024-04-22[LTO] Allow target-specific module splittting (#83128)Pierre van Houtryve
Allow targets to implement custom module splitting logic for --lto-partitions, see #89245 https://discourse.llvm.org/t/rfc-lto-target-specific-module-splittting/77252
2022-01-21[llvm] Cleanup header dependencies in ADT and Supportserge-sans-paille
The cleanup was manual, but assisted by "include-what-you-use". It consists in 1. Removing unused forward declaration. No impact expected. 2. Removing unused headers in .cpp files. No impact expected. 3. Removing unused headers in .h files. This removes implicit dependencies and is generally considered a good thing, but this may break downstream builds. I've updated llvm, clang, lld, lldb and mlir deps, and included a list of the modification in the second part of the commit. 4. Replacing header inclusion by forward declaration. This has the same impact as 3. Notable changes: - llvm/Support/TargetParser.h no longer includes llvm/Support/AArch64TargetParser.h nor llvm/Support/ARMTargetParser.h - llvm/Support/TypeSize.h no longer includes llvm/Support/WithColor.h - llvm/Support/YAMLTraits.h no longer includes llvm/Support/Regex.h - llvm/ADT/SmallVector.h no longer includes llvm/Support/MemAlloc.h nor llvm/Support/ErrorHandling.h You may need to add some of these headers in your compilation units, if needs be. As an hint to the impact of the cleanup, running clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l before: 8000919 lines after: 7917500 lines Reduced dependencies also helps incremental rebuilds and is more ccache friendly, something not shown by the above metric :-) Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831
2021-07-22[llvm][tools] Hide remaining unrelated llvm- tool optionsTimm Bäder
Differential Revision: https://reviews.llvm.org/D106430
2021-01-29[LTO] Update splitCodeGen to take a reference to the module. (NFC)Florian Hahn
splitCodeGen does not need to take ownership of the module, as it currently clones the original module for each split operation. There is an ~4 year old fixme to change that, but until this is addressed, the function can just take a reference to the module. This makes the transition of LTOCodeGenerator to use LTOBackend a bit easier, because under some circumstances, LTOCodeGenerator needs to write the original module back after codegen. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D95222
2020-05-18Fix several places that were calling verifyFunction or verifyModule without ↵Craig Topper
checking the return value. verifyFunction/verifyModule don't assert or error internally. They also don't print anything if you don't pass a raw_ostream to them. So the caller needs to check the result and ideally pass a stream to get the messages. Otherwise they're just really expensive no-ops. I've filed PR45965 for another instance in SLPVectorizer that causes a lit test failure. Differential Revision: https://reviews.llvm.org/D80106
2019-08-05Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFCFangrui Song
F_{None,Text,Append} are kept for compatibility since r334221. llvm-svn: 367800
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-02-14Pass a reference to a module to the bitcode writer.Rafael Espindola
This simplifies most callers as they are already using references or std::unique_ptr. llvm-svn: 325155
2017-09-23[Support] Rename tool_output_file to ToolOutputFile, NFCReid Kleckner
This class isn't similar to anything from the STL, so it shouldn't use the STL naming conventions. llvm-svn: 314050
2016-11-11Split Bitcode/ReaderWriter.h into separate reader and writer headersTeresa Johnson
Summary: Split ReaderWriter.h which contains the APIs into both the BitReader and BitWriter libraries into BitcodeReader.h and BitcodeWriter.h. This is to address Chandler's concern about sharing the same API header between multiple libraries (BitReader and BitWriter). That concern is why we create a single bitcode library in our downstream build of clang, which led to r286297 being reverted as it added a dependency that created a cycle only when there is a single bitcode library (not two as in upstream). Reviewers: mehdi_amini Subscribers: dlj, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D26502 llvm-svn: 286566
2016-04-14Remove every uses of getGlobalContext() in LLVM (but the C API)Mehdi Amini
At the same time, fixes InstructionsTest::CastInst unittest: yes you can leave the IR in an invalid state and exit when you don't destroy the context (like the global one), no longer now. This is the first part of http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266379
2016-03-28Remove personality for declarations in CloneModule.Evgeniy Stepanov
Personality is copied as part of copyFunctionAttributes, but it is invalid on a declaration. Remove the personality attribute it the function body is not cloned. Also add a verifier run over output modules in the llvm-split tool. llvm-svn: 264667
2016-01-18 Add to the split module utility an SCC based method which allows not to ↵Sergei Larin
globalize any local variables. Summary: Currently llvm::SplitModule as the first step globalizes all local objects, which might not be desirable in some scenarios. This change adds a new flag to llvm::SplitModule that uses SCC approach to search for a balanced partition without the need to externalize symbols. Such partition might not be possible or fully balanced for a given number of partitions, and is a function of the module properties (global/local dependencies within the module). Joint development Tobias Edler von Koch (tobias@codeaurora.org) and Sergei Larin (slarin@codeaurora.org) Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D16124 llvm-svn: 258083
2015-08-21TransformUtils: Introduce module splitter.Peter Collingbourne
The module splitter splits a module into linkable partitions. It will be used to implement parallel LTO code generation. This initial version of the splitter does not attempt to deal with the somewhat subtle symbol visibility issues around module splitting. These will be dealt with in a future change. Differential Revision: http://reviews.llvm.org/D12132 llvm-svn: 245662