MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / getConstantIndex

Method getConstantIndex

lib/Bytecode/Writer/BytecodeWriter.cpp:484–491  ·  view source on GitHub ↗

Look up a constant by attribute without adding it

Source from the content-addressed store, hash-verified

482
483 // Look up a constant by attribute without adding it
484 LogicalResult getConstantIndex(Attribute attr, uint64_t &index) const {
485 auto it = constantsMap.find(attr);
486 if (it != constantsMap.end()) {
487 index = std::distance(constantsMap.begin(), it);
488 return success();
489 }
490 return failure();
491 }
492
493 // Provide access to the constant map
494 const llvm::MapVector<Attribute, SmallVector<char>> &getConstantsMap() const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected