llvmir some opt
This commit is contained in:
25
midend/llvm/instr/StoreInstr.java
Normal file
25
midend/llvm/instr/StoreInstr.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package midend.llvm.instr;
|
||||
|
||||
import midend.llvm.value.IrValue;
|
||||
import midend.llvm.type.IrInterType;
|
||||
|
||||
public class StoreInstr extends IrInstr {
|
||||
public StoreInstr(IrValue value, IrValue pointer) {
|
||||
super(IrInterType.VOID, "store", IrInstrType.STORE);
|
||||
addUse(value);
|
||||
addUse(pointer);
|
||||
}
|
||||
|
||||
public IrValue getValue() {
|
||||
return getUse(0);
|
||||
}
|
||||
|
||||
public IrValue getPointer() {
|
||||
return getUse(1);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getName() + " " + getValue().getType() + " " + getValue().getName()
|
||||
+ ", " + getPointer().getType() + " " + getPointer().getName();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user