From: Owen Anderson Date: Sun, 8 Nov 2009 22:36:55 +0000 (+0000) Subject: Fix an issue where the ordering of blocks within a function could lead to different... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=9feeeaf9ed3a9509049a4cdd4f22a8735658dbca Fix an issue where the ordering of blocks within a function could lead to different constraint graphs being produced. The cause was that we were incorrectly marking sigma instructions as processed after handling the sigma-specific constraints for them, potentially neglecting to process them as normal instructions as well. Unfortunately, the testcase that inspired this still doesn't work because of a bug in the solver, which is next on the list to debug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86486 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/ABCD.cpp b/lib/Transforms/Scalar/ABCD.cpp index c8541d72a4d..cc4683a52a8 100644 --- a/lib/Transforms/Scalar/ABCD.cpp +++ b/lib/Transforms/Scalar/ABCD.cpp @@ -796,13 +796,15 @@ void ABCD::createConstraintSigInst(Instruction *I_op, BasicBlock *BB_succ_t, int32_t width = cast((*SIG_op_t)->getType())->getBitWidth(); inequality_graph.addEdge(I_op, *SIG_op_t, APInt(width, 0), true); inequality_graph.addEdge(*SIG_op_t, I_op, APInt(width, 0), false); - created.insert(*SIG_op_t); + if (created.insert(*SIG_op_t)) + createConstraintPHINode(cast(*SIG_op_t)); } if (*SIG_op_f) { int32_t width = cast((*SIG_op_f)->getType())->getBitWidth(); inequality_graph.addEdge(I_op, *SIG_op_f, APInt(width, 0), true); inequality_graph.addEdge(*SIG_op_f, I_op, APInt(width, 0), false); - created.insert(*SIG_op_f); + if (created.insert(*SIG_op_f)) + createConstraintPHINode(cast(*SIG_op_f)); } }