[llvm] [GlobalISel] Refactor extractParts() (PR #75223)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 13 01:37:55 PST 2024
================
@@ -247,6 +248,24 @@ MachineInstr *getDefIgnoringCopies(Register Reg,
/// Also walks through hints such as G_ASSERT_ZEXT.
Register getSrcRegIgnoringCopies(Register Reg, const MachineRegisterInfo &MRI);
+/// Helper function to split a wide generic register into bitwise blocks with
+/// the given Type (which implies the number of blocks needed). The generic
+/// registers created are appended to Ops, starting at bit 0 of Reg.
+void extractParts(Register Reg, LLT Ty, int NumParts,
+ SmallVectorImpl<Register> &VRegs,
+ MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI);
----------------
s-barannikov wrote:
nit: There is in-class `MachineIRBuidler::getMRI()`, no need to pass `MRI`.
https://github.com/llvm/llvm-project/pull/75223
More information about the llvm-commits
mailing list