From 89f711604f5b504eadccc5527e9428a7a24aaa94 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 6 Oct 2017 15:33:55 +0000 Subject: Strip trailing whitespace git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315070 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/DAGISelMatcherEmitter.cpp | 10 +++++----- utils/TableGen/FastISelEmitter.cpp | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'utils') diff --git a/utils/TableGen/DAGISelMatcherEmitter.cpp b/utils/TableGen/DAGISelMatcherEmitter.cpp index 75e4f52ca52..76370cdad67 100644 --- a/utils/TableGen/DAGISelMatcherEmitter.cpp +++ b/utils/TableGen/DAGISelMatcherEmitter.cpp @@ -47,14 +47,14 @@ static cl::opt InstrumentCoverage( namespace { class MatcherTableEmitter { const CodeGenDAGPatterns &CGP; - + DenseMap NodePredicateMap; std::vector NodePredicates; // We de-duplicate the predicates by code string, and use this map to track // all the patterns with "identical" predicates. StringMap> NodePredicatesByCodeToRun; - + StringMap PatternPredicateMap; std::vector PatternPredicates; @@ -116,7 +116,7 @@ private: } return Entry-1; } - + unsigned getPatternPredicate(StringRef PredName) { unsigned &Entry = PatternPredicateMap[PredName]; if (Entry == 0) { @@ -773,13 +773,13 @@ void MatcherTableEmitter::EmitPredicateFunctions(raw_ostream &OS) { for (unsigned i = 0, e = NodePredicates.size(); i != e; ++i) { // Emit the predicate code corresponding to this pattern. TreePredicateFn PredFn = NodePredicates[i]; - + assert(!PredFn.isAlwaysTrue() && "No code in this predicate"); OS << " case " << i << ": { \n"; for (auto *SimilarPred : NodePredicatesByCodeToRun[PredFn.getCodeToRunOnSDNode()]) OS << " // " << TreePredicateFn(SimilarPred).getFnName() <<'\n'; - + OS << PredFn.getCodeToRunOnSDNode() << "\n }\n"; } OS << " }\n"; diff --git a/utils/TableGen/FastISelEmitter.cpp b/utils/TableGen/FastISelEmitter.cpp index ed48c02280c..610f4d21bf2 100644 --- a/utils/TableGen/FastISelEmitter.cpp +++ b/utils/TableGen/FastISelEmitter.cpp @@ -363,7 +363,7 @@ struct OperandsSignature { namespace { class FastISelMap { - // A multimap is needed instead of a "plain" map because the key is + // A multimap is needed instead of a "plain" map because the key is // the instruction's complexity (an int) and they are not unique. typedef std::multimap PredMap; typedef std::map RetPredMap; @@ -374,7 +374,7 @@ class FastISelMap { OperandsOpcodeTypeRetPredMap SimplePatterns; - // This is used to check that there are no duplicate predicates + // This is used to check that there are no duplicate predicates typedef std::multimap PredCheckMap; typedef std::map RetPredCheckMap; typedef std::map TypeRetPredCheckMap; @@ -395,10 +395,10 @@ public: void collectPatterns(CodeGenDAGPatterns &CGP); void printImmediatePredicates(raw_ostream &OS); void printFunctionDefinitions(raw_ostream &OS); -private: - void emitInstructionCode(raw_ostream &OS, +private: + void emitInstructionCode(raw_ostream &OS, const OperandsSignature &Operands, - const PredMap &PM, + const PredMap &PM, const std::string &RetVTName); }; } // End anonymous namespace @@ -572,7 +572,7 @@ void FastISelMap::collectPatterns(CodeGenDAGPatterns &CGP) { PhysRegInputs, PredicateCheck }; - + int complexity = Pattern.getPatternComplexity(CGP); if (SimplePatternsCheck[Operands][OpcodeName][VT] @@ -612,9 +612,9 @@ void FastISelMap::printImmediatePredicates(raw_ostream &OS) { OS << "\n\n"; } -void FastISelMap::emitInstructionCode(raw_ostream &OS, +void FastISelMap::emitInstructionCode(raw_ostream &OS, const OperandsSignature &Operands, - const PredMap &PM, + const PredMap &PM, const std::string &RetVTName) { // Emit code for each possible instruction. There may be // multiple if there are subtarget concerns. A reverse iterator -- cgit v1.2.3