Skip to content

Inlining: inline more variables#174

Merged
laurentlb merged 1 commit intomasterfrom
inl
Dec 10, 2022
Merged

Inlining: inline more variables#174
laurentlb merged 1 commit intomasterfrom
inl

Conversation

@laurentlb
Copy link
Copy Markdown
Owner

If a variable is used once, and its init value depends on values proven constant, we can inline it.

e.g.
float a= f();
float b = a + 1;
float c = b;

now becomes:
float a= f();
float c = a + 1;

If a variable is used once, and its init value depends on values proven constant, we can inline it.

e.g.
  float a= f();
  float b = a + 1;
  float c = b;

now becomes:
  float a= f();
  float c = a + 1;
@laurentlb laurentlb merged commit 5efeb81 into master Dec 10, 2022
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

Successfully merging this pull request may close these issues.

1 participant