[Mono-dev] build error in mono LLVM project (on head)

Jonathan Shore jonathan.shore at gmail.com
Sat Oct 13 14:38:22 UTC 2012


There is an error in the function SelectionDAGBuilder::handleLoad (), whereby Ranges is not defined:

void SelectionDAGBuilder::handleLoad(const Instruction &I, const Value *SV, Type *Ty,
	bool isVolatile, bool isNonTemporal,
	bool isInvariant, unsigned Alignment,
	const MDNode *TBAAInfo) 
{
	SmallVector<EVT, 4> ValueVTs;
	SmallVector<uint64_t, 4> Offsets;
	ComputeValueVTs(TLI, Ty, ValueVTs, &Offsets);
	unsigned NumValues = ValueVTs.size();
	if (NumValues == 0)
		return;

	SDValue Ptr = getValue(SV);

	SDValue Root;
	bool ConstantMemory = false;

	...	

  	for (unsigned i = 0; i != NumValues; ++i, ++ChainI) {
    		// ...
    		if (ChainI == MaxParallelChains) {
      			assert(PendingLoads.empty() && "PendingLoads must be serialized first");
      			SDValue Chain = DAG.getNode(ISD::TokenFactor, getCurDebugLoc(), MVT::Other, &Chains[0], ChainI);
      			Root = Chain;
      			ChainI = 0;
    		}
   		 SDValue A = DAG.getNode(ISD::ADD, getCurDebugLoc(),
                            PtrVT, Ptr,
                            DAG.getConstant(Offsets[i], PtrVT));
    		SDValue L = DAG.getLoad(ValueVTs[i], getCurDebugLoc(), Root,
                            A, MachinePointerInfo(SV, Offsets[i]), isVolatile,
                            isNonTemporal, isInvariant, Alignment, TBAAInfo,
                            Ranges);
		...
	}
	...
}


It looks as if the following code should be inserted at the top of the function:

const MDNode *Ranges = I.getMetadata(LLVMContext::MD_range);




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20121013/29652afe/attachment.html>


More information about the Mono-devel-list mailing list