//===-- ExpandPostRAPseudos.cpp - Pseudo instruction expansion pass -------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file defines a pass that expands COPY and SUBREG_TO_REG pseudo // instructions after register allocation. // //===----------------------------------------------------------------------===// #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/TargetInstrInfo.h" #include "llvm/CodeGen/TargetRegisterInfo.h" #include "llvm/CodeGen/TargetSubtargetInfo.h" #include "llvm/InitializePasses.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" usingnamespacellvm; #define DEBUG_TYPE … namespace { struct ExpandPostRA : public MachineFunctionPass { … }; } // end anonymous namespace char ExpandPostRA::ID = …; char &llvm::ExpandPostRAPseudosID = …; INITIALIZE_PASS(…) bool ExpandPostRA::LowerSubregToReg(MachineInstr *MI) { … } /// runOnMachineFunction - Reduce subregister inserts and extracts to register /// copies. /// bool ExpandPostRA::runOnMachineFunction(MachineFunction &MF) { … }