C-Breeze
C Compiler Infrastructure

[ Project home page]
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

pointerOptions Class Reference

Pointer options. More...

#include <pointeroptions.h>

List of all members.

Static Public Attributes

bool Context_insensitive = false
 Context-sensitivity control.

bool Recursion_Context_sensitive = true
 Allow recursive functions to be context-sensitivity.

bool Use_multiplicity = true
 Use multiplicity analysis.

bool Verbose = false
 Verbose output.

bool Show_memoryblocks = false
 Show memory blocks.

bool Show_procedures = false
 Show procedures.

bool Pointer_statistics = false
 Pointer statistics.

bool Ignore_fields = false
 Ignore struct/union fields.

bool One_struct_per_type = false
 One struct per type.

bool Show_stack = false
 Show the stack state.

bool Flow_insensitive = false
 Flow-insensitive analysis.

bool Unification = false
 Unification-based analysis.

bool Unification_use_annotation = true
 Allow unification to use annotation.

bool Show_Unification = false
 Show result of unification-based analysis.

bool Conditional_analysis = false
 Conditional analysis.

bool Bidirectional_assignment = false
 Bi-directional assignment.

bool Aggressive_multiplicity = false
 Aggressive multiplicity.

bool One_string_constant = true
 One string constant.

bool Context_insensitive_memory = false
 Context-insensitive memory model.

bool Use_escape_analysis = false
 Use escape analysis.

bool Verbose_unification = false
 Verbose unification.

bool Verbose_constants = false
 Verbose constants.

bool Verbose_liveness = false
 Verbose liveness.

bool Show_unknown_procedures = false
 Show unknown procedures.

bool Show_memory_leaks = false
 Show memory leaks.

bool Monitor_precision = false
 Monitor precision.

str_set Context_sensitive_procedures
 Context sensitive procedures.

flow_sensitive_set Flow_sensitive_objects
 Flow-sensitive objects.

flow_sensitive_set Flow_sensitive_allocation_objects
 Flow-sensitive allocation objects.

UnifyTypes Non_unify_types
 Flow-sensitive allocation objects.

int Unify_objects = 0
 Count the number of objects unified.

basicblock_set Path_sensitive_branches
 Path-sensitive branches.

str_set Verbose_procedures
 Verbose procedures.

int Threshold
 Context-sensitivity control.


Detailed Description

Pointer options.

This class contains static flags that control the behavior of the pointer analyzer. The actual definitions (and default values) reside in pointers.cc.

Definition at line 129 of file pointeroptions.h.


Member Data Documentation

bool pointerOptions::Aggressive_multiplicity = false [static]
 

Aggressive multiplicity.

With this option turned on, we use a trick that could be unsafe in some cases, but it's very unlikely. The observation is that if a memoryBlock is allocated and then a subsequent if-then-else frees it on one branch, but not the other, then it is probably the case that either way it is unallocated. For example:

f = fopen(...); if (f) { ... fclose(f); }

At the end of this code, the file is always closed because in the case that f is null, the file was never opened in the first place.

Definition at line 161 of file pointers.cc.

bool pointerOptions::Bidirectional_assignment = false [static]
 

Bi-directional assignment.

This options is intended to emulate equality-based type analysis. It causes all assignments (including parameter passing) to include all of the right-hand-side objects on the left hand side.

For example, "y = x" becomes "{y,x} = x".

Definition at line 142 of file pointers.cc.

bool pointerOptions::Conditional_analysis = false [static]
 

Conditional analysis.

When set to true this flag causes the analyzer to skip branches when it can ascertain the value of the condition.

Definition at line 133 of file pointers.cc.

bool pointerOptions::Context_insensitive = false [static]
 

Context-sensitivity control.

Definition at line 50 of file pointers.cc.

Referenced by procedureInfo::setup_call_at().

bool pointerOptions::Context_insensitive_memory = false [static]
 

Context-insensitive memory model.

When true, all objects, including variables and heap objects, are only instantiated once for each calling context regardless of the analysis mode.

Definition at line 177 of file pointers.cc.

str_set pointerOptions::Context_sensitive_procedures [static]
 

Context sensitive procedures.

Populate this list with procedures that are to be treated context sensitive.

Definition at line 228 of file pointers.cc.

Referenced by procedureInfo::procedureInfo().

bool pointerOptions::Flow_insensitive = false [static]
 

Flow-insensitive analysis.

This is implemented in the following way: (1) every object has only one def that occurs at the main function (and therefore dominates everything), (2) all assignments are additive, (3) we don't perform any control-flow merges (phi functions), and (4) all heap allocations are immediately Unbounded in size.

Definition at line 99 of file pointers_common.h.

flow_sensitive_set pointerOptions::Flow_sensitive_allocation_objects [static]
 

Flow-sensitive allocation objects.

Populate this list with allocation objects that need to be flow sensitive in order to improve the4 multiplicity analysis.

Definition at line 242 of file pointers.cc.

flow_sensitive_set pointerOptions::Flow_sensitive_objects [static]
 

Flow-sensitive objects.

Populate this list with variables that are to be treated flow sensitive.

Definition at line 235 of file pointers.cc.

bool pointerOptions::Ignore_fields = false [static]
 

Ignore struct/union fields.

The "dot" operator becomes a no-op. This also forces all updates to the structure to be weak (as if the multiplicity were high).

Definition at line 85 of file pointers_common.h.

bool pointerOptions::Monitor_precision = false [static]
 

Monitor precision.

When true, the analysis engine monitors precision and builds a graph of the causes and effects of precision loss.

Definition at line 221 of file pointers.cc.

UnifyTypes pointerOptions::Non_unify_types [static]
 

Flow-sensitive allocation objects.

Populate this list with allocation objects that need to be flow sensitive in order to improve the4 multiplicity analysis.

Definition at line 250 of file pointers.cc.

bool pointerOptions::One_string_constant = true [static]
 

One string constant.

When set true, we only create a single object to represent all string constants. Since we never look at the value, and we don't allow them to be changed, this should not affect our results.

Definition at line 169 of file pointers.cc.

bool pointerOptions::One_struct_per_type = false [static]
 

One struct per type.

With this flag on, there is only one set of memory blocks for each structure type. This emulates the situation in the type-system world.

Definition at line 96 of file pointers.cc.

basicblock_set pointerOptions::Path_sensitive_branches [static]
 

Path-sensitive branches.

Record the basic block that controls path sensitive information -- that is, the branch at the end of the basic block needs to be path sensitive.

Definition at line 261 of file pointers.cc.

bool pointerOptions::Pointer_statistics = false [static]
 

Pointer statistics.

Definition at line 81 of file pointers_common.h.

bool pointerOptions::Recursion_Context_sensitive = true [static]
 

Allow recursive functions to be context-sensitivity.

Definition at line 54 of file pointers.cc.

Referenced by procedureInfo::setup_call_at().

bool pointerOptions::Show_memory_leaks = false [static]
 

Show memory leaks.

With escape analysis and aggressive multiplicity on, report possible memory leaks.

Definition at line 214 of file pointers.cc.

bool pointerOptions::Show_memoryblocks = false [static]
 

Show memory blocks.

At the end of pointer analysis print out a list of all the memoryblocks along with information about their properties, including numbers of defs and uses.

Definition at line 70 of file pointers.cc.

bool pointerOptions::Show_procedures = false [static]
 

Show procedures.

At the end of pointer analysis print out a list of all the procedures and information about them.

Definition at line 77 of file pointers.cc.

bool pointerOptions::Show_stack = false [static]
 

Show the stack state.

Definition at line 89 of file pointers_common.h.

Referenced by Pointers::analyze_procedure_at(), and memoryModel::create_memory_object().

bool pointerOptions::Show_Unification = false [static]
 

Show result of unification-based analysis.

Definition at line 126 of file pointers.cc.

Referenced by Pointers::run_unification().

bool pointerOptions::Show_unknown_procedures = false [static]
 

Show unknown procedures.

Definition at line 207 of file pointers.cc.

Referenced by Pointers::analyze().

int pointerOptions::Threshold [static]
 

Context-sensitivity control.

Definition at line 69 of file pointers_common.h.

bool pointerOptions::Unification = false [static]
 

Unification-based analysis.

This is implemented based on Steensgaard algorithm.

Definition at line 117 of file pointers.cc.

Referenced by Pointers::assignment_operator(), memoryModel::create_memory_object(), Pointers::determine_call_targets(), Pointers::dot_operator(), memoryModel::generate_array_elements_for(), memoryModel::generate_su_field(), memoryModel::initialize_struct(), memoryModel::lookup_heap_object(), memoryModel::lookup_variable(), memoryBlock::set_unification(), Pointers::star_operator(), and memoryBlock::top_most_container().

bool pointerOptions::Unification_use_annotation = true [static]
 

Allow unification to use annotation.

Definition at line 122 of file pointers.cc.

int pointerOptions::Unify_objects = 0 [static]
 

Count the number of objects unified.

Definition at line 253 of file pointers.cc.

Referenced by memoryBlock::get_allocation_object(), memoryModel::memoryModel(), and memoryBlock::set_unification().

bool pointerOptions::Use_escape_analysis = false [static]
 

Use escape analysis.

In Pointers::record_external_inputs_and_outputs, use escape analysis to prune out unreachable heap objects.

Definition at line 184 of file pointers.cc.

bool pointerOptions::Use_multiplicity = true [static]
 

Use multiplicity analysis.

Definition at line 73 of file pointers_common.h.

bool pointerOptions::Verbose = false [static]
 

Verbose output.

During program analysis, show every statement processed along with the corresponding verbose output for either the pointer analyzer or whatever other analysis is being run.

Definition at line 77 of file pointers_common.h.

Referenced by Pointers::analyze_procedure(), Pointers::analyze_procedure_at(), procedureInfo::check_merge_point(), memoryModel::create_memory_object(), Pointers::eval(), memoryModel::generate_su_field(), Pointers::process_local_changes(), Pointers::run_unification(), and procedureInfo::setup_merge_point().

bool pointerOptions::Verbose_constants = false [static]
 

Verbose constants.

During constant propagation, show constant values being computed.

Definition at line 196 of file pointers.cc.

bool pointerOptions::Verbose_liveness = false [static]
 

Verbose liveness.

During liveness analysis, show liveness computations.

Definition at line 202 of file pointers.cc.

str_set pointerOptions::Verbose_procedures [static]
 

Verbose procedures.

Turn on verbose output when we're analyzing these procedures.

Definition at line 267 of file pointers.cc.

Referenced by procedureInfo::procedureInfo().

bool pointerOptions::Verbose_unification = false [static]
 

Verbose unification.

During unification, show constant values being computed.

Definition at line 190 of file pointers.cc.


The documentation for this class was generated from the following files:

Generated on August 27, 2003
Back to the C-Breeze home page