[PATCH] D38319: [ELF] - Teach ICF to take FDEs into account when doing code folding.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 20:16:59 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/EhFrame.cpp:67
 
+bool elf::areFdesEqual(EhSectionPiece *A, EhSectionPiece *B) {
+  if (!A || !B)
----------------
I wonder if you actually tried this.

Do you really have to care about padding?


================
Comment at: ELF/ICF.cpp:285
 
+  if (!areFdesEqual(A->Fde, B->Fde))
+    return false;
----------------
Rename equalsFde


================
Comment at: ELF/InputSection.h:330
 
+  EhSectionPiece *Fde = nullptr;
+
----------------
I strongly doubt if this is correct because the relationship between input sections and fdes is 1 to many.


https://reviews.llvm.org/D38319





More information about the llvm-commits mailing list