Code generation and adaptive control divergence management for light weight SIMT processors