projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bed9933
)
[CFLGraph] Fix a crash due to missing handling of freeze
author
Juneyoung Lee
<aqjune@gmail.com>
Sat, 20 Mar 2021 17:14:06 +0000
(
02:14
+0900)
committer
Juneyoung Lee
<aqjune@gmail.com>
Sat, 20 Mar 2021 17:14:13 +0000
(
02:14
+0900)
https://reviews.llvm.org/D85534#2636321
llvm/lib/Analysis/CFLGraph.h
patch
|
blob
|
history
diff --git
a/llvm/lib/Analysis/CFLGraph.h
b/llvm/lib/Analysis/CFLGraph.h
index
21842ed
..
02a13d6
100644
(file)
--- a/
llvm/lib/Analysis/CFLGraph.h
+++ b/
llvm/lib/Analysis/CFLGraph.h
@@
-284,6
+284,13
@@
template <typename CFLAA> class CFLGraphBuilder {
addAssignEdge(Src, &Inst);
}
+ void visitFreezeInst(FreezeInst &Inst) {
+ // Accessing freeze(ptr) is equivalent to accessing ptr.
+ // The former raises UB iff latter raises UB.
+ auto *Src = Inst.getOperand(0);
+ addAssignEdge(Src, &Inst);
+ }
+
void visitBinaryOperator(BinaryOperator &Inst) {
auto *Op1 = Inst.getOperand(0);
auto *Op2 = Inst.getOperand(1);