Skip to content

[WebAssembly] Pass ArrayRef by value (NFC) #85732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ wasm::ValType WebAssembly::toValType(MVT Type) {
}

void WebAssembly::wasmSymbolSetType(MCSymbolWasm *Sym, const Type *GlobalVT,
const ArrayRef<MVT> &VTs) {
ArrayRef<MVT> VTs) {
assert(!Sym->getType());

// Tables are represented as Arrays in LLVM IR therefore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ wasm::ValType toValType(MVT Type);

/// Sets a Wasm Symbol Type.
void wasmSymbolSetType(MCSymbolWasm *Sym, const Type *GlobalVT,
const ArrayRef<MVT> &VTs);
ArrayRef<MVT> VTs);

} // end namespace WebAssembly
} // end namespace llvm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void llvm::computeSignatureVTs(const FunctionType *Ty,
}
}

void llvm::valTypesFromMVTs(const ArrayRef<MVT> &In,
void llvm::valTypesFromMVTs(ArrayRef<MVT> In,
SmallVectorImpl<wasm::ValType> &Out) {
for (MVT Ty : In)
Out.push_back(WebAssembly::toValType(Ty));
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ void computeSignatureVTs(const FunctionType *Ty, const Function *TargetFunc,
SmallVectorImpl<MVT> &Params,
SmallVectorImpl<MVT> &Results);

void valTypesFromMVTs(const ArrayRef<MVT> &In,
SmallVectorImpl<wasm::ValType> &Out);
void valTypesFromMVTs(ArrayRef<MVT> In, SmallVectorImpl<wasm::ValType> &Out);

std::unique_ptr<wasm::WasmSignature>
signatureFromMVTs(const SmallVectorImpl<MVT> &Results,
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ buildVRegToDbgValueMap(MachineFunction &MF, const LiveIntervals *Liveness) {
// changes.
static void undefInvalidDbgValues(
const LiveIntervals *Liveness,
const ArrayRef<SmallVector<LiveInterval *, 4>> &Assignments,
ArrayRef<SmallVector<LiveInterval *, 4>> Assignments,
DenseMap<Register, std::vector<std::pair<SlotIndex, MachineInstr *>>>
&DbgVRegToValues) {
#ifndef NDEBUG
Expand Down