-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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().
- Loading branch information
Showing
3 changed files
with
128 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters