< prev index next >

src/share/vm/opto/ifnode.cpp

Print this page

        

*** 21,30 **** --- 21,31 ---- * questions. * */ #include "precompiled.hpp" + #include "gc_implementation/shenandoah/shenandoahHeap.hpp" #include "memory/allocation.inline.hpp" #include "opto/addnode.hpp" #include "opto/cfgnode.hpp" #include "opto/connode.hpp" #include "opto/loopnode.hpp"
*** 607,616 **** --- 608,640 ---- // Give up the search at true merges return NULL; // Dead loop? Or hit root? } + bool IfNode::is_shenandoah_marking_if(PhaseTransform *phase) const { + if (!UseShenandoahGC) { + return false; + } + + if (Opcode() != Op_If) { + return false; + } + + Node* bol = in(1); + assert(bol->is_Bool(), ""); + Node* cmpx = bol->in(1); + if (bol->as_Bool()->_test._test == BoolTest::ne && + cmpx->is_Cmp() && cmpx->in(2) == phase->intcon(0) && + cmpx->in(1)->in(1)->is_shenandoah_state_load() && + cmpx->in(1)->in(2)->is_Con() && + cmpx->in(1)->in(2) == phase->intcon(ShenandoahHeap::MARKING)) { + return true; + } + + return false; + } + //------------------------------filtered_int_type-------------------------------- // Return a possibly more restrictive type for val based on condition control flow for an if const TypeInt* IfNode::filtered_int_type(PhaseGVN* gvn, Node *val, Node* if_proj) { assert(if_proj &&
< prev index next >