llvm / llvm/llvm-project

[clang] Consider emitting llvm.lifetime.start/llvm.lifetime.end for variables with bypassed initialization

Open
#199,144 1 comment 0 reactions 0 assignees View on GitHub
clang:codegen missed-optimization
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

#181937 will add infrastructure for emitting code on entry into the scope of a variable, even if the initializer is bypassed. We could use this infrastructure to emit llvm.lifetime.start() for such variables, and drop the check at https://github.com/llvm/llvm-project/blob/3873d151c9248fed3da049d793208296413bbcc8/clang/lib/CodeGen/CGDecl.cpp#L1617 .

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.