[PATCH] D109131: [GlobalISel] Add a store-merging optimization pass and enable for AArch64.
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 2 11:12:56 PDT 2021
paquette added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp:157
+
+ if (Base0Def->getOpcode() == TargetOpcode::G_FRAME_INDEX) {
+ if (Base1Def->getOpcode() == TargetOpcode::G_FRAME_INDEX) {
----------------
Will there ever be a combination of opcodes where `Base0Def->getOpcode() != Base1Def->getOpcode()`?
Would it be simpler to check something like...
```
unsigned Opc = Base0Def->getOpcode();
if (Opc != Base1Def->getOpcode())
return false;
if (Opc == TargetOpcode::G_FRAME_INDEX)
...
```
?
================
Comment at: llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp:403
+ Builder.buildStore(WideReg, Stores[0]->getPointerReg(), *WideMMO);
+ LLVM_DEBUG(dbgs() << "Created merged store: " << *NewStore);
+ NumStoresMerged += Stores.size();
----------------
Wonder if we should actually have remarks for these as well? IIRC people sometimes want remarks from SDAG. Maybe this is something we can improve on with GISel.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109131/new/
https://reviews.llvm.org/D109131
More information about the llvm-commits
mailing list