summaryrefslogtreecommitdiff
path: root/chapter06/src/test/java/com
diff options
context:
space:
mode:
authorDibyendu Majumdar <dibyendumajumdar@users.noreply.github.com>2023-11-18 17:20:24 +0000
committerGitHub <noreply@github.com>2023-11-18 09:20:24 -0800
commit21a1fc4a4414f8511ae5e94965b4b72fd45751e0 (patch)
tree7ad90082de465c7b58668eaebc6586bb5417c2f1 /chapter06/src/test/java/com
parent1a9cac97df063af82516ca35bde34fde62d24c56 (diff)
downloadSimple-21a1fc4a4414f8511ae5e94965b4b72fd45751e0.tar.gz
Simple-21a1fc4a4414f8511ae5e94965b4b72fd45751e0.zip
Chapter6 Part 2 - Add further peephole based on dominator calc (#42)
* #37 Add a Utils class to hold some useful functions. (#39) Move the name '$ctrl' to the ScopeNode * Fix maven pom Missing an explicit compiler target, so IntelliJ/Maven defaulted to version 5 ??? Remove explict ver 17 from Makefile. * Add immediate dominator peephole * A little more robust & simpler idom search * #40 Revise chapter 6 writeup to include a description of dominators * #40 Revise chapter 6 writeup to include a description of dominators --------- Co-authored-by: Cliff Click <cliffc@acm.org>
Diffstat (limited to 'chapter06/src/test/java/com')
-rw-r--r--chapter06/src/test/java/com/seaofnodes/simple/Chapter06Test.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/chapter06/src/test/java/com/seaofnodes/simple/Chapter06Test.java b/chapter06/src/test/java/com/seaofnodes/simple/Chapter06Test.java
index 801f8d3f..7767b203 100644
--- a/chapter06/src/test/java/com/seaofnodes/simple/Chapter06Test.java
+++ b/chapter06/src/test/java/com/seaofnodes/simple/Chapter06Test.java
@@ -200,7 +200,7 @@ if( arg ) {
return a+b;
""");
StopNode ret = parser.parse(true);
- assertEquals("return (Phi(Region21,Phi(Region19,2,3),1)+Phi(Region21,2,0));", ret.toString());
+ assertEquals("return Phi(Region22,4,1);", ret.toString());
}
@@ -251,7 +251,7 @@ if( arg ) {
return a+b+c;
""");
StopNode ret = parser.parse(true);
- assertEquals("return ((Phi(Region32,Phi(Region22,2,3),0)+Phi(Region32,Phi(Region30,2,3),1))+Phi(Region32,1,0));", ret.toString());
+ assertEquals("return (Phi(Region33,Phi(Region22,2,3),0)+Phi(Region33,3,1));", ret.toString());
}