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

DCE regression: modules can't be eliminated #10703

Closed
cooldome opened this issue Feb 17, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@cooldome
Copy link
Member

commented Feb 17, 2019

The following commit made module elimination not possible: 28cb81e

The dependency on the nimFrame is raised without checking if it is actually used plus cfsForwardTypes section is always not empty, making module elimination not possible.

The commit claims that some DLL issue was fixed in the tests, there is no test changes.

@Araq: do you remember what was the problem? Should be a better way to fix it.

@Araq

This comment has been minimized.

Copy link
Member

commented Feb 18, 2019

Well it was DLLs in C++ mode and my patch is really nice IMO. We can use a different section for it though, but I don't know how the module elimination works.

@cooldome

This comment has been minimized.

Copy link
Member Author

commented Feb 20, 2019

The module elimination works in a simple way. genModule is generating final module's rope also checks if sections are empty using dead simple: sectionrope.len > 0. If all sections starting from cfsForwardTypes are empty then nil is returned and output file is not generated.

Using a different section before cfsForwardTypes will help, but I don't understand one thing.
nimfr_ is now defined both in nimbase.h and each output file. What is the purpose? Should be remove at least one of these definitions.

@Araq

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

So that older versions can still bootstrap, they require it to be in nimbase.h.

cooldome added a commit to cooldome/Nim that referenced this issue Mar 10, 2019

@Araq Araq closed this in ea3e18b Mar 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.