Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CODE.Uop#(_,rhs=_) bug in collect_global_read #33

Open
Samuel-Oglegba opened this issue Sep 6, 2023 · 1 comment
Open

CODE.Uop#(_,rhs=_) bug in collect_global_read #33

Samuel-Oglegba opened this issue Sep 6, 2023 · 1 comment

Comments

@Samuel-Oglegba
Copy link
Collaborator

In collect_global_read having case: CODE.PtrAccess#(rhs=,) ... CODE.Uop#(,rhs=) alongside is returning references to Uop code that are not memory references like PtrAccess.

Steps to Reproduce

  • given the parsed output of the of this line of code: return XT_ALIGN(target->targetsize) - COMPAT_XT_ALIGN(csize);
  • Add the code below to a .pt file and run it
input = Return#Bop#( "+", FunctionCall#( "XT_ALIGN", PtrAccess#( "target", "targetsize")), Uop#(  "-",  FunctionCall#("COMPAT_XT_ALIGN", "csize")));

collect_global_read(input);

Output
("target"PtrAccess#( "target", "targetsize") "csize"Uop#( "-", FunctionCall#( "COMPAT_XT_ALIGN", "csize"))

Expected Output without reference to the Uop
("target"PtrAccess#( "target", "targetsize") "csize")

@qingyi-yan
Copy link
Owner

qingyi-yan commented Sep 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants