OSDN Git Service

[MachineScheduler] Fix for PR21807: minor code difference building with/without -g.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 12 Dec 2014 12:41:22 +0000 (12:41 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Fri, 12 Dec 2014 12:41:22 +0000 (12:41 +0000)
commitc15d82e2590fc76e11f0bff891b89259b9c056d2
tree0a895f2ad457b4a880d64d224adab6eb6f60ca5c
parent2a3c63a58f7fd41326d04b4e962746af4beeef77
[MachineScheduler] Fix for PR21807: minor code difference building with/without -g.

This patch fixes the issue reported as PR21807. There was a minor difference
in the generated code depending on the -g flag.

The cause was that with -g the machine scheduler used a different
scheduling strategy. This decision was based on the number of instructions
in a schedule region and included debug instructions in that count.

This patch fixes the issue in MISched and provides a test.

Patch by Russell Gallop!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224118 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineScheduler.cpp
test/CodeGen/X86/misched-code-difference-with-debug.ll [new file with mode: 0644]