Added function GetMemInstArgs and made FoldGetElemChain private.
llvm-svn: 3503
This commit is contained in:
parent
6f3268d39d
commit
802e7716d8
|
|
@ -37,16 +37,25 @@ int64_t GetConstantValueAsSignedInt (const Value *V,
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Function: FoldGetElemChain
|
// Function: GetMemInstArgs
|
||||||
//
|
//
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Fold a chain of GetElementPtr instructions into an equivalent
|
// Get the pointer value and the index vector for a memory operation
|
||||||
// (Pointer, IndexVector) pair. Returns the pointer Value, and
|
// (GetElementPtr, Load, or Store). If all indices of the given memory
|
||||||
// stores the resulting IndexVector in argument chainIdxVec.
|
// operation are constant, fold in constant indices in a chain of
|
||||||
|
// preceding GetElementPtr instructions (if any), and return the
|
||||||
|
// pointer value of the first instruction in the chain.
|
||||||
|
// All folded instructions are marked so no code is generated for them.
|
||||||
|
//
|
||||||
|
// Return values:
|
||||||
|
// Returns the pointer Value to use.
|
||||||
|
// Returns the resulting IndexVector in idxVec.
|
||||||
|
// Returns true/false in allConstantIndices if all indices are/aren't const.
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
Value* FoldGetElemChain (const InstructionNode* getElemInstrNode,
|
Value* GetMemInstArgs (const InstructionNode* memInstrNode,
|
||||||
std::vector<Value*>& chainIdxVec);
|
vector<Value*>& idxVec,
|
||||||
|
bool& allConstantIndices);
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue