diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/dfg/DFGCSEPhase.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGCSEPhase.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGCSEPhase.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGCSEPhase.h b/Source/JavaScriptCore/dfg/DFGCSEPhase.h index 1dfd2b7dd..a8042ecdd 100644 --- a/Source/JavaScriptCore/dfg/DFGCSEPhase.h +++ b/Source/JavaScriptCore/dfg/DFGCSEPhase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Apple Inc. All rights reserved. + * Copyright (C) 2011, 2014 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,10 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DFGCSEPhase_h -#define DFGCSEPhase_h - -#include <wtf/Platform.h> +#pragma once #if ENABLE(DFG_JIT) @@ -36,18 +33,21 @@ namespace JSC { namespace DFG { class Graph; -// Block-local common subexpression elimination. This is an optional phase, but -// it is rather profitable. It has fairly accurate heap modeling and will match -// a wide range of subexpression similarities. It's known to produce big wins -// on a few benchmarks, and is relatively cheap to run. -bool performCSE(Graph&); - -// Perform just block-local store elimination. -bool performStoreElimination(Graph&); +// Block-local common subexpression elimination. It uses clobberize() for heap +// modeling, which is quite precise. This phase is known to produce big wins on +// a few benchmarks, and is relatively cheap to run. +// +// Note that this phase also gets rid of Identity nodes, which means that it's +// currently not an optional phase. Basically, DFG IR doesn't have use-lists, +// so there is no instantaneous replaceAllUsesWith operation. Instead, you turn +// a node into an Identity and wait for CSE to clean it up. +bool performLocalCSE(Graph&); + +// Same, but global. Only works for SSA. This will find common subexpressions +// both in the same block and in any block that dominates the current block. It +// has no limits on how far it will look for load-elimination opportunities. +bool performGlobalCSE(Graph&); } } // namespace JSC::DFG #endif // ENABLE(DFG_JIT) - -#endif // DFGCSEPhase_h - |