Index: src/IceInst.h |
diff --git a/src/IceInst.h b/src/IceInst.h |
index 36b8810a82bcbf0390e66283285f6cde91763239..89f308d0add56c29f1a046cfcce2db23592a8c56 100644 |
--- a/src/IceInst.h |
+++ b/src/IceInst.h |
@@ -108,6 +108,13 @@ public: |
assert(I < getSrcSize()); |
return Srcs[I]; |
} |
+ void replaceSource(SizeT Index, Operand *Replacement) { |
+ assert(Index < NumSrcs); |
+ assert(!isDeleted()); |
+ assert(LiveRangesEnded == 0); |
+ //Invalidates liveness info because the use Srcs[Index] is removed. |
+ Srcs[Index] = Replacement; |
+ } |
bool isLastUse(const Operand *Src) const; |
void spliceLivenessInfo(Inst *OrigInst, Inst *SpliceAssn); |