Not sure what the policy is on this - Hal, you already marked this with 'LGTM', but the patch has grown quite a bit since that. Do you want to give this another look over? http://reviews.llvm.org/D4217