Pointer analysis method and device
A pointer analysis and pointer technology, applied in the computer field, can solve the problems of incomplete analysis results, limited global sharing of multi-threaded program pointer analysis, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 2
[0086] image 3 It is a flowchart of a pointer analysis method provided by Embodiment 2 of the present invention. Such as image 3 As shown, the method of this embodiment may include:
[0087] S200, receiving a pointer analysis instruction sent by the user;
[0088] S210, read statement information in the multi-threaded program to be analyzed according to the pointer analysis instruction;
[0089] S220, analyze the program according to the global sharing judgment rule, and obtain the global sharing amount in the program;
[0090] When analyzing the pointers of the program, the global sharing amount in the program can be determined first according to the global sharing judgment rules. The judgment of the global sharing amount is based on the analysis of the overall structure of the program. Specifically, the global sharing judgment rules include: if the variable If it can be accessed by at least two threads in the program at the same time, then the variable is a global shared...
Embodiment 3
[0116] Figure 5 It is a schematic structural diagram of a pointer analysis device provided by Embodiment 3 of the present invention. Such as Figure 5 As shown, the pointer analysis device provided in this embodiment specifically includes: a reading module 11 , a pointer analysis module 12 and a compensation analysis module 13 .
[0117] Wherein, the reading module 11 is used to read the statement information in the multi-threaded program to be analyzed;
[0118] The pointer analysis module 12 is used to perform pointer analysis on the program according to the statement information of the program read by the reading module 11, and obtain the shared information of the program, and the shared information includes shared amount, pointer pointing set and access Storage behavior, wherein, the shared amount includes the global shared amount and the local shared amount;
[0119] The compensation analysis module 13 is configured to perform compensation analysis on the sharing amou...
Embodiment 4
[0124] Figure 7 It is a schematic structural diagram of a pointer analysis device provided by Embodiment 4 of the present invention. Such as Figure 7 As shown, the pointer analysis device provided in this embodiment is Figure 6 On the basis of the shown device structure, the pointer analysis module 12 includes: a program analysis unit 16, which is used to analyze the program according to the global sharing judgment rule, and obtain the global sharing amount in the program; a thread analysis unit 17 , for performing pointer analysis on each thread in the program, and obtaining a set of pointers in each thread, a local shared volume, and a memory access behavior corresponding to the shared volume.
[0125] In the specific implementation of this embodiment, the above-mentioned global sharing judgment rule includes: if the variable can be accessed by at least two threads in the program at the same time, then the variable is a global shared quantity.
[0126] Further, in the ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com