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

Fix typo in size remarks for module passes

ModuleCount = InstrCount was incorrect. It should have been
InstrCount = ModuleCount. This was making it emit an extra, incorrect remark
for Print Module IR.

The test didn't catch this, because it didn't ensure that the only remark
output was from the desired pass. So, it was possible to have an extra remark
come through and not fail. Updated the test so that we ensure that the last
remark that's output comes from the desired pass. This is done by ensuring
that whatever is being read after the last remark is YAML output rather than
some incorrect garbage.

llvm-svn: 341267
This commit is contained in:
Jessica Paquette 2018-08-31 22:43:41 +00:00
parent cca54c5f90
commit a683ce17f2
2 changed files with 11 additions and 6 deletions

View File

@ -1644,7 +1644,7 @@ MPPassManager::runOnModule(Module &M) {
int64_t Delta = static_cast<int64_t>(ModuleCount) -
static_cast<int64_t>(InstrCount);
emitInstrCountChangedRemark(MP, M, Delta, InstrCount);
ModuleCount = InstrCount;
InstrCount = ModuleCount;
}
}
}

View File

@ -20,7 +20,8 @@
; CGSCC-SAME: IR instruction count changed from
; CGSCC-SAME: [[ORIG:[1-9][0-9]*]] to [[FINAL:[1-9][0-9]*]];
; CGSCC-SAME: Delta: [[DELTA:-?[1-9][0-9]*]]
; CGSCC: --- !Analysis
; CGSCC-NEXT: ---
; CGSCC-DAG: !Analysis
; CGSCC-NEXT: Pass: size-info
; CGSCC-NEXT: Name: IRSizeChange
; CGSCC-NEXT: Function:
@ -44,7 +45,8 @@
; FUNC-SAME: IR instruction count changed from
; FUNC-SAME: [[SIZE2]] to [[SIZE3:[1-9][0-9]*]];
; FUNC-SAME: Delta: [[DELTA2:-?[1-9][0-9]*]]
; FUNC: --- !Analysis
; FUNC-NEXT: ---
; FUNC-DAG: !Analysis
; FUNC-NEXT: Pass: size-info
; FUNC-NEXT: Name: IRSizeChange
; FUNC-NEXT: Function:
@ -77,7 +79,8 @@
; MODULE-SAME: IR instruction count changed from
; MODULE-SAME: [[ORIG:[1-9][0-9]*]] to [[FINAL:[1-9][0-9]*]];
; MODULE-SAME: Delta: [[DELTA:-?[1-9][0-9]*]]
; MODULE: --- !Analysis
; MODULE-NEXT: ---
; MODULE-DAG: !Analysis
; MODULE-NEXT: Pass: size-info
; MODULE-NEXT: Name: IRSizeChange
; MODULE-NEXT: Function:
@ -97,7 +100,8 @@
; BB-SAME: IR instruction count changed from
; BB-SAME: [[ORIG:[1-9][0-9]*]] to [[FINAL:[1-9][0-9]*]];
; BB-SAME: Delta: [[DELTA:-?[1-9][0-9]*]]
; BB: --- !Analysis
; BB-NEXT: ---
; BB-DAG: !Analysis
; BB-NEXT: Pass: size-info
; BB-NEXT: Name: IRSizeChange
; BB-NEXT: Function:
@ -117,7 +121,8 @@
; LOOP-SAME: IR instruction count changed from
; LOOP-SAME: [[ORIG:[1-9][0-9]*]] to [[FINAL:[1-9][0-9]*]];
; LOOP-SAME: Delta: [[DELTA:-?[1-9][0-9]*]]
; LOOP: --- !Analysis
; LOOP-NEXT: ---
; LOOP-DAG: !Analysis
; LOOP-NEXT: Pass: size-info
; LOOP-NEXT: Name: IRSizeChange
; LOOP-NEXT: Function: