@@ -875,8 +875,7 @@ static void instrumentOneFunc(
875
875
F, TLI, ComdatMembers, true , BPI, BFI, IsCS, PGOInstrumentEntry,
876
876
PGOBlockCoverage);
877
877
878
- Type *I8PtrTy = PointerType::getUnqual (M->getContext ());
879
- auto Name = ConstantExpr::getBitCast (FuncInfo.FuncNameVar , I8PtrTy);
878
+ auto Name = FuncInfo.FuncNameVar ;
880
879
auto CFGHash = ConstantInt::get (Type::getInt64Ty (M->getContext ()),
881
880
FuncInfo.FunctionHash );
882
881
if (PGOFunctionEntryCoverage) {
@@ -965,9 +964,8 @@ static void instrumentOneFunc(
965
964
populateEHOperandBundle (Cand, BlockColors, OpBundles);
966
965
Builder.CreateCall (
967
966
Intrinsic::getDeclaration (M, Intrinsic::instrprof_value_profile),
968
- {ConstantExpr::getBitCast (FuncInfo.FuncNameVar , I8PtrTy),
969
- Builder.getInt64 (FuncInfo.FunctionHash ), ToProfile,
970
- Builder.getInt32 (Kind), Builder.getInt32 (SiteIndex++)},
967
+ {FuncInfo.FuncNameVar , Builder.getInt64 (FuncInfo.FunctionHash ),
968
+ ToProfile, Builder.getInt32 (Kind), Builder.getInt32 (SiteIndex++)},
971
969
OpBundles);
972
970
}
973
971
} // IPVK_First <= Kind <= IPVK_Last
@@ -1650,12 +1648,10 @@ void SelectInstVisitor::instrumentOneSelectInst(SelectInst &SI) {
1650
1648
Module *M = F.getParent ();
1651
1649
IRBuilder<> Builder (&SI);
1652
1650
Type *Int64Ty = Builder.getInt64Ty ();
1653
- Type *I8PtrTy = Builder.getInt8PtrTy ();
1654
1651
auto *Step = Builder.CreateZExt (SI.getCondition (), Int64Ty);
1655
1652
Builder.CreateCall (
1656
1653
Intrinsic::getDeclaration (M, Intrinsic::instrprof_increment_step),
1657
- {ConstantExpr::getBitCast (FuncNameVar, I8PtrTy),
1658
- Builder.getInt64 (FuncHash), Builder.getInt32 (TotalNumCtrs),
1654
+ {FuncNameVar, Builder.getInt64 (FuncHash), Builder.getInt32 (TotalNumCtrs),
1659
1655
Builder.getInt32 (*CurCtrIdx), Step});
1660
1656
++(*CurCtrIdx);
1661
1657
}
0 commit comments