[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstrBuilder.h

Chris Lattner lattner at cs.uiuc.edu
Thu Nov 14 16:33:05 PST 2002


Changes in directory llvm/include/llvm/CodeGen:

MachineInstrBuilder.h updated: 1.4 -> 1.5

---
Log message:

include/llvm/CodeGen/MachineInstrBuilder.h: Add addClobber() inline
 convenience method.  Fix typo in comment.
lib/Target/X86/InstSelectSimple.cpp: Explicitly specify some implicit uses.
 Use MOVZX/MOVSX instead of MOV instructions with sign extend instructions.
 Take out LEAVE instructions.
 32-bit IDIV and DIV use CDQ, not CWQ (CWQ is a typo).
 Fix typo in comment and remove some FIXME comments. 
lib/Target/X86/Printer.cpp: Include X86InstrInfo.h and llvm/Function.h.
 Add some simple code to Printer::runOnFunction to iterate over
  MachineBasicBlocks and call X86InstrInfo::print(). 
lib/Target/X86/X86InstrInfo.def: Make some more instructions with
 implicit defs "Void".  Add more sign/zero extending "move" insns
 (movsx, movzx).
lib/Target/X86/X86RegisterInfo.def: Add EFLAGS as a register.


---
Diffs of the changes:

Index: llvm/include/llvm/CodeGen/MachineInstrBuilder.h
diff -u llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.4 llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.5
--- llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.4	Tue Oct 29 19:48:41 2002
+++ llvm/include/llvm/CodeGen/MachineInstrBuilder.h	Thu Nov 14 16:32:30 2002
@@ -34,10 +34,19 @@
     return *this;
   }
 
-  /// addReg - Add an LLVM value that is to be used as a register...x
+  /// addReg - Add an LLVM value that is to be used as a register...
   ///
   MachineInstrBuilder &addReg(Value *V, bool isDef = false, bool isDNU = false){
     MI->addRegOperand(V, isDef, isDNU);
+    return *this;
+  }
+
+  /// addClobber - Assert that this MI is going to clobber a specific
+  /// register. Useful for instructions that always clobber certain hard regs.
+  /// (Same as addReg(RegNo, true) but shorter and more obvious).
+  ///
+  MachineInstrBuilder &addClobber(int RegNo) {
+    MI->addRegOperand(RegNo, true);
     return *this;
   }
 





More information about the llvm-commits mailing list