The could be several CheckCastPP nodes (with different type) associated with allocation. The code in adjust_escape_state() does take it into account when looking for initializing store. As result an allocation could be marked as ArgEscape when it could be scalar replaced. Also EA should split escape state ArgEscape into two: ArgEscape when object passed as argument into not inlined call and ControlEscape when an non escaping object can't be scalar replaced because of complex control flow (for example, merge of two allocations).
|