Add support for sdiv by 2^k and -2^k. Producing code like:
[oota-llvm.git] / lib / Target / PowerPC / PowerPCTargetMachine.h
1 //===-- PowerPCTargetMachine.h - Define TargetMachine for PowerPC -*- C++ -*-=//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the PowerPC-specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef POWERPC_TARGETMACHINE_H
15 #define POWERPC_TARGETMACHINE_H
16
17 #include "llvm/Target/TargetMachine.h"
18 #include "llvm/Target/TargetFrameInfo.h"
19 #include "llvm/PassManager.h"
20 #include "PowerPCFrameInfo.h"
21 #include "PowerPCSubtarget.h"
22
23 namespace llvm {
24
25 class GlobalValue;
26 class IntrinsicLowering;
27
28 class PowerPCTargetMachine : public TargetMachine {
29   PowerPCFrameInfo  FrameInfo;
30   PPCSubtarget      Subtarget;
31 protected:
32   PowerPCTargetMachine(const std::string &name, IntrinsicLowering *IL,
33                        const Module &M, const TargetData &TD, 
34                        const PowerPCFrameInfo &TFI);
35 public:
36   virtual const TargetFrameInfo  *getFrameInfo() const { return &FrameInfo; }
37   virtual const TargetSubtarget  *getSubtargetImpl() const{ return &Subtarget; }
38
39   virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
40                                    CodeGenFileType FileType);
41 };
42
43 } // end namespace llvm
44
45 #endif