This patch is part of a set of patches that add an -fextend-lifetimes flag to clang, which extends the lifetimes of local variables and parameters for improved debuggability. In addition to that flag, the patch series adds a new function attribute to disable the post-RA scheduler (which is applied by -fextend-lifetimes), a pragma to selectively disable -fextend-lifetimes, and an -fextend-this-ptr flag which functions as -fextend-lifetimes for this pointers only. All changes and tests in these patches were written by @wolfgangp, though I will be managing these reviews and addressing any comments raised. Discussion on the approach of this patch series as a whole should be directed to the 3rd patch, D157613, in order to simplify review.
This particular patch implements the disable-post-ra function attribute, which trivially stops the post-register-allocation scheduler from running. This is useful when using the -fextend-lifetimes flag, as post-RA scheduling is not directly affected by that flag. The reason for creating an attribute instead of simply disabling the post-RA scheduler with a flag is that -fextend-lifetimes may be enabled or disabled for individual functions, and we only want to skip scheduling for the functions which desire extended lifetimes.
Although this patch is technically unrelated to debug info, I am bringing in debug info reviewers because of how this patch connects to the following patches in the sequence.