Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Handling unresolved calls in PML #7

Closed
alexjordan opened this issue Jul 23, 2014 · 2 comments
Closed

Handling unresolved calls in PML #7

alexjordan opened this issue Jul 23, 2014 · 2 comments
Assignees

Comments

@alexjordan
Copy link
Member

Different parts of platin currently fail to process functions with unresolved calls (e.g. flowfact transformation, visualization). @dlp proposed trace analysis to identify some call targets, but this cannot handle calls in parts of the program not executed during the trace. (Platin testcase created here: https://github.com/t-crest/patmos-benchmarks/blob/master/tests/platin/22-call-any.c)

To manually resolve the calls (or ignore them), we could ultimately use

  1. source code annotations
  2. external annotations

Both should update a programs PML file in some way. 5a6cc5e adds an experimental platin tool to modify program information in a PML file. Program elements are selected by matching an XPath-inspired PMLPath. The only modification action supported right now is --clear-callees (clears the callee list in selected instructions), removing or replacing modifications could be added as well.

Proposed PMLPath (by example):

The first segment of the path selects the set of bitcode bc or machine code mc functions; the following segments represent function, basic block, instruction, respectively. Matching predicates are of the form [@property=name], all elements are selected using *.

The bitcode and the machine code function 'main':
/*/[@label=main]

All blocks in bitcode function 'main':
/bc/[@label=main]/*

All instructions in bitcode function 'main' that call function 'foo':
/bc/[@label=main]/*/[@callees=foo]

@alexjordan alexjordan self-assigned this Jul 23, 2014
@alexjordan
Copy link
Member Author

The command to "fix" the unresolved call in main of 22-call-any.c is:
platin pmlmod --match "/*/[@label=main]/*/*" --clear-callees -i 22-call-any.pml -o 22-call-any.pml

@Emoun
Copy link
Member

Emoun commented May 18, 2020

Closing as this issue seems solved.

@Emoun Emoun closed this as completed May 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants