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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 05:35:16 PDT 2017


grimar added inline comments.


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


================
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
----------------
ruiu wrote:
> I doubt if this is correct because this function seems to compare contents only byte-by-byte. You need to handle relocations right?
I have already answered the same question here:
https://reviews.llvm.org/D38319#inline-335138


https://reviews.llvm.org/D38319





More information about the llvm-commits mailing list