aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstrBuilder.h
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2002-11-14 22:32:30 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2002-11-14 22:32:30 +0000
commit6559bb96a9901af21c6037675f9508373773bd35 (patch)
treea56a26a6c9180f3504a02ab0f1b14617daf50ddc /include/llvm/CodeGen/MachineInstrBuilder.h
parente555460e4e47458e99801c7ab0f85cfdf80583a0 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstrBuilder.h')
-rw-r--r--include/llvm/CodeGen/MachineInstrBuilder.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineInstrBuilder.h b/include/llvm/CodeGen/MachineInstrBuilder.h
index d594d1b025..a360be6de3 100644
--- a/include/llvm/CodeGen/MachineInstrBuilder.h
+++ b/include/llvm/CodeGen/MachineInstrBuilder.h
@@ -34,13 +34,22 @@ struct MachineInstrBuilder {
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;
+ }
+
/// addPCDisp - Add an LLVM value to be treated as a PC relative
/// displacement...
///