This is an archive of the discontinued LLVM Phabricator instance.

[LogicCombine 2/?] Add weight into node then use it to determine if we can combine the case need to create new value.
AbandonedPublic

Authored by bcl5980 on Jan 31 2023, 11:07 PM.

Details

Summary

In this patch we involve two member variables into logical node: Weight , OneUseWeight.
Weight maintain how many instructions can we get the value based on original IR code.
OneUseWeightmeans if we rebuild the final instruction, how many instructions we need to keep for the child node without one-use.
After that we can measure the cost if we rebuild the instruction.

Diff Detail

Event Timeline

bcl5980 created this revision.Jan 31 2023, 11:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 11:07 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
bcl5980 requested review of this revision.Jan 31 2023, 11:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 11:07 PM
bcl5980 updated this revision to Diff 494179.Feb 2 2023, 12:00 AM
bcl5980 updated this revision to Diff 494202.Feb 2 2023, 1:23 AM
bcl5980 updated this revision to Diff 494213.Feb 2 2023, 1:57 AM
bcl5980 updated this revision to Diff 494507.Feb 2 2023, 10:10 PM
bcl5980 updated this revision to Diff 494512.Feb 2 2023, 10:37 PM
bcl5980 updated this revision to Diff 494541.Feb 3 2023, 12:58 AM
bcl5980 updated this revision to Diff 494599.Feb 3 2023, 5:56 AM
bcl5980 updated this revision to Diff 497566.Feb 14 2023, 11:45 PM
bcl5980 updated this revision to Diff 498710.Feb 19 2023, 7:06 PM
bcl5980 updated this revision to Diff 498737.Feb 19 2023, 11:47 PM
bcl5980 updated this revision to Diff 498757.Feb 20 2023, 1:16 AM
bcl5980 updated this revision to Diff 498984.Feb 20 2023, 5:59 PM
bcl5980 retitled this revision from [ComplexLogicCombine 2/?] Add weight into node then use it to determine if we can combine the case need to create new Value. to [ComplexLogicCombine 2/?] Add weight into node then use it to determine if we can combine the case need to create new value..
bcl5980 edited the summary of this revision. (Show Details)
bcl5980 added reviewers: spatel, nikic, reames.

rebase code

bcl5980 updated this revision to Diff 499431.Feb 22 2023, 2:24 AM
bcl5980 retitled this revision from [ComplexLogicCombine 2/?] Add weight into node then use it to determine if we can combine the case need to create new value. to [LogicCombine 2/?] Add weight into node then use it to determine if we can combine the case need to create new value..
bcl5980 updated this revision to Diff 500663.Feb 26 2023, 10:15 PM
bcl5980 abandoned this revision.Mar 14 2023, 10:46 PM