[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
Tue Oct 24 13:43:12 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/Driver.cpp:1112-1113
   mergeSections();
-  if (Config->ICF)
-    doIcf<ELFT>();
 
----------------
This change is dubious. ICF is not a part of writing a result, so it shouldn't be moved there.


================
Comment at: ELF/EhFrame.cpp:67
 
+static bool equalsFde(EhSectionPiece *A, EhSectionPiece *B) {
+  // We want to compare FDEs contents, for that we want to ignore
----------------
I doubt if this is correct because this function seems to compare contents only byte-by-byte. You need to handle relocations right?


https://reviews.llvm.org/D38319





More information about the llvm-commits mailing list