01: /*
02: * Bytecode Analysis Framework
03: * Copyright (C) 2003,2004 University of Maryland
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
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
42: .getBoolean("vna.noRLE");
43:
44: /**
45: * Debug redundant load elimination.
46: */
47: public static final boolean RLE_DEBUG = SystemProperties
48: .getBoolean("vna.rle.debug");
49: }
50:
51: // vim:ts=4
|