bug - need to analyze at the whole function level not just basic block