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

1

2

3

4

5

6

7

8

13

14using namespace llvm;

15

16

17

18

19

23

24 if (MBB->empty())

25 return MBB->begin();

26

27

28

29

30

31

32

33

34 bool EHPadSuccessor = SuccMBB->isEHPad();

36 return MBB->getFirstTerminator();

37

38

42 if (RI.getParent() == MBB)

43 DefsInMBB.insert(&RI);

44

46

47

48

49 for (auto I = MBB->rbegin(), E = MBB->rend(); I != E; ++I) {

51 InsertPoint = std::next(I.getReverse());

52 break;

53 }

54 if ((EHPadSuccessor && I->isCall()) ||

55 I->getOpcode() == TargetOpcode::INLINEASM_BR) {

56 InsertPoint = I.getReverse();

57 break;

58 }

59 }

60

61

62

63 return MBB->SkipPHIsAndLabels(InsertPoint);

64}

unsigned const MachineRegisterInfo * MRI

This file defines the SmallPtrSet class.

bool isInlineAsmBrIndirectTarget() const

Returns true if this is the indirect dest of an INLINEASM_BR.

bool isEHPad() const

Returns true if the block is a landing pad.

MachineInstrBundleIterator< MachineInstr > iterator

Representation of each machine instruction.

MachineRegisterInfo - Keep track of information for virtual and physical registers,...

Wrapper class representing virtual and physical registers.

std::pair< iterator, bool > insert(PtrType Ptr)

Inserts Ptr if and only if there is no element in the container equal to Ptr.

bool contains(ConstPtrType Ptr) const

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.

This is an optimization pass for GlobalISel generic memory operations.

MachineBasicBlock::iterator findPHICopyInsertPoint(MachineBasicBlock *MBB, MachineBasicBlock *SuccMBB, Register SrcReg)

findPHICopyInsertPoint - Find a safe place in MBB to insert a copy from SrcReg when following the CFG...

Definition PHIEliminationUtils.cpp:21