diff options
Diffstat (limited to 'lib/Analysis/CFLGraph.h')
-rw-r--r-- | lib/Analysis/CFLGraph.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Analysis/CFLGraph.h b/lib/Analysis/CFLGraph.h index a8fb12b725686..54782b6bd4ad9 100644 --- a/lib/Analysis/CFLGraph.h +++ b/lib/Analysis/CFLGraph.h @@ -210,6 +210,11 @@ template <typename CFLAA> class CFLGraphBuilder { void addDerefEdge(Value *From, Value *To, bool IsRead) { assert(From != nullptr && To != nullptr); + // FIXME: This is subtly broken, due to how we model some instructions + // (e.g. extractvalue, extractelement) as loads. Since those take + // non-pointer operands, we'll entirely skip adding edges for those. + // + // addAssignEdge seems to have a similar issue with insertvalue, etc. if (!From->getType()->isPointerTy() || !To->getType()->isPointerTy()) return; addNode(From); @@ -540,6 +545,7 @@ template <typename CFLAA> class CFLGraphBuilder { case Instruction::ExtractValue: { auto *Ptr = CE->getOperand(0); addLoadEdge(Ptr, CE); + break; } case Instruction::ShuffleVector: { auto *From1 = CE->getOperand(0); |