This patch is derived from D70157. Changes from that one:
- Remove prefix padding and simply pad with variable lengths nops. This reduces the complexity sharply. We can and should return to prefix padding in a follow up patch.
- Remove fused instruction handling. Needs to be reimplemented, but not having it makes the mechanics of the basic padding requirements more straight-forward.
- Rename MCMachineDependentFragment to MCBoundaryAlignFragment and try to clarify (in comments and asserts) associated invariants and expectations.
- Remove master flag as user expectations (which are set by our patch and the corresponding gcc patch) would not be met by only aligning a subset of branches.
The intent here is to create something straight forward and easy to review. If others agree with the incremental approach, the original patch can be incrementally reimplemented on top of this one.
It seems that you didn't simply the code based on my latest patch, I have removed the class/function name in my comment.