[llvm] [AArch64][GlobalISel] Split offsets of consecutive stores to aid STP … (PR #66980)
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 09:00:50 PDT 2023
================
@@ -492,7 +510,191 @@ bool AArch64PostLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
F.hasMinSize());
AArch64PostLegalizerCombinerImpl Impl(MF, CInfo, TPC, *KB, CSEInfo,
RuleConfig, ST, MDT, LI);
- return Impl.combineMachineInstrs();
+ bool Changed = Impl.combineMachineInstrs();
+
+ auto MIB = CSEMIRBuilder(MF);
+ MIB.setCSEInfo(CSEInfo);
+ Changed |= optimizeConsecutiveMemOpAddressing(MF, MIB);
+ return Changed;
+}
+
+bool AArch64PostLegalizerCombiner::tryOptimizeConsecStores(
+ SmallVectorImpl<StoreInfo> &Stores, CSEMIRBuilder &MIB) {
+ if (Stores.size() <= 2)
+ return false;
+
----------------
jroelofs wrote:
Do we need checks for `volatile`, or do we not care since this pass is only touching the pointers + offsets?
https://github.com/llvm/llvm-project/pull/66980
More information about the llvm-commits
mailing list