Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary idiom recognition assertions #17949

Merged

Commits on Aug 16, 2023

  1. Remove unnecessary idiom recognition assertions

    There are uses of TR_ASSERT() in idiom recognition that check for cases
    that are not necessarily impossible and that are handled conservatively
    in builds where TR_ASSERT() is not checked. Assertions are not a good
    way to detect and report these cases, since assertion failure is not
    likely to be due to a bug.
    
    This commit removes a number of these assertions. Now the conservative
    logic will apply in all builds. When it does, a static debug counter
    will be incremented, and (when tracing idiom recognition) a message will
    be printed to the log.
    
    Anyone who wants to look for transformations that have been prevented
    due to incomplete support for a particular case can use the new static
    debug counters.
    
    Additionally, use dumpOptDetails() to trace when a transformer fails.
    In that case it's misleading to leave the log showing only the message
    from performTransformation().
    jdmpapin committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    6ef55f5 View commit details
    Browse the repository at this point in the history