src/share/vm/ci/ciTypeFlow.hpp

Print this page


   1 /*
   2  * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 














  25 
  26 class ciTypeFlow : public ResourceObj {
  27 private:
  28   ciEnv*    _env;
  29   ciMethod* _method;
  30   ciMethodBlocks* _methodBlocks;
  31   int       _osr_bci;
  32 
  33   // information cached from the method:
  34   int _max_locals;
  35   int _max_stack;
  36   int _code_size;
  37   bool      _has_irreducible_entry;
  38 
  39   const char* _failure_reason;
  40 
  41 public:
  42   class StateVector;
  43   class Loop;
  44   class Block;


 907   // Perform the depth first type flow analysis. Helper for flow_types.
 908   void df_flow_types(Block* start,
 909                      bool do_flow,
 910                      StateVector* temp_vector,
 911                      JsrSet* temp_set);
 912 
 913   // Incrementally build loop tree.
 914   void build_loop_tree(Block* blk);
 915 
 916   // Create the block map, which indexes blocks in pre_order.
 917   void map_blocks();
 918 
 919 public:
 920   // Perform type inference flow analysis.
 921   void do_flow();
 922 
 923   void print_on(outputStream* st) const PRODUCT_RETURN;
 924 
 925   void rpo_print_on(outputStream* st) const PRODUCT_RETURN;
 926 };


   1 /*
   2  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_CI_CITYPEFLOW_HPP
  26 #define SHARE_VM_CI_CITYPEFLOW_HPP
  27 
  28 #ifdef COMPILER2
  29 #include "ci/ciEnv.hpp"
  30 #include "ci/ciKlass.hpp"
  31 #include "ci/ciMethodBlocks.hpp"
  32 #endif
  33 #ifdef SHARK
  34 #include "ci/ciEnv.hpp"
  35 #include "ci/ciKlass.hpp"
  36 #include "ci/ciMethodBlocks.hpp"
  37 #endif
  38 
  39 
  40 class ciTypeFlow : public ResourceObj {
  41 private:
  42   ciEnv*    _env;
  43   ciMethod* _method;
  44   ciMethodBlocks* _methodBlocks;
  45   int       _osr_bci;
  46 
  47   // information cached from the method:
  48   int _max_locals;
  49   int _max_stack;
  50   int _code_size;
  51   bool      _has_irreducible_entry;
  52 
  53   const char* _failure_reason;
  54 
  55 public:
  56   class StateVector;
  57   class Loop;
  58   class Block;


 921   // Perform the depth first type flow analysis. Helper for flow_types.
 922   void df_flow_types(Block* start,
 923                      bool do_flow,
 924                      StateVector* temp_vector,
 925                      JsrSet* temp_set);
 926 
 927   // Incrementally build loop tree.
 928   void build_loop_tree(Block* blk);
 929 
 930   // Create the block map, which indexes blocks in pre_order.
 931   void map_blocks();
 932 
 933 public:
 934   // Perform type inference flow analysis.
 935   void do_flow();
 936 
 937   void print_on(outputStream* st) const PRODUCT_RETURN;
 938 
 939   void rpo_print_on(outputStream* st) const PRODUCT_RETURN;
 940 };
 941 
 942 #endif // SHARE_VM_CI_CITYPEFLOW_HPP