mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-01 15:40:53 +00:00
Delete dead code and add asserts instead; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
74292e46d4
commit
eaec8b3b2a
@ -266,15 +266,11 @@ bool HazardDetector::isSafeToHoist(MachineInstr *MI,
|
||||
return true;
|
||||
if (MO.isUse())
|
||||
return false;
|
||||
assert((!MO.isDef() || RegDefs.count(MO.getReg())) &&
|
||||
assert(MO.isDef() &&
|
||||
"Register MachineOperands must either be uses or be defs.");
|
||||
assert(RegDefs.count(MO.getReg()) &&
|
||||
"All defs must be tracked in RegDefs by now!");
|
||||
|
||||
if (!MO.isDef()) {
|
||||
// FIXME: This is unnecessary, we should be able to
|
||||
// assert(MO.isDef()) here.
|
||||
return true;
|
||||
}
|
||||
|
||||
for (unsigned Reg : RegUses)
|
||||
if (TRI.regsOverlap(Reg, MO.getReg()))
|
||||
return false; // We found a write-after-read
|
||||
|
Loading…
Reference in New Issue
Block a user