On 05/07/2012 07:04 PM, Aldy Hernandez wrote:
Andrew suggested the correct fix was to add a new pass that was able to do some ?? flow sensitive data flow analysis ?? that could discover these unreachable paths and insert the 0 phis at the start of the blocks automatically. But that seemed like far too much work, considering how long it's taken me to get this far ;-).
Wait, no. I didn't suggest writing an entire generic pass was the correct fix for you... I said that this was a technique that a generic pass which identified this sort of flow sensitive data flow info could use to work within the CFG. Simply zeroing out uses of the load in PHI nodes on paths it has determined are not actually reachable by that value, and you were suppose to integrate just the bits of that technique that you required.. just replace any uses of your LSM temporary with 0. I never intended you should write an entire pass...
Andrew