diff options
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGSSAConversionPhase.h')
-rw-r--r-- | Source/JavaScriptCore/dfg/DFGSSAConversionPhase.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGSSAConversionPhase.h b/Source/JavaScriptCore/dfg/DFGSSAConversionPhase.h index 2fa5ff41a..03766896f 100644 --- a/Source/JavaScriptCore/dfg/DFGSSAConversionPhase.h +++ b/Source/JavaScriptCore/dfg/DFGSSAConversionPhase.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,10 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DFGSSAConversionPhase_h -#define DFGSSAConversionPhase_h - -#include <wtf/Platform.h> +#pragma once #if ENABLE(DFG_JIT) @@ -36,10 +33,9 @@ class Graph; // Convert ThreadedCPS form into SSA form. This results in a form that has: // -// - Roughly minimal Phi's. We use the Aycock & Horspool fixpoint for -// converting the CPS maximal Phis into SSA minimal Phis, with the caveat -// that irreducible control flow may result in some missed opportunities -// for Phi reduction. +// - Minimal Phi's. We use the the Cytron et al (TOPLAS'91) algorithm for +// Phi insertion. Most of the algorithm is implemented in SSACalculator +// and Dominators. // // - No uses of GetLocal/SetLocal except for captured variables and flushes. // After this, any remaining SetLocal means Flush. PhantomLocals become @@ -84,12 +80,6 @@ class Graph; // the caveat that the Phi predecessor block lists would have to be // updated). // -// The easiest way to convert from this SSA form into a different SSA -// form is to redo SSA conversion for Phi functions. That is, treat each -// Phi in our IR as a non-SSA variable in the foreign IR (so, as an -// alloca in LLVM IR, for example); the Upsilons that refer to the Phi -// become stores and the Phis themselves become loads. -// // Fun fact: Upsilon is so named because it comes before Phi in the // alphabet. It can be written as "Y". @@ -98,6 +88,3 @@ bool performSSAConversion(Graph&); } } // namespace JSC::DFG #endif // ENABLE(DFG_JIT) - -#endif // DFGSSAConversionPhase_h - |