mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 04:24:49 +02:00
6797305: Add LoadUB and LoadUI opcode class
Add a LoadUB (unsigned byte) and LoadUI (unsigned int) opcode class so we have these load optimizations in the first place and do not need to handle them in the matcher. Reviewed-by: never, kvn
This commit is contained in:
parent
26d192003f
commit
89cea91c48
17 changed files with 726 additions and 186 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -207,6 +207,19 @@ public:
|
|||
virtual BasicType memory_type() const { return T_BYTE; }
|
||||
};
|
||||
|
||||
//------------------------------LoadUBNode-------------------------------------
|
||||
// Load a unsigned byte (8bits unsigned) from memory
|
||||
class LoadUBNode : public LoadNode {
|
||||
public:
|
||||
LoadUBNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt* ti = TypeInt::UBYTE )
|
||||
: LoadNode(c, mem, adr, at, ti) {}
|
||||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return Op_RegI; }
|
||||
virtual Node* Ideal(PhaseGVN *phase, bool can_reshape);
|
||||
virtual int store_Opcode() const { return Op_StoreB; }
|
||||
virtual BasicType memory_type() const { return T_BYTE; }
|
||||
};
|
||||
|
||||
//------------------------------LoadUSNode-------------------------------------
|
||||
// Load an unsigned short/char (16bits unsigned) from memory
|
||||
class LoadUSNode : public LoadNode {
|
||||
|
@ -232,6 +245,18 @@ public:
|
|||
virtual BasicType memory_type() const { return T_INT; }
|
||||
};
|
||||
|
||||
//------------------------------LoadUI2LNode-----------------------------------
|
||||
// Load an unsigned integer into long from memory
|
||||
class LoadUI2LNode : public LoadNode {
|
||||
public:
|
||||
LoadUI2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeLong* t = TypeLong::UINT)
|
||||
: LoadNode(c, mem, adr, at, t) {}
|
||||
virtual int Opcode() const;
|
||||
virtual uint ideal_reg() const { return Op_RegL; }
|
||||
virtual int store_Opcode() const { return Op_StoreL; }
|
||||
virtual BasicType memory_type() const { return T_LONG; }
|
||||
};
|
||||
|
||||
//------------------------------LoadRangeNode----------------------------------
|
||||
// Load an array length from the array
|
||||
class LoadRangeNode : public LoadINode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue