WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
the patch
blah.patch (text/plain), 4.99 KB, created by
Filip Pizlo
on 2013-07-02 19:28:50 PDT
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Filip Pizlo
Created:
2013-07-02 19:28:50 PDT
Size:
4.99 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 152333) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,35 @@ >+2013-07-02 Filip Pizlo <fpizlo@apple.com> >+ >+ fourthTier: Have fewer Arrayify's >+ https://bugs.webkit.org/show_bug.cgi?id=118335 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ A lot of Arrayify's arise because some program saw Int32 arrays early on in >+ execution, but then they all got converted to Double arrays and the program >+ will never see Int32 arrays ever again. Prior to this change you would always >+ have an Arrayify in this case. But with this change, the first time that an >+ ArrayProfile is about to go polymorphic in computeUpdatedPrediction(), it >+ instead forcibly monomorphises itself to the latest-seen structure. >+ Thereafter it will never again perform this monomorphisation. This is >+ controlled by ArrayProfile::m_didPerformFirstRunPruning. This is a 5% >+ speed-up on Kraken/imaging-gaussian-blur with the FTL enabled, and it >+ unblocks a bunch of stuff we want to do in the future because it makes a >+ bunch of loops effect-free. >+ >+ We will still want to implement Arrayify hoisting in the future, but this is >+ great anyway because it's better to not have Arrayifications than it is to >+ have hoisted Arrayifications. >+ >+ * bytecode/ArrayProfile.cpp: >+ (JSC::ArrayProfile::computeUpdatedPrediction): >+ (JSC::ArrayProfile::briefDescription): >+ (JSC): >+ (JSC::ArrayProfile::briefDescriptionWithoutUpdating): >+ * bytecode/ArrayProfile.h: >+ (JSC::ArrayProfile::ArrayProfile): >+ (ArrayProfile): >+ > 2013-07-02 Filip Pizlo <fpizlo@apple.com> > > fourthTier: add option to disable OSR entry in loops >Index: Source/JavaScriptCore/bytecode/ArrayProfile.cpp >=================================================================== >--- Source/JavaScriptCore/bytecode/ArrayProfile.cpp (revision 152332) >+++ Source/JavaScriptCore/bytecode/ArrayProfile.cpp (working copy) >@@ -78,6 +78,14 @@ void ArrayProfile::computeUpdatedPredict > { > if (m_lastSeenStructure) { > m_observedArrayModes |= arrayModeFromStructure(m_lastSeenStructure); >+ >+ if (!m_didPerformFirstRunPruning >+ && hasTwoOrMoreBitsSet(m_observedArrayModes)) { >+ m_observedArrayModes = arrayModeFromStructure(m_lastSeenStructure); >+ m_expectedStructure = 0; >+ m_didPerformFirstRunPruning = true; >+ } >+ > m_mayInterceptIndexedAccesses |= > m_lastSeenStructure->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero(); > if (!codeBlock->globalObject()->isOriginalArrayStructure(m_lastSeenStructure)) >@@ -103,7 +111,11 @@ void ArrayProfile::computeUpdatedPredict > CString ArrayProfile::briefDescription(const ConcurrentJITLocker& locker, CodeBlock* codeBlock) > { > computeUpdatedPrediction(locker, codeBlock); >- >+ return briefDescriptionWithoutUpdating(locker); >+} >+ >+CString ArrayProfile::briefDescriptionWithoutUpdating(const ConcurrentJITLocker& locker) >+{ > StringPrintStream out; > > bool hasPrinted = false; >Index: Source/JavaScriptCore/bytecode/ArrayProfile.h >=================================================================== >--- Source/JavaScriptCore/bytecode/ArrayProfile.h (revision 152332) >+++ Source/JavaScriptCore/bytecode/ArrayProfile.h (working copy) >@@ -126,6 +126,7 @@ public: > , m_outOfBounds(false) > , m_mayInterceptIndexedAccesses(false) > , m_usesOriginalArrayStructures(true) >+ , m_didPerformFirstRunPruning(false) > , m_observedArrayModes(0) > { > } >@@ -138,6 +139,7 @@ public: > , m_outOfBounds(false) > , m_mayInterceptIndexedAccesses(false) > , m_usesOriginalArrayStructures(true) >+ , m_didPerformFirstRunPruning(false) > , m_observedArrayModes(0) > { > } >@@ -179,6 +181,7 @@ public: > bool usesOriginalArrayStructures(const ConcurrentJITLocker&) const { return m_usesOriginalArrayStructures; } > > CString briefDescription(const ConcurrentJITLocker&, CodeBlock*); >+ CString briefDescriptionWithoutUpdating(const ConcurrentJITLocker&); > > private: > friend class LLIntOffsetsExtractor; >@@ -190,8 +193,9 @@ private: > Structure* m_expectedStructure; > bool m_mayStoreToHole; // This flag may become overloaded to indicate other special cases that were encountered during array access, as it depends on indexing type. Since we currently have basically just one indexing type (two variants of ArrayStorage), this flag for now just means exactly what its name implies. > bool m_outOfBounds; >- bool m_mayInterceptIndexedAccesses; >- bool m_usesOriginalArrayStructures; >+ bool m_mayInterceptIndexedAccesses : 1; >+ bool m_usesOriginalArrayStructures : 1; >+ bool m_didPerformFirstRunPruning : 1; > ArrayModes m_observedArrayModes; > }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mhahnenberg
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 118335
: 205963