[AMDGPU] Minor cleanups in offload plugin and AMDGPUEmitPrintf. NFC. (#187587)

Use empty() in assert, brace-init instead of std::make_pair in the
AMDGPU offload plugin, and fix a comment typo in AMDGPUEmitPrintf.
This commit is contained in:
Bruce Changlong Xu 2026-03-19 15:16:47 -07:00 committed by GitHub
parent 61b9fc1d42
commit cbab7e65a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -475,7 +475,7 @@ Value *llvm::emitAMDGPUPrintfCall(IRBuilder<> &Builder, ArrayRef<Value *> Args,
Ptr = Builder.CreateConstInBoundsGEP1_32(Int8Ty, Ptr, 4);
// Create MD5 hash for costant format string, push low 64 bits of the
// Create MD5 hash for constant format string, push low 64 bits of the
// same onto buffer and metadata.
NamedMDNode *metaD = M->getOrInsertNamedMetadata("llvm.printf.fmts");
if (IsConstFmtStr) {

View File

@ -1141,7 +1141,7 @@ private:
// Set the output signal of the current slot.
Slots[Curr].Signal = OutputSignal;
return std::make_pair(Curr, InputSignal);
return {Curr, InputSignal};
}
/// Complete all pending post actions and reset the stream after synchronizing
@ -1974,7 +1974,7 @@ struct AMDHostDeviceTy : public AMDGenericDeviceTy {
const llvm::SmallVector<hsa_agent_t> &HostAgents)
: AMDGenericDeviceTy(), Agents(HostAgents), ArgsMemoryManager(Plugin),
PinnedMemoryManager(Plugin) {
assert(HostAgents.size() && "No host agent found");
assert(!HostAgents.empty() && "No host agent found");
}
/// Initialize the host device memory pools and the memory managers for