This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Fix threshold calculation for branching when exec is zero
ClosedPublic

Authored by tstellarAMD on Mar 18 2016, 2:31 PM.

Details

Summary

When control flow is implemented using the exec mask, the compiler will
insert branch instructions to skip over the masked section when exec is
zero if the section contains more than a certian number of instructions.

The previous code would only count instructions in successor blocks,
and this patch modifies the code to start counting instructions in all
blocks between the start and end of the branch.

Diff Detail

Event Timeline

tstellarAMD retitled this revision from to AMDGPU/SI: Fix threshold calculation for branching when exec is zero.
tstellarAMD updated this object.
tstellarAMD added reviewers: nhaehnle, arsenm.
tstellarAMD added a subscriber: llvm-commits.
arsenm accepted this revision.Mar 18 2016, 4:20 PM
arsenm edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 18 2016, 4:20 PM

Typo certian in message

This revision was automatically updated to reflect the committed changes.