diff options
| author | Vitaly Buka <vitalybuka@google.com> | 2024-09-23 15:55:29 -0700 |
|---|---|---|
| committer | Vitaly Buka <vitalybuka@google.com> | 2024-09-23 15:55:29 -0700 |
| commit | 80323f174971174928c87fb0e958a6fcfe094d59 (patch) | |
| tree | bb0862b94fc42ba636ea993820a3368b851fd334 /llvm/lib/Analysis/CtxProfAnalysis.cpp | |
| parent | 1c4f36eefcbee84fe801c6817ff4cdc7feeafd13 (diff) | |
| parent | 8dbb739ffb0880e4f739992d07dc6ba6edca9509 (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/vitalybuka/spr/main.nfchwasan-remove-code-duplication-in-shadowmappinginit
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'llvm/lib/Analysis/CtxProfAnalysis.cpp')
| -rw-r--r-- | llvm/lib/Analysis/CtxProfAnalysis.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/CtxProfAnalysis.cpp b/llvm/lib/Analysis/CtxProfAnalysis.cpp index 3df72983862d..7517011395a7 100644 --- a/llvm/lib/Analysis/CtxProfAnalysis.cpp +++ b/llvm/lib/Analysis/CtxProfAnalysis.cpp @@ -254,6 +254,15 @@ InstrProfIncrementInst *CtxProfAnalysis::getBBInstrumentation(BasicBlock &BB) { return nullptr; } +InstrProfIncrementInstStep * +CtxProfAnalysis::getSelectInstrumentation(SelectInst &SI) { + Instruction *Prev = &SI; + while ((Prev = Prev->getPrevNode())) + if (auto *Step = dyn_cast<InstrProfIncrementInstStep>(Prev)) + return Step; + return nullptr; +} + template <class ProfilesTy, class ProfTy> static void preorderVisit(ProfilesTy &Profiles, function_ref<void(ProfTy &)> Visitor, |
