selfrando
selfrando copied to clipboard
Discard function alignment padding from gap functions
MSVC on Windows prepends padding instructions to functions for alignment (it currently uses the CC
opcode for this and a 16-byte alignment for all functions by default). We currently preserve those instructions as "gap functions", but they should be safe to discard. We could add a pass that scans all gap functions and trims them by removing all CC
(and even 90
as well) opcode.