1# Copyright (c) 2021-2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14module: 15 name: bytecodeopt 16 namespace: panda::bytecodeopt 17 18options: 19 20- name: opt-level 21 type: int 22 default: 2 23 possible_values: 24 - 0 25 - 1 26 - 2 27 description: | 28 Optimization level for bytecode optimizer. N=0: No optimizations. N=1: New optimizer is turned on, only DCE is applied. N=2: (default): New optimizer is turned on, all compiler's optimizations are turned on. 29 30- name: canonicalization 31 type: bool 32 default: true 33 description: Enable Canonicalization Pass 34 35- name: const-resolver 36 type: bool 37 default: true 38 description: Enable Constant Resolver Pass 39 40- name: method-regex 41 type: std::string 42 default: "" 43 description: A regular expression that specifies methods to optimize 44 45- name: skip-methods-with-eh 46 type: bool 47 default: false 48 description: Disable optimizer for methods with exceptions handlers 49 50- name: bytecode-opt-peepholes 51 type: bool 52 default: true 53 description: Enable BytecodeOptPeepholes Pass 54 55- name: const-array-resolver 56 type: bool 57 default: true 58 description: Enable ConstArray Resolver Pass 59