Insert a target‐specific instruction that clears Reg.
Synopsis
Declared in <llvm/CodeGen/TargetInstrInfo.h>
virtual
void
buildClearRegister(
Register Reg,
MachineBasicBlock& MBB,
MachineBasicBlock::iterator Iter,
DebugLoc& DL,
bool AllowSideEffects = true) const;
Description
Insert an architecture‐specific instruction to clear a register. If you need to avoid sideeffects (e.g. avoid XOR on x86, which sets EFLAGS), set
AllowSideEffects to false.
Parameters
Name |
Description |
Reg |
Register being queried or updated. |
MBB |
Machine basic block where code is inserted or analyzed. |
Iter |
Insertion point or peel iteration index. |
DL |
Debug location for newly created instructions. |
AllowSideEffects |
If false, avoid clearing sequences that clobber flags or similar. |
Created with MrDocs