Skip to content

Conversation

@rastogishubham
Copy link

@rastogishubham rastogishubham commented Nov 13, 2025

In Debug builds, the names of adjusted pointers have a pointer-specific name prefix which doesn't exist in non-debug builds.

This causes differences in output when looking at the output of SROA with a Debug or Release compiler.

For most of our ongoing testing, we use essentially Release+Asserts build (basically release but without NDEBUG defined), however we ship a Release compiler. Therefore we want to say with reasonable confidence that building a large project with Release vs a Release+Asserts build gives us the same output when the same compiler version is used.

This difference however, makes it difficult to prove that the output is the same if the only difference is the name when using LTO builds and looking at bitcode. We are using -fdiscard-value-names to make sure the LLVM IR as identical as possible.

Hence this change is being proposed.

In Debug builds, the names of adjusted pointers have a pointer-specific
name prefix which doesn't exist in non-debug builds.

This causes differences in output when looking at the output of SROA
with a Debug or Release compiler.

For most of our ongoing testing, we use essentially Release+Asserts
build (basically release but without NDEBUG defined), however we ship a
Release compiler. Therefore we want to say with reasonable confidence
that building a large project with Release vs a Release+Asserts build
gives us the same output when the same compiler version is used.

This difference however, makes it difficult to prove that the output is
the same if the only difference is the name when using LTO builds and
looking at bitcode.

Hence this change is being proposed.
@rastogishubham
Copy link
Author

To add to this, I looked at the output of the compile-time tracker and it looks to not increase compile-times by any significant amount

https://llvm-compile-time-tracker.com/compare.php?from=4d772de1526d824ac349de581509171fd02e1be7&to=707b8c29da343a0c9d66d7a4c713b5ae72c21786&stat=instructions:u

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.

1 participant