0

You can have CFGs at both the LLVM IR Function level and CodeGen MachineFunction level. Is this a one-to-one mapping? I mean, are there same number of (Machine)BasicBlocks in those CFGs with similar control flows?I know the number of instructions could differ for obvious reason, but I am interested to know whether the structure remains same.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
soham
  • 1,508
  • 6
  • 30
  • 47

1 Answers1

0

Is this a one-to-one mapping? I mean, are there same number of (Machine)BasicBlocks in those CFGs with similar control flows?

No there is no one-to-one mapping at the level of Basic blocks. One reason for this is that there is no exact replacement of "PHI" node possible. The generation of 'SELECT' and 'SELECT_CC' nodes restructures the Machine Basic Block representation.

ConsistentProgrammer
  • 1,294
  • 10
  • 14