-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Attribute to always inline a function #561
Comments
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
|
#563 is a first implementation of UDAs. It can handle all function attributes except |
|
@redstar: See my comment there. |
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
|
I've been working on inlining of functions imported from modules not given on the command line. The code is here. It seems to work, but I am not sure whether my changes can cause some other issues. |
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
|
@jerro: Sorry for my delayed reply, I was hoping that @redstar would get around to look at your changes. The basic concept seems good, thanks a lot for you work. However, I'm a bit wary of making an LDC-only change to name mangling/derivation. Could you maybe submit them as a DMD pull request to see what @9rnsr and the others have to say? |
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Examples:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at
http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
|
ldc.attributes is fine for ldc-specific attributes but especially ones that are so commonly used like alwaysinline should be short (@alwaysinline) and supported by all compilers. |
|
@Trass3r: attribute("alwaysinline") isn't enough for supporting a proper "always inline" feature anyway, as it needs to trigger emission of code that might not have otherwise been emitted (marked with available_externally, of course). |
|
Yeah I don't see how this relates to my post though. |
move _moduleXXX functions from dmain2.d to minfo.d
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Example:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
Introduces an attribute @ldc.attribute which can be used to annotate functions.
Example:
@ldc.attribute("alwaysinline") void foo() {}
Valid attribute names can be found in the LLVM manual at http://www.llvm.org/docs/LangRef.html#function-attributes.
This fixes issue ldc-developers#561 and creates a base for issue ldc-developers#547.
|
A relevant PR: #1172. |
|
#1577 has been merged. |
It should map to the
alwaysinlineIR attribute, and also cause such functions from imported modules to be emitted asavailable_externallyto support cross-module inlining (similar to the extra semantic3s we run with inlining enabled).We might want to implement this as a "blessed" UDA in a runtime module, e.g.
ldc.attributes.The text was updated successfully, but these errors were encountered: