llvm-project
9f2381a1 - [BOLT] Fix data race in CDSplit

Commit
6 days ago
[BOLT] Fix data race in CDSplit There is a race in split functions pass, CDSplit strategy, that might affect production although it is not super common. We've observed only a few cases in one workload. The problem is that one thread might be inserting new basic blocks in a function (BF object) while another is trying to read the blocks via BF::front(). If the threads are timed in the wrong way, the reading thread will load an invalid pointer and crash on DstBB->getKnownExecutionCount(). The BB insertion is done by SplitFunctions to insert EH trampolines.
Author
Committer
Parents
Loading