mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 22:50:53 +03:00
Implement -femit-local-var-lifetime which adds local (stack) variable… (#4395)
Implement -femit-local-var-lifetime which adds local (stack) variable lifetime annotation to LLVM IR, which enables sharing stack space for variables whose lifetimes do not overlap. Resolves issue #2227 This is not enabled by default yet, to prevent miscompilation due to bugs (should be enabled in future for optimization levels > 0, and when sanitizers are enabled).
This commit is contained in:
parent
89cbc4cceb
commit
ef0719f36b
14 changed files with 357 additions and 6 deletions
|
@ -203,8 +203,10 @@ static void legacyAddGarbageCollect2StackPass(const PassManagerBuilder &builder,
|
|||
}
|
||||
|
||||
static void legacyAddAddressSanitizerPasses(const PassManagerBuilder &Builder,
|
||||
PassManagerBase &PM) {
|
||||
PM.add(createAddressSanitizerFunctionPass());
|
||||
PassManagerBase &PM) {
|
||||
PM.add(createAddressSanitizerFunctionPass(/*CompileKernel = */ false,
|
||||
/*Recover = */ false,
|
||||
/*UseAfterScope = */ true));
|
||||
PM.add(createModuleAddressSanitizerLegacyPassPass());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue