Changeset 96482 in webkit
- Timestamp:
- Oct 2, 2011 7:13:11 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r96479 r96482 1 2011-10-02 Filip Pizlo <fpizlo@apple.com> 2 3 DFG misses some obvious opportunities for common subexpression elimination 4 https://bugs.webkit.org/show_bug.cgi?id=69233 5 6 Reviewed by Oliver Hunt. 7 8 0.7% speed-up on SunSpider. 9 10 * dfg/DFGPropagator.cpp: 11 (JSC::DFG::Propagator::getByValLoadElimination): 12 (JSC::DFG::Propagator::getMethodLoadElimination): 13 (JSC::DFG::Propagator::checkStructureLoadElimination): 14 (JSC::DFG::Propagator::getByOffsetLoadElimination): 15 (JSC::DFG::Propagator::getPropertyStorageLoadElimination): 16 (JSC::DFG::Propagator::performNodeCSE): 17 1 18 2011-10-02 Gavin Barraclough <barraclough@apple.com> 2 19 -
trunk/Source/JavaScriptCore/dfg/DFGPropagator.cpp
r96461 r96482 965 965 return node.child3(); 966 966 break; 967 case PutStructure: 968 case PutByOffset: 969 // GetByVal currently always speculates that it's accessing an 970 // array with an integer index, which means that it's impossible 971 // for a structure change or a put to property storage to affect 972 // the GetByVal. 973 break; 967 974 default: 968 break;969 }970 if (clobbersWorld(index))971 break;975 if (clobbersWorld(index)) 976 return NoNode; 977 break; 978 } 972 979 } 973 980 return NoNode; … … 979 986 for (NodeIndex index = m_compileIndex; index-- > start;) { 980 987 Node& node = m_graph[index]; 981 if (node.op == CheckMethod 982 && node.child1() == child1 983 && node.identifierNumber() == identifierNumber 984 && m_graph.m_methodCheckData[node.methodCheckDataIndex()] == methodCheckData) 985 return index; 986 if (clobbersWorld(index)) 987 break; 988 switch (node.op) { 989 case CheckMethod: 990 if (node.child1() == child1 991 && node.identifierNumber() == identifierNumber 992 && m_graph.m_methodCheckData[node.methodCheckDataIndex()] == methodCheckData) 993 return index; 994 break; 995 996 case PutByOffset: 997 // If a put was optimized to by-offset then it's not changing the structure 998 break; 999 1000 case PutByVal: 1001 case PutByValAlias: 1002 // PutByVal currently always speculates that it's accessing an array with an 1003 // integer index, which means that it's impossible for it to cause a structure 1004 // change. 1005 break; 1006 1007 default: 1008 if (clobbersWorld(index)) 1009 return NoNode; 1010 break; 1011 } 988 1012 } 989 1013 return NoNode; … … 1012 1036 break; 1013 1037 1038 case PutByVal: 1039 case PutByValAlias: 1040 // PutByVal currently always speculates that it's accessing an array with an 1041 // integer index, which means that it's impossible for it to cause a structure 1042 // change. 1043 break; 1044 1014 1045 default: 1015 1046 if (clobbersWorld(index)) … … 1045 1076 break; 1046 1077 1078 case PutByVal: 1079 case PutByValAlias: 1080 // PutByVal currently always speculates that it's accessing an array with an 1081 // integer index, which means that it's impossible for it to cause a structure 1082 // change. 1083 break; 1084 1047 1085 default: 1048 1086 if (clobbersWorld(index)) … … 1069 1107 // Changing the structure or putting to the storage cannot 1070 1108 // change the property storage pointer. 1109 break; 1110 1111 case PutByVal: 1112 case PutByValAlias: 1113 // PutByVal currently always speculates that it's accessing an array with an 1114 // integer index, which means that it's impossible for it to cause a structure 1115 // change. 1071 1116 break; 1072 1117 … … 1192 1237 case ArithSqrt: 1193 1238 case GetCallee: 1194 case GetArrayLength:1195 1239 case GetStringLength: 1196 1240 setReplacement(pureCSE(node)); 1241 break; 1242 1243 case GetArrayLength: 1244 setReplacement(impureCSE(node)); 1197 1245 break; 1198 1246
Note: See TracChangeset
for help on using the changeset viewer.