[PATCH] D62791: [CFLGraph] Add support for unary fneg instruction.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 1 23:33:59 PDT 2019
craig.topper created this revision.
craig.topper added reviewers: george.burgess.iv, cameron.mcinally.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
I don't know much about this analysis so I'm not sure the best way to test this.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62791
Files:
llvm/lib/Analysis/CFLGraph.h
Index: llvm/lib/Analysis/CFLGraph.h
===================================================================
--- llvm/lib/Analysis/CFLGraph.h
+++ llvm/lib/Analysis/CFLGraph.h
@@ -292,6 +292,11 @@
addAssignEdge(Op2, &Inst);
}
+ void visitUnaryOperator(UnaryOperator &Inst) {
+ auto *Src = Inst.getOperand(0);
+ addAssignEdge(Src, &Inst);
+ }
+
void visitAtomicCmpXchgInst(AtomicCmpXchgInst &Inst) {
auto *Ptr = Inst.getPointerOperand();
auto *Val = Inst.getNewValOperand();
@@ -579,6 +584,11 @@
break;
}
+ case Instruction::FNeg: {
+ addAssignEdge(CE->getOperand(0), CE);
+ break;
+ }
+
default:
llvm_unreachable("Unknown instruction type encountered!");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62791.202586.patch
Type: text/x-patch
Size: 765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190602/f45191a4/attachment.bin>
More information about the llvm-commits
mailing list