-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update comments, .ll file, and .dot file
- Loading branch information
guanqin-123
committed
Feb 14, 2022
1 parent
888bfb4
commit f9ef0ca
Showing
24 changed files
with
321 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,52 @@ | ||
digraph "ICFG" { | ||
label="ICFG"; | ||
|
||
Node0x10140bf10 [shape=record,color=black,label="{NodeID: 27\nIntraBlockNode ID: 27 br label %while.cond \{fun: main\}}"]; | ||
Node0x10140bf10 -> Node0x10140acb0[style=solid]; | ||
Node0x10140bd90 [shape=record,color=black,label="{NodeID: 26\nIntraBlockNode ID: 26 store i32 %inc, i32* %a, align 4 \{fun: main\}}"]; | ||
Node0x10140bd90 -> Node0x10140bf10[style=solid]; | ||
Node0x10140bb50 [shape=record,color=black,label="{NodeID: 25\nIntraBlockNode ID: 25 %inc = add nsw i32 %1, 1 \{fun: main\}}"]; | ||
Node0x10140bb50 -> Node0x10140bd90[style=solid]; | ||
Node0x10140a450 [shape=record,color=green,label="{NodeID: 24\nFunExitBlockNode ID: 24 Exit(\{ \})\n \{fun: main\}}"]; | ||
Node0x10140b6e0 [shape=record,color=black,label="{NodeID: 23\nIntraBlockNode ID: 23 %1 = load i32, i32* %a, align 4 \{fun: main\}}"]; | ||
Node0x10140b6e0 -> Node0x10140bb50[style=solid]; | ||
Node0x10140b560 [shape=record,color=black,label="{NodeID: 22\nIntraBlockNode ID: 22 ret i32 0 \{fun: main\}}"]; | ||
Node0x10140b560 -> Node0x10140a450[style=solid]; | ||
Node0x10140b360 [shape=record,color=blue,label="{NodeID: 21\nRetBlockNode ID: 21 call void @source(i32* %a) \{fun: main\}}"]; | ||
Node0x10140b360 -> Node0x10140b6e0[style=solid]; | ||
Node0x10140b220 [shape=record,color=red,label="{NodeID: 20\nCallICFGNode ID: 20 call void @source(i32* %a) \{fun: main\}|{|<s1>0x101308ce0}}"]; | ||
Node0x10140b220 -> Node0x10140b360[style=solid]; | ||
Node0x10140b220:s1 -> Node0x101409760[style=solid,color=red]; | ||
Node0x10140afe0 [shape=record,color=black,label="{NodeID: 19\nIntraBlockNode ID: 19 br i1 %cmp, label %while.body, label %while.end \{fun: main\}}"]; | ||
Node0x10140afe0 -> Node0x10140b220[style=solid]; | ||
Node0x10140afe0 -> Node0x10140b560[style=solid]; | ||
Node0x10140ae90 [shape=record,color=black,label="{NodeID: 18\nIntraBlockNode ID: 18 %cmp = icmp sle i32 %0, 1 \{fun: main\}}"]; | ||
Node0x10140ae90 -> Node0x10140afe0[style=solid]; | ||
Node0x10140acb0 [shape=record,color=black,label="{NodeID: 17\nIntraBlockNode ID: 17 %0 = load i32, i32* %a, align 4 \{fun: main\}}"]; | ||
Node0x10140acb0 -> Node0x10140ae90[style=solid]; | ||
Node0x10140ab30 [shape=record,color=black,label="{NodeID: 16\nIntraBlockNode ID: 16 br label %while.cond \{fun: main\}}"]; | ||
Node0x10140ab30 -> Node0x10140acb0[style=solid]; | ||
Node0x10140a9b0 [shape=record,color=black,label="{NodeID: 15\nIntraBlockNode ID: 15 store i32 1, i32* %a, align 4 \{fun: main\}}"]; | ||
Node0x10140a9b0 -> Node0x10140ab30[style=solid]; | ||
Node0x10140a800 [shape=record,color=black,label="{NodeID: 14\nIntraBlockNode ID: 14 store i32 0, i32* %retval, align 4 \{fun: main\}}"]; | ||
Node0x10140a800 -> Node0x10140a9b0[style=solid]; | ||
Node0x10140a650 [shape=record,color=black,label="{NodeID: 13\nIntraBlockNode ID: 13 %a = alloca i32, align 4 \{fun: main\}AddrPE: [22\<--23] %a = alloca i32, align 4\{ \}}"]; | ||
Node0x10140a650 -> Node0x10140a800[style=solid]; | ||
Node0x10140a540 [shape=record,color=black,label="{NodeID: 12\nIntraBlockNode ID: 12 %retval = alloca i32, align 4 \{fun: main\}AddrPE: [20\<--21] %retval = alloca i32, align 4\{ \}}"]; | ||
Node0x10140a540 -> Node0x10140a650[style=solid]; | ||
Node0x10140a3b0 [shape=record,color=yellow,label="{NodeID: 11\nFunEntryBlockNode ID: 11 Entry(\{ \})\n \{fun: main\}}"]; | ||
Node0x10140a3b0 -> Node0x101307280[style=solid]; | ||
Node0x10140a3b0 -> Node0x10140a540[style=solid]; | ||
Node0x10140a200 [shape=record,color=black,label="{NodeID: 10\nIntraBlockNode ID: 10 ret void \{fun: sink\}}"]; | ||
Node0x10140a200 -> Node0x101409d20[style=solid]; | ||
Node0x10140a0e0 [shape=record,color=green,label="{NodeID: 9\nFunExitBlockNode ID: 9 Exit(\{ \})\n \{fun: source\}|{<s0>0x101308ce0}}"]; | ||
Node0x10140a0e0:s0 -> Node0x10140b360[style=solid,color=blue]; | ||
Node0x101409f00 [shape=record,color=black,label="{NodeID: 8\nIntraBlockNode ID: 8 ret void \{fun: source\}}"]; | ||
Node0x101409f00 -> Node0x10140a0e0[style=solid]; | ||
Node0x101409d20 [shape=record,color=green,label="{NodeID: 7\nFunExitBlockNode ID: 7 Exit(\{ \})\n \{fun: sink\}|{<s0>0x101308298}}"]; | ||
Node0x101409d20:s0 -> Node0x101409c80[style=solid,color=blue]; | ||
Node0x101409c80 [shape=record,color=blue,label="{NodeID: 6\nRetBlockNode ID: 6 call void @sink() \{fun: source\}}"]; | ||
Node0x101409c80 -> Node0x101409f00[style=solid]; | ||
Node0x101409b20 [shape=record,color=yellow,label="{NodeID: 5\nFunEntryBlockNode ID: 5 Entry(\{ \})\n \{fun: sink\}}"]; | ||
Node0x101409b20 -> Node0x10140a200[style=solid]; | ||
Node0x101409a70 [shape=record,color=red,label="{NodeID: 4\nCallICFGNode ID: 4 call void @sink() \{fun: source\}|{|<s1>0x101308298}}"]; | ||
Node0x101409a70 -> Node0x101409c80[style=solid]; | ||
Node0x101409a70:s1 -> Node0x101409b20[style=solid,color=red]; | ||
Node0x101409950 [shape=record,color=black,label="{NodeID: 3\nIntraBlockNode ID: 3 store i32* %s, i32** %s.addr, align 8 \{fun: source\}StorePE: [8\<--7] store i32* %s, i32** %s.addr, align 8\{ \}}"]; | ||
Node0x101409950 -> Node0x101409a70[style=solid]; | ||
Node0x101409800 [shape=record,color=black,label="{NodeID: 2\nIntraBlockNode ID: 2 %s.addr = alloca i32*, align 8 \{fun: source\}AddrPE: [8\<--9] %s.addr = alloca i32*, align 8\{ \}}"]; | ||
Node0x101409800 -> Node0x101409950[style=solid]; | ||
Node0x101409760 [shape=record,color=yellow,label="{NodeID: 1\nFunEntryBlockNode ID: 1 Entry(\{ \})\n \{fun: source\}}"]; | ||
Node0x101409760 -> Node0x101409800[style=solid]; | ||
Node0x101307280 [shape=record,color=purple,label="{NodeID: 0\nCopyPE: [2\<--3] i8* null\{ Can only get source location for instruction, argument, global var or function. \}AddrPE: [4\<--5] ; Function Attrs: noinline nounwind optnone ssp uwtable\ndefine void @source(i32* %s) #0 \{\nentry:\n %s.addr = alloca i32*, align 8\n store i32* %s, i32** %s.addr, align 8\n call void @sink()\n ret void\n\}\n\{ \}AddrPE: [12\<--13] ; Function Attrs: noinline nounwind optnone ssp uwtable\ndefine void @sink() #0 \{\nentry:\n ret void\n\}\n\{ \}AddrPE: [17\<--18] ; Function Attrs: noinline nounwind optnone ssp uwtable\ndefine i32 @main() #0 \{\nentry:\n %retval = alloca i32, align 4\n %a = alloca i32, align 4\n store i32 0, i32* %retval, align 4\n store i32 1, i32* %a, align 4\n br label %while.cond\n\nwhile.cond: ; preds = %while.body, %entry\n %0 = load i32, i32* %a, align 4\n %cmp = icmp sle i32 %0, 1\n br i1 %cmp, label %while.body, label %while.end\n\nwhile.body: ; preds = %while.cond\n call void @source(i32* %a)\n %1 = load i32, i32* %a, align 4\n %inc = add nsw i32 %1, 1\n store i32 %inc, i32* %a, align 4\n br label %while.cond\n\nwhile.end: ; preds = %while.cond\n ret i32 0\n\}\n\{ \}}"]; | ||
Node0x55e6463a4ba0 [shape=record,color=black,label="{IntraICFGNode23 \{fun: main\}\nBranchStmt: [ Unconditional branch]\nSuccessor 0 ICFGNode13 \n br label %while.cond, !llvm.loop !4 }"]; | ||
Node0x55e6463a4ba0 -> Node0x55e6463a3870[style=solid]; | ||
Node0x55e6463a49c0 [shape=record,color=black,label="{IntraICFGNode22 \{fun: main\}\nStoreStmt: [Var17 \<-- Var28] \n store i32 %inc, i32* %a, align 4 }"]; | ||
Node0x55e6463a49c0 -> Node0x55e6463a4ba0[style=solid]; | ||
Node0x55e6463a47e0 [shape=record,color=black,label="{IntraICFGNode21 \{fun: main\}\nBinaryOPStmt: [Var28 \<-- (Var27 opcode13 Var20)] \n %inc = add nsw i32 %1, 1 }"]; | ||
Node0x55e6463a47e0 -> Node0x55e6463a49c0[style=solid]; | ||
Node0x55e6463a4610 [shape=record,color=green,label="{FunExitICFGNode20 \{fun: main\}\nPhiStmt: [Var16 \<-- ([Var32, ICFGNode18],)] \n ret i32 0 }"]; | ||
Node0x55e6463a4430 [shape=record,color=black,label="{IntraICFGNode19 \{fun: main\}\nLoadStmt: [Var27 \<-- Var17] \n %1 = load i32, i32* %a, align 4 }"]; | ||
Node0x55e6463a4430 -> Node0x55e6463a47e0[style=solid]; | ||
Node0x55e6463a4250 [shape=record,color=black,label="{IntraICFGNode18 \{fun: main\}\n ret i32 0 }"]; | ||
Node0x55e6463a4250 -> Node0x55e6463a4610[style=solid]; | ||
Node0x55e6463a3f80 [shape=record,color=blue,label="{RetICFGNode17 \{fun: main\}}"]; | ||
Node0x55e6463a3f80 -> Node0x55e6463a4430[style=solid]; | ||
Node0x55e64638fa10 [shape=record,color=red,label="{CallICFGNode16 \{fun: main\}\nCallPE: [Var7 \<-- Var17] \n call void @source(i32* %a) |{<s0>0x55e646392e80}}"]; | ||
Node0x55e64638fa10:s0 -> Node0x55e646393d00[style=solid,color=red]; | ||
Node0x55e6463a3d20 [shape=record,color=black,label="{IntraICFGNode15 \{fun: main\}\nBranchStmt: [Condition Var24]\nSuccessor 0 ICFGNode16 Successor 1 ICFGNode18 \n br i1 %cmp, label %while.body, label %while.end }"]; | ||
Node0x55e6463a3d20 -> Node0x55e64638fa10[style=solid]; | ||
Node0x55e6463a3d20 -> Node0x55e6463a4250[style=solid]; | ||
Node0x55e6463a3b40 [shape=record,color=black,label="{IntraICFGNode14 \{fun: main\}\nCmpStmt: [Var24 \<-- (Var23 predicate41 Var20)] \n %cmp = icmp sle i32 %0, 1 }"]; | ||
Node0x55e6463a3b40 -> Node0x55e6463a3d20[style=solid]; | ||
Node0x55e6463a3870 [shape=record,color=black,label="{IntraICFGNode13 \{fun: main\}\nLoadStmt: [Var23 \<-- Var17] \n %0 = load i32, i32* %a, align 4 }"]; | ||
Node0x55e6463a3870 -> Node0x55e6463a3b40[style=solid]; | ||
Node0x55e64638e050 [shape=record,color=purple,label="{GlobalICFGNode0\nCopyStmt: [Var1 \<-- Var0] \n i8* null \{ constant data \}\nAddrStmt: [Var20 \<-- Var3] \n i32 1 \{ constant data \}\nAddrStmt: [Var32 \<-- Var3] \n i32 0 \{ constant data \}\nAddrStmt: [Var4 \<-- Var5] \n source \nAddrStmt: [Var9 \<-- Var10] \n sink \nAddrStmt: [Var14 \<-- Var15] \n main }"]; | ||
Node0x55e64638e050 -> Node0x55e6463a31e0[style=solid]; | ||
Node0x55e646393d00 [shape=record,color=yellow,label="{FunEntryICFGNode1 \{fun: source\}}"]; | ||
Node0x55e646393d00 -> Node0x55e64638e1e0[style=solid]; | ||
Node0x55e64638e1e0 [shape=record,color=red,label="{CallICFGNode2 \{fun: source\}|{<s0>0x55e646391cd0}}"]; | ||
Node0x55e64638e1e0:s0 -> Node0x55e6463a2a10[style=solid,color=red]; | ||
Node0x55e6463a28d0 [shape=record,color=blue,label="{RetICFGNode3 \{fun: source\}}"]; | ||
Node0x55e6463a28d0 -> Node0x55e6463a2da0[style=solid]; | ||
Node0x55e6463a2a10 [shape=record,color=yellow,label="{FunEntryICFGNode4 \{fun: sink\}}"]; | ||
Node0x55e6463a2a10 -> Node0x55e6463a3040[style=solid]; | ||
Node0x55e6463a2ae0 [shape=record,color=green,label="{FunExitICFGNode5 \{fun: sink\}|{<s0>0x55e646391cd0}}"]; | ||
Node0x55e6463a2ae0:s0 -> Node0x55e6463a28d0[style=solid,color=blue]; | ||
Node0x55e6463a2da0 [shape=record,color=black,label="{IntraICFGNode6 \{fun: source\}\n ret void }"]; | ||
Node0x55e6463a2da0 -> Node0x55e6463a2f30[style=solid]; | ||
Node0x55e6463a2f30 [shape=record,color=green,label="{FunExitICFGNode7 \{fun: source\}|{<s0>0x55e646392e80}}"]; | ||
Node0x55e6463a2f30:s0 -> Node0x55e6463a3f80[style=solid,color=blue]; | ||
Node0x55e6463a3040 [shape=record,color=black,label="{IntraICFGNode8 \{fun: sink\}\n ret void }"]; | ||
Node0x55e6463a3040 -> Node0x55e6463a2ae0[style=solid]; | ||
Node0x55e6463a31e0 [shape=record,color=yellow,label="{FunEntryICFGNode9 \{fun: main\}}"]; | ||
Node0x55e6463a31e0 -> Node0x55e6463a3310[style=solid]; | ||
Node0x55e6463a3310 [shape=record,color=black,label="{IntraICFGNode10 \{fun: main\}\nAddrStmt: [Var17 \<-- Var18] \n %a = alloca i32, align 4 }"]; | ||
Node0x55e6463a3310 -> Node0x55e6463a34d0[style=solid]; | ||
Node0x55e6463a34d0 [shape=record,color=black,label="{IntraICFGNode11 \{fun: main\}\nStoreStmt: [Var17 \<-- Var20] \n store i32 1, i32* %a, align 4 }"]; | ||
Node0x55e6463a34d0 -> Node0x55e6463a3690[style=solid]; | ||
Node0x55e6463a3690 [shape=record,color=black,label="{IntraICFGNode12 \{fun: main\}\nBranchStmt: [ Unconditional branch]\nSuccessor 0 ICFGNode13 \n br label %while.cond }"]; | ||
Node0x55e6463a3690 -> Node0x55e6463a3870[style=solid]; | ||
} |
Oops, something went wrong.