For an internal function, if all its call sites are dead, the body of the function is considered dead. This patch also updates checkForAllCallSites with llvm::function_ref.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 36680 Build 36679: arc lint + arc unit
Event Timeline
Test missing, otherwise good
llvm/lib/Transforms/IPO/Attributor.cpp | ||
---|---|---|
1495 | Move this into a helper function as it is a copy of the init code. |
llvm/test/Transforms/FunctionAttrs/liveness.ll | ||
---|---|---|
29 ↗ | (On Diff #214934) | We should kill dead functions in the manifest method. |
llvm/test/Transforms/FunctionAttrs/align.ll | ||
---|---|---|
130 ↗ | (On Diff #215262) | Use this as scc test in liveness and make one of them live in this test so that all become live |
llvm/test/Transforms/FunctionAttrs/liveness.ll | ||
18 ↗ | (On Diff #215262) | These should not be derived anymore. We stopped annotating dead stuff. |
llvm/test/Transforms/FunctionAttrs/liveness.ll | ||
---|---|---|
18 ↗ | (On Diff #215262) | Didn't intend to include this. This is actually a leftover. Didn't see you committed that. |
llvm/lib/Transforms/IPO/Attributor.cpp | ||
---|---|---|
1488 | Only do the whole conditional once. Hence, add && AssumedLiveBlocks.empy() to the conditional in line 1838. | |
1523 | I'm confused. When do we need this status flag here, I mean why isn't the one above sufficient. And if this one is needed, why only if we find a new NextNoReturnI and not once the path size changes (as before)? | |
2087 | This is not a valid cast. You want &AA::ID == &AAIsDead::ID | |
llvm/test/Transforms/FunctionAttrs/align.ll | ||
95 ↗ | (On Diff #215970) | Why do we loose the align? |
llvm/lib/Transforms/IPO/Attributor.cpp | ||
---|---|---|
1523 | This was actually a leftover. I was trying things when I thought I messed something with verification. |
llvm/lib/Transforms/IPO/Attributor.cpp | ||
---|---|---|
1287 | Add a new STATS_DECL... here to count number of dead internal functions. |
maybe (!...empty())