forked from OSchip/llvm-project
[OpenMPOpt][NFC] Moving constants as struct static attributes
This commit is contained in:
parent
2bbbcae782
commit
1d3d9b9cd8
|
@ -407,6 +407,10 @@ struct OffloadArray {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const unsigned BasePtrsArgNum = 2;
|
||||||
|
static const unsigned PtrsArgNum = 3;
|
||||||
|
static const unsigned SizesArgNum = 4;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Traverses the BasicBlock where \p Array is, collecting the stores made to
|
/// Traverses the BasicBlock where \p Array is, collecting the stores made to
|
||||||
/// \p Array, leaving StoredValues with the values stored before the
|
/// \p Array, leaving StoredValues with the values stored before the
|
||||||
|
@ -705,14 +709,12 @@ private:
|
||||||
// offload arrays, offload_baseptrs, offload_ptrs, offload_sizes.
|
// offload arrays, offload_baseptrs, offload_ptrs, offload_sizes.
|
||||||
// Therefore:
|
// Therefore:
|
||||||
// i8** %offload_baseptrs.
|
// i8** %offload_baseptrs.
|
||||||
const unsigned BasePtrsArgNum = 2;
|
Value *BasePtrsArg =
|
||||||
Value *BasePtrsArg = RuntimeCall.getArgOperand(BasePtrsArgNum);
|
RuntimeCall.getArgOperand(OffloadArray::BasePtrsArgNum);
|
||||||
// i8** %offload_ptrs.
|
// i8** %offload_ptrs.
|
||||||
const unsigned PtrsArgNum = 3;
|
Value *PtrsArg = RuntimeCall.getArgOperand(OffloadArray::PtrsArgNum);
|
||||||
Value *PtrsArg = RuntimeCall.getArgOperand(PtrsArgNum);
|
|
||||||
// i8** %offload_sizes.
|
// i8** %offload_sizes.
|
||||||
const unsigned SizesArgNum = 4;
|
Value *SizesArg = RuntimeCall.getArgOperand(OffloadArray::SizesArgNum);
|
||||||
Value *SizesArg = RuntimeCall.getArgOperand(SizesArgNum);
|
|
||||||
|
|
||||||
// Get values stored in **offload_baseptrs.
|
// Get values stored in **offload_baseptrs.
|
||||||
auto *V = getUnderlyingObject(BasePtrsArg);
|
auto *V = getUnderlyingObject(BasePtrsArg);
|
||||||
|
|
Loading…
Reference in New Issue