Bug 145850 - Simplify things like CompareEq(@x,@x)
Summary: Simplify things like CompareEq(@x,@x)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-10 12:18 PDT by Filip Pizlo
Modified: 2015-07-22 21:53 PDT (History)
13 users (show)

See Also:


Attachments
should just work (3.79 KB, patch)
2015-06-10 14:58 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (4.73 KB, patch)
2015-07-22 20:03 PDT, Filip Pizlo
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2015-06-10 12:18:22 PDT
I'm seeing cases where these sort of float past our optimizations.  It's all because of silly omissions, like AI not handling CompareEq(@x, @x) and CFG simplification not being run in SSA.
Comment 1 Filip Pizlo 2015-06-10 14:58:18 PDT
Created attachment 254680 [details]
should just work
Comment 2 Filip Pizlo 2015-07-22 20:03:40 PDT
Created attachment 257330 [details]
the patch
Comment 3 WebKit Commit Bot 2015-07-22 20:06:02 PDT
Attachment 257330 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1193:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1193:  Multi line control clauses should use braces.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1194:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1195:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1196:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1197:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1198:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1199:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1253:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1253:  Multi line control clauses should use braces.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1254:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1255:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1256:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1257:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1258:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1259:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1260:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1261:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1262:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1263:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
Total errors found: 20 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Filip Pizlo 2015-07-22 20:08:55 PDT
(In reply to comment #3)
> Attachment 257330 [details] did not pass style-queue:
> 
> 
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1193: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1193: 
> Multi line control clauses should use braces.  [whitespace/braces] [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1194: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1195: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1196: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1197: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1198: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1199: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1253: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1253: 
> Multi line control clauses should use braces.  [whitespace/braces] [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1254: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1255: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1256: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1257: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1258: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1259: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1260: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1261: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1262: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> ERROR: Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:1263: 
> Boolean expressions that span multiple lines should have their operators on
> the left side of the line instead of the right side.  [whitespace/operators]
> [4]
> Total errors found: 20 in 4 files
> 
> 
> If any of these errors are false positives, please file a bug against
> check-webkit-style.

I intentionally broke with the custom here because I wanted the various conditions to line up.  I think it makes the code more legible in this case.
Comment 5 Filip Pizlo 2015-07-22 21:53:29 PDT
Landed in http://trac.webkit.org/changeset/187213