[midend-GVN]初步构建GVN,能够优化部分CSE无法处理的子表达式但是有错误需要debug。
This commit is contained in:
@@ -847,7 +847,7 @@ void CondBrInst::print(std::ostream &os) const {
|
||||
|
||||
os << "%tmp_cond_" << condName << "_" << uniqueSuffix << " = icmp ne i32 ";
|
||||
printOperand(os, condition);
|
||||
os << ", 0\n br i1 %tmp_cond_" << condName << "_" << uniqueSuffix;
|
||||
os << ", 0\n br i1 %tmp_cond_" << condName << "_" << uniqueSuffix;
|
||||
|
||||
os << ", label %";
|
||||
printBlockName(os, getThenBlock());
|
||||
@@ -886,7 +886,7 @@ void MemsetInst::print(std::ostream &os) const {
|
||||
// This is done at print time to avoid modifying the IR structure
|
||||
os << "%tmp_bitcast_" << ptr->getName() << " = bitcast " << *ptr->getType() << " ";
|
||||
printOperand(os, ptr);
|
||||
os << " to i8*\n ";
|
||||
os << " to i8*\n ";
|
||||
|
||||
// Now call memset with the bitcast result
|
||||
os << "call void @llvm.memset.p0i8.i32(i8* %tmp_bitcast_" << ptr->getName() << ", i8 ";
|
||||
|
||||
Reference in New Issue
Block a user