mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[MCA][TimelineView] Fixed a bug that was causing instructions outside of the timeline-max-cycles to still be printed.
Differential Revision: https://reviews.llvm.org/D104815
This commit is contained in:
parent
6c523b4fc3
commit
d745bb18b1
@ -288,6 +288,15 @@ void TimelineView::printTimeline(raw_ostream &OS) const {
|
||||
for (unsigned Iteration = 0; Iteration < Iterations; ++Iteration) {
|
||||
for (const MCInst &Inst : Source) {
|
||||
const TimelineViewEntry &Entry = Timeline[IID];
|
||||
// When an instruction is retired after timeline-max-cycles,
|
||||
// its CycleRetired is left at 0. However, it's possible for
|
||||
// a 0 latency instruction to be retired during cycle 0 and we
|
||||
// don't want to early exit in that case. The CycleExecuted
|
||||
// attribute is set correctly whether or not it is greater
|
||||
// than timeline-max-cycles so we can use that to ensure
|
||||
// we don't early exit because of a 0 latency instruction.
|
||||
if (Entry.CycleRetired == 0 && Entry.CycleExecuted != 0)
|
||||
return;
|
||||
|
||||
unsigned SourceIndex = IID % Source.size();
|
||||
printTimelineViewEntry(FOS, Entry, Iteration, SourceIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user