mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
e6c6ee9be7
systematically and document in the test what all is going on. This replaces the PR-named test that was the only coverage for GlobalDCE and comdats previously. I wrote this because I wasn't certain how comdat DCE was supposed to work and wanted to step through what GlobalDCE did to fully understand it. After talking to folks and reading the code and really staring at things it all makes sense but it seemed good to help write down some of this in a more explicit and fully covering test case. For example, it seemed like a bug that GlobalDCE didn't consider comdat participation of ifuncs. Specifically it seemed like an accident because testing didn't really cover that case. But in fact, ifuncs specifically cannot participate in a comdat despite having that API. The new test case covers this and explicitly documents that DCE gets to fire here even though there are comdats involved. Also, we didn't have any positive tests for the challenging cases such as usage cycles between comdat participants that might make them seem alive except that there is no external edge into the cycle. llvm-svn: 290537