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/DFGOSRAvailabilityAnalysisPhase.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.h b/Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.h index 28bf505da..2433c040e 100644 --- a/Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.h +++ b/Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 2013, 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,13 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DFGOSRAvailabilityAnalysisPhase_h -#define DFGOSRAvailabilityAnalysisPhase_h - -#include <wtf/Platform.h> +#pragma once #if ENABLE(DFG_JIT) +#include "DFGBasicBlock.h" #include "DFGCommon.h" namespace JSC { namespace DFG { @@ -37,13 +35,28 @@ namespace JSC { namespace DFG { class Graph; // Computes BasicBlock::ssa->availabiltiyAtHead/Tail. This is a forward flow type inference -// over MovHints and SetLocals. +// over MovHints and SetLocals. This analysis is run directly by the Plan for preparing for +// lowering to B3 IR, but it can also be used as a utility. Note that if you run it before +// stack layout, all of the flush availability will omit the virtual register - but it will +// tell you the format. bool performOSRAvailabilityAnalysis(Graph&); +// Local calculator for figuring out the availability at any node in a basic block. Requires +// having run the availability analysis. +class LocalOSRAvailabilityCalculator { +public: + LocalOSRAvailabilityCalculator(Graph&); + ~LocalOSRAvailabilityCalculator(); + + void beginBlock(BasicBlock*); + void endBlock(BasicBlock*); // Useful if you want to get data for the end of the block. You don't need to call this if you did beginBlock() and then executeNode() for every node. + void executeNode(Node*); + + AvailabilityMap m_availability; + Graph& m_graph; +}; + } } // namespace JSC::DFG #endif // ENABLE(DFG_JIT) - -#endif // DFGOSRAvailabilityAnalysisPhase_h - |