This function is used in D36619 to update the instruction depths
incrementally.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM. Just some food for thought for possible follow up commits.
lib/CodeGen/MachineTraceMetrics.cpp | ||
---|---|---|
782 | It would make the side effects of this procedure more explicit if a reference to TBI rather than MBB is passed as the first parameter. Within MachineTraceMetrics this would also reduce the #accesss to BlockInfo. | |
812 | You could simplify and update the CP when HasValidInstrHeights is true. |
Comment Actions
Thanks for the comments, I added a updateDepth function that accepts a reference to TBI. I kept the version with MBB as well, as I think there's no way to get TBI for a basic block from outside MachineTraceMetrics (which we should not change IMO). I've also moved the code to set the CP, it should be slightly clearer now.
It would make the side effects of this procedure more explicit if a reference to TBI rather than MBB is passed as the first parameter. Within MachineTraceMetrics this would also reduce the #accesss to BlockInfo.