mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-17 07:22:54 +00:00
Don't delete volatile loads. Doing so is not safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40448 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fb80b6e056
commit
6b8894bb67
@ -69,6 +69,12 @@ bool FDLE::runOnBasicBlock(BasicBlock &BB) {
|
||||
for (BasicBlock::iterator BBI = BB.begin(), BBE = BB.end(); BBI != BBE; ++BBI) {
|
||||
// If we find a store or a free...
|
||||
if (LoadInst* L = dyn_cast<LoadInst>(BBI)) {
|
||||
// We can't delete volatile loads
|
||||
if (L->isVolatile()) {
|
||||
lastLoad[L->getPointerOperand()] = L;
|
||||
continue;
|
||||
}
|
||||
|
||||
Value* pointer = L->getPointerOperand();
|
||||
LoadInst*& last = lastLoad[pointer];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user