Next: Testing if a Up: Interprocedural Algorithm Previous: Interprocedural Algorithm

Calls Through Pointers

The first step in evaluating procedure calls is to determine the target procedures. For most calls the target is a constant and this is a trivial step, but the target may also be specified by a function pointer. Fortunately, calls through pointers are relatively easy to handle in pointer analysis, since the points-to functions record the possible pointer values.

Function pointer values may be expressed in terms of extended parameters. This is the one situation where we need to know the specific values represented by extended parameters. When an extended parameter is included as a potential target of a call, we check the parameter mappings up the call graph until we find the values that it represents. Since the function pointer values are part of the input domain specifications for the PTFs, we flag these extended parameters as function pointers and record their values in the PTFs.



Next: Testing if a Up: Interprocedural Algorithm Previous: Interprocedural Algorithm


Bob Wilson