Codegen difference between Asserts and No-Asserts mode

Hi,

What is the guarantee that the codegen is same across Release and Release+Asserts build (except the known differences)?

I assume there is no guarantee and it is possible to drop a bug like this. Personally I feel it is very expensive to debug and it depends on each scenario.

Most of the bots test the Release+Asserts mode and any thoughts on how we can catch this sort of a problem with minimal set of changes to build infrastructure?

–Sumanth G

Hi Sumanth,

I don't know to what you're referring, but the output from Release vs. Release+Asserts should be identical. There might be differences in the IR value names, but if that is affecting the final result, that's a bug.

-Hal

I imagine that the Clang “Check Compile Flow Consistency” tool (tools/clang/utils/check_cfc) would be a good fit for this sort of testing. It’s currently used to verify that adding -g does not affect codegen or that compiling via a .s file produces the same codegen as a directly emitted object, so it may not be too much of a stretch to use it to verify that two different sets of compiler binaries produce identical codegen. Obviously you’d need a bot that was building both sets of executables first. Unfortunately, I don’t have any time to look at doing this myself but I expect it would be worthwhile thing to do if someone wanted to pick this up.

-Greg

Thanks for the information Greg. I will look in to this further.

–Sumanth G