[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:
parent
61b9fc1d42
commit
cbab7e65a7
@ -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) {
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user