HomePhabricator

[CodeGen] Move fentry-insert, xray-instrumentation and patchable-function…

Authored by MaskRay on Jan 18 2020, 9:44 PM.

Description

[CodeGen] Move fentry-insert, xray-instrumentation and patchable-function before addPreEmitPass()

This intention is to move patchable-function before aarch64-branch-targets
(configured in AArch64PassConfig::addPreEmitPass) so that we emit BTI before NOPs
(see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92424).

This also allows addPreEmitPass() passes to know the precise instruction sizes if they want.

Tried x86-64 Debug/Release builds of ccls with -fxray-instrument -fxray-instruction-threshold=1.
No output difference with this commit and the previous commit.

Details

Committed
MaskRayJan 19 2020, 12:09 AM
Parents
rGa72d15e37c5e: [XRay] Set hasSideEffects flag of PATCHABLE_FUNCTION_{ENTER,EXIT}
Branches
Unknown
Tags
Unknown