summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2017-07-04 14:35:06 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2017-07-04 14:35:06 +0000
commit6ab0daade820ff12dafb861dfe8e2e5058435b8f (patch)
tree84379a3c426fcd5ad4a8085e08a23b6bcec01c68 /llvm/lib/CodeGen
parent90f69abc8b92f896625437616910adce2ae49db1 (diff)
downloadbcm5719-llvm-6ab0daade820ff12dafb861dfe8e2e5058435b8f.tar.gz
bcm5719-llvm-6ab0daade820ff12dafb861dfe8e2e5058435b8f.zip
[globalisel][tablegen] Partially fix compile-time regressions by converting matcher to state-machine(s)
Summary: Replace the matcher if-statements for each rule with a state-machine. This significantly reduces compile time, memory allocations, and cumulative memory allocation when compiling AArch64InstructionSelector.cpp.o after r303259 is recommitted. The following patches will expand on this further to fully fix the regressions. Reviewers: rovka, ab, t.p.northover, qcolombet, aditya_nandakumar Reviewed By: ab Subscribers: vitalybuka, aemerson, javed.absar, igorb, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D33758 llvm-svn: 307079
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp b/llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp
index 860fc9a4f8b..f1373791a9e 100644
--- a/llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp
@@ -26,6 +26,9 @@
using namespace llvm;
+InstructionSelector::MatcherState::MatcherState(unsigned MaxRenderers)
+ : Renderers(MaxRenderers, nullptr), MIs() {}
+
InstructionSelector::InstructionSelector() = default;
bool InstructionSelector::constrainOperandRegToRegClass(
OpenPOWER on IntegriCloud