Hexagon: Honor __builtin_expect by using branch probabilities.
authorJyotsna Verma <jverma@codeaurora.org>
Thu, 2 May 2013 15:39:30 +0000 (15:39 +0000)
committerJyotsna Verma <jverma@codeaurora.org>
Thu, 2 May 2013 15:39:30 +0000 (15:39 +0000)
commitf945d09d53a4f2f392b8b51191d37de2f8acd566
tree6f084e07bf1540542def9252f74d09ca611e4f55
parent399880527d99f60dfbf580bb921ff7f234db3222
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180923 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Hexagon/HexagonInstrInfo.cpp
lib/Target/Hexagon/HexagonInstrInfo.h
lib/Target/Hexagon/HexagonNewValueJump.cpp
lib/Target/Hexagon/HexagonVLIWPacketizer.cpp