Path: blob/master/runtime/compiler/optimizer/J9Optimizer.hpp
6000 views
/*******************************************************************************1* Copyright (c) 2000, 2019 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/2122#ifndef J9_OPTIMIZER_INCL23#define J9_OPTIMIZER_INCL2425/*26* The following #define and typedef must appear before any #includes in this file27*/28#ifndef J9_OPTIMIZER_CONNECTOR29#define J9_OPTIMIZER_CONNECTOR30namespace J9 { class Optimizer; }31namespace J9 { typedef J9::Optimizer OptimizerConnector; }32#endif3334#include "optimizer/OMROptimizer.hpp"3536#include <stddef.h>37#include <stdint.h>3839namespace TR { class Compilation; }40namespace TR { class Optimizer; }41namespace TR { class ResolvedMethodSymbol; }42struct OptimizationStrategy;43class TR_J9InlinerPolicy;44class TR_J9InlinerUtil;4546namespace J947{4849class Optimizer : public OMR::OptimizerConnector50{51public:5253Optimizer(TR::Compilation *comp, TR::ResolvedMethodSymbol *methodSymbol, bool isIlGen,54const OptimizationStrategy *strategy = NULL, uint16_t VNType = 0);5556OMR_InlinerPolicy *getInlinerPolicy();57OMR_InlinerUtil *getInlinerUtil();5859bool switchToProfiling(uint32_t f, uint32_t c);60bool switchToProfiling();6162static const OptimizationStrategy *optimizationStrategy(TR::Compilation *c);63static ValueNumberInfoBuildType valueNumberInfoBuildType();6465private:6667TR::Optimizer *self();68};6970}7172#endif737475