< prev index next >

src/share/vm/opto/compile.hpp

Print this page




  30 #include "code/debugInfoRec.hpp"
  31 #include "code/exceptionHandlerTable.hpp"
  32 #include "compiler/compilerOracle.hpp"
  33 #include "compiler/compileBroker.hpp"
  34 #include "libadt/dict.hpp"
  35 #include "libadt/vectset.hpp"
  36 #include "memory/resourceArea.hpp"
  37 #include "opto/idealGraphPrinter.hpp"
  38 #include "opto/phasetype.hpp"
  39 #include "opto/phase.hpp"
  40 #include "opto/regmask.hpp"
  41 #include "runtime/deoptimization.hpp"
  42 #include "runtime/timerTrace.hpp"
  43 #include "runtime/vmThread.hpp"
  44 #include "trace/tracing.hpp"
  45 #include "utilities/ticks.hpp"
  46 
  47 class AddPNode;
  48 class Block;
  49 class Bundle;

  50 class C2Compiler;
  51 class CallGenerator;
  52 class CloneMap;
  53 class ConnectionGraph;
  54 class InlineTree;
  55 class Int_Array;
  56 class Matcher;
  57 class MachConstantNode;
  58 class MachConstantBaseNode;
  59 class MachNode;
  60 class MachOper;
  61 class MachSafePointNode;
  62 class Node;
  63 class Node_Array;
  64 class Node_Notes;
  65 class NodeCloneInfo;
  66 class OptoReg;
  67 class PhaseCFG;
  68 class PhaseGVN;
  69 class PhaseIterGVN;


1261   AliasType* find_alias_type(const TypePtr* adr_type, bool no_create, ciField* field);
1262 
1263   void verify_top(Node*) const PRODUCT_RETURN;
1264 
1265   // Intrinsic setup.
1266   void           register_library_intrinsics();                            // initializer
1267   CallGenerator* make_vm_intrinsic(ciMethod* m, bool is_virtual);          // constructor
1268   int            intrinsic_insertion_index(ciMethod* m, bool is_virtual, bool& found);  // helper
1269   CallGenerator* find_intrinsic(ciMethod* m, bool is_virtual);             // query fn
1270   void           register_intrinsic(CallGenerator* cg);                    // update fn
1271 
1272 #ifndef PRODUCT
1273   static juint  _intrinsic_hist_count[vmIntrinsics::ID_LIMIT];
1274   static jubyte _intrinsic_hist_flags[vmIntrinsics::ID_LIMIT];
1275 #endif
1276   // Function calls made by the public function final_graph_reshaping.
1277   // No need to be made public as they are not called elsewhere.
1278   void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc);
1279   void final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc );
1280   void eliminate_redundant_card_marks(Node* n);

1281 
1282  public:
1283 
1284   // Note:  Histogram array size is about 1 Kb.
1285   enum {                        // flag bits:
1286     _intrinsic_worked = 1,      // succeeded at least once
1287     _intrinsic_failed = 2,      // tried it but it failed
1288     _intrinsic_disabled = 4,    // was requested but disabled (e.g., -XX:-InlineUnsafeOps)
1289     _intrinsic_virtual = 8,     // was seen in the virtual form (rare)
1290     _intrinsic_both = 16        // was seen in the non-virtual form (usual)
1291   };
1292   // Update histogram.  Return boolean if this is a first-time occurrence.
1293   static bool gather_intrinsic_statistics(vmIntrinsics::ID id,
1294                                           bool is_virtual, int flags) PRODUCT_RETURN0;
1295   static void print_intrinsic_statistics() PRODUCT_RETURN;
1296 
1297   // Graph verification code
1298   // Walk the node list, verifying that there is a one-to-one
1299   // correspondence between Use-Def edges and Def-Use edges
1300   // The option no_dead_code enables stronger checks that the


1319 
1320   // Static parse-time type checking logic for gen_subtype_check:
1321   enum { SSC_always_false, SSC_always_true, SSC_easy_test, SSC_full_test };
1322   int static_subtype_check(ciKlass* superk, ciKlass* subk);
1323 
1324   static Node* conv_I2X_index(PhaseGVN* phase, Node* offset, const TypeInt* sizetype,
1325                               // Optional control dependency (for example, on range check)
1326                               Node* ctrl = NULL);
1327 
1328   // Convert integer value to a narrowed long type dependent on ctrl (for example, a range check)
1329   static Node* constrained_convI2L(PhaseGVN* phase, Node* value, const TypeInt* itype, Node* ctrl);
1330 
1331   // Auxiliary method for randomized fuzzing/stressing
1332   static bool randomized_select(int count);
1333 
1334   // supporting clone_map
1335   CloneMap&     clone_map();
1336   void          set_clone_map(Dict* d);
1337 
1338   // Create value type node from arguments at method entry
1339   Node* create_vt_node(Node* n, ciValueKlass* vk, ciValueKlass* base_vk, int base_offset, int base_input);


