C++: Check that there is only one overlap

This commit is contained in:
Mathias Vorreiter Pedersen
2020-02-14 11:13:17 +01:00
parent e1644dd68b
commit 121c5e436d
3 changed files with 6 additions and 0 deletions

View File

@@ -61,12 +61,14 @@ newtype TValueNumber =
*/
class CongruentCopyInstruction extends CopyInstruction {
CongruentCopyInstruction() {
strictcount(this.getSourceValueOperand().getDefinitionOverlap()) = 1 and
this.getSourceValueOperand().getDefinitionOverlap() instanceof MustExactlyOverlap
}
}
class LoadTotalOverlapInstruction extends LoadInstruction {
LoadTotalOverlapInstruction() {
strictcount(this.getSourceValueOperand().getDefinitionOverlap()) = 1 and
this.getSourceValueOperand().getDefinitionOverlap() instanceof MustTotallyOverlap
}
}

View File

@@ -61,12 +61,14 @@ newtype TValueNumber =
*/
class CongruentCopyInstruction extends CopyInstruction {
CongruentCopyInstruction() {
strictcount(this.getSourceValueOperand().getDefinitionOverlap()) = 1 and
this.getSourceValueOperand().getDefinitionOverlap() instanceof MustExactlyOverlap
}
}
class LoadTotalOverlapInstruction extends LoadInstruction {
LoadTotalOverlapInstruction() {
strictcount(this.getSourceValueOperand().getDefinitionOverlap()) = 1 and
this.getSourceValueOperand().getDefinitionOverlap() instanceof MustTotallyOverlap
}
}

View File

@@ -61,12 +61,14 @@ newtype TValueNumber =
*/
class CongruentCopyInstruction extends CopyInstruction {
CongruentCopyInstruction() {
strictcount(this.getSourceValueOperand().getDefinitionOverlap()) = 1 and
this.getSourceValueOperand().getDefinitionOverlap() instanceof MustExactlyOverlap
}
}
class LoadTotalOverlapInstruction extends LoadInstruction {
LoadTotalOverlapInstruction() {
strictcount(this.getSourceValueOperand().getDefinitionOverlap()) = 1 and
this.getSourceValueOperand().getDefinitionOverlap() instanceof MustTotallyOverlap
}
}