[llvm] 7ad879c - [NFC][RDA] typedef SmallPtrSetImpl<MachineInstr*>
Sam Parker via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 05:16:52 PST 2020
Author: Sam Parker
Date: 2020-01-28T13:15:44Z
New Revision: 7ad879caa052f84f323d505aadf078eb806d6de3
URL: https://github.com/llvm/llvm-project/commit/7ad879caa052f84f323d505aadf078eb806d6de3
DIFF: https://github.com/llvm/llvm-project/commit/7ad879caa052f84f323d505aadf078eb806d6de3.diff
LOG: [NFC][RDA] typedef SmallPtrSetImpl<MachineInstr*>
Added:
Modified:
llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
llvm/lib/CodeGen/ReachingDefAnalysis.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/ReachingDefAnalysis.h b/llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
index 465709617460..0e13c71c0975 100644
--- a/llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
+++ b/llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
@@ -70,6 +70,8 @@ class ReachingDefAnalysis : public MachineFunctionPass {
/// Default values are 'nothing happened a long time ago'.
const int ReachingDefDefaultVal = -(1 << 20);
+ using InstSet = SmallPtrSetImpl<MachineInstr*>;
+
public:
static char ID; // Pass identification, replacement for typeid
@@ -126,18 +128,18 @@ class ReachingDefAnalysis : public MachineFunctionPass {
/// Provides the uses, in the same block as MI, of register that MI defines.
/// This does not consider live-outs.
void getReachingLocalUses(MachineInstr *MI, int PhysReg,
- SmallPtrSetImpl<MachineInstr*> &Uses) const;
+ InstSet &Uses) const;
/// For the given block, collect the instructions that use the live-in
/// value of the provided register. Return whether the value is still
/// live on exit.
bool getLiveInUses(MachineBasicBlock *MBB, int PhysReg,
- SmallPtrSetImpl<MachineInstr*> &Uses) const;
+ InstSet &Uses) const;
/// Collect the users of the value stored in PhysReg, which is defined
/// by MI.
void getGlobalUses(MachineInstr *MI, int PhysReg,
- SmallPtrSetImpl<MachineInstr*> &Uses) const;
+ InstSet &Uses) const;
private:
/// Set up LiveRegs by merging predecessor live-out values.
diff --git a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
index b08e6e570256..e21df328be89 100644
--- a/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
+++ b/llvm/lib/CodeGen/ReachingDefAnalysis.cpp
@@ -227,7 +227,7 @@ ReachingDefAnalysis::getClearance(MachineInstr *MI, MCPhysReg PhysReg) const {
}
void ReachingDefAnalysis::getReachingLocalUses(MachineInstr *Def, int PhysReg,
- SmallPtrSetImpl<MachineInstr*> &Uses) const {
+ InstSet &Uses) const {
MachineBasicBlock *MBB = Def->getParent();
MachineBasicBlock::iterator MI = MachineBasicBlock::iterator(Def);
while (++MI != MBB->end()) {
@@ -252,7 +252,7 @@ void ReachingDefAnalysis::getReachingLocalUses(MachineInstr *Def, int PhysReg,
bool
ReachingDefAnalysis::getLiveInUses(MachineBasicBlock *MBB, int PhysReg,
- SmallPtrSetImpl<MachineInstr*> &Uses) const {
+ InstSet &Uses) const {
for (auto &MI : *MBB) {
if (MI.isDebugInstr())
continue;
@@ -269,7 +269,7 @@ ReachingDefAnalysis::getLiveInUses(MachineBasicBlock *MBB, int PhysReg,
void
ReachingDefAnalysis::getGlobalUses(MachineInstr *MI, int PhysReg,
- SmallPtrSetImpl<MachineInstr*> &Uses) const {
+ InstSet &Uses) const {
MachineBasicBlock *MBB = MI->getParent();
// Collect the uses that each def touches within the block.
More information about the llvm-commits
mailing list