KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > umd > cs > findbugs > ba > vna > ValueNumberAnalysisFeatures


1 /*
2  * Bytecode Analysis Framework
3  * Copyright (C) 2003,2004 University of Maryland
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19
20 package edu.umd.cs.findbugs.ba.vna;
21
22 import edu.umd.cs.findbugs.SystemProperties;
23
24 /**
25  * Global flags controlling ValueNumberAnalysis.
26  */

27 public interface ValueNumberAnalysisFeatures {
28     /**
29      * When set, perform redundant load elimination and forward substitution.
30      * Note that we do <em>not</em> do this in a correctness-preserving way!
31      * For example, we don't kill loads when methods are called, even though
32      * those methods could change heap values. The intent here is simply
33      * to try to handle situations where a field is read multiple times,
34      * where the intent of the programmer is clearly that the loaded values
35      * will be the same in each case.
36      * <p/>
37      * <p> Eventually, we might do interprocedural analysis that would allow
38      * accurate modeling of which fields a called method could modify,
39      * which would allow a more correct implementation.
40      */

41     public static final boolean REDUNDANT_LOAD_ELIMINATION = !SystemProperties.getBoolean("vna.noRLE");
42
43     /**
44      * Debug redundant load elimination.
45      */

46     public static final boolean RLE_DEBUG = SystemProperties.getBoolean("vna.rle.debug");
47 }
48
49 // vim:ts=4
50
Popular Tags