[llvm] [FuncComp] Compare MDNodes in cmpMetadata using cmpMDNode. (PR #128878)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 11 04:47:32 PDT 2025
https://github.com/fhahn commented:
> I'm somewhat unhappy about doing deep metadata comparison. IMHO, we should not be comparing instruction metadata at all, and instead doing a combineMetadata run to combine metadata between the merged functions. This results in more merging opportunities, while also avoiding the need to implement complex comparison logic.
>
> We _do_ need to compare metadata arguments to calls, but I think the inputs that are used there are a lot more limited -- I think it's pretty much only MDStrings?
There are a few intrinsics that take more complex metadata args including `llvm.experimental.noalias.scope.decl`(which has alias scope sets which may have self-references and `llvm.type.test`). I'll see if it would be possible to impose a simple set of restrictions on metadata as arguments.
https://github.com/llvm/llvm-project/pull/128878
More information about the llvm-commits
mailing list