mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
!3993 pr3685 review fix
Merge pull request !3993 from yingguofeng/master
This commit is contained in:
commit
316e5366b9
@ -866,7 +866,7 @@ GateRef CircuitBuilder::NumberBinaryOp(GateRef x, GateRef y)
|
||||
auto numberBinaryOp = TypedBinaryOperator(MachineType::I64, Op,
|
||||
GateType::NumberType(), GateType::NumberType(),
|
||||
{currentControl, currentDepend, x, y}, GateType::AnyType(),
|
||||
PGOSampleType::Type::NONE);
|
||||
PGOSampleType::NoneType());
|
||||
currentLabel->SetControl(numberBinaryOp);
|
||||
currentLabel->SetDepend(numberBinaryOp);
|
||||
return numberBinaryOp;
|
||||
|
@ -180,7 +180,7 @@ std::vector<std::string> PGOMethodInfo::ParseFromText(const std::string &infoStr
|
||||
|
||||
void PGOMethodTypeSet::Merge(const PGOMethodTypeSet *info)
|
||||
{
|
||||
for (auto &fromType : info->typeInfoSet_) {
|
||||
for (const auto &fromType : info->typeInfoSet_) {
|
||||
auto iter = typeInfoSet_.find(fromType);
|
||||
if (iter != typeInfoSet_.end()) {
|
||||
PGOSampleType combineType = iter->GetType().CombineType(fromType.GetType());
|
||||
@ -225,7 +225,7 @@ bool PGOMethodTypeSet::ParseFromText(const std::string &typeString)
|
||||
{
|
||||
std::vector<std::string> typeInfoVector = base::StringHelper::SplitString(typeString, TYPE_SEPARATOR);
|
||||
if (typeInfoVector.size() > 0) {
|
||||
for (auto iter : typeInfoVector) {
|
||||
for (const auto &iter : typeInfoVector) {
|
||||
std::vector<std::string> typeStrings = base::StringHelper::SplitString(iter, BLOCK_START);
|
||||
if (typeStrings.size() < METHOD_TYPE_INFO_COUNT) {
|
||||
return false;
|
||||
@ -335,7 +335,7 @@ void PGOMethodInfoMap::Merge(Chunk *chunk, PGOMethodInfoMap *methodInfos)
|
||||
} else {
|
||||
auto typeInfoSet = chunk->New<PGOMethodTypeSet>();
|
||||
typeInfoSet->Merge(fromTypeInfo);
|
||||
methodTypeInfos_.emplace(methodId, fromTypeInfo);
|
||||
methodTypeInfos_.emplace(methodId, typeInfoSet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ public:
|
||||
static constexpr int METHOD_MODE_INDEX = 2;
|
||||
static constexpr int METHOD_NAME_INDEX = 3;
|
||||
|
||||
PGOMethodInfo(EntityId id) : id_(id) {}
|
||||
explicit PGOMethodInfo(EntityId id) : id_(id) {}
|
||||
|
||||
PGOMethodInfo(EntityId id, uint32_t count, SampleMode mode, const char *methodName)
|
||||
: id_(id), count_(count), mode_(mode)
|
||||
@ -357,7 +357,7 @@ public:
|
||||
|
||||
void AddType(uint32_t offset, PGOSampleType type)
|
||||
{
|
||||
auto result = typeInfoSet_.find(offset);
|
||||
auto result = typeInfoSet_.find(PGOMethodTypeInfo(offset));
|
||||
if (result != typeInfoSet_.end()) {
|
||||
typeInfoSet_.erase(result);
|
||||
}
|
||||
@ -386,7 +386,7 @@ public:
|
||||
private:
|
||||
class PGOMethodTypeInfo {
|
||||
public:
|
||||
PGOMethodTypeInfo(uint32_t offset) : offset_(offset) {}
|
||||
explicit PGOMethodTypeInfo(uint32_t offset) : offset_(offset) {}
|
||||
PGOMethodTypeInfo(uint32_t offset, PGOSampleType type)
|
||||
: size_(sizeof(PGOMethodTypeInfo)), offset_(offset), type_(type) {}
|
||||
|
||||
|
@ -47,8 +47,8 @@ public:
|
||||
|
||||
PGOSampleType() : type_(Type::NONE) {};
|
||||
|
||||
PGOSampleType(Type type) : type_(type) {};
|
||||
PGOSampleType(uint32_t type) : type_(Type(type)) {};
|
||||
explicit PGOSampleType(Type type) : type_(type) {};
|
||||
explicit PGOSampleType(uint32_t type) : type_(Type(type)) {};
|
||||
|
||||
static PGOSampleType NoneType()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user