diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-07-26 23:00:24 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-07-26 23:00:24 +0000 |
commit | c3bcb02154d457f1dcc05bca10ccacec822f2330 (patch) | |
tree | 072ea266834745319858c118b78d47daf5e9c059 /llvm/lib/CodeGen/RegisterCoalescer.h | |
parent | 28f8189866b5506ab7362e2857c90ba2cdfac39b (diff) | |
download | bcm5719-llvm-c3bcb02154d457f1dcc05bca10ccacec822f2330.tar.gz bcm5719-llvm-c3bcb02154d457f1dcc05bca10ccacec822f2330.zip |
Eliminate copies of undefined values during coalescing.
These copies would coalesce easily, but the resulting value would be
defined by a deleted instruction. Now we also remove the undefined value
number from the destination register.
This fixes PR10503.
llvm-svn: 136174
Diffstat (limited to 'llvm/lib/CodeGen/RegisterCoalescer.h')
-rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.h b/llvm/lib/CodeGen/RegisterCoalescer.h index 4131d91c00e..7ba6ef76e7d 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.h +++ b/llvm/lib/CodeGen/RegisterCoalescer.h @@ -136,6 +136,9 @@ namespace llvm { /// markAsJoined - Remember that CopyMI has already been joined. void markAsJoined(MachineInstr *CopyMI); + /// eliminateUndefCopy - Handle copies of undef values. + bool eliminateUndefCopy(MachineInstr *CopyMI, const CoalescerPair &CP); + public: static char ID; // Class identification, replacement for typeinfo RegisterCoalescer() : MachineFunctionPass(ID) { |