1 /* 2 * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_OPTO_VECTOR_HPP 26 #define SHARE_OPTO_VECTOR_HPP 27 28 #include "opto/node.hpp" 29 #include "opto/phaseX.hpp" 30 #include "opto/type.hpp" 31 #include "opto/vectornode.hpp" 32 33 class PhaseVector : public Phase { 34 private: 35 PhaseIterGVN& _igvn; 36 37 void expand_vbox_nodes(); 38 void expand_vbox_node(VectorBoxNode* vec_box); 39 Node* expand_vbox_node_helper(Node* vbox, 40 Node* vect, 41 const TypeInstPtr* box_type, 42 const TypeVect* vect_type); 43 Node* expand_vbox_alloc_node(VectorBoxAllocateNode* vbox_alloc, 44 Node* value, 45 const TypeInstPtr* box_type, 46 const TypeVect* vect_type); 47 void scalarize_vbox_nodes(); 48 void scalarize_vbox_node(VectorBoxNode* vec_box); 49 void expand_vunbox_nodes(); 50 void expand_vunbox_node(VectorUnboxNode* vec_box); 51 void eliminate_vbox_alloc_nodes(); 52 void eliminate_vbox_alloc_node(VectorBoxAllocateNode* vbox_alloc); 53 void do_cleanup(); 54 void scalarize_vector_boxes(); 55 void expand_vector_boxes(); 56 57 public: PhaseVector(PhaseIterGVN & igvn)58 PhaseVector(PhaseIterGVN& igvn) : Phase(Vector), _igvn(igvn) {} 59 void optimize_vector_boxes(); 60 }; 61 62 #endif // SHARE_OPTO_VECTOR_HPP 63