//===-- ARM/ARMCodeEmitter.cpp - Convert ARM code to machine code ---------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file contains the pass that transforms the ARM machine instructions into// relocatable machine code.////===----------------------------------------------------------------------===//#define DEBUG_TYPE "jit"#include"ARM.h"#include"ARMAddressingModes.h"#include"ARMConstantPoolValue.h"#include"ARMInstrInfo.h"#include"ARMRelocations.h"#include"ARMSubtarget.h"#include"ARMTargetMachine.h"#include"llvm/Constants.h"#include"llvm/DerivedTypes.h"#include"llvm/Function.h"#include"llvm/PassManager.h"#include"llvm/CodeGen/JITCodeEmitter.h"#include"llvm/CodeGen/MachineConstantPool.h"#include"llvm/CodeGen/MachineFunctionPass.h"#include"llvm/CodeGen/MachineInstr.h"#include"llvm/CodeGen/MachineJumpTableInfo.h"#include"llvm/CodeGen/MachineModuleInfo.h"#include"llvm/CodeGen/Passes.h"#include"llvm/ADT/Statistic.h"#include"llvm/Support/Debug.h"#include"llvm/Support/ErrorHandling.h"#include"llvm/Support/raw_ostream.h"#ifndef NDEBUG#include<iomanip>#endifusingnamespacellvm;STATISTIC(NumEmitted,"Number of machine instructions emitted");namespace{classARMCodeEmitter:publicMachineFunctionPass{ARMJITInfo*JTI;constARMInstrInfo*II;constTargetData*TD;constARMSubtarget*Subtarget;TargetMachine&TM;JITCodeEmitter&MCE;MachineModuleInfo*MMI;conststd::vector<MachineConstantPoolEntry>*MCPEs;conststd::vector<MachineJumpTableEntry>*MJTEs;boolIsPIC;voidgetAnalysisUsage(AnalysisUsage&AU)const{AU.addRequired<MachineModuleInfo>();MachineFunctionPass::getAnalysisUsage(AU