Ticket #29156: dragonegg_llvm29_compat.diff
File dragonegg_llvm29_compat.diff, 1.5 KB (added by howarth@…, 14 years ago) |
---|
-
src/Convert.cpp
void TreeToLLVM::PopulatePhiNodes() { 902 902 } 903 903 904 904 // Add the operands to the phi node. 905 P.PHI->reserveOperandSpace(PhiArguments.size()); 905 906 for (ValueVector::iterator I = PhiArguments.begin(), E = PhiArguments.end(); 906 907 I != E; ++I) 907 908 P.PHI->addIncoming(I->second, I->first); … … void TreeToLLVM::EmitBasicBlock(basic_bl 1097 1098 1098 1099 // Create the LLVM phi node. 1099 1100 const Type *Ty = getRegType(TREE_TYPE(gimple_phi_result(gcc_phi))); 1100 PHINode *PHI = Builder.CreatePHI(Ty , gimple_phi_num_args(gcc_phi));1101 PHINode *PHI = Builder.CreatePHI(Ty); 1101 1102 1102 1103 // The phi defines the associated ssa name. 1103 1104 tree name = gimple_phi_result(gcc_phi); … … void TreeToLLVM::EmitLandingPads() { 1955 1956 if (InVal == 0) { 1956 1957 // Different unwind edges have different values. Create a new PHI node 1957 1958 // in LPad. 1958 PHINode *NewPN = PHINode::Create(PN->getType(), std::distance(PB, PE),1959 PN->getName()+".lpad",LPad);1959 PHINode *NewPN = PHINode::Create(PN->getType(), PN->getName()+".lpad", 1960 LPad); 1960 1961 // Add an entry for each unwind edge, using the value from the old PHI. 1961 1962 for (pred_iterator PI = PB; PI != PE; ++PI) 1962 1963 NewPN->addIncoming(PN->getIncomingValueForBlock(*PI), *PI);