LLVM  10.0.0svn
ARMTargetMachine.h
Go to the documentation of this file.
1 //===-- ARMTargetMachine.h - Define TargetMachine for ARM -------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the ARM specific subclass of TargetMachine.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_ARM_ARMTARGETMACHINE_H
14 #define LLVM_LIB_TARGET_ARM_ARMTARGETMACHINE_H
15 
16 #include "ARMSubtarget.h"
17 #include "llvm/ADT/Optional.h"
18 #include "llvm/ADT/StringMap.h"
19 #include "llvm/ADT/StringRef.h"
21 #include "llvm/Support/CodeGen.h"
23 #include <memory>
24 
25 namespace llvm {
26 
28 public:
29  enum ARMABI {
32  ARM_ABI_AAPCS, // ARM EABI
34  } TargetABI;
35 
36 protected:
37  std::unique_ptr<TargetLoweringObjectFile> TLOF;
38  bool isLittle;
40 
41 public:
42  ARMBaseTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
43  StringRef FS, const TargetOptions &Options,
45  CodeGenOpt::Level OL, bool isLittle);
46  ~ARMBaseTargetMachine() override;
47 
48  const ARMSubtarget *getSubtargetImpl(const Function &F) const override;
49  // DO NOT IMPLEMENT: There is no such thing as a valid default subtarget,
50  // subtargets are per-function entities based on the target-specific
51  // attributes of each function.
52  const ARMSubtarget *getSubtargetImpl() const = delete;
53  bool isLittleEndian() const { return isLittle; }
54 
56 
57  // Pass Pipeline Configuration
59 
61  return TLOF.get();
62  }
63 
64  bool isTargetHardFloat() const {
72  }
73 };
74 
75 /// ARM/Thumb little endian target machine.
76 ///
78 public:
79  ARMLETargetMachine(const Target &T, const Triple &TT, StringRef CPU,
80  StringRef FS, const TargetOptions &Options,
82  CodeGenOpt::Level OL, bool JIT);
83 };
84 
85 /// ARM/Thumb big endian target machine.
86 ///
88 public:
89  ARMBETargetMachine(const Target &T, const Triple &TT, StringRef CPU,
90  StringRef FS, const TargetOptions &Options,
92  CodeGenOpt::Level OL, bool JIT);
93 };
94 
95 } // end namespace llvm
96 
97 #endif // LLVM_LIB_TARGET_ARM_ARMTARGETMACHINE_H
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with...
Definition: TargetMachine.h:84
F(f)
enum llvm::ARMBaseTargetMachine::ARMABI TargetABI
TargetLoweringObjectFile * getObjFileLowering() const override
ARMBaseTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool isLittle)
Create an ARM architecture model.
Target-Independent Code Generator Pass Configuration Options.
SubArchType getSubArch() const
getSubArch - get the parsed subarchitecture type for this triple.
Definition: Triple.h:299
ARM/Thumb big endian target machine.
std::unique_ptr< TargetLoweringObjectFile > TLOF
StringMap< std::unique_ptr< ARMSubtarget > > SubtargetMap
ARM/Thumb little endian target machine.
bool isOSWindows() const
Tests whether the OS is Windows.
Definition: Triple.h:538
TargetTransformInfo getTargetTransformInfo(const Function &F) override
Get a TargetTransformInfo implementation for the target.
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
This class describes a target machine that is implemented with the LLVM target-independent code gener...
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
Definition: Triple.h:633
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
Definition: Triple.h:314
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Definition: StringMap.h:219
Target - Wrapper for Target specific information.
TargetOptions Options
const ARMSubtarget * getSubtargetImpl() const =delete
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
This pass exposes codegen information to IR-level passes.