Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check call has one predecessor before considering eliminating guard
When applying constraints for a non-overridden call guard, constrainIfcmpeqne looks at the guarded call node to see whether the guard can be eliminated. However, if the call block has more than one predecessor, not all definitions that reach the call block might have been visited on the current walk. That might result in incorrect constraints being applied to the references on the call because of the incomplete information. This change adds an additional check of whether the block containing the guarded call has only one predecessor before checking whether the guard can be eliminated. That is a simple way of ensuring all the predecessors of the guarded call must already have been walked. Signed-off-by: Henry Zongaro <zongaro@ca.ibm.com>
- Loading branch information