Skip to content

Conversation

aviatesk
Copy link
Member

So that they can be deleted during the first compact!-ion. This allows us to delete an inlineable and effect-free, but unused call.

This is essentially an alternative of #47305, but doesn't introduce a problem like #47374.

@aviatesk aviatesk requested a review from Keno November 24, 2022 07:17
@aviatesk aviatesk changed the title inference: mark flag for effect-free :calls during optimization inference: mark flag for effect-free :calls during abstractintepret Nov 24, 2022
@aviatesk aviatesk changed the title inference: mark flag for effect-free :calls during abstractintepret inference: mark flag for effect-free :calls during abstractinterpret Nov 24, 2022
@aviatesk aviatesk force-pushed the avi/dce-effect-free-inlinee branch 3 times, most recently from f7aa97b to 7c4afbf Compare November 25, 2022 09:14
@brenhinkeller brenhinkeller added compiler:inference Type inference compiler:effects effect analysis ffi foreign function interfaces, ccall, etc. needs pkgeval Tests for all registered packages should be run with this change labels Nov 25, 2022
@aviatesk aviatesk force-pushed the avi/dce-effect-free-inlinee branch from 7c4afbf to f6ad4f8 Compare November 30, 2022 09:46
if is_removable_if_unused(effects)
add_curr_ssaflag!(sv, IR_FLAG_EFFECT_FREE)
else
sub_curr_ssaflag!(sv, IR_FLAG_EFFECT_FREE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to do this in a single pass at the end based on the info object rather than toggling the flag back and forth here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, yeah. The (unmentioned) support for :foreigncall isn't that important anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we need something like #46962 (which came with a minor computational cost when I tried last time).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I couldn't fix the performance regression of #46962 , I'd like to merge this as is leaving this as a TODO comment.

@aviatesk aviatesk force-pushed the avi/dce-effect-free-inlinee branch from f6ad4f8 to b25da02 Compare December 22, 2022 08:39
So that they can be deleted during the first `compact!`-ion.
This allows us to delete an inlineable and effect-free, but unused call.

This is essentially an alternative of #47305, but doesn't introduce a
problem like #47374.
@aviatesk aviatesk force-pushed the avi/dce-effect-free-inlinee branch from b25da02 to 27c1d6c Compare December 22, 2022 08:41
@aviatesk
Copy link
Member Author

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - no performance regressions were detected. A full report can be found here.

@aviatesk aviatesk removed needs pkgeval Tests for all registered packages should be run with this change ffi foreign function interfaces, ccall, etc. labels Dec 22, 2022
@aviatesk aviatesk merged commit a074d06 into master Dec 22, 2022
@aviatesk aviatesk deleted the avi/dce-effect-free-inlinee branch December 22, 2022 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:effects effect analysis compiler:inference Type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants