[all-commits] [llvm/llvm-project] 711051: [WPD] Don't optimize calls more than once
aeubanks via All-commits
all-commits at lists.llvm.org
Thu Jun 24 13:28:24 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7110510ecacf9eecc56d452e9ed3bf47fdee16a5
https://github.com/llvm/llvm-project/commit/7110510ecacf9eecc56d452e9ed3bf47fdee16a5
Author: Arthur Eubanks <aeubanks at google.com>
Date: 2021-06-24 (Thu, 24 Jun 2021)
Changed paths:
M llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
A llvm/test/Transforms/WholeProgramDevirt/devirt-single-impl-multiple-assumes.ll
A llvm/test/Transforms/WholeProgramDevirt/uniform-retval-multiple-assumes.ll
A llvm/test/Transforms/WholeProgramDevirt/unique-retval-multiple-assumes.ll
A llvm/test/Transforms/WholeProgramDevirt/virtual-const-prop-multiple-assumes.ll
Log Message:
-----------
[WPD] Don't optimize calls more than once
WPD currently assumes that there is a one to one correspondence between
type test assume sequences and virtual calls. However, with
-fstrict-vtable-pointers this may not be true. This ends up causing
crashes when we try to optimize a virtual call more than once (
applyUniformRetValOpt()/applyUniqueRetValOpt()/applyVirtualConstProp()/applySingleImplDevirt()).
applySingleImplDevirt() actually didn't previous crash because it would
replace the devirtualized call with the same direct call. Adding an
assert that the call is indirect causes the corresponding test to crash
with the rest of the patch.
This makes Chrome successfully build with -fstrict-vtable-pointers + WPD.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D104798
More information about the All-commits
mailing list