c1_Optimizer.hpp revision 1879:f95d63e2154a
1272343Sngie/* 2272343Sngie * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 3272343Sngie * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4272343Sngie * 5272343Sngie * This code is free software; you can redistribute it and/or modify it 6272343Sngie * under the terms of the GNU General Public License version 2 only, as 7272343Sngie * published by the Free Software Foundation. 8272343Sngie * 9272343Sngie * This code is distributed in the hope that it will be useful, but WITHOUT 10272343Sngie * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11272343Sngie * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12272343Sngie * version 2 for more details (a copy is included in the LICENSE file that 13272343Sngie * accompanied this code). 14272343Sngie * 15272343Sngie * You should have received a copy of the GNU General Public License version 16272343Sngie * 2 along with this work; if not, write to the Free Software Foundation, 17272343Sngie * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18272343Sngie * 19272343Sngie * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20272343Sngie * or visit www.oracle.com if you need additional information or have any 21272343Sngie * questions. 22272343Sngie * 23272343Sngie */ 24272343Sngie 25272343Sngie#ifndef SHARE_VM_C1_C1_OPTIMIZER_HPP 26272343Sngie#define SHARE_VM_C1_C1_OPTIMIZER_HPP 27272343Sngie 28272343Sngie#include "c1/c1_IR.hpp" 29272343Sngie#include "c1/c1_Instruction.hpp" 30272343Sngie#include "memory/allocation.hpp" 31272343Sngie 32272343Sngieclass Optimizer VALUE_OBJ_CLASS_SPEC { 33272343Sngie private: 34272343Sngie IR* _ir; 35272343Sngie 36272343Sngie public: 37272343Sngie Optimizer(IR* ir); 38272343Sngie IR* ir() const { return _ir; } 39272343Sngie 40272343Sngie // optimizations 41272343Sngie void eliminate_conditional_expressions(); 42272343Sngie void eliminate_blocks(); 43272343Sngie void eliminate_null_checks(); 44272343Sngie}; 45272343Sngie 46272343Sngie#endif // SHARE_VM_C1_C1_OPTIMIZER_HPP 47272343Sngie