From 180677850c63c6a8640ebce8fb56fa1c34f67dc3 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Thu, 8 Dec 2022 16:54:54 -0500 Subject: [PATCH] Run amdgpu-unify-metadata after build Run this hack pass to cleanup the extra version metadata from the linked bitcode files. Really these named nodes should have a setvector behavior. We probably shouldn't run this in the backend, the main reason we have it is from all the duplicates from the libraries. Saves about 1K in total bitcode file size. Change-Id: Ibc59fb57113b2734700d1717262c5aefa5c59c55 --- cmake/OCL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OCL.cmake b/cmake/OCL.cmake index c0cf83a..773c6f6 100644 --- a/cmake/OCL.cmake +++ b/cmake/OCL.cmake @@ -136,7 +136,7 @@ macro(opencl_bc_lib) # Extra link step with internalize COMMAND $ -internalize -only-needed "${name}.link0${LIB_SUFFIX}" -o "${OUT_NAME}${LIB_SUFFIX}" ${internal_link_libs} - COMMAND $ -passes=strip + COMMAND $ -passes=amdgpu-unify-metadata,strip -o "${OUT_NAME}${STRIP_SUFFIX}" "${OUT_NAME}${LIB_SUFFIX}" COMMAND "${PREPARE_BUILTINS}" -o ${OUTPUT_BC_LIB} "${OUT_NAME}${STRIP_SUFFIX}"