diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2024-02-25 09:21:17 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2024-02-25 18:33:53 +0900 |
commit | 1f6a347c8abf8868fb4630c404480226c2efc2c2 (patch) | |
tree | c4de075080f5bb6161699fd536595c4b34fe941b /llvm/lib/ProfileData | |
parent | 3b27cc2ceec265d751c909c431ed62c0d7ed9b51 (diff) | |
download | llvm-1f6a347c8abf8868fb4630c404480226c2efc2c2.zip llvm-1f6a347c8abf8868fb4630c404480226c2efc2c2.tar.gz llvm-1f6a347c8abf8868fb4630c404480226c2efc2c2.tar.bz2 |
Refactor: Let MCDC::State have DecisionByStmt and BranchByStmt
- Prune `RegionMCDCBitmapMap` and `RegionCondIDMap`. They are handled
by `MCDCState`.
- Rename `s/BitmapMap/DecisionByStmt/`. It can handle Decision stuff.
- Rename `s/CondIDMap/BranchByStmt/`. It can be handle Branch stuff.
- `MCDCRecordProcessor`: Use `DecisionParams.BitmapIdx` directly.
Diffstat (limited to 'llvm/lib/ProfileData')
-rw-r--r-- | llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp index ddce758..8f9d1ead 100644 --- a/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp @@ -243,8 +243,6 @@ class MCDCRecordProcessor { /// Total number of conditions in the boolean expression. unsigned NumConditions; - unsigned BitmapIdx; - /// Mapping of a condition ID to its corresponding branch params. llvm::DenseMap<unsigned, mcdc::ConditionIDs> CondsMap; @@ -265,7 +263,6 @@ public: : Bitmap(Bitmap), Region(Region), DecisionParams(Region.getDecisionParams()), Branches(Branches), NumConditions(DecisionParams.NumConditions), - BitmapIdx(DecisionParams.BitmapIdx * CHAR_BIT), Folded(NumConditions, false), IndependencePairs(NumConditions) {} private: @@ -287,7 +284,7 @@ private: continue; } - if (!Bitmap[BitmapIdx + Index]) + if (!Bitmap[DecisionParams.BitmapIdx * CHAR_BIT + Index]) continue; // Copy the completed test vector to the vector of testvectors. |