Skip to content

Conversation

@wenju-he
Copy link
Contributor

The flag reduces nvptx64--nvidiacl.bc size from 10.6MB to 5.2MB.

The flag reduces nvptx64--nvidiacl.bc size from 10.6MB to 5.2MB.
@wenju-he wenju-he requested a review from frasercrmck July 16, 2025 04:26
Copy link
Contributor

@frasercrmck frasercrmck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice find.

I think this could optionally do with a comment before explaining what this flag is helping to achieve, but it's not a blocker.

@wenju-he
Copy link
Contributor Author

I think this could optionally do with a comment before explaining what this flag is helping to achieve, but it's not a blocker.

it is explained at https://clang.llvm.org/docs/UsersManual.html#id72 and reducing size and verbosity is what this flag is intended for. I mean the flag doesn't have another meaning.

@wenju-he wenju-he merged commit 9d78eb5 into llvm:main Jul 17, 2025
10 checks passed
@wenju-he wenju-he deleted the fdiscard-value-names branch July 17, 2025 01:02
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 17, 2025

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building libclc at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/38396

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
...
PASS: lld :: COFF/exclude-symbols.s (98673 of 101648)
PASS: lld :: COFF/exclude-symbols-embedded.s (98674 of 101648)
PASS: lld :: COFF/arm64ec-import-range-ext.test (98675 of 101648)
PASS: cfi-standalone-lld-thinlto-x86_64 :: simple-fail.cpp (98676 of 101648)
PASS: lit :: discovery.py (98677 of 101648)
PASS: cfi-devirt-lld-thinlto-x86_64 :: cross-dso/icall/dlopen.cpp (98678 of 101648)
PASS: lld :: COFF/comdat-selection-associative-largest.s (98679 of 101648)
PASS: lld :: COFF/eh_frame_terminator.s (98680 of 101648)
PASS: lit :: googletest-timeout.py (98681 of 101648)
TIMEOUT: MLIR :: Examples/standalone/test.toy (98682 of 101648)
******************** TEST 'MLIR :: Examples/standalone/test.toy' FAILED ********************
Exit Code: 1
Timeout: Reached timeout of 60 seconds

Command Output (stdout):
--
# RUN: at line 1
"/etc/cmake/bin/cmake" "/build/buildbot/premerge-monolithic-linux/llvm-project/mlir/examples/standalone" -G "Ninja"  -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang  -DLLVM_ENABLE_LIBCXX=OFF -DMLIR_DIR=/build/buildbot/premerge-monolithic-linux/build/lib/cmake/mlir  -DLLVM_USE_LINKER=lld  -DPython3_EXECUTABLE="/usr/bin/python3.10"
# executed command: /etc/cmake/bin/cmake /build/buildbot/premerge-monolithic-linux/llvm-project/mlir/examples/standalone -G Ninja -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang -DLLVM_ENABLE_LIBCXX=OFF -DMLIR_DIR=/build/buildbot/premerge-monolithic-linux/build/lib/cmake/mlir -DLLVM_USE_LINKER=lld -DPython3_EXECUTABLE=/usr/bin/python3.10
# .---command stdout------------
# | -- The CXX compiler identification is Clang 16.0.6
# | -- The C compiler identification is Clang 16.0.6
# | -- Detecting CXX compiler ABI info
# | -- Detecting CXX compiler ABI info - done
# | -- Check for working CXX compiler: /usr/bin/clang++ - skipped
# | -- Detecting CXX compile features
# | -- Detecting CXX compile features - done
# | -- Detecting C compiler ABI info
# | -- Detecting C compiler ABI info - done
# | -- Check for working C compiler: /usr/bin/clang - skipped
# | -- Detecting C compile features
# | -- Detecting C compile features - done
# | -- Looking for histedit.h
# | -- Looking for histedit.h - found
# | -- Found LibEdit: /usr/include (found version "2.11") 
# | -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
# | -- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.13") 
# | -- Using MLIRConfig.cmake in: /build/buildbot/premerge-monolithic-linux/build/lib/cmake/mlir
# | -- Using LLVMConfig.cmake in: /build/buildbot/premerge-monolithic-linux/build/lib/cmake/llvm
# | -- Linker detection: unknown
# | -- Performing Test LLVM_LIBSTDCXX_MIN
# | -- Performing Test LLVM_LIBSTDCXX_MIN - Success
# | -- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR
# | -- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR - Success
# | -- Performing Test CXX_SUPPORTS_CUSTOM_LINKER
# | -- Performing Test CXX_SUPPORTS_CUSTOM_LINKER - Success
# | -- Performing Test C_SUPPORTS_FPIC
# | -- Performing Test C_SUPPORTS_FPIC - Success
# | -- Performing Test CXX_SUPPORTS_FPIC

SquallATF pushed a commit to SquallATF/llvm-project that referenced this pull request Sep 25, 2025
…ze (llvm#149016)

The flag reduces nvptx64--nvidiacl.bc size from 10.6MB to 5.2MB.
SquallATF pushed a commit to SquallATF/llvm-project that referenced this pull request Oct 22, 2025
…ze (llvm#149016)

The flag reduces nvptx64--nvidiacl.bc size from 10.6MB to 5.2MB.
SquallATF pushed a commit to SquallATF/llvm-project that referenced this pull request Nov 6, 2025
…ze (llvm#149016)

The flag reduces nvptx64--nvidiacl.bc size from 10.6MB to 5.2MB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants