
The patch extends the existing LegalizeDataValues to support DeclareEnter and DeclareExit pair. Since unlike other ops, DeclareEnter and DeclareExit don't have a region defined, we use dominance/post dominance information to ensure only the uses within the region dominated by DeclareEnter and post dominated by DeclareExit are updated with data on device.