提交 aac0d914 编写于 作者: B Ben Harris

Correct some codegen stats counters

上级 a80a610a
......@@ -277,7 +277,7 @@ pub fn sub(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
}
pub fn nswsub(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
self.count_insn("nwsub");
self.count_insn("nswsub");
unsafe {
llvm::LLVMBuildNSWSub(self.llbuilder, lhs, rhs, noname())
}
......@@ -291,14 +291,14 @@ pub fn nuwsub(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
}
pub fn fsub(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
self.count_insn("sub");
self.count_insn("fsub");
unsafe {
llvm::LLVMBuildFSub(self.llbuilder, lhs, rhs, noname())
}
}
pub fn fsub_fast(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
self.count_insn("sub");
self.count_insn("fsub");
unsafe {
let instr = llvm::LLVMBuildFSub(self.llbuilder, lhs, rhs, noname());
llvm::LLVMRustSetHasUnsafeAlgebra(instr);
......@@ -1315,6 +1315,7 @@ pub fn add_case(&self, s: ValueRef, on_val: ValueRef, dest: BasicBlockRef) {
}
pub fn add_incoming_to_phi(&self, phi: ValueRef, val: ValueRef, bb: BasicBlockRef) {
self.count_insn("addincoming");
unsafe {
llvm::LLVMAddIncoming(phi, &val, &bb, 1 as c_uint);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册