~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to lib/Target/Hexagon/HexagonInstrInfo.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
#include "HexagonRegisterInfo.h"
18
18
#include "MCTargetDesc/HexagonBaseInfo.h"
 
19
#include "llvm/Target/TargetInstrInfo.h"
19
20
#include "llvm/Target/TargetFrameLowering.h"
20
 
#include "llvm/Target/TargetInstrInfo.h"
21
 
 
 
21
#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"
22
22
 
23
23
#define GET_INSTRINFO_HEADER
24
24
#include "HexagonGenInstrInfo.inc"
28
28
class HexagonInstrInfo : public HexagonGenInstrInfo {
29
29
  const HexagonRegisterInfo RI;
30
30
  const HexagonSubtarget& Subtarget;
 
31
  typedef unsigned Opcode_t;
 
32
 
31
33
public:
32
34
  explicit HexagonInstrInfo(HexagonSubtarget &ST);
33
35
 
111
113
 
112
114
  unsigned createVR(MachineFunction* MF, MVT VT) const;
113
115
 
 
116
  virtual bool isBranch(const MachineInstr *MI) const;
114
117
  virtual bool isPredicable(MachineInstr *MI) const;
115
118
  virtual bool
116
119
  PredicateInstruction(MachineInstr *MI,
127
130
                                   const BranchProbability &Probability) const;
128
131
 
129
132
  virtual bool isPredicated(const MachineInstr *MI) const;
 
133
  virtual bool isPredicated(unsigned Opcode) const;
 
134
  virtual bool isPredicatedTrue(const MachineInstr *MI) const;
 
135
  virtual bool isPredicatedTrue(unsigned Opcode) const;
130
136
  virtual bool isPredicatedNew(const MachineInstr *MI) const;
 
137
  virtual bool isPredicatedNew(unsigned Opcode) const;
131
138
  virtual bool DefinesPredicate(MachineInstr *MI,
132
139
                                std::vector<MachineOperand> &Pred) const;
133
140
  virtual bool
176
183
  bool isConditionalLoad (const MachineInstr* MI) const;
177
184
  bool isConditionalStore(const MachineInstr* MI) const;
178
185
  bool isNewValueInst(const MachineInstr* MI) const;
 
186
  bool isNewValue(const MachineInstr* MI) const;
179
187
  bool isDotNewInst(const MachineInstr* MI) const;
 
188
  int GetDotOldOp(const int opc) const;
 
189
  int GetDotNewOp(const MachineInstr* MI) const;
 
190
  int GetDotNewPredOp(MachineInstr *MI,
 
191
                      const MachineBranchProbabilityInfo
 
192
                      *MBPI) const;
 
193
  bool mayBeNewStore(const MachineInstr* MI) const;
180
194
  bool isDeallocRet(const MachineInstr *MI) const;
181
195
  unsigned getInvertedPredicatedOpcode(const int Opc) const;
182
196
  bool isExtendable(const MachineInstr* MI) const;
183
197
  bool isExtended(const MachineInstr* MI) const;
184
198
  bool isPostIncrement(const MachineInstr* MI) const;
185
199
  bool isNewValueStore(const MachineInstr* MI) const;
 
200
  bool isNewValueStore(unsigned Opcode) const;
186
201
  bool isNewValueJump(const MachineInstr* MI) const;
187
202
  bool isNewValueJumpCandidate(const MachineInstr *MI) const;
188
203
 
189
204
 
190
205
  void immediateExtend(MachineInstr *MI) const;
191
206
  bool isConstExtended(MachineInstr *MI) const;
 
207
  int getDotNewPredJumpOp(MachineInstr *MI,
 
208
                      const MachineBranchProbabilityInfo *MBPI) const;
192
209
  unsigned getAddrMode(const MachineInstr* MI) const;
193
210
  bool isOperandExtended(const MachineInstr *MI,
194
211
                         unsigned short OperandNum) const;
197
214
  int getMaxValue(const MachineInstr *MI) const;
198
215
  bool NonExtEquivalentExists (const MachineInstr *MI) const;
199
216
  short getNonExtOpcode(const MachineInstr *MI) const;
 
217
  bool PredOpcodeHasJMP_c(Opcode_t Opcode) const;
 
218
  bool PredOpcodeHasNot(Opcode_t Opcode) const;
 
219
 
200
220
private:
201
221
  int getMatchingCondBranchOpcode(int Opc, bool sense) const;
202
222