Page MenuHomePhabricator

[DAGCombiner][NFC] Factor out ByteProvider
Needs ReviewPublic

Authored by jrbyrnes on Jan 31 2023, 2:30 PM.

Details

Summary

Bring ByteProvider into header to serve as generic utility.

Diff Detail

Event Timeline

jrbyrnes created this revision.Jan 31 2023, 2:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 2:30 PM
jrbyrnes requested review of this revision.Jan 31 2023, 2:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 2:30 PM
jrbyrnes updated this revision to Diff 493741.Jan 31 2023, 2:41 PM

Fix comments.

jrbyrnes updated this revision to Diff 494442.Feb 2 2023, 3:05 PM

Restructure

jrbyrnes added a subscriber: arsenm.Feb 2 2023, 3:05 PM

@arsenm is that what you had in mind?

jrbyrnes updated this revision to Diff 495567.Feb 7 2023, 8:47 AM

Format + Comments

Factor out common code for use in https://reviews.llvm.org/D142782 . Template class for eventual porting to GlobalISel.

jrbyrnes updated this revision to Diff 499912.Thu, Feb 23, 10:36 AM

Require contained class in ByteProvider to have getOpcode (class must be node in selection DAG)

tschuett added inline comments.
llvm/include/llvm/ADT/ByteProvider.h
27

Why struct, when you use private and public?

30

using instead of typedef?

52

Why struct?

92

Newline missing

jrbyrnes updated this revision to Diff 500262.Fri, Feb 24, 11:19 AM
jrbyrnes marked 4 inline comments as done.

Address review comments -- thanks @tschuett

Add outside reviewers

arsenm added inline comments.Fri, Mar 17, 9:46 AM
llvm/include/llvm/ADT/ByteProvider.h
54

probably should use int64_t offsets?

jrbyrnes updated this revision to Diff 506212.Fri, Mar 17, 3:34 PM
jrbyrnes marked an inline comment as done.

int64_t offsets