methodLiveness.hpp revision 1472
1472N/A * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A // The BasicBlock class is used to represent a basic block in the 0N/A // liveness analysis. 0N/A // This class is only used by the MethodLiveness class. 0N/A // The analyzer which created this basic block. 0N/A // The range of this basic block is [start_bci,limit_bci) 0N/A // The liveness at the start of the block; 0N/A // The summarized liveness effects of our direct successors reached 0N/A // by normal control flow 0N/A // The summarized liveness effects of our direct successors reached 0N/A // by exceptional control flow 0N/A // These members hold the results of the last call to 0N/A // compute_gen_kill_range(). _gen is the set of locals 0N/A // used before they are defined in the range. _kill is the 0N/A // set of locals defined before they are used. 0N/A // A list of all blocks which could come directly before this one 0N/A // in normal (non-exceptional) control flow. We propagate liveness 0N/A // information to these blocks. 0N/A // A list of all blocks which could come directly before this one 0N/A // in exceptional control flow. 0N/A // The following fields are used to manage a work list used in the 0N/A // Our successors call this method to merge liveness information into 0N/A // our _normal_exit member. 0N/A // Our successors call this method to merge liveness information into 0N/A // our _exception_exit member. 0N/A // This helper routine is used to help compute the gen/kill pair for 0N/A // the block. It is also used to answer queries. 0N/A // Compute the gen/kill effect of a single instruction. 0N/A // Helpers for compute_gen_kill_single. 0N/A // -- Flow graph construction. 0N/A // Add a basic block to our list of normal predecessors. 0N/A // Add a basic block to our list of exceptional predecessors 0N/A // Split the basic block at splitBci. This basic block 0N/A // becomes the second half. The first half is newly created. 0N/A // Propagate changes from this basic block 0N/A };
// End of MethodLiveness::BasicBlock 0N/A // The method we are analyzing. 0N/A // The arena for storing structures... 0N/A // We cache the length of the method. 0N/A // The size of a BitMap. 0N/A // A list of all BasicBlocks. 0N/A // Keeps track of bci->block mapping. One entry for each bci. Only block starts are 0N/A // bcis where blocks start are marked 0N/A // -- Graph construction & Analysis 0N/A // Compute ranges and predecessors for basic blocks. 0N/A // Compute gen/kill information for all basic blocks. 0N/A // Perform the dataflow. 0N/A // The class MethodLiveness::BasicBlock needs special access to some 0N/A // Work list manipulation routines. Called internally by BasicBlock. 0N/A // -- Timing and Statistics. 0N/A // Create a liveness analyzer for a method 0N/A // Compute liveness information for the method 0N/A // Find out which locals are live at a specific bci.