diff options
| author | Jyotsna Verma <jverma@codeaurora.org> | 2013-05-02 15:39:30 +0000 |
|---|---|---|
| committer | Jyotsna Verma <jverma@codeaurora.org> | 2013-05-02 15:39:30 +0000 |
| commit | 1d29750b7dedb16cb63d0fe5026e199d734d315d (patch) | |
| tree | f978e08bbceac070e9f2b0e02bb22bd0adc180af /llvm/lib/Target/Hexagon/HexagonInstrInfo.h | |
| parent | 40b7f1f6c3606b9b3d543763c030812f4c06b9d7 (diff) | |
| download | bcm5719-llvm-1d29750b7dedb16cb63d0fe5026e199d734d315d.tar.gz bcm5719-llvm-1d29750b7dedb16cb63d0fe5026e199d734d315d.zip | |
Hexagon: Honor __builtin_expect by using branch probabilities.
* lib/Target/Hexagon/HexagonInstrInfo.cpp (GetDotNewPredOp):
Given a jump opcode return the right pred.new jump opcode with
a taken vs not-taken hint based on branch probabilities provided
by the target independent module.
* lib/Target/Hexagon/HexagonVLIWPacketizer.cpp: Use the above function.
* lib/Target/Hexagon/HexagonNewValueJump.cpp(getNewvalueJumpOpcode):
Enhance existing function use branch probabilities like
HexagonInstrInfo::GetDotNewPredOp but for New Value (GPR) Jumps.
llvm-svn: 180923
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonInstrInfo.h')
| -rw-r--r-- | llvm/lib/Target/Hexagon/HexagonInstrInfo.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonInstrInfo.h b/llvm/lib/Target/Hexagon/HexagonInstrInfo.h index 03a8a77a33a..e0bec04e64f 100644 --- a/llvm/lib/Target/Hexagon/HexagonInstrInfo.h +++ b/llvm/lib/Target/Hexagon/HexagonInstrInfo.h @@ -18,8 +18,7 @@ #include "MCTargetDesc/HexagonBaseInfo.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetFrameLowering.h" -#include "llvm/Target/TargetInstrInfo.h" - +#include "llvm/CodeGen/MachineBranchProbabilityInfo.h" #define GET_INSTRINFO_HEADER #include "HexagonGenInstrInfo.inc" @@ -192,6 +191,8 @@ public: void immediateExtend(MachineInstr *MI) const; bool isConstExtended(MachineInstr *MI) const; + int getDotNewPredJumpOp(MachineInstr *MI, + const MachineBranchProbabilityInfo *MBPI) const; unsigned getAddrMode(const MachineInstr* MI) const; bool isOperandExtended(const MachineInstr *MI, unsigned short OperandNum) const; |

