@@ -278,10 +278,6 @@ class InstrLowerer final {
278
278
// / using the index represented by the a temp value into a bitmap.
279
279
void lowerMCDCTestVectorBitmapUpdate (InstrProfMCDCTVBitmapUpdate *Ins);
280
280
281
- // / Replace instrprof.mcdc.temp.update with a shift and or instruction using
282
- // / the corresponding condition ID.
283
- void lowerMCDCCondBitmapUpdate (InstrProfMCDCCondBitmapUpdate *Ins);
284
-
285
281
// / Compute the address of the counter value that this profiling instruction
286
282
// / acts on.
287
283
Value *getCounterAddress (InstrProfCntrInstBase *I);
@@ -648,9 +644,6 @@ bool InstrLowerer::lowerIntrinsics(Function *F) {
648
644
} else if (auto *IPBU = dyn_cast<InstrProfMCDCTVBitmapUpdate>(&Instr)) {
649
645
lowerMCDCTestVectorBitmapUpdate (IPBU);
650
646
MadeChange = true ;
651
- } else if (auto *IPTU = dyn_cast<InstrProfMCDCCondBitmapUpdate>(&Instr)) {
652
- lowerMCDCCondBitmapUpdate (IPTU);
653
- MadeChange = true ;
654
647
}
655
648
}
656
649
}
@@ -1053,34 +1046,6 @@ void InstrLowerer::lowerMCDCTestVectorBitmapUpdate(
1053
1046
Update->eraseFromParent ();
1054
1047
}
1055
1048
1056
- void InstrLowerer::lowerMCDCCondBitmapUpdate (
1057
- InstrProfMCDCCondBitmapUpdate *Update) {
1058
- IRBuilder<> Builder (Update);
1059
- auto *Int32Ty = Type::getInt32Ty (M.getContext ());
1060
- auto *MCDCCondBitmapAddr = Update->getMCDCCondBitmapAddr ();
1061
-
1062
- // Load the MCDC temporary value from the stack.
1063
- // %mcdc.temp = load i32, ptr %mcdc.addr, align 4
1064
- auto *Temp = Builder.CreateLoad (Int32Ty, MCDCCondBitmapAddr, " mcdc.temp" );
1065
-
1066
- // Zero-extend the evaluated condition boolean value (0 or 1) by 32bits.
1067
- // %1 = zext i1 %tobool to i32
1068
- auto *CondV_32 = Builder.CreateZExt (Update->getCondBool (), Int32Ty);
1069
-
1070
- // Shift the boolean value left (by the condition's ID) to form a bitmap.
1071
- // %2 = shl i32 %1, <Update->getCondID()>
1072
- auto *ShiftedVal = Builder.CreateShl (CondV_32, Update->getCondID ());
1073
-
1074
- // Perform logical OR of the bitmap against the loaded MCDC temporary value.
1075
- // %3 = or i32 %mcdc.temp, %2
1076
- auto *Result = Builder.CreateOr (Temp, ShiftedVal);
1077
-
1078
- // Store the updated temporary value back to the stack.
1079
- // store i32 %3, ptr %mcdc.addr, align 4
1080
- Builder.CreateStore (Result, MCDCCondBitmapAddr);
1081
- Update->eraseFromParent ();
1082
- }
1083
-
1084
1049
// / Get the name of a profiling variable for a particular function.
1085
1050
static std::string getVarName (InstrProfInstBase *Inc, StringRef Prefix,
1086
1051
bool &Renamed) {
0 commit comments