LLVM: lib/CodeGen/MIRNamerPass.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

23

24using namespace llvm;

25

26namespace llvm {

28}

29

30#define DEBUG_TYPE "mir-namer"

31

32namespace {

33

35public:

36 static char ID;

38

40 return "Rename virtual register operands";

41 }

42

46 }

47

49 bool Changed = false;

50

52 return Changed;

53

55

56 unsigned BBIndex = 0;

58 for (auto &MBB : RPOT)

60

61 return Changed;

62 }

63};

64

65}

66

67char MIRNamer::ID;

68

70

72 false)

73

mir Rename Register Operands

#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)

#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)

This file builds on the ADT/GraphTraits.h file to build a generic graph post order iterator.

Represent the analysis usage information of a pass.

void setPreservesCFG()

This function should be called by the pass, iff they do not:

MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...

void getAnalysisUsage(AnalysisUsage &AU) const override

getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.

virtual bool runOnMachineFunction(MachineFunction &MF)=0

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...

MachineRegisterInfo & getRegInfo()

getRegInfo - Return information about the registers currently in use.

virtual StringRef getPassName() const

getPassName - Return a nice clean name for a pass.

Wrapper class representing virtual and physical registers.

StringRef - Represent a constant reference to a string, i.e.

VRegRenamer - This class is used for renaming vregs in a machine basic block according to semantics o...

bool renameVRegs(MachineBasicBlock *MBB, unsigned BBNum)

Same as the above, but sets a BBNum depending on BB traversal that will be used as prefix for the vre...

unsigned ID

LLVM IR allows to use arbitrary numbers as calling convention identifiers.

This is an optimization pass for GlobalISel generic memory operations.