[PATCH] D132013: [BOLT][NFC] Simplify scanExternalRefs
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 16 22:38:20 PDT 2022
Amir created this revision.
Herald added a reviewer: rafauler.
Herald added a subscriber: ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132013
Files:
bolt/lib/Core/BinaryFunction.cpp
Index: bolt/lib/Core/BinaryFunction.cpp
===================================================================
--- bolt/lib/Core/BinaryFunction.cpp
+++ bolt/lib/Core/BinaryFunction.cpp
@@ -1483,15 +1483,11 @@
bool IsPCRel = false;
bool IsBranch = false;
if (BC.MIB->hasPCRelOperand(Instruction)) {
- if (BC.MIB->evaluateMemOperandTarget(Instruction, TargetAddress,
- AbsoluteInstrAddr, Size)) {
- IsPCRel = true;
- }
+ IsPCRel = BC.MIB->evaluateMemOperandTarget(Instruction, TargetAddress,
+ AbsoluteInstrAddr, Size);
} else if (BC.MIB->isCall(Instruction) || BC.MIB->isBranch(Instruction)) {
- if (BC.MIB->evaluateBranch(Instruction, AbsoluteInstrAddr, Size,
- TargetAddress)) {
- IsBranch = true;
- }
+ IsBranch = BC.MIB->evaluateBranch(Instruction, AbsoluteInstrAddr, Size,
+ TargetAddress);
}
MCSymbol *TargetSymbol = nullptr;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132013.453201.patch
Type: text/x-patch
Size: 1065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220817/8f5f1bc8/attachment.bin>
More information about the llvm-commits
mailing list