Skip to content

Commit

Permalink
Merge pull request #4428 from IBMJimmyk/spmdNullParent-v0.12.0
Browse files Browse the repository at this point in the history
Added NULL parent check to SPMDParallelizer
  • Loading branch information
andrewcraik authored Jan 24, 2019
2 parents d90fa19 + 6fc26d4 commit 93ddcae
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions runtime/compiler/optimizer/SPMDParallelizer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2018 IBM Corp. and others
* Copyright (c) 2000, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -3425,7 +3425,13 @@ TR_SPMDKernelParallelizer::perform()
ListIterator<TR_RegionStructure> sit(&simdLoops);
for (TR_RegionStructure *loop = sit.getFirst(); loop; loop = sit.getNext())
{
if (loop->getPrimaryInductionVariable())
/*
* The GPU transformation might make the block we are trying to vectorize unreachable due
* to creating and using a new GPU path. We check for this case by checking if the loop's
* parent is NULL or not. If it is NULL, vectorization of the unreachable block is not
* necessary and can be skipped.
*/
if (loop->getPrimaryInductionVariable() && (NULL != loop->getParent()))
{
if (reductionOperationsHashTab->locate(loop, id))
{
Expand Down

0 comments on commit 93ddcae

Please sign in to comment.