1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-21 18:22:53 +01:00

Relax volatile stores (always return)

This commit partially reverts 2211738092
That commit caused performance regression in RPCS3
This commit is contained in:
Nekotekina 2021-12-27 01:19:26 +03:00
parent a670c459ea
commit 1c0ca194dc

View File

@ -690,10 +690,6 @@ bool Instruction::isSafeToRemove() const {
}
bool Instruction::willReturn() const {
// Volatile store isn't guaranteed to return; see LangRef.
if (auto *SI = dyn_cast<StoreInst>(this))
return !SI->isVolatile();
if (const auto *CB = dyn_cast<CallBase>(this))
// FIXME: Temporarily assume that all side-effect free intrinsics will
// return. Remove this workaround once all intrinsics are appropriately