[BOLT-AArch64] Fix -icf, -use-old-text and -update-debug-sections
Summary: Refactor MCInst comparison code to support target-dependent functionality. This was necessary because AArch64 uses MCTargetExprs that only the AArch64 backend knows how to unpack it and compare. Also fix a bug where a relocation against a constant island would make BOLT create a fixed reference against a code location in a similar way to read-only data, so when we asked to -use-old-text, the code would break for this particular HHVM function (_ZN5folly2io4zlib18defaultZlibOptionsEv) because the reference now contains invalid data, since the original .text was overwritten. Finally, fix a bug with -update-debug-sections on AArch64 where the update loop wasn't expecting a function with zero basic blocks, which can happen on AArch64 because some functions contain just a constant island. (cherry picked from FBD7679244)
Loading
Please register or sign in to comment