mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-07 10:11:57 +00:00
Minor comment fixes.
llvm-svn: 137693
This commit is contained in:
parent
6a475e691d
commit
eb7e5209e5
@ -195,12 +195,14 @@ static bool AnalyzeGlobal(const Value *V, GlobalStatus &GS,
|
|||||||
}
|
}
|
||||||
if (const LoadInst *LI = dyn_cast<LoadInst>(I)) {
|
if (const LoadInst *LI = dyn_cast<LoadInst>(I)) {
|
||||||
GS.isLoaded = true;
|
GS.isLoaded = true;
|
||||||
if (!LI->isSimple()) return true; // Don't hack on volatile loads.
|
// Don't hack on volatile/atomic loads.
|
||||||
|
if (!LI->isSimple()) return true;
|
||||||
} else if (const StoreInst *SI = dyn_cast<StoreInst>(I)) {
|
} else if (const StoreInst *SI = dyn_cast<StoreInst>(I)) {
|
||||||
// Don't allow a store OF the address, only stores TO the address.
|
// Don't allow a store OF the address, only stores TO the address.
|
||||||
if (SI->getOperand(0) == V) return true;
|
if (SI->getOperand(0) == V) return true;
|
||||||
|
|
||||||
if (!SI->isSimple()) return true; // Don't hack on volatile stores.
|
// Don't hack on volatile/atomic stores.
|
||||||
|
if (!SI->isSimple()) return true;
|
||||||
|
|
||||||
// If this is a direct store to the global (i.e., the global is a scalar
|
// If this is a direct store to the global (i.e., the global is a scalar
|
||||||
// value, not an aggregate), keep more specific information about
|
// value, not an aggregate), keep more specific information about
|
||||||
@ -2333,7 +2335,7 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal,
|
|||||||
Constant *InstResult = 0;
|
Constant *InstResult = 0;
|
||||||
|
|
||||||
if (StoreInst *SI = dyn_cast<StoreInst>(CurInst)) {
|
if (StoreInst *SI = dyn_cast<StoreInst>(CurInst)) {
|
||||||
if (!SI->isSimple()) return false; // no volatile accesses.
|
if (!SI->isSimple()) return false; // no volatile/atomic accesses.
|
||||||
Constant *Ptr = getVal(Values, SI->getOperand(1));
|
Constant *Ptr = getVal(Values, SI->getOperand(1));
|
||||||
if (!isSimpleEnoughPointerToCommit(Ptr))
|
if (!isSimpleEnoughPointerToCommit(Ptr))
|
||||||
// If this is too complex for us to commit, reject it.
|
// If this is too complex for us to commit, reject it.
|
||||||
@ -2410,7 +2412,7 @@ static bool EvaluateFunction(Function *F, Constant *&RetVal,
|
|||||||
ConstantExpr::getGetElementPtr(P, GEPOps,
|
ConstantExpr::getGetElementPtr(P, GEPOps,
|
||||||
cast<GEPOperator>(GEP)->isInBounds());
|
cast<GEPOperator>(GEP)->isInBounds());
|
||||||
} else if (LoadInst *LI = dyn_cast<LoadInst>(CurInst)) {
|
} else if (LoadInst *LI = dyn_cast<LoadInst>(CurInst)) {
|
||||||
if (!LI->isSimple()) return false; // no volatile accesses.
|
if (!LI->isSimple()) return false; // no volatile/atomic accesses.
|
||||||
InstResult = ComputeLoadResult(getVal(Values, LI->getOperand(0)),
|
InstResult = ComputeLoadResult(getVal(Values, LI->getOperand(0)),
|
||||||
MutatedMemory);
|
MutatedMemory);
|
||||||
if (InstResult == 0) return false; // Could not evaluate load.
|
if (InstResult == 0) return false; // Could not evaluate load.
|
||||||
|
@ -2269,7 +2269,7 @@ bool SimplifyCFGOpt::SimplifyUnreachable(UnreachableInst *UI) {
|
|||||||
// Note that deleting LandingPad's here is in fact okay, although it
|
// Note that deleting LandingPad's here is in fact okay, although it
|
||||||
// involves a bit of subtle reasoning. If this inst is a LandingPad,
|
// involves a bit of subtle reasoning. If this inst is a LandingPad,
|
||||||
// all the predecessors of this block will be the unwind edges of Invokes,
|
// all the predecessors of this block will be the unwind edges of Invokes,
|
||||||
// and we can therefore guaranteed this block will be erased.
|
// and we can therefore guarantee this block will be erased.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete this instruction (any uses are guaranteed to be dead)
|
// Delete this instruction (any uses are guaranteed to be dead)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user