aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/InstSelectSimple.cpp
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2003-12-20 16:22:59 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2003-12-20 16:22:59 +0000
commite0bb3e766d977d129da6add3bad6793ca20ab151 (patch)
tree4b5f16e3ece7d311d0c937d52bb3b3bfbbf978db /lib/Target/X86/InstSelectSimple.cpp
parentef56a197edf546d320b33577b128e803e86f7e0d (diff)
Remove floating point killer pass. This is now implemented in the
instruction selector by adding a new pseudo-instruction FP_REG_KILL. This instruction implicitly defines all x86 fp registers and is a terminator so that passes which add machine code at the end of basic blocks (like phi elimination) do not add instructions between it and the branch or return instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/InstSelectSimple.cpp')
-rw-r--r--lib/Target/X86/InstSelectSimple.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp
index 4113076ad2..ca65c446ea 100644
--- a/lib/Target/X86/InstSelectSimple.cpp
+++ b/lib/Target/X86/InstSelectSimple.cpp
@@ -834,6 +834,7 @@ void ISel::promote32(unsigned targetReg, const ValueRecord &VR) {
/// ret float/double : Top of FP stack
///
void ISel::visitReturnInst(ReturnInst &I) {
+ BuildMI(BB, X86::FP_REG_KILL, 0);
if (I.getNumOperands() == 0) {
BuildMI(BB, X86::RET, 0); // Just emit a 'ret' instruction
return;
@@ -882,6 +883,7 @@ static inline BasicBlock *getBlockAfter(BasicBlock *BB) {
///
void ISel::visitBranchInst(BranchInst &BI) {
BasicBlock *NextBB = getBlockAfter(BI.getParent()); // BB after current one
+ BuildMI(BB, X86::FP_REG_KILL, 0);
if (!BI.isConditional()) { // Unconditional branch?
if (BI.getSuccessor(0) != NextBB)