[mips] Fix compact branch hazard detection
authorSimon Dardis <simon.dardis@imgtec.com>
Tue, 13 Dec 2016 11:07:51 +0000 (11:07 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Tue, 13 Dec 2016 11:07:51 +0000 (11:07 +0000)
commit43b5ce492d4480c6bca08351e36f47da8413776c
treebb367c86f15aebffca94018cece1a7a40c575bf9
parent2d9adbf5244292537b30946570ac73ff8b2219b8
[mips] Fix compact branch hazard detection

In certain cases it is possible that transient instructions such as
%reg = IMPLICIT_DEF as a single instruction in a basic block to reach
the MipsHazardSchedule pass. This patch teaches MipsHazardSchedule to
properly look through such cases.

Reviewers: vkalintiris, zoran.jovanovic

Differential Revision: https://reviews.llvm.org/D27209

llvm-svn: 289529
llvm/lib/Target/Mips/MipsHazardSchedule.cpp
llvm/test/CodeGen/Mips/compactbranches/compact-branch-implicit-def.mir [new file with mode: 0644]