aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2024-01-25 13:13:46 +0000
committerGitHub <noreply@github.com>2024-01-25 13:13:46 +0000
commit47a2e732100c4102a1a5f3243123638f157c9a2a (patch)
treec790ed86881bbd49428248f2dfd981a267073606 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent3490f037c3c750416ad224147b32c92bf6c7db0f (diff)
downloadllvm-47a2e732100c4102a1a5f3243123638f157c9a2a.zip
llvm-47a2e732100c4102a1a5f3243123638f157c9a2a.tar.gz
llvm-47a2e732100c4102a1a5f3243123638f157c9a2a.tar.bz2
[DebugInfo][RemoveDIs] Make getDbgValueRange inlineable (#79331)
`getDbgValueRange` is the replacement of a common LLVM idiom of: 1) Am I currently looking at a `DbgVariableIntrinsic` instruction? 2) Let's do something special with it! We instead iterate over the range of DPValues attached to an instruction and do special things with those. Unfortunately in the common case of "there is no debug-info", this generates a spurious function call that's paid by non-debug builds. To get around this, make `getDbgValueRange` inlineable so that the "`if (DbgMarker)`" test can be inlined and guard the more expensive call. The false path should be optimisable-awayable to skipping the loop. However, due to header inclusion order we can't just make `Instruction::getDbgValueRange` inline because `DPMarker` hasn't been declared yet. So, define an inlinable function in the llvm:: namespace and pre-declare it -- the eventual code should be inlineable almost 100% of the time.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions