forked from OSchip/llvm-project
Handle functions with multiple exit blocks properly.
llvm-svn: 37539
This commit is contained in:
parent
c43f32b935
commit
d184c18074
|
@ -526,6 +526,9 @@ bool GVNPRE::runOnFunction(Function &F) {
|
||||||
df_begin(PDT.getRootNode()), E = df_end(PDT.getRootNode());
|
df_begin(PDT.getRootNode()), E = df_end(PDT.getRootNode());
|
||||||
PDI != E; ++PDI) {
|
PDI != E; ++PDI) {
|
||||||
BasicBlock* BB = PDI->getBlock();
|
BasicBlock* BB = PDI->getBlock();
|
||||||
|
if (BB == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
DOUT << "Block: " << BB->getName() << "\n";
|
DOUT << "Block: " << BB->getName() << "\n";
|
||||||
DOUT << "TMP_GEN: ";
|
DOUT << "TMP_GEN: ";
|
||||||
dump(generatedTemporaries[BB]);
|
dump(generatedTemporaries[BB]);
|
||||||
|
@ -635,6 +638,9 @@ bool GVNPRE::runOnFunction(Function &F) {
|
||||||
E = df_end(DT.getRootNode()); DI != E; ++DI) {
|
E = df_end(DT.getRootNode()); DI != E; ++DI) {
|
||||||
BasicBlock* BB = DI->getBlock();
|
BasicBlock* BB = DI->getBlock();
|
||||||
|
|
||||||
|
if (BB == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
std::set<Value*, ExprLT>& new_set = new_sets[BB];
|
std::set<Value*, ExprLT>& new_set = new_sets[BB];
|
||||||
std::set<Value*, ExprLT>& availOut = availableOut[BB];
|
std::set<Value*, ExprLT>& availOut = availableOut[BB];
|
||||||
std::set<Value*, ExprLT>& anticIn = anticipatedIn[BB];
|
std::set<Value*, ExprLT>& anticIn = anticipatedIn[BB];
|
||||||
|
|
Loading…
Reference in New Issue