[PATCH] D139552: [NFC] Optimize vector usage in lld
Alf via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 14:19:28 PST 2022
gAlfonso-bit updated this revision to Diff 481065.
Herald added a subscriber: hiraditya.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139552/new/
https://reviews.llvm.org/D139552
Files:
llvm/lib/MC/MCExpr.cpp
llvm/lib/Object/ELFObjectFile.cpp
Index: llvm/lib/Object/ELFObjectFile.cpp
===================================================================
--- llvm/lib/Object/ELFObjectFile.cpp
+++ llvm/lib/Object/ELFObjectFile.cpp
@@ -800,8 +800,6 @@
return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
if (const auto *Obj = dyn_cast<ELF32BEObjectFile>(this))
return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
- if (const auto *Obj = cast<ELF64BEObjectFile>(this))
- return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
- else
- llvm_unreachable("Unsupported binary format");
+ const auto *Obj = cast<ELF64BEObjectFile>(this);
+ return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
}
Index: llvm/lib/MC/MCExpr.cpp
===================================================================
--- llvm/lib/MC/MCExpr.cpp
+++ llvm/lib/MC/MCExpr.cpp
@@ -886,7 +886,7 @@
Addrs, InSet)) {
// Check if both are Target Expressions, see if we can compare them.
if (const MCTargetExpr *L = dyn_cast<MCTargetExpr>(ABE->getLHS()))
- if (const MCTargetExpr *R = cast<MCTargetExpr>(ABE->getRHS())) {
+ if (const MCTargetExpr *R = dyn_cast<MCTargetExpr>(ABE->getRHS())) {
switch (ABE->getOpcode()) {
case MCBinaryExpr::EQ:
Res = MCValue::get((L->isEqualTo(R)) ? -1 : 0);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139552.481065.patch
Type: text/x-patch
Size: 1382 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221207/da701231/attachment.bin>
More information about the llvm-commits
mailing list