mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-17 19:06:09 +00:00

Armv6 introduced instructions to perform 32-bit SIMD operations. The purpose of this pass is to do some straightforward IR pattern matching to create ACLE DSP intrinsics, which map on these 32-bit SIMD operations. Currently, only the SMLAD instruction gets recognised. This instruction performs two multiplications with 16-bit operands, and stores the result in an accumulator. We will follow this up with patches to recognise SMLAD in more cases, and also to generate other DSP instructions (like e.g. SADD16). Patch by: Sam Parker and Sjoerd Meijer Differential Revision: https://reviews.llvm.org/D48128 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335850 91177308-0d34-0410-b5e6-96231b3b80d8
74 lines
2.4 KiB
C++
74 lines
2.4 KiB
C++
//===-- ARM.h - Top-level interface for ARM representation ------*- C++ -*-===//
|
|
//
|
|
// 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 entry points for global functions defined in the LLVM
|
|
// ARM back-end.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_TARGET_ARM_ARM_H
|
|
#define LLVM_LIB_TARGET_ARM_ARM_H
|
|
|
|
#include "llvm/IR/LegacyPassManager.h"
|
|
#include "llvm/Support/CodeGen.h"
|
|
#include <functional>
|
|
#include <vector>
|
|
|
|
namespace llvm {
|
|
|
|
class ARMAsmPrinter;
|
|
class ARMBaseTargetMachine;
|
|
class ARMRegisterBankInfo;
|
|
class ARMSubtarget;
|
|
struct BasicBlockInfo;
|
|
class Function;
|
|
class FunctionPass;
|
|
class InstructionSelector;
|
|
class MachineBasicBlock;
|
|
class MachineFunction;
|
|
class MachineInstr;
|
|
class MCInst;
|
|
class PassRegistry;
|
|
|
|
|
|
Pass *createARMParallelDSPPass();
|
|
FunctionPass *createARMISelDag(ARMBaseTargetMachine &TM,
|
|
CodeGenOpt::Level OptLevel);
|
|
FunctionPass *createA15SDOptimizerPass();
|
|
FunctionPass *createARMLoadStoreOptimizationPass(bool PreAlloc = false);
|
|
FunctionPass *createARMExpandPseudoPass();
|
|
FunctionPass *createARMConstantIslandPass();
|
|
FunctionPass *createMLxExpansionPass();
|
|
FunctionPass *createThumb2ITBlockPass();
|
|
FunctionPass *createARMOptimizeBarriersPass();
|
|
FunctionPass *createThumb2SizeReductionPass(
|
|
std::function<bool(const Function &)> Ftor = nullptr);
|
|
InstructionSelector *
|
|
createARMInstructionSelector(const ARMBaseTargetMachine &TM, const ARMSubtarget &STI,
|
|
const ARMRegisterBankInfo &RBI);
|
|
|
|
void LowerARMMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
|
|
ARMAsmPrinter &AP);
|
|
|
|
void computeBlockSize(MachineFunction *MF, MachineBasicBlock *MBB,
|
|
BasicBlockInfo &BBI);
|
|
std::vector<BasicBlockInfo> computeAllBlockSizes(MachineFunction *MF);
|
|
|
|
|
|
void initializeARMParallelDSPPass(PassRegistry &);
|
|
void initializeARMLoadStoreOptPass(PassRegistry &);
|
|
void initializeARMPreAllocLoadStoreOptPass(PassRegistry &);
|
|
void initializeARMConstantIslandsPass(PassRegistry &);
|
|
void initializeARMExpandPseudoPass(PassRegistry &);
|
|
void initializeThumb2SizeReducePass(PassRegistry &);
|
|
|
|
} // end namespace llvm
|
|
|
|
#endif // LLVM_LIB_TARGET_ARM_ARM_H
|