HomePhabricator

[MachinePipeliner] Fix risky iterator usage R++, --R

Description

[MachinePipeliner] Fix risky iterator usage R++, --R

When we calculate MII, we use two loops, one with iterator R++ to
check whether we can reserve the resource, then --R to move back
the iterator to do reservation.

This is risky, as R++, --R may not point to the same element at all.
The can cause wrong MII.

Differential Revision: https://reviews.llvm.org/D63536

Details

Committed
jsjiJun 25 2019, 2:50 PM
Differential Revision
D63536: [MachinePipeliner] Fix risky iterator usage R++, --R
Parents
rL364352: android: enable double-word CAS on x64
Branches
Unknown
Tags
Unknown