some primitive optimizations
optionally record control dependencies to disable code motion in particular scopes