[llvm] r255551 - [WebAssembly] Add an assert to sanity-check dead flags.
Dan Gohman via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 13:53:54 PST 2015
Author: djg
Date: Mon Dec 14 15:53:54 2015
New Revision: 255551
URL: http://llvm.org/viewvc/llvm-project?rev=255551&view=rev
Log:
[WebAssembly] Add an assert to sanity-check dead flags.
The WebAssemblyStoreResults pass runs before LiveVariables, so it doesn't
expect to have to keep dead flags up to date; check this with an assert.
Modified:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp?rev=255551&r1=255550&r2=255551&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp Mon Dec 14 15:53:54 2015
@@ -113,6 +113,9 @@ bool WebAssemblyStoreResults::runOnMachi
DEBUG(dbgs() << "Setting operand " << O << " in " << *Where
<< " from " << MI << "\n");
O.setReg(ToReg);
+ // If the store's def was previously dead, it is no longer. But the
+ // dead flag shouldn't be set yet.
+ assert(!MI.getOperand(0).isDead() && "Dead flag set on store result");
}
}
}
More information about the llvm-commits
mailing list