This is an archive of the discontinued LLVM Phabricator instance.

[ARM][RDA] add getUniqueReachingMIDef
ClosedPublic

Authored by samparker on Feb 14 2020, 5:01 AM.

Details

Summary

Add getUniqueReachingMIDef to RDA which performs a global search for a machine instruction that produces a unique definition of a given register at a given point. Also add two helper functions (getMIOperand) that wrap around this functionality to get the incoming definition uses of a given instruction. These now replaces the uses of getReachingMIDef in ARMLowOverheadLoops. getReachingMIDef has been renamed to getReachingLocalMIDef and has been made private along with getInstFromId.

Diff Detail

Event Timeline

samparker created this revision.Feb 14 2020, 5:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2020, 5:01 AM
samparker updated this revision to Diff 245653.Feb 20 2020, 7:13 AM
samparker edited the summary of this revision. (Show Details)
  • Rebased after committing some changes under an NFC.
  • Added two getMIOperand methods.
SjoerdMeijer added inline comments.Feb 26 2020, 12:54 AM
llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
155

Incoming -> Defs?

222

This function already exists. Why this change?

llvm/lib/CodeGen/ReachingDefAnalysis.cpp
337

nit: use shorter notation?

if (InstIds[LocalDef] < InstIds[MI])
samparker marked 2 inline comments as done.Feb 26 2020, 1:26 AM
samparker added inline comments.
llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
222

Just making it private.

llvm/lib/CodeGen/ReachingDefAnalysis.cpp
337

Can't use that notation in a const method.

SjoerdMeijer accepted this revision.Feb 26 2020, 1:42 AM

LGTM

llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
222

Ah, okay, thanks, missed that.

llvm/lib/CodeGen/ReachingDefAnalysis.cpp
337

Cheers, missed that too

This revision is now accepted and ready to land.Feb 26 2020, 1:42 AM
This revision was automatically updated to reflect the committed changes.