[PATCH] D154119: Fix: Distinguish CFI Metadata Checks in MergeFunctions Pass
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 5 15:03:58 PDT 2023
dexonsmith added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/FunctionComparator.cpp:810
+ return 0;
+ return -1;
+ }
----------------
oskarwirga wrote:
> dexonsmith wrote:
> > This breaks strict weak ordering, which means compareValues can never be used for sorting, which I assume is the whole point.
> I had to consult with ChatGPT about what strict weak ordering is, but IIUC what I am doing wrong here is that I am returning -1 no matter what rather than 1 vs -1 depending on L vs R and R vs L, is my understanding correct here?
Correct. As I suggested in my longer comment, it I suspect it’s better to fix this outside of the compare function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154119/new/
https://reviews.llvm.org/D154119
More information about the llvm-commits
mailing list