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

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

25using namespace llvm;

26

27#define DEBUG_TYPE "finalize-isel"

28

29namespace {

31 public:

32 static char ID;

34

35 private:

37

40 }

41 };

42}

43

45 bool Changed = false;

49

50

54 MBBI != MBBE; ) {

56

57

58

59 if (TII->isFrameInstr(MI) || MI.isStackAligningInlineAsm())

61

62

63 if (MI.usesCustomInsertionHook()) {

64 Changed = true;

66

67 if (NewMBB != MBB) {

69 MBB = NewMBB;

72 MBBE = NewMBB->end();

73 }

74 }

75 }

76 }

77

79

81}

82

83char FinalizeISel::ID = 0;

86 "Finalize ISel and expand pseudo-instructions", false, false)

87

90}

91

95 if (!Changed)

100 return PA;

101}

MachineBasicBlock MachineBasicBlock::iterator MBBI

static bool runImpl(Function &F, const TargetLowering &TLI)

static std::pair< bool, bool > runImpl(MachineFunction &MF)

const HexagonInstrInfo * TII

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

This file describes how to lower LLVM code to machine code.

A container for analyses that lazily runs them and caches their results.

Represent the analysis usage information of a pass.

Represents analyses that only rely on functions' control flow.

PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &)

void setAdjustsStack(bool V)

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...

const TargetSubtargetInfo & getSubtarget() const

getSubtarget - Return the subtarget for which this machine code is being compiled.

MachineFrameInfo & getFrameInfo()

getFrameInfo - Return the frame info object for the current function.

Representation of each machine instruction.

A set of analyses that are preserved following a run of a transformation pass.

static PreservedAnalyses all()

Construct a special preserved set that preserves all passes.

TargetInstrInfo - Interface to description of machine instruction set.

virtual void finalizeLowering(MachineFunction &MF) const

Execute target specific actions to finalize target lowering.

This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...

virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr &MI, MachineBasicBlock *MBB) const

This method should be implemented by targets that mark instructions with the 'usesCustomInserter' fla...

virtual const TargetInstrInfo * getInstrInfo() const

virtual const TargetLowering * getTargetLowering() const

self_iterator getIterator()

unsigned ID

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

This is an optimization pass for GlobalISel generic memory operations.

PreservedAnalyses getMachineFunctionPassPreservedAnalyses()

Returns the minimum set of Analyses that all machine function passes must preserve.

char & FinalizeISelID

This pass expands pseudo-instructions, reserves registers and adjusts machine frame information.