[GlobalISel] Propagate PCSections metadata to MachineInstr
authorMarco Elver <elver@google.com>
Tue, 6 Sep 2022 13:49:23 +0000 (15:49 +0200)
committerMarco Elver <elver@google.com>
Wed, 7 Sep 2022 09:36:02 +0000 (11:36 +0200)
commit31a548021b4af4d6cffb2c0018e9f808abee2bde
treef8a6360cd5f954d55e0f5a4b584b2569bcb6c9d0
parentf0d6709e4a587449eae3e6277e64e6550840b468
[GlobalISel] Propagate PCSections metadata to MachineInstr

Propagate (most) PC sections metadata to MachineInstr when GlobalISel is
doing instruction selection.

This change results in support for architectures using GlobalISel (such
as -O0 with AArch64). Not all instructions may be supported yet, and
requires further target-specific handling (such as done for AArch64
pseudo-atomics). Expanding supported instructions is planned on a
case-by-case basis and new use cases for PC sections metadata.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D130886
llvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp