This depends on D19904 to land in LLVM so that the attributes for XRay
instrumentation in the IR are supported and generate the appropriate nop sleds
in function entry/exits. We implement two flags to control the XRay behaviour:
- -fxray-instrument: enables XRay annotation of IR
- -fxray-instruction-threshold: configures the threshold for function size (looking at IR instructions), and allow LLVM to decide whether to add the nop sleds later on in the process.
Also Depends on D21612 for the XRay runtime dependency.
Would this also make sense for ObjC methods?