[llvm] Fix: Distinguish CFI Metadata Checks in MergeFunctions Pass (PR #65963)

Oskar Wirga via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 03:31:23 PDT 2023


oskarwirga wrote:

> (Just to double-check: is `llvm.type.test` being (correctly) rejected for function merging for global types (not `distinct`) when it's not structurally equal? (I.e., pointing at two different global types.) I'm assuming "yes" below.)

Yes, because the typeid metadata are different. 

> Perhaps we don't need to compare functions at all; instead, we can filter out functions as candidates for merging if they have (non-debug info) intrinsics that reference distinct metadata. You're never comparing metadata. You're just checking it.

I like this idea, will put up a new patch. 


https://github.com/llvm/llvm-project/pull/65963


More information about the llvm-commits mailing list