Displaying 1 result from an estimated 1 matches for "transformpointerrecurrence".
2005 Jul 29
0
[LLVMdev] patch for pointer-to-array conversion
...derIdx^1;
- if (GetElementPtrInst *GEPI =
- dyn_cast<GetElementPtrInst>(PN->getIncomingValue(BackedgeIdx)))
- if (GEPI->getOperand(0) == PN) {
- assert(GEPI->getNumOperands() == 2 && "GEP types must mismatch!");
-
+static std::pair<Value*,Value*> transformPointerRecurrence(
+ GetElementPtrInst *GEPI, PHINode *PN, BasicBlock
*Preheader )
+{
+ unsigned PreheaderIdx = PN->getBasicBlockIndex(Preheader);
+ unsigned BackedgeIdx = PreheaderIdx^1;
// Okay, we found a pointer recurrence. Transform this pointer
// recurrence into an...