Lines Matching full:hexagon

1 //===- HexagonNewValueJump.cpp - Hexagon Backend New Value Jump -----------===//
9 // This implements NewValueJump pass in Hexagon.
24 #include "Hexagon.h"
55 #define DEBUG_TYPE "hexagon-nvj"
85 StringRef getPassName() const override { return "Hexagon NewValueJump"; } in getPassName()
108 INITIALIZE_PASS_BEGIN(HexagonNewValueJump, "hexagon-nvj",
109 "Hexagon NewValueJump", false, false)
111 INITIALIZE_PASS_END(HexagonNewValueJump, "hexagon-nvj", in INITIALIZE_PASS_DEPENDENCY()
112 "Hexagon NewValueJump", false, false) in INITIALIZE_PASS_DEPENDENCY()
156 if (!Hexagon::IntRegsRegClass.contains(Op.getReg())) in INITIALIZE_PASS_DEPENDENCY()
225 // The following pseudo Hexagon instructions sets "use" and "def" in commonChecksToProhibitNewValueJump()
229 if (MII->getOpcode() == Hexagon::LDriw_pred || in commonChecksToProhibitNewValueJump()
230 MII->getOpcode() == Hexagon::STriw_pred) in commonChecksToProhibitNewValueJump()
258 case Hexagon::C2_cmpeqi: in canCompareBeNewValueJump()
259 case Hexagon::C4_cmpneqi: in canCompareBeNewValueJump()
260 case Hexagon::C2_cmpgti: in canCompareBeNewValueJump()
261 case Hexagon::C4_cmpltei: in canCompareBeNewValueJump()
264 case Hexagon::C2_cmpgtui: in canCompareBeNewValueJump()
265 case Hexagon::C4_cmplteui: in canCompareBeNewValueJump()
268 case Hexagon::S2_tstbit_i: in canCompareBeNewValueJump()
269 case Hexagon::S4_ntstbit_i: in canCompareBeNewValueJump()
348 case Hexagon::C2_cmpeq: in getNewValueJumpOpcode()
349 return taken ? Hexagon::J4_cmpeq_t_jumpnv_t in getNewValueJumpOpcode()
350 : Hexagon::J4_cmpeq_t_jumpnv_nt; in getNewValueJumpOpcode()
352 case Hexagon::C2_cmpeqi: in getNewValueJumpOpcode()
354 return taken ? Hexagon::J4_cmpeqi_t_jumpnv_t in getNewValueJumpOpcode()
355 : Hexagon::J4_cmpeqi_t_jumpnv_nt; in getNewValueJumpOpcode()
356 return taken ? Hexagon::J4_cmpeqn1_t_jumpnv_t in getNewValueJumpOpcode()
357 : Hexagon::J4_cmpeqn1_t_jumpnv_nt; in getNewValueJumpOpcode()
359 case Hexagon::C4_cmpneqi: in getNewValueJumpOpcode()
361 return taken ? Hexagon::J4_cmpeqi_f_jumpnv_t in getNewValueJumpOpcode()
362 : Hexagon::J4_cmpeqi_f_jumpnv_nt; in getNewValueJumpOpcode()
363 return taken ? Hexagon::J4_cmpeqn1_f_jumpnv_t : in getNewValueJumpOpcode()
364 Hexagon::J4_cmpeqn1_f_jumpnv_nt; in getNewValueJumpOpcode()
366 case Hexagon::C2_cmpgt: in getNewValueJumpOpcode()
368 return taken ? Hexagon::J4_cmplt_t_jumpnv_t in getNewValueJumpOpcode()
369 : Hexagon::J4_cmplt_t_jumpnv_nt; in getNewValueJumpOpcode()
370 return taken ? Hexagon::J4_cmpgt_t_jumpnv_t in getNewValueJumpOpcode()
371 : Hexagon::J4_cmpgt_t_jumpnv_nt; in getNewValueJumpOpcode()
373 case Hexagon::C2_cmpgti: in getNewValueJumpOpcode()
375 return taken ? Hexagon::J4_cmpgti_t_jumpnv_t in getNewValueJumpOpcode()
376 : Hexagon::J4_cmpgti_t_jumpnv_nt; in getNewValueJumpOpcode()
377 return taken ? Hexagon::J4_cmpgtn1_t_jumpnv_t in getNewValueJumpOpcode()
378 : Hexagon::J4_cmpgtn1_t_jumpnv_nt; in getNewValueJumpOpcode()
380 case Hexagon::C2_cmpgtu: in getNewValueJumpOpcode()
382 return taken ? Hexagon::J4_cmpltu_t_jumpnv_t in getNewValueJumpOpcode()
383 : Hexagon::J4_cmpltu_t_jumpnv_nt; in getNewValueJumpOpcode()
384 return taken ? Hexagon::J4_cmpgtu_t_jumpnv_t in getNewValueJumpOpcode()
385 : Hexagon::J4_cmpgtu_t_jumpnv_nt; in getNewValueJumpOpcode()
387 case Hexagon::C2_cmpgtui: in getNewValueJumpOpcode()
388 return taken ? Hexagon::J4_cmpgtui_t_jumpnv_t in getNewValueJumpOpcode()
389 : Hexagon::J4_cmpgtui_t_jumpnv_nt; in getNewValueJumpOpcode()
391 case Hexagon::C4_cmpneq: in getNewValueJumpOpcode()
392 return taken ? Hexagon::J4_cmpeq_f_jumpnv_t in getNewValueJumpOpcode()
393 : Hexagon::J4_cmpeq_f_jumpnv_nt; in getNewValueJumpOpcode()
395 case Hexagon::C4_cmplte: in getNewValueJumpOpcode()
397 return taken ? Hexagon::J4_cmplt_f_jumpnv_t in getNewValueJumpOpcode()
398 : Hexagon::J4_cmplt_f_jumpnv_nt; in getNewValueJumpOpcode()
399 return taken ? Hexagon::J4_cmpgt_f_jumpnv_t in getNewValueJumpOpcode()
400 : Hexagon::J4_cmpgt_f_jumpnv_nt; in getNewValueJumpOpcode()
402 case Hexagon::C4_cmplteu: in getNewValueJumpOpcode()
404 return taken ? Hexagon::J4_cmpltu_f_jumpnv_t in getNewValueJumpOpcode()
405 : Hexagon::J4_cmpltu_f_jumpnv_nt; in getNewValueJumpOpcode()
406 return taken ? Hexagon::J4_cmpgtu_f_jumpnv_t in getNewValueJumpOpcode()
407 : Hexagon::J4_cmpgtu_f_jumpnv_nt; in getNewValueJumpOpcode()
409 case Hexagon::C4_cmpltei: in getNewValueJumpOpcode()
411 return taken ? Hexagon::J4_cmpgti_f_jumpnv_t in getNewValueJumpOpcode()
412 : Hexagon::J4_cmpgti_f_jumpnv_nt; in getNewValueJumpOpcode()
413 return taken ? Hexagon::J4_cmpgtn1_f_jumpnv_t in getNewValueJumpOpcode()
414 : Hexagon::J4_cmpgtn1_f_jumpnv_nt; in getNewValueJumpOpcode()
416 case Hexagon::C4_cmplteui: in getNewValueJumpOpcode()
417 return taken ? Hexagon::J4_cmpgtui_f_jumpnv_t in getNewValueJumpOpcode()
418 : Hexagon::J4_cmpgtui_f_jumpnv_nt; in getNewValueJumpOpcode()
430 case Hexagon::C2_cmpeq: in isNewValueJumpCandidate()
431 case Hexagon::C2_cmpeqi: in isNewValueJumpCandidate()
432 case Hexagon::C2_cmpgt: in isNewValueJumpCandidate()
433 case Hexagon::C2_cmpgti: in isNewValueJumpCandidate()
434 case Hexagon::C2_cmpgtu: in isNewValueJumpCandidate()
435 case Hexagon::C2_cmpgtui: in isNewValueJumpCandidate()
436 case Hexagon::C4_cmpneq: in isNewValueJumpCandidate()
437 case Hexagon::C4_cmpneqi: in isNewValueJumpCandidate()
438 case Hexagon::C4_cmplte: in isNewValueJumpCandidate()
439 case Hexagon::C4_cmplteu: in isNewValueJumpCandidate()
440 case Hexagon::C4_cmpltei: in isNewValueJumpCandidate()
441 case Hexagon::C4_cmplteui: in isNewValueJumpCandidate()
450 LLVM_DEBUG(dbgs() << "********** Hexagon New Value Jump **********\n" in runOnMachineFunction()
506 if (!foundJump && (MI.getOpcode() == Hexagon::J2_jumpt || in runOnMachineFunction()
507 MI.getOpcode() == Hexagon::J2_jumptpt || in runOnMachineFunction()
508 MI.getOpcode() == Hexagon::J2_jumpf || in runOnMachineFunction()
509 MI.getOpcode() == Hexagon::J2_jumpfpt || in runOnMachineFunction()
510 MI.getOpcode() == Hexagon::J2_jumptnewpt || in runOnMachineFunction()
511 MI.getOpcode() == Hexagon::J2_jumptnew || in runOnMachineFunction()
512 MI.getOpcode() == Hexagon::J2_jumpfnewpt || in runOnMachineFunction()
513 MI.getOpcode() == Hexagon::J2_jumpfnew)) { in runOnMachineFunction()
547 if (MI.getOpcode() == Hexagon::J2_jumpf || in runOnMachineFunction()
548 MI.getOpcode() == Hexagon::J2_jumpfnewpt || in runOnMachineFunction()
549 MI.getOpcode() == Hexagon::J2_jumpfnew) { in runOnMachineFunction()
628 if ((COp == Hexagon::C2_cmpeq || COp == Hexagon::C4_cmpneq) && in runOnMachineFunction()