//===-- llvm/CodeGen/FinalizeISel.cpp ---------------------------*- C++ -*-===// // // 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 pass expands Pseudo-instructions produced by ISel, fixes register /// reservations and may do machine frame information adjustments. /// The pseudo instructions are used to allow the expansion to contain control /// flow, such as a conditional move implemented with a conditional branch and a /// phi, or an atomic operation implemented with a loop. // //===----------------------------------------------------------------------===// #include "llvm/CodeGen/FinalizeISel.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/TargetInstrInfo.h" #include "llvm/CodeGen/TargetLowering.h" #include "llvm/CodeGen/TargetSubtargetInfo.h" #include "llvm/InitializePasses.h" usingnamespacellvm; #define DEBUG_TYPE … namespace { class FinalizeISel : public MachineFunctionPass { … }; } // end anonymous namespace static std::pair<bool, bool> runImpl(MachineFunction &MF) { … } char FinalizeISel::ID = …; char &llvm::FinalizeISelID = …; INITIALIZE_PASS(…) bool FinalizeISel::runOnMachineFunction(MachineFunction &MF) { … } PreservedAnalyses FinalizeISelPass::run(MachineFunction &MF, MachineFunctionAnalysisManager &) { … }