[all-commits] [llvm/llvm-project] 50b5b3: [AMDGPU] Iterate LoweredEndCf in the reverse order
Christudasan Devadasan via All-commits
all-commits at lists.llvm.org
Wed Jan 5 21:28:00 PST 2022
Author: Christudasan Devadasan <Christudasan.Devadasan at amd.com>
Date: 2022-01-06 (Thu, 06 Jan 2022)
[AMDGPU] Iterate LoweredEndCf in the reverse order
The function that optimally inserts the exec mask
restore operations by combining the blocks currently
visits the lowered END_CF pseudos in the forward
direction as it iterates the setvector in the order
the entries are inserted in it.
Due to the absence of BranchFolding at -O0, the
irregularly placed BBs cause the forward traversal
to incorrectly place two unconditional branches in
certain BBs while combining them, especially when
an intervening block later gets optimized away in
It is avoided by reverse iterating the setvector.
The blocks at the bottom of a function will get
optimized first before processing those at the top.
Reviewed By: rampitec
Differential Revision: https://reviews.llvm.org/D116273
More information about the All-commits