[PATCH] D74605: [ARM][RDA] add getUniqueReachingMIDef

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 01:59:55 PST 2020


SjoerdMeijer accepted this revision.
SjoerdMeijer added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/include/llvm/CodeGen/ReachingDefAnalysis.h:222
+  /// nullptr if the id does not refer to the block.
+  MachineInstr *getInstFromId(MachineBasicBlock *MBB, int InstId) const;
+
----------------
samparker wrote:
> SjoerdMeijer wrote:
> > This function already exists. Why this change? 
> Just making it private.
Ah, okay, thanks, missed that.


================
Comment at: llvm/lib/CodeGen/ReachingDefAnalysis.cpp:337
+  MachineInstr *LocalDef = getReachingLocalMIDef(MI, PhysReg);
+  if (InstIds.lookup(LocalDef) < InstIds.lookup(MI))
+    return LocalDef;
----------------
samparker wrote:
> SjoerdMeijer wrote:
> > nit: use shorter notation?
> > 
> >    if (InstIds[LocalDef] < InstIds[MI])
> Can't use that notation in a const method. 
Cheers, missed that too


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74605/new/

https://reviews.llvm.org/D74605





More information about the llvm-commits mailing list