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
Remove the dmd front-end inliner and related code #16173
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request, @ibuclaw! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#16173" |
6421e60
to
f97053d
Compare
inlining is still useful in debug builds in math intensive applications, like games for example i personally oppose removing the ability for DMD to be inline things when asked for it, with the pragma for example, i hope that one mechanic stays |
DMD has a backend inliner, it just isn't currently used for non-optimised builds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update frontend.h
diff --git a/home/circleci/dmd/compiler/src/dmd/frontend.h b/home/circleci/dmd/generated/linux/release/64/frontend.h
index d29bccf2aa..6536228d62 100644
--- a/home/circleci/dmd/compiler/src/dmd/frontend.h
+++ b/home/circleci/dmd/generated/linux/release/64/frontend.h
@@ -411,9 +411,7 @@ enum class PASS : uint8_t
semantic2done = 4u,
semantic3 = 5u,
semantic3done = 6u,
- inline_ = 7u,
- inlinedone = 8u,
- obj = 9u,
+ obj = 7u,
};
3a2a324
to
b5fc2a8
Compare
it does, |
Right, so #16171 will have you covered then. |
this appears to segfault on |
cc @WalterBright about the backend inline segfault hitting this assert on build kite |
b5fc2a8
to
4223d04
Compare
merged dependant PR |
I'd like to get rid of the front line inliner as much as anyone. But I'd like to wait on this until the dmd backend inliner is more effective. Inlining has a huge effect on performance, so much so that some programs are unusable without inlining. |
(See also related: #16170 and #16171)
As discussed in last DLF meeting.
By disabling the front-end inliner, building Phobos with
-O -release -inline
gets cut down from 40s -> 10s on my machine.Parts of the front-end inliner is still kept around for inlining default arguments (
inlineCopy
).arg.copy()
and is happy with itarg.copy()
because of https://issues.dlang.org/show_bug.cgi?id=2935Could attempt removing
inlineCopy
again if this gets pulled (see also #14214 and #14309)