[PATCH] D49196: [llvm-mca][BtVer2] teach how to identify false dependencies on partially written registers.
Andrea Di Biagio via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 12 03:49:03 PDT 2018
andreadb added inline comments.
================
Comment at: tools/llvm-mca/RegisterFile.cpp:99
+ RegisterRenamingInfo &OtherEntry = RegisterMappings[*I].second;
+ if (!OtherEntry.IndexPlusCost.first &&
+ (!OtherEntry.RenameAs ||
----------------
mattd wrote:
> We should note that index 0 is a special case, and probably have a similar comment in RegisterFile.h where IndexPlusCostPairTy is declared.
This is already explained in a couple of places in RegisterFile.h.
See the comments on field `RegisterFiles`, and type `RegisterMapping`.
If possible, I prefer not to add another comment about it.
================
Comment at: tools/llvm-mca/RegisterFile.cpp:243
for (MCSuperRegIterator I(RegID, &MRI); I.isValid(); ++I) {
- WR = RegisterMappings[*I].first;
- if (WR.getWriteState() == &WS)
- WR.invalidate();
+ WriteRef &OtherWR = RegisterMappings[*I].first;
+ if (OtherWR.getWriteState() == &WS)
----------------
mattd wrote:
> This block looks duplicated from line 233 above. It looks like we will invalidate the supers of RegID twice if WS are clearing super regs.
The previous block is invalidating sub-registers of RegID.
This block invalidates super-registers of RegID. So, we cannot remove it.
https://reviews.llvm.org/D49196
More information about the llvm-commits
mailing list