This is an archive of the discontinued LLVM Phabricator instance.

fix the opt's crash bug caused by "-early-cse-memssa -early-cse-memssa"
AbandonedPublic

Authored by cszide on Jan 15 2019, 6:26 PM.

Details

Summary

The optimization sequence "-early-cse-memssa -early-cse-memssa" will cause a crash bug for opt tool with any input. This is because that the LegacyPassManager can not correctly process the dependency of the second "-early-cse-memssa".

The "-early-cse-memssa" pass requires analysis pass "Memory SSA" and will preserves it. However, the "-early-cse-memssa" pass can not preserve pass "Function Alias Analysis Results", which is required by pass "Memory SSA" and it will be removed after the first "-early-cse-memssa". Thus, when adding the second "-early-cse-memssa", the LegacyPassManager find that the analysis pass "Memory SSA" is already existed, which causes that the required pass "Function Alias Analysis Results" can not be satisfied for the second "-early-cse-memssa".

PS: This bug has been verified using llvm 6/7 and the truck version.

Diff Detail

Repository
rL LLVM

Event Timeline

cszide created this revision.Jan 15 2019, 6:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2019, 10:49 PM
cszide edited reviewers, added: 2m; removed: 01alchemist.Feb 20 2019, 10:53 PM
cszide retitled this revision from Solution for opt's crash bug caused by "-early-cse-memssa -early-cse-memssa" to fix the opt's crash bug caused by "-early-cse-memssa -early-cse-memssa".Feb 22 2019, 5:22 PM
1ace removed a reviewer: 1ace.Dec 12 2020, 8:06 AM
cszide abandoned this revision.Mar 25 2021, 6:30 AM

The bug has been fixed by other patch.