hotspot/src/share/vm/shark/sharkState.hpp
author stefank
Tue, 23 Nov 2010 13:22:55 -0800
changeset 7397 5b173b4ca846
parent 6187 4fa7845f7c14
permissions -rw-r--r--
6989984: Use standard include model for Hospot Summary: Replaced MakeDeps and the includeDB files with more standardized solutions. Reviewed-by: coleenp, kvn, kamg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     1
/*
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
     2
 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     3
 * Copyright 2008, 2009 Red Hat, Inc.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     5
 *
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     8
 * published by the Free Software Foundation.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
     9
 *
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    14
 * accompanied this code).
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    15
 *
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    19
 *
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    22
 * questions.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    23
 *
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    24
 */
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    25
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    26
#ifndef SHARE_VM_SHARK_SHARKSTATE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    27
#define SHARE_VM_SHARK_SHARKSTATE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    28
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    29
#include "ci/ciMethod.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    30
#include "memory/allocation.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    31
#include "shark/llvmHeaders.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    32
#include "shark/sharkBuilder.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    33
#include "shark/sharkInvariants.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    34
#include "shark/sharkValue.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
    35
6187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    36
class SharkState : public SharkTargetInvariants {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    37
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    38
  SharkState(const SharkTargetInvariants* parent)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    39
    : SharkTargetInvariants(parent),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    40
      _method(NULL),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    41
      _oop_tmp(NULL),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    42
      _has_safepointed(false) { initialize(NULL); }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    43
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    44
  SharkState(const SharkState* state)
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    45
    : SharkTargetInvariants(state),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    46
      _method(state->_method),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    47
      _oop_tmp(state->_oop_tmp),
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    48
      _has_safepointed(state->_has_safepointed) { initialize(state); }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    49
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    50
 private:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    51
  void initialize(const SharkState* state);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    52
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    53
 private:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    54
  llvm::Value* _method;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    55
  SharkValue** _locals;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    56
  SharkValue** _stack;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    57
  SharkValue** _sp;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    58
  int          _num_monitors;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    59
  llvm::Value* _oop_tmp;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    60
  bool         _has_safepointed;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    61
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    62
  // Method
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    63
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    64
  llvm::Value** method_addr() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    65
    return &_method;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    66
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    67
  llvm::Value* method() const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    68
    return _method;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    69
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    70
 protected:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    71
  void set_method(llvm::Value* method) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    72
    _method = method;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    73
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    74
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    75
  // Local variables
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    76
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    77
  SharkValue** local_addr(int index) const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    78
    assert(index >= 0 && index < max_locals(), "bad local variable index");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    79
    return &_locals[index];
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    80
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    81
  SharkValue* local(int index) const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    82
    return *local_addr(index);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    83
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    84
  void set_local(int index, SharkValue* value) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    85
    *local_addr(index) = value;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    86
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    87
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    88
  // Expression stack
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    89
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    90
  SharkValue** stack_addr(int slot) const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    91
    assert(slot >= 0 && slot < stack_depth(), "bad stack slot");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    92
    return &_sp[-(slot + 1)];
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    93
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    94
  SharkValue* stack(int slot) const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    95
    return *stack_addr(slot);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    96
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    97
 protected:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    98
  void set_stack(int slot, SharkValue* value) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
    99
    *stack_addr(slot) = value;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   100
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   101
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   102
  int stack_depth() const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   103
    return _sp - _stack;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   104
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   105
  void push(SharkValue* value) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   106
    assert(stack_depth() < max_stack(), "stack overrun");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   107
    *(_sp++) = value;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   108
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   109
  SharkValue* pop() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   110
    assert(stack_depth() > 0, "stack underrun");
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   111
    return *(--_sp);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   112
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   113
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   114
  // Monitors
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   115
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   116
  int num_monitors() const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   117
    return _num_monitors;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   118
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   119
  void set_num_monitors(int num_monitors) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   120
    _num_monitors = num_monitors;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   121
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   122
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   123
  // Temporary oop slot
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   124
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   125
  llvm::Value** oop_tmp_addr() {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   126
    return &_oop_tmp;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   127
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   128
  llvm::Value* oop_tmp() const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   129
    return _oop_tmp;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   130
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   131
  void set_oop_tmp(llvm::Value* oop_tmp) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   132
    _oop_tmp = oop_tmp;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   133
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   134
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   135
  // Safepointed status
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   136
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   137
  bool has_safepointed() const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   138
    return _has_safepointed;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   139
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   140
  void set_has_safepointed(bool has_safepointed) {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   141
    _has_safepointed = has_safepointed;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   142
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   143
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   144
  // Comparison
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   145
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   146
  bool equal_to(SharkState* other);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   147
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   148
  // Copy and merge
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   149
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   150
  SharkState* copy() const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   151
    return new SharkState(this);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   152
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   153
  void merge(SharkState*       other,
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   154
             llvm::BasicBlock* other_block,
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   155
             llvm::BasicBlock* this_block);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   156
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   157
  // Value replacement
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   158
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   159
  void replace_all(SharkValue* old_value, SharkValue* new_value);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   160
};
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   161
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   162
class SharkTopLevelBlock;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   163
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   164
// SharkNormalEntryState objects are used to create the state
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   165
// that the method will be entered with for a normal invocation.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   166
class SharkNormalEntryState : public SharkState {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   167
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   168
  SharkNormalEntryState(SharkTopLevelBlock* block,
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   169
                        llvm::Value*        method);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   170
};
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   171
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   172
// SharkOSREntryState objects are used to create the state
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   173
// that the method will be entered with for an OSR invocation.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   174
class SharkOSREntryState : public SharkState {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   175
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   176
  SharkOSREntryState(SharkTopLevelBlock* block,
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   177
                     llvm::Value*        method,
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   178
                     llvm::Value*        osr_buf);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   179
};
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   180
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   181
// SharkPHIState objects are used to manage the entry state
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   182
// for blocks with more than one entry path or for blocks
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   183
// entered from blocks that will be compiled later.
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   184
class SharkPHIState : public SharkState {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   185
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   186
  SharkPHIState(SharkTopLevelBlock* block);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   187
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   188
 private:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   189
  SharkTopLevelBlock* _block;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   190
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   191
 private:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   192
  SharkTopLevelBlock* block() const {
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   193
    return _block;
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   194
  }
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   195
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   196
 public:
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   197
  void add_incoming(SharkState* incoming_state);
4fa7845f7c14 6976186: integrate Shark HotSpot changes
twisti
parents:
diff changeset
   198
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
   199
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6187
diff changeset
   200
#endif // SHARE_VM_SHARK_SHARKSTATE_HPP