Index: src/hydrogen-uint32-analysis.h |
diff --git a/src/hydrogen-infer-representation.h b/src/hydrogen-uint32-analysis.h |
similarity index 71% |
copy from src/hydrogen-infer-representation.h |
copy to src/hydrogen-uint32-analysis.h |
index 7c605696c4b956152bdd9dfc74c83e80569e3714..59739d1ccf13ffc428996432417019a8a84c2829 100644 |
--- a/src/hydrogen-infer-representation.h |
+++ b/src/hydrogen-uint32-analysis.h |
@@ -25,8 +25,8 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-#ifndef V8_HYDROGEN_INFER_REPRESENTATION_H_ |
-#define V8_HYDROGEN_INFER_REPRESENTATION_H_ |
+#ifndef V8_HYDROGEN_UINT32_ANALYSIS_H_ |
+#define V8_HYDROGEN_UINT32_ANALYSIS_H_ |
#include "hydrogen.h" |
@@ -34,24 +34,26 @@ namespace v8 { |
namespace internal { |
-class HInferRepresentationPhase : public HPhase { |
+// Discover instructions that can be marked with kUint32 flag allowing |
+// them to produce full range uint32 values. |
+class HUint32AnalysisPhase : public HPhase { |
public: |
- explicit HInferRepresentationPhase(HGraph* graph) |
- : HPhase("H_Infer representations", graph), |
- worklist_(8, zone()), |
- in_worklist_(graph->GetMaximumValueID(), zone()) { } |
+ explicit HUint32AnalysisPhase(HGraph* graph) |
+ : HPhase("H_Compute safe UInt32 operations", graph), phis_(4, zone()) { } |
void Run(); |
- void AddToWorklist(HValue* current); |
private: |
- ZoneList<HValue*> worklist_; |
- BitVector in_worklist_; |
+ INLINE(bool IsSafeUint32Use(HValue* val, HValue* use)); |
+ INLINE(bool Uint32UsesAreSafe(HValue* uint32val)); |
+ INLINE(bool CheckPhiOperands(HPhi* phi)); |
+ INLINE(void UnmarkPhi(HPhi* phi, ZoneList<HPhi*>* worklist)); |
+ INLINE(void UnmarkUnsafePhis()); |
- DISALLOW_COPY_AND_ASSIGN(HInferRepresentationPhase); |
+ ZoneList<HPhi*> phis_; |
}; |
} } // namespace v8::internal |
-#endif // V8_HYDROGEN_INFER_REPRESENTATION_H_ |
+#endif // V8_HYDROGEN_UINT32_ANALYSIS_H_ |