Subzero: Clean up some uses of *_cast<>.
Some casts to size_t for use as array indexes are simply unnecessary.
Some explicit declaration types are changed to "auto" to avoid redundancy with the static_cast type.
A few llvm::dyn_cast<> operations are changed to llvm::cast<>, and vice versa.
A few explicit declaration types are changed to "auto" when used with llvm::cast<> and llvm::dynamic_cast<>. Some of these were missed during an earlier cleansing because of multi-line issues.
There are still a few opportunities related to Variable register numbers, but they are ignored for now because they are being addressed in another CL.
BUG= none
R=jpp@chromium.org
Review URL: https://codereview.chromium.org/1674033002 .
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index fe44ee7..6565667 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -916,8 +916,7 @@
// of the block, because a Phi temporary may be live at the end of
// the previous block, and if it is also assigned in the first
// instruction of this block, the adjacent live ranges get merged.
- if (static_cast<class Inst *>(&Instr) != FirstInst &&
- !Instr.isDestRedefined() &&
+ if (&Instr != FirstInst && !Instr.isDestRedefined() &&
Dest->getLiveRange().containsValue(InstNumber - 1, IsDest))
Invalid = true;
if (Invalid) {