mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-09 05:31:37 +00:00
VNCoercion: Make the function signatures all consistent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297537 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3081264dbe
commit
5b9a142f57
@ -53,7 +53,7 @@ Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy,
|
||||
/// On success, it returns the offset into DepSI that extraction would start.
|
||||
/// On failure, it returns -1.
|
||||
int analyzeLoadFromClobberingStore(Type *LoadTy, Value *LoadPtr,
|
||||
StoreInst *DepSI);
|
||||
StoreInst *DepSI, const DataLayout &DL);
|
||||
|
||||
/// This function determines whether a value for the pointer LoadPtr can be
|
||||
/// extracted from the load at DepLI.
|
||||
|
@ -832,7 +832,7 @@ bool GVN::AnalyzeLoadAvailability(LoadInst *LI, MemDepResult DepInfo,
|
||||
// Can't forward from non-atomic to atomic without violating memory model.
|
||||
if (Address && LI->isAtomic() <= DepSI->isAtomic()) {
|
||||
int Offset =
|
||||
analyzeLoadFromClobberingStore(LI->getType(), Address, DepSI);
|
||||
analyzeLoadFromClobberingStore(LI->getType(), Address, DepSI, DL);
|
||||
if (Offset != -1) {
|
||||
Res = AvailableValue::get(DepSI->getValueOperand(), Offset);
|
||||
return true;
|
||||
|
@ -190,13 +190,12 @@ static int analyzeLoadFromClobberingWrite(Type *LoadTy, Value *LoadPtr,
|
||||
/// This function is called when we have a
|
||||
/// memdep query of a load that ends up being a clobbering store.
|
||||
int analyzeLoadFromClobberingStore(Type *LoadTy, Value *LoadPtr,
|
||||
StoreInst *DepSI) {
|
||||
StoreInst *DepSI, const DataLayout &DL) {
|
||||
// Cannot handle reading from store of first-class aggregate yet.
|
||||
if (DepSI->getValueOperand()->getType()->isStructTy() ||
|
||||
DepSI->getValueOperand()->getType()->isArrayTy())
|
||||
return -1;
|
||||
|
||||
const DataLayout &DL = DepSI->getModule()->getDataLayout();
|
||||
Value *StorePtr = DepSI->getPointerOperand();
|
||||
uint64_t StoreSize =
|
||||
DL.getTypeSizeInBits(DepSI->getValueOperand()->getType());
|
||||
|
Loading…
Reference in New Issue
Block a user