diff options
| author | Owen Anderson <resistor@mac.com> | 2009-11-08 22:36:55 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-11-08 22:36:55 +0000 |
| commit | 058088f219006df0d40a47bd2e7c24ea45288a5e (patch) | |
| tree | e849dd87a7a9148bd98342bdcb03b3e149beeeb9 /llvm/lib/Transforms/Scalar | |
| parent | fd8d4e1383a829dc3cc2b271aab5abe14eca6813 (diff) | |
| download | bcm5719-llvm-058088f219006df0d40a47bd2e7c24ea45288a5e.tar.gz bcm5719-llvm-058088f219006df0d40a47bd2e7c24ea45288a5e.zip | |
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.
llvm-svn: 86486
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ABCD.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/ABCD.cpp b/llvm/lib/Transforms/Scalar/ABCD.cpp index c8541d72a4d..cc4683a52a8 100644 --- a/llvm/lib/Transforms/Scalar/ABCD.cpp +++ b/llvm/lib/Transforms/Scalar/ABCD.cpp @@ -796,13 +796,15 @@ void ABCD::createConstraintSigInst(Instruction *I_op, BasicBlock *BB_succ_t, int32_t width = cast<IntegerType>((*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<PHINode>(*SIG_op_t)); } if (*SIG_op_f) { int32_t width = cast<IntegerType>((*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<PHINode>(*SIG_op_f)); } } |

