[llvm] r268611 - [TableGen] Make sure to recursively factor any ScopeMatchers created while forming a SwitchType node. Remove a couple hundred bytes from the X86 matcher table.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 23:19:27 PDT 2016


Author: ctopper
Date: Thu May  5 01:19:27 2016
New Revision: 268611

URL: http://llvm.org/viewvc/llvm-project?rev=268611&view=rev
Log:
[TableGen] Make sure to recursively factor any ScopeMatchers created while forming a SwitchType node. Remove a couple hundred bytes from the X86 matcher table.

Modified:
    llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp

Modified: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=268611&r1=268610&r2=268611&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Thu May  5 01:19:27 2016
@@ -484,7 +484,9 @@ static void FactorNodes(std::unique_ptr<
         }
         
         Matcher *Entries[2] = { PrevMatcher, MatcherWithoutCTM };
-        Cases[Entry-1].second = new ScopeMatcher(Entries);
+        std::unique_ptr<Matcher> Case(new ScopeMatcher(Entries));
+        FactorNodes(Case);
+        Cases[Entry-1].second = Case.release();
         continue;
       }
       




More information about the llvm-commits mailing list