This patch adds AAHotCold, which propagates the cold attribute.
The Attribute marks a function as cold if all of it's callers are cold.
Other ways of propagating the hot/cold attributes are planned.
| Paths 
 |  Differential  D107409  
[Attributor] Propagate Cold attribute inter procedurally AcceptedPublic Authored by kuter on Aug 3 2021, 4:24 PM. 
Details 
Diff Detail 
 
Unit TestsFailed Event TimelineComment Actions Use a BitState instead of hacky Option<bool> This revision is now accepted and ready to land.Aug 22 2021, 8:28 PM 
Revision Contents 
 
 
Diff 367708 llvm/include/llvm/Transforms/IPO/Attributor.h
 llvm/lib/Transforms/IPO/Attributor.cpp
 llvm/lib/Transforms/IPO/AttributorAttributes.cpp
 
 llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll
 llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
 llvm/test/Transforms/Attributor/depgraph.ll
 llvm/test/Transforms/Attributor/hotcold.ll
 
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
We need more than a boolean state, no? Maybe we should use a 3-bit (or 4-bit) state here instead of an optional in the Impl.