Small optimization of the code -- No need to calculate any stats for NULL nodes, and also no need to call the collectStatsForDie() if it is the CU itself.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This definitely won't hurt, but it's a bit inconsistent. The NULL check is inside collectStatsRecursive(), but the CU check is outside of collectStatsForDie(). It would be nice to be consistent and have all functions handle all DIE types with potentially an early exit at the top rather sometimes having the burden to sanitize the input at the call site.