|
8 | 8 | // |
9 | 9 | // This file defines the LiveOriginAnalysis, a backward dataflow analysis that |
10 | 10 | // determines which origins are "live" at each program point. An origin is |
11 | | -// "live" at a program point if there's a potential future use of the pointer it |
12 | | -// represents. Liveness is "generated" by a read of origin's loan set (e.g., a |
13 | | -// `UseFact`) and is "killed" (i.e., it stops being live) when its loan set is |
14 | | -// overwritten (e.g. a OriginFlow killing the destination origin). |
| 11 | +// "live" at a program point if there's a potential future use of a pointer it |
| 12 | +// is associated with. Liveness is "generated" by a use of an origin (e.g., a |
| 13 | +// `UseFact` from a read of a pointer) and is "killed" (i.e., it stops being |
| 14 | +// live) when the origin is replaced by flowing a different origin into it |
| 15 | +// (e.g., an OriginFlow from an assignment that kills the destination). |
15 | 16 | // |
16 | 17 | // This information is used for detecting use-after-free errors, as it allows us |
17 | 18 | // to check if a live origin holds a loan to an object that has already expired. |
@@ -42,8 +43,8 @@ struct LivenessInfo { |
42 | 43 | /// multiple uses along different paths, this will point to the use appearing |
43 | 44 | /// earlier in the translation unit. |
44 | 45 | /// This is 'null' when the origin is not live. |
45 | | - |
46 | 46 | const UseFact *CausingUseFact; |
| 47 | + |
47 | 48 | /// The kind of liveness of the origin. |
48 | 49 | /// `Must`: The origin is live on all control-flow paths from the current |
49 | 50 | /// point to the function's exit (i.e. the current point is dominated by a set |
@@ -79,7 +80,7 @@ class LiveOriginsAnalysis { |
79 | 80 | ~LiveOriginsAnalysis(); |
80 | 81 |
|
81 | 82 | /// Returns the set of origins that are live at a specific program point, |
82 | | - /// along with the confidence level of their liveness. |
| 83 | + /// along with the the details of the liveness. |
83 | 84 | LivenessMap getLiveOriginsAt(ProgramPoint P) const; |
84 | 85 |
|
85 | 86 | // Dump liveness values on all test points in the program. |
|
0 commit comments