diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-02-04 00:47:02 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-02-04 00:47:02 +0000 |
commit | 905af9f40974f831de3d5dcfc2cac43247392a0c (patch) | |
tree | 117aee124ffea24d95735eeb9a1c73ccf97db1c5 | |
parent | f0fe1a87fed9e85eb1cf9a684e18a7999253b574 (diff) | |
download | bcm5719-llvm-905af9f40974f831de3d5dcfc2cac43247392a0c.tar.gz bcm5719-llvm-905af9f40974f831de3d5dcfc2cac43247392a0c.zip |
[GlobalISel] Separate matchers with newlines in emitted selector. NFC.
We don't try very hard to format the emitted code, but newlines
are an easy way to make it more readable.
llvm-svn: 294074
-rw-r--r-- | llvm/utils/TableGen/GlobalISelEmitter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/GlobalISelEmitter.cpp b/llvm/utils/TableGen/GlobalISelEmitter.cpp index 1886f75c49c..1d16c5cb6c1 100644 --- a/llvm/utils/TableGen/GlobalISelEmitter.cpp +++ b/llvm/utils/TableGen/GlobalISelEmitter.cpp @@ -143,7 +143,7 @@ public: OS << Separator << "("; Predicate->emitCxxPredicateExpr(OS, std::forward<Args>(args)...); OS << ")"; - Separator = " && "; + Separator = " &&\n"; } } }; @@ -276,7 +276,7 @@ public: void emitCxxPredicateExpr(raw_ostream &OS, const StringRef InsnVarName) const { emitCxxPredicateListExpr(OS, InsnVarName); for (const auto &Operand : Operands) { - OS << " && ("; + OS << " &&\n("; Operand.emitCxxPredicateExpr(OS, InsnVarName); OS << ")"; } @@ -359,7 +359,7 @@ public: OS << " constrainSelectedInstRegOperands(I, TII, TRI, RBI);\n"; OS << " return true;\n"; - OS << " }\n"; + OS << " }\n\n"; } }; @@ -515,7 +515,7 @@ void GlobalISelEmitter::run(raw_ostream &OS) { OS << "bool " << Target.getName() << "InstructionSelector::selectImpl" "(MachineInstr &I) const {\n const MachineRegisterInfo &MRI = " - "I.getParent()->getParent()->getRegInfo();\n"; + "I.getParent()->getParent()->getRegInfo();\n\n"; // Look through the SelectionDAG patterns we found, possibly emitting some. for (const PatternToMatch &Pat : CGP.ptms()) { |