[PATCH] D38998: [ELF] - Dedupliсate FDEs when sections are ICFed.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 20:41:44 PDT 2017
ruiu added inline comments.
================
Comment at: ELF/SyntheticSections.cpp:453-455
+ // We keep only FDEs that describes code that is:
+ // 1) Live after GC as we dont want to keep useless FDEs.
+ // 2) Not merged during ICF as we do not want to keep duplicate FDE entries.
----------------
// FDEs for garbage-collected or merged-by-ICF sections are dead.
================
Comment at: ELF/SyntheticSections.cpp:457-459
if (auto *D = dyn_cast<DefinedRegular>(&B))
if (D->Section)
+ FnSec = cast<InputSectionBase>(D->Section);
----------------
This code looks odd. The following code is more natural.
if (auto *D = dyn_cast<DefinedRegular>(&B))
if (auto *Sec = cast_or_null<InputSectionBase>(D->Section))
return Sec && ...;
return false;
https://reviews.llvm.org/D38998
More information about the llvm-commits
mailing list