LLVM  8.0.1
ARMTargetMachine.h
Go to the documentation of this file.
1 //===-- ARMTargetMachine.h - Define TargetMachine for ARM -------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the ARM specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_ARM_ARMTARGETMACHINE_H
15 #define LLVM_LIB_TARGET_ARM_ARMTARGETMACHINE_H
16 
17 #include "ARMSubtarget.h"
18 #include "llvm/ADT/Optional.h"
19 #include "llvm/ADT/StringMap.h"
20 #include "llvm/ADT/StringRef.h"
22 #include "llvm/Support/CodeGen.h"
24 #include <memory>
25 
26 namespace llvm {
27 
29 public:
30  enum ARMABI {
33  ARM_ABI_AAPCS, // ARM EABI
35  } TargetABI;
36 
37 protected:
38  std::unique_ptr<TargetLoweringObjectFile> TLOF;
39  bool isLittle;
41 
42 public:
43  ARMBaseTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
44  StringRef FS, const TargetOptions &Options,
46  CodeGenOpt::Level OL, bool isLittle);
47  ~ARMBaseTargetMachine() override;
48 
49  const ARMSubtarget *getSubtargetImpl(const Function &F) const override;
50  // DO NOT IMPLEMENT: There is no such thing as a valid default subtarget,
51  // subtargets are per-function entities based on the target-specific
52  // attributes of each function.
53  const ARMSubtarget *getSubtargetImpl() const = delete;
54  bool isLittleEndian() const { return isLittle; }
55 
57 
58  // Pass Pipeline Configuration
60 
62  return TLOF.get();
63  }
64 
65  bool isTargetHardFloat() const {
73  }
74 };
75 
76 /// ARM/Thumb little endian target machine.
77 ///
79 public:
80  ARMLETargetMachine(const Target &T, const Triple &TT, StringRef CPU,
81  StringRef FS, const TargetOptions &Options,
83  CodeGenOpt::Level OL, bool JIT);
84 };
85 
86 /// ARM/Thumb big endian target machine.
87 ///
89 public:
90  ARMBETargetMachine(const Target &T, const Triple &TT, StringRef CPU,
91  StringRef FS, const TargetOptions &Options,
93  CodeGenOpt::Level OL, bool JIT);
94 };
95 
96 } // end namespace llvm
97 
98 #endif // LLVM_LIB_TARGET_ARM_ARMTARGETMACHINE_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with...
Definition: TargetMachine.h:78
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:293
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:567
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:614
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
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:308
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Definition: StringMap.h:220
Target - Wrapper for Target specific information.
TargetOptions Options
Definition: TargetMachine.h:97
const ARMSubtarget * getSubtargetImpl() const =delete
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
This pass exposes codegen information to IR-level passes.