aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/IfConversion.cpp
diff options
context:
space:
mode:
authorWang, Xin10 <xin10.wang@intel.com>2023-04-23 20:45:43 -0400
committerWang, Xin10 <xin10.wang@intel.com>2023-04-23 20:46:34 -0400
commit76cc9492121a402f7099f3fec822ea7192d3074e (patch)
tree43a82ee44148259de9386be13225f021cdcc00fb /llvm/lib/CodeGen/IfConversion.cpp
parent8e58b79f67a9f921733b105a874c0d4f69dd50da (diff)
downloadllvm-76cc9492121a402f7099f3fec822ea7192d3074e.zip
llvm-76cc9492121a402f7099f3fec822ea7192d3074e.tar.gz
llvm-76cc9492121a402f7099f3fec822ea7192d3074e.tar.bz2
Clean come dead code
These codes deleted are dead code, we never go into it. 1. In AggressiveAntiDepBreaker.cpp, have assert AntiDepReg != 0. 2. IfConversion.cpp, Kind can only be one unique value, so isFalse && isRev can never be true. 3. DAGCombiner.cpp, at line 3675, we have considered the condition like ``` // fold (sub x, c) -> (add x, -c) if (N1C) { return DAG.getNode(ISD::ADD, DL, VT, N0, DAG.getConstant(-N1C->getAPIntValue(), DL, VT)); } ``` 4. ScheduleDAGSDNodes.cpp, we have Latency > 1 at line 663 5. MasmParser.cpp, code exists in a switch-case block which decided by the value FirstTokenKind, at line 1621, FirstTokenKind could only be one of AsmToken::Dollar, AsmToken::At and AsmToken::Identifier. Reviewed By: skan Differential Revision: https://reviews.llvm.org/D148610
Diffstat (limited to 'llvm/lib/CodeGen/IfConversion.cpp')
-rw-r--r--llvm/lib/CodeGen/IfConversion.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp
index b76867b..2ad5820 100644
--- a/llvm/lib/CodeGen/IfConversion.cpp
+++ b/llvm/lib/CodeGen/IfConversion.cpp
@@ -71,8 +71,6 @@ static cl::opt<bool> DisableTriangleR("disable-ifcvt-triangle-rev",
cl::init(false), cl::Hidden);
static cl::opt<bool> DisableTriangleF("disable-ifcvt-triangle-false",
cl::init(false), cl::Hidden);
-static cl::opt<bool> DisableTriangleFR("disable-ifcvt-triangle-false-rev",
- cl::init(false), cl::Hidden);
static cl::opt<bool> DisableDiamond("disable-ifcvt-diamond",
cl::init(false), cl::Hidden);
static cl::opt<bool> DisableForkedDiamond("disable-ifcvt-forked-diamond",
@@ -532,7 +530,6 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
if (DisableTriangle && !isFalse && !isRev) break;
if (DisableTriangleR && !isFalse && isRev) break;
if (DisableTriangleF && isFalse && !isRev) break;
- if (DisableTriangleFR && isFalse && isRev) break;
LLVM_DEBUG(dbgs() << "Ifcvt (Triangle");
if (isFalse)
LLVM_DEBUG(dbgs() << " false");