[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Apr 27 23:46:01 PDT 2004
Changes in directory llvm/lib/Target/X86:
InstSelectSimple.cpp updated: 1.240 -> 1.241
---
Log message:
Make RequiresFPRegKill() take a MachineBasicBlock arg.
In InsertFPRegKills(), just check the MachineBasicBlock for successors
instead of its corresponding BasicBlock.
---
Diffs of the changes: (+3 -3)
Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.240 llvm/lib/Target/X86/InstSelectSimple.cpp:1.241
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.240 Tue Apr 27 23:34:16 2004
+++ llvm/lib/Target/X86/InstSelectSimple.cpp Tue Apr 27 23:45:55 2004
@@ -684,8 +684,9 @@
/// Note that this kill instruction will eventually be eliminated when
/// restrictions in the stackifier are relaxed.
///
-static bool RequiresFPRegKill(const BasicBlock *BB) {
+static bool RequiresFPRegKill(const MachineBasicBlock *MBB) {
#if 0
+ const BasicBlock *BB = MBB->getBasicBlock ();
for (succ_const_iterator SI = succ_begin(BB), E = succ_end(BB); SI!=E; ++SI) {
const BasicBlock *Succ = *SI;
pred_const_iterator PI = pred_begin(Succ), PE = pred_end(Succ);
@@ -756,8 +757,7 @@
UsesFPReg:
// Okay, this block uses an FP register. If the block has successors (ie,
// it's not an unwind/return), insert the FP_REG_KILL instruction.
- if (BB->getBasicBlock()->getTerminator()->getNumSuccessors() &&
- RequiresFPRegKill(BB->getBasicBlock())) {
+ if (BB->succ_size () && RequiresFPRegKill(BB)) {
BuildMI(*BB, BB->getFirstTerminator(), X86::FP_REG_KILL, 0);
++NumFPKill;
}
More information about the llvm-commits
mailing list