diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/lib/CodeGen/XRayInstrumentation.cpp | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/CodeGen/XRayInstrumentation.cpp')
-rw-r--r-- | contrib/libs/llvm12/lib/CodeGen/XRayInstrumentation.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/libs/llvm12/lib/CodeGen/XRayInstrumentation.cpp b/contrib/libs/llvm12/lib/CodeGen/XRayInstrumentation.cpp index 11d1b309aa..961046a723 100644 --- a/contrib/libs/llvm12/lib/CodeGen/XRayInstrumentation.cpp +++ b/contrib/libs/llvm12/lib/CodeGen/XRayInstrumentation.cpp @@ -145,22 +145,22 @@ void XRayInstrumentation::prependRetWithPatchableExit( bool XRayInstrumentation::runOnMachineFunction(MachineFunction &MF) { auto &F = MF.getFunction(); auto InstrAttr = F.getFnAttribute("function-instrument"); - bool AlwaysInstrument = InstrAttr.isStringAttribute() && + bool AlwaysInstrument = InstrAttr.isStringAttribute() && InstrAttr.getValueAsString() == "xray-always"; - bool NeverInstrument = InstrAttr.isStringAttribute() && - InstrAttr.getValueAsString() == "xray-never"; - if (NeverInstrument && !AlwaysInstrument) - return false; + bool NeverInstrument = InstrAttr.isStringAttribute() && + InstrAttr.getValueAsString() == "xray-never"; + if (NeverInstrument && !AlwaysInstrument) + return false; auto ThresholdAttr = F.getFnAttribute("xray-instruction-threshold"); auto IgnoreLoopsAttr = F.getFnAttribute("xray-ignore-loops"); unsigned int XRayThreshold = 0; if (!AlwaysInstrument) { - if (!ThresholdAttr.isStringAttribute()) + if (!ThresholdAttr.isStringAttribute()) return false; // XRay threshold attribute not found. if (ThresholdAttr.getValueAsString().getAsInteger(10, XRayThreshold)) return false; // Invalid value for threshold. - bool IgnoreLoops = IgnoreLoopsAttr.isValid(); + bool IgnoreLoops = IgnoreLoopsAttr.isValid(); // Count the number of MachineInstr`s in MachineFunction int64_t MICount = 0; |