This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix data race on RegisterBank initialization.
ClosedPublic

Authored by huihuiz on Jan 28 2020, 9:14 PM.

Details

Summary

The initialization of RegisterBank needs to be done only once. The
logic of AlreadyInit has data race, use llvm::call_once instead.

This is continuing work of D73587.

Diff Detail

Event Timeline

huihuiz created this revision.Jan 28 2020, 9:14 PM
nhaehnle accepted this revision.Jan 29 2020, 1:31 AM

LGTM, thanks.

This revision is now accepted and ready to land.Jan 29 2020, 1:31 AM
This revision was automatically updated to reflect the committed changes.