diff options
author | dan sinclair <dj2@everburning.com> | 2018-07-12 10:16:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-12 10:16:15 -0400 |
commit | a5e4a532170bbbdd2a8c57d827e71a0b111fdcf3 (patch) | |
tree | 386f1cb6067871690e03b255cae7eb84c2459d39 /test/opt/dominator_tree | |
parent | 4cc6cd184ad74d35cb3e995f206f85ad23c2febc (diff) | |
download | spirv-tools-a5e4a532170bbbdd2a8c57d827e71a0b111fdcf3.tar.gz |
Remove context() method from opt::Function (#1700)
This CL removes the context() method from opt::Function. In the places
where the context() was used we can retrieve, or provide, the context in
another fashion.
Diffstat (limited to 'test/opt/dominator_tree')
-rw-r--r-- | test/opt/dominator_tree/generated.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/test/opt/dominator_tree/generated.cpp b/test/opt/dominator_tree/generated.cpp index b26a1bc7..f2340516 100644 --- a/test/opt/dominator_tree/generated.cpp +++ b/test/opt/dominator_tree/generated.cpp @@ -122,8 +122,8 @@ TEST_F(PassClassTest, DominatorSimpleCFG) { // Test normal dominator tree { DominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); @@ -187,8 +187,8 @@ TEST_F(PassClassTest, DominatorSimpleCFG) { // Test post dominator tree { PostDominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); @@ -289,8 +289,8 @@ TEST_F(PassClassTest, DominatorIrreducibleCFG) { // Check normal dominator tree { DominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); @@ -331,8 +331,8 @@ TEST_F(PassClassTest, DominatorIrreducibleCFG) { // Check post dominator tree { PostDominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); @@ -410,8 +410,8 @@ TEST_F(PassClassTest, DominatorLoopToSelf) { // Check normal dominator tree { DominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); @@ -486,8 +486,8 @@ TEST_F(PassClassTest, DominatorLoopToSelf) { // Check post dominator tree { PostDominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); @@ -607,8 +607,8 @@ TEST_F(PassClassTest, DominatorUnreachableInLoop) { // Check normal dominator tree { DominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); @@ -658,8 +658,8 @@ TEST_F(PassClassTest, DominatorUnreachableInLoop) { // Check post dominator tree. { PostDominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // (strict) dominance checks. for (uint32_t id : {10, 11, 12, 13, 14, 15}) @@ -737,8 +737,8 @@ TEST_F(PassClassTest, DominatorInfinitLoop) { // Check normal dominator tree { DominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); @@ -772,8 +772,8 @@ TEST_F(PassClassTest, DominatorInfinitLoop) { // Check post dominator tree { PostDominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); @@ -842,8 +842,9 @@ TEST_F(PassClassTest, DominatorUnreachableFromEntry) { // Check dominator tree { DominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); + // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); EXPECT_EQ(tree.GetRoot()->bb_, cfg.pseudo_entry_block()); @@ -870,8 +871,8 @@ TEST_F(PassClassTest, DominatorUnreachableFromEntry) { // Check post dominator tree { PostDominatorAnalysis dom_tree; - dom_tree.InitializeTree(fn); const CFG& cfg = *context->cfg(); + dom_tree.InitializeTree(cfg, fn); // Inspect the actual tree DominatorTree& tree = dom_tree.GetDomTree(); |