6709742: find_base_for_derived's use of Ideal NULL is unsafe causing crashes during register allocation

Create a mach node corresponding to ideal node ConP #NULL specifically for derived pointers.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2009-04-22 17:03:18 -07:00
parent b9f27b5eea
commit 273a47426e
4 changed files with 62 additions and 6 deletions

View file

@ -109,6 +109,9 @@ class Matcher : public PhaseTransform {
Node* _mem_node; // Ideal memory node consumed by mach node
#endif
// Mach node for ConP #NULL
MachNode* _mach_null;
public:
int LabelRootDepth;
static const int base2reg[]; // Map Types to machine register types
@ -122,6 +125,8 @@ public:
static RegMask mreg2regmask[];
static RegMask STACK_ONLY_mask;
MachNode* mach_null() const { return _mach_null; }
bool is_shared( Node *n ) { return _shared.test(n->_idx) != 0; }
void set_shared( Node *n ) { _shared.set(n->_idx); }
bool is_visited( Node *n ) { return _visited.test(n->_idx) != 0; }