[Comgr][hotswap] Add AMDGPU MC state setup#2439
Draft
tgymnich wants to merge 1 commit into
Draft
Conversation
This was referenced May 7, 2026
d1a05c9 to
8be9478
Compare
e8a1fa9 to
9183737
Compare
8be9478 to
6ab4011
Compare
9183737 to
6122d14
Compare
6ab4011 to
dd6bb68
Compare
6122d14 to
e1822d4
Compare
dd6bb68 to
94e24d0
Compare
e1822d4 to
b9c85a5
Compare
2b8bfde to
70e5099
Compare
b9c85a5 to
dade881
Compare
70e5099 to
73d63ce
Compare
dade881 to
c1170b2
Compare
73d63ce to
4314144
Compare
c1170b2 to
e5d271e
Compare
4314144 to
7fde156
Compare
e5d271e to
d7718e4
Compare
`CanonicalOp` is the architecture-neutral instruction identity the raiser dispatches on. Each value names a logical operation; many MC opcode variants (different encodings, target generations) collapse onto a single `CanonicalOp` via the opcode-canonicalisation table that lands in the next commit. This commit ships only the `Unknown` terminal — the dispatch surface is empty until the per-format handler patches add the values they consume. That keeps the enum scoped to what the in-tree raiser actually recognises and avoids front-loading a dictionary of opcodes for handlers that have not landed yet. `amdgpu_formats.h` re-exposes the AMDGPU target-private `SIInstrFlags` and operand-type enums under a stable header name so the rest of the raiser does not depend on AMDGPU build-tree paths directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7fde156 to
2c6f5a2
Compare
d7718e4 to
d1342e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
mc_state.{hpp,cpp}providinginitMCState— a one-call setup of the LLVM MC stack (Target, Triple, MCInstrInfo, MCRegisterInfo, MCAsmInfo, MCSubtargetInfo, MCContext, MCDisassembler, MCInstPrinter) keyed off an AMDGPU ISA name.The MC stack is consumed by the disassembler and per-handler raiser code that lands in subsequent commits. Includes the
InlineSrcMgr-on-MCContext defensive init that prevents the SIG6Either SourceMgr should be available UNREACHABLEabort, with a gtest regression fence.CMakeLists gains the LLVM build-tree requirement, the AMDGPU target-private include paths (SIDefines.h, AMDGPUBaseInfo.h, the TableGen-generated AMDGPUGen*.inc files), and the LLVM MC + AMDGPU library link surface.