1340 };
1341 
1342 #endif // SHARE_VM_OPTO_COMPILE_HPP


  30 #include "code/debugInfoRec.hpp"
  31 #include "code/exceptionHandlerTable.hpp"
  32 #include "compiler/compilerOracle.hpp"
  33 #include "compiler/compileBroker.hpp"
  34 #include "libadt/dict.hpp"
  35 #include "libadt/vectset.hpp"
  36 #include "memory/resourceArea.hpp"
  37 #include "opto/idealGraphPrinter.hpp"
  38 #include "opto/phasetype.hpp"
  39 #include "opto/phase.hpp"
  40 #include "opto/regmask.hpp"
  41 #include "runtime/deoptimization.hpp"
  42 #include "runtime/timerTrace.hpp"
  43 #include "runtime/vmThread.hpp"
  44 #include "trace/tracing.hpp"
  45 #include "utilities/ticks.hpp"
  46 
  47 class AddPNode;
  48 class Block;
  49 class Bundle;
  50 class CallNode;
  51 class C2Compiler;
  52 class CallGenerator;
  53 class CloneMap;
  54 class ConnectionGraph;
  55 class InlineTree;
  56 class Int_Array;
  57 class Matcher;
  58 class MachConstantNode;
  59 class MachConstantBaseNode;
  60 class MachNode;
  61 class MachOper;
  62 class MachSafePointNode;
  63 class Node;
  64 class Node_Array;
  65 class Node_Notes;
  66 class NodeCloneInfo;
  67 class OptoReg;
  68 class PhaseCFG;
  69 class PhaseGVN;
  70 class PhaseIterGVN;


1262   AliasType* find_alias_type(const TypePtr* adr_type, bool no_create, ciField* field);
1263 
1264   void verify_top(Node*) const PRODUCT_RETURN;
1265 
1266   // Intrinsic setup.
1267   void           register_library_intrinsics();                            // initializer
1268   CallGenerator* make_vm_intrinsic(ciMethod* m, bool is_virtual);          // constructor
1269   int            intrinsic_insertion_index(ciMethod* m, bool is_virtual, bool& found);  // helper
1270   CallGenerator* find_intrinsic(ciMethod* m, bool is_virtual);             // query fn
1271   void           register_intrinsic(CallGenerator* cg);                    // update fn
1272 
1273 #ifndef PRODUCT
1274   static juint  _intrinsic_hist_count[vmIntrinsics::ID_LIMIT];
1275   static jubyte _intrinsic_hist_flags[vmIntrinsics::ID_LIMIT];
1276 #endif
1277   // Function calls made by the public function final_graph_reshaping.
1278   // No need to be made public as they are not called elsewhere.
1279   void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc);
1280   void final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc );
1281   void eliminate_redundant_card_marks(Node* n);
1282   void value_type_return_from_mh_intrinsic(CallNode *call, Final_Reshape_Counts &frc);
1283 
1284  public:
1285 
1286   // Note:  Histogram array size is about 1 Kb.
1287   enum {                        // flag bits:
1288     _intrinsic_worked = 1,      // succeeded at least once
1289     _intrinsic_failed = 2,      // tried it but it failed
1290     _intrinsic_disabled = 4,    // was requested but disabled (e.g., -XX:-InlineUnsafeOps)
1291     _intrinsic_virtual = 8,     // was seen in the virtual form (rare)
1292     _intrinsic_both = 16        // was seen in the non-virtual form (usual)
1293   };
1294   // Update histogram.  Return boolean if this is a first-time occurrence.
1295   static bool gather_intrinsic_statistics(vmIntrinsics::ID id,
1296                                           bool is_virtual, int flags) PRODUCT_RETURN0;
1297   static void print_intrinsic_statistics() PRODUCT_RETURN;
1298 
1299   // Graph verification code
1300   // Walk the node list, verifying that there is a one-to-one
1301   // correspondence between Use-Def edges and Def-Use edges
1302   // The option no_dead_code enables stronger checks that the


1321 
1322   // Static parse-time type checking logic for gen_subtype_check:
1323   enum { SSC_always_false, SSC_always_true, SSC_easy_test, SSC_full_test };
1324   int static_subtype_check(ciKlass* superk, ciKlass* subk);
1325 
1326   static Node* conv_I2X_index(PhaseGVN* phase, Node* offset, const TypeInt* sizetype,
1327                               // Optional control dependency (for example, on range check)
1328                               Node* ctrl = NULL);
1329 
1330   // Convert integer value to a narrowed long type dependent on ctrl (for example, a range check)
1331   static Node* constrained_convI2L(PhaseGVN* phase, Node* value, const TypeInt* itype, Node* ctrl);
1332 
1333   // Auxiliary method for randomized fuzzing/stressing
1334   static bool randomized_select(int count);
1335 
1336   // supporting clone_map
1337   CloneMap&     clone_map();
1338   void          set_clone_map(Dict* d);
1339 
1340   // Create value type node from arguments at method entry
1341   Node* create_vt_node(Node* n, ciValueKlass* vk, ciValueKlass* base_vk, int base_offset, int base_input, bool in);
1342 
1343   void add_safepoint_edges(SafePointNode* call, JVMState* youngest_jvms, bool can_prune_locals = false, uint stack_slots_not_pruned = 0);
1344 };
1345 
1346 #endif // SHARE_VM_OPTO_COMPILE_HPP
< prev index next >