src/share/vm/opto/machnode.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/machnode.hpp	Mon Aug 15 17:13:59 2011
--- new/src/share/vm/opto/machnode.hpp	Mon Aug 15 17:13:59 2011

*** 183,193 **** --- 183,192 ---- virtual MachNode *cisc_version(int offset, Compile* C); // Modify this instruction's register mask to use stack version for cisc_operand virtual void use_cisc_RegMask(); // Support for short branches virtual MachNode *short_branch_version(Compile* C) { return NULL; } bool may_be_short_branch() const { return (flags() & Flag_may_be_short_branch) != 0; } // Avoid back to back some instructions on some CPUs. bool avoid_back_to_back() const { return (flags() & Flag_avoid_back_to_back) != 0; }
*** 270,291 **** --- 269,284 ---- virtual const MachOper* memory_operand() const { return NULL; } // Call "get_base_and_disp" to decide which category of memory is used here. virtual const class TypePtr *adr_type() const; // Negate conditional branches. Error for non-branch Nodes virtual void negate(); // Apply peephole rule(s) to this instruction virtual MachNode *peephole( Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted, Compile* C ); // Top-level ideal Opcode matched virtual int ideal_Opcode() const { return Op_Node; } // Set the branch inside jump MachNodes. Error for non-branch Nodes. virtual void label_set( Label* label, uint block_num ); // Adds the label for the case virtual void add_case_label( int switch_val, Label* blockLabel); // Set the absolute address for methods virtual void method_set( intptr_t addr );
*** 512,540 **** --- 505,549 ---- virtual const char *Name() const { return "MachSpillCopy"; } virtual void format( PhaseRegAlloc *, outputStream *st ) const; #endif }; + //------------------------------MachBranchNode-------------------------------- + // Abstract machine branch Node + class MachBranchNode : public MachIdealNode { + public: + MachBranchNode() : MachIdealNode() { + init_class_id(Class_MachBranch); + } + virtual void label_set(Label* label, uint block_num) = 0; + virtual void save_label(Label** label, uint* block_num) = 0; + + // Support for short branches + virtual MachNode *short_branch_version(Compile* C) { return NULL; } + + virtual bool pinned() const { return true; }; + }; + //------------------------------MachNullChkNode-------------------------------- // Machine-dependent null-pointer-check Node. Points a real MachNode that is // also some kind of memory op. Turns the indicated MachNode into a // conditional branch with good latency on the ptr-not-null path and awful // latency on the pointer-is-null path. ! class MachNullCheckNode : public MachIdealNode { ! class MachNullCheckNode : public MachBranchNode { public: const uint _vidx; // Index of memop being tested ! MachNullCheckNode( Node *ctrl, Node *memop, uint vidx ) : MachIdealNode(), _vidx(vidx) { ! MachNullCheckNode( Node *ctrl, Node *memop, uint vidx ) : MachBranchNode(), _vidx(vidx) { init_class_id(Class_MachNullCheck); init_flags(Flag_is_Branch); add_req(ctrl); add_req(memop); } + virtual uint size_of() const { return sizeof(*this); } virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const; virtual void label_set(Label* label, uint block_num); ! virtual bool pinned() const { return true; }; ! virtual void save_label(Label** label, uint* block_num); virtual void negate() { } virtual const class Type *bottom_type() const { return TypeTuple::IFBOTH; } virtual uint ideal_reg() const { return NotAMachineReg; } virtual const RegMask &in_RegMask(uint) const; virtual const RegMask &out_RegMask() const { return RegMask::Empty; }
*** 576,603 **** --- 585,614 ---- #endif }; //------------------------------MachIfNode------------------------------------- // Machine-specific versions of IfNodes ! class MachIfNode : public MachNode { ! class MachIfNode : public MachBranchNode { virtual uint size_of() const { return sizeof(*this); } // Size is bigger public: float _prob; // Probability branch goes either way float _fcnt; // Frequency counter ! MachIfNode() : MachNode() { ! MachIfNode() : MachBranchNode() { init_class_id(Class_MachIf); } + // Negate conditional branches. + virtual void negate() = 0; #ifndef PRODUCT virtual void dump_spec(outputStream *st) const; #endif }; //------------------------------MachGotoNode----------------------------------- // Machine-specific versions of GotoNodes ! class MachGotoNode : public MachNode { ! class MachGotoNode : public MachBranchNode { public: ! MachGotoNode() : MachNode() { ! MachGotoNode() : MachBranchNode() { init_class_id(Class_MachGoto); } }; //------------------------------MachFastLockNode-------------------------------------

src/share/vm/opto/machnode.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File