Skip to content

Commit 21a1bcb

Browse files
committed
[RISCV] Pass FeatureBitset by reference rather than by value. NFCI
FeatureBitset is 4 64-bit values in an array. It's better passed by reference rather than copying it. I may be adding FeatureBitset as an argument to another function and noticed this while working on that.
1 parent bcaf57c commit 21a1bcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ struct SysReg {
257257
FeatureBitset FeaturesRequired;
258258
bool isRV32Only;
259259

260-
bool haveRequiredFeatures(FeatureBitset ActiveFeatures) const {
260+
bool haveRequiredFeatures(const FeatureBitset &ActiveFeatures) const {
261261
// Not in 32-bit mode.
262262
if (isRV32Only && ActiveFeatures[RISCV::Feature64Bit])
263263
return false;

0 commit comments

Comments
 (0)