summaryrefslogtreecommitdiff
path: root/llvm/unittests/CodeGen/MachineDomTreeUpdaterTest.cpp
AgeCommit message (Collapse)Author
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.
2024-11-14Overhaul the TargetMachine and LLVMTargetMachine Classes (#111234)Matin Raayai
Following discussions in #110443, and the following earlier discussions in https://lists.llvm.org/pipermail/llvm-dev/2017-October/117907.html, https://reviews.llvm.org/D38482, https://reviews.llvm.org/D38489, this PR attempts to overhaul the `TargetMachine` and `LLVMTargetMachine` interface classes. More specifically: 1. Makes `TargetMachine` the only class implemented under `TargetMachine.h` in the `Target` library. 2. `TargetMachine` contains target-specific interface functions that relate to IR/CodeGen/MC constructs, whereas before (at least on paper) it was supposed to have only IR/MC constructs. Any Target that doesn't want to use the independent code generator simply does not implement them, and returns either `false` or `nullptr`. 3. Renames `LLVMTargetMachine` to `CodeGenCommonTMImpl`. This renaming aims to make the purpose of `LLVMTargetMachine` clearer. Its interface was moved under the CodeGen library, to further emphasis its usage in Targets that use CodeGen directly. 4. Makes `TargetMachine` the only interface used across LLVM and its projects. With these changes, `CodeGenCommonTMImpl` is simply a set of shared function implementations of `TargetMachine`, and CodeGen users don't need to static cast to `LLVMTargetMachine` every time they need a CodeGen-specific feature of the `TargetMachine`. 5. More importantly, does not change any requirements regarding library linking. cc @arsenm @aeubanks
2024-08-26[NFC] Remove unused argument (FuncName) for parseMIR (#106144)Kyungwoo Lee
While working on a MIR unittest, I noticed that parseMIR includes an unused argument that sets a function name. This is not only redundant but also irrelevant, as parseMIR is designed to parse entire module, not specific functions, even though most unittests contain a single function per module. To streamline the API, I have removed this unnecessary argument from parseMIR. However, if this argument was originally included to enhance readability or for any other purpose, please let me know.
2024-06-29[IRBuilder] Don't include Module.h (NFC) (#97159)Nikita Popov
This used to be necessary to fetch the DataLayout, but isn't anymore.
2024-06-29[DomTreeUpdater] Fix use after free in unittests (#97133)paperchalice
In #96851, the unit test contains use after free, which triggers sanitizer error. Fix https://lab.llvm.org/buildbot/#/builders/169/builds/490
2024-06-28Reapply "[CodeGen] Introduce `MachineDomTreeUpdater`" (#96846) (#96851)paperchalice
This reverts commit 0f8849349ae3d3f2f537ad6ab233a586fb39d375. Resolve conflict in `MachinePostDominators.h` There is a conflict after merging #96378, resolved in #96852. Both PRs modified `MachinePostDominators.h` and triggered build failure.
2024-06-27Revert "[CodeGen] Introduce `MachineDomTreeUpdater`" (#96846)paperchalice
Reverts llvm/llvm-project#95369 Many build bots failed
2024-06-27[CodeGen] Introduce `MachineDomTreeUpdater` (#95369)paperchalice
This commit converts most of `DomTreeUpdater` into `GenericDomTreeUpdater` class template, so IR and MIR can reuse some codes. There are some differences between interfaces of `BasicBlock` and `MachineBasicBlock`, so subclasses still need to implement some functions, like `forceFlushDeletedBB`.