summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorHideki Saito <hideki.saito@intel.com>2018-09-14 02:02:57 +0000
committerHideki Saito <hideki.saito@intel.com>2018-09-14 02:02:57 +0000
commitd19851ac7edaf7c6c9290a493a79d02fd18d2be3 (patch)
treefea2837c8e0f14fb857cc231205f57ad5186e64f /llvm/lib
parent05cf44346346c0308396cf59b2c7228b2b3eff30 (diff)
downloadbcm5719-llvm-d19851ac7edaf7c6c9290a493a79d02fd18d2be3.tar.gz
bcm5719-llvm-d19851ac7edaf7c6c9290a493a79d02fd18d2be3.zip
Fix for the buildbot failure http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/23635
from the commit (r342197) of https://reviews.llvm.org/D50820. llvm-svn: 342201
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlan.cpp4
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlan.h10
-rw-r--r--llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp1
3 files changed, 11 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index 511b31a28c3..09d20fbdefe 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -205,10 +205,6 @@ void VPBasicBlock::execute(VPTransformState *State) {
Value *IRCBV = CBV->getUnderlyingValue();
assert(IRCBV && "Unexpected null underlying value for condition bit");
- // Delete the condition bit at this point - it should be no longer needed.
- delete CBV;
- setCondBit(nullptr);
-
// Condition bit value in a VPBasicBlock is used as the branch selector. In
// the VPlan-native path case, since all branches are uniform we generate a
// branch instruction using the condition value from vector lane 0 and dummy
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 8d544034e94..c3123b41600 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1118,6 +1118,9 @@ private:
/// Holds the VPLoopInfo analysis for this VPlan.
VPLoopInfo VPLInfo;
+ /// Holds the condition bit values built during VPInstruction to VPRecipe transformation.
+ SmallVector<VPValue *, 4> VPCBVs;
+
public:
VPlan(VPBlockBase *Entry = nullptr) : Entry(Entry) {}
@@ -1128,6 +1131,8 @@ public:
delete MapEntry.second;
for (VPValue *Def : VPExternalDefs)
delete Def;
+ for (VPValue *CBV : VPCBVs)
+ delete CBV;
}
/// Generate the IR code for this VPlan.
@@ -1152,6 +1157,11 @@ public:
VPExternalDefs.insert(VPVal);
}
+ /// Add \p CBV to the vector of condition bit values.
+ void addCBV(VPValue *CBV) {
+ VPCBVs.push_back(CBV);
+ }
+
void addVPValue(Value *V) {
assert(V && "Trying to add a null Value to VPlan");
assert(!Value2VPValue.count(V) && "Value already exists in VPlan");
diff --git a/llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp
index 910d0f509ce..3ad7fc7e7b9 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp
@@ -33,6 +33,7 @@ void VPlanHCFGTransforms::VPInstructionsToVPRecipes(
if (auto *CondBit = VPBB->getCondBit()) {
auto *NCondBit = new VPValue(CondBit->getUnderlyingValue());
VPBB->setCondBit(NCondBit);
+ Plan->addCBV(NCondBit);
}
}
for (VPBlockBase *Base : RPOT) {
OpenPOWER on IntegriCloud