Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Run amdgpu-unify-metadata after build
Browse files Browse the repository at this point in the history
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
  • Loading branch information
arsenm committed Dec 21, 2022
1 parent 63ddefc commit 1806778
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/OCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ macro(opencl_bc_lib)
# Extra link step with internalize
COMMAND $<TARGET_FILE:llvm-link> -internalize -only-needed "${name}.link0${LIB_SUFFIX}"
-o "${OUT_NAME}${LIB_SUFFIX}" ${internal_link_libs}
COMMAND $<TARGET_FILE:opt> -passes=strip
COMMAND $<TARGET_FILE:opt> -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}"
Expand Down

0 comments on commit 1806778

Please sign in to comment.