projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b1602d
)
[RISCV][NFC] Use templated getSubtarget in RISCVExpandPseudo::runOnMachineFunction
author
Alex Bradbury
<asb@igalia.com>
Thu, 20 Jul 2023 13:05:17 +0000
(14:05 +0100)
committer
Alex Bradbury
<asb@igalia.com>
Thu, 20 Jul 2023 13:08:41 +0000
(14:08 +0100)
This avoids a static_cast.
llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
b/llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
index
00b2959
..
6bb388f
100644
(file)
--- a/
llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
+++ b/
llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
@@
-68,7
+68,7
@@
private:
char RISCVExpandPseudo::ID = 0;
bool RISCVExpandPseudo::runOnMachineFunction(MachineFunction &MF) {
- TII =
static_cast<const RISCVInstrInfo *>(MF.getSubtarget().getInstrInfo()
);
+ TII =
MF.getSubtarget<RISCVSubtarget>().getInstrInfo(
);
#ifndef NDEBUG
const unsigned OldSize = getInstSizeInBytes(MF);