Skip to content

Commit 5d304d6

Browse files
committed
Revert "[gicombiner] Add GIMatchTree and use it for the code generation"
All the windows bots are failing match-tree.td and there's no obvious cause that I can see. It's not just the %p formatting problem. My best guess is that there's an ordering issue too but I'll need further information to figure that out. Revert while I'm investigating. This reverts commit 64f1bb5 and 77d4b5f
1 parent df71f92 commit 5d304d6

File tree

13 files changed

+17
-1928
lines changed

13 files changed

+17
-1928
lines changed

llvm/include/llvm/Target/GlobalISel/Combine.td

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ def match;
8989
class GIMatchKind;
9090
class GIMatchKindWithArgs;
9191

92-
/// In lieu of having proper macro support. Trivial one-off opcode checks can be
93-
/// performed with this.
94-
def wip_match_opcode : GIMatchKindWithArgs;
95-
9692
/// The operator at the root of a GICombineRule.Apply dag.
9793
def apply;
9894
/// All arguments of the apply operator must be subclasses of GIApplyKind, or
@@ -103,30 +99,26 @@ class GIApplyKindWithArgs;
10399

104100
def copy_prop : GICombineRule<
105101
(defs root:$d),
106-
(match (COPY $d, $s):$mi,
107-
[{ return Helper.matchCombineCopy(*${mi}); }]),
108-
(apply [{ Helper.applyCombineCopy(*${mi}); }])>;
102+
(match [{ return Helper.matchCombineCopy(${d}); }]),
103+
(apply [{ Helper.applyCombineCopy(${d}); }])>;
109104
def trivial_combines : GICombineGroup<[copy_prop]>;
110105

111106
def extending_loads : GICombineRule<
112107
(defs root:$root, extending_load_matchdata:$matchinfo),
113-
(match (wip_match_opcode G_LOAD, G_SEXTLOAD, G_ZEXTLOAD):$root,
114-
[{ return Helper.matchCombineExtendingLoads(*${root}, ${matchinfo}); }]),
115-
(apply [{ Helper.applyCombineExtendingLoads(*${root}, ${matchinfo}); }])>;
108+
(match [{ return Helper.matchCombineExtendingLoads(${root}, ${matchinfo}); }]),
109+
(apply [{ Helper.applyCombineExtendingLoads(${root}, ${matchinfo}); }])>;
116110
def combines_for_extload: GICombineGroup<[extending_loads]>;
117111

118112
def combine_indexed_load_store : GICombineRule<
119113
(defs root:$root, indexed_load_store_matchdata:$matchinfo),
120-
(match (wip_match_opcode G_LOAD, G_SEXTLOAD, G_ZEXTLOAD, G_STORE):$root,
121-
[{ return Helper.matchCombineIndexedLoadStore(*${root}, ${matchinfo}); }]),
122-
(apply [{ Helper.applyCombineIndexedLoadStore(*${root}, ${matchinfo}); }])>;
114+
(match [{ return Helper.matchCombineIndexedLoadStore(${root}, ${matchinfo}); }]),
115+
(apply [{ Helper.applyCombineIndexedLoadStore(${root}, ${matchinfo}); }])>;
123116

124117
// FIXME: Is there a reason this wasn't in tryCombine? I've left it out of
125118
// all_combines because it wasn't there.
126119
def elide_br_by_inverting_cond : GICombineRule<
127-
(defs root:$root),
128-
(match (wip_match_opcode G_BR):$root,
129-
[{ return Helper.matchElideBrByInvertingCond(*${root}); }]),
130-
(apply [{ Helper.applyElideBrByInvertingCond(*${root}); }])>;
120+
(defs root:$d),
121+
(match [{ return Helper.matchElideBrByInvertingCond(${d}); }]),
122+
(apply [{ Helper.applyElideBrByInvertingCond(${d}); }])>;
131123

132124
def all_combines : GICombineGroup<[trivial_combines, combines_for_extload, combine_indexed_load_store]>;

llvm/test/TableGen/GICombinerEmitter/match-tree.td

Lines changed: 0 additions & 142 deletions
This file was deleted.

0 commit comments

Comments
 (0)