1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Create a machine basic block in the constant pool and retrieve the symbol for an MBB.

llvm-svn: 140824
This commit is contained in:
Bill Wendling 2011-09-29 23:50:42 +00:00
parent de36760902
commit ee48218f94
2 changed files with 7 additions and 0 deletions

View File

@ -853,6 +853,9 @@ EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) {
} else if (ACPV->isGlobalValue()) {
const GlobalValue *GV = ACPV->getGV();
MCSym = GetARMGVSymbol(GV);
} else if (ACPV->isMachineBasicBlock()) {
const MachineBasicBlock *MBB = ACPV->getMBB();
MCSym = MBB->getSymbol();
} else {
assert(ACPV->isExtSymbol() && "unrecognized constant pool value");
MCSym = GetExternalSymbolSymbol(ACPV->getSymbol());

View File

@ -1065,6 +1065,10 @@ static unsigned duplicateCPV(MachineFunction &MF, unsigned &CPI) {
else if (ACPV->isLSDA())
NewCPV = new ARMConstantPoolValue(MF.getFunction(), PCLabelId,
ARMCP::CPLSDA, 4);
else if (ACPV->isMachineBasicBlock())
NewCPV = new ARMConstantPoolValue(MF.getFunction()->getContext(),
ACPV->getMBB(), PCLabelId,
ARMCP::CPMachineBasicBlock, 4);
else
llvm_unreachable("Unexpected ARM constantpool value type!!");
CPI = MCP->getConstantPoolIndex(NewCPV, MCPE.getAlignment());