aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/utils/TableGen/PredicateExpander.cpp
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/utils/TableGen/PredicateExpander.cpp
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
downloadydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/utils/TableGen/PredicateExpander.cpp')
-rw-r--r--contrib/libs/llvm12/utils/TableGen/PredicateExpander.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/contrib/libs/llvm12/utils/TableGen/PredicateExpander.cpp b/contrib/libs/llvm12/utils/TableGen/PredicateExpander.cpp
index a76640f6d1..1bff258abd 100644
--- a/contrib/libs/llvm12/utils/TableGen/PredicateExpander.cpp
+++ b/contrib/libs/llvm12/utils/TableGen/PredicateExpander.cpp
@@ -198,18 +198,18 @@ void PredicateExpander::expandCheckIsImmOperand(raw_ostream &OS, int OpIndex) {
<< "getOperand(" << OpIndex << ").isImm() ";
}
-void PredicateExpander::expandCheckFunctionPredicateWithTII(
- raw_ostream &OS, StringRef MCInstFn, StringRef MachineInstrFn,
- StringRef TIIPtr) {
- if (!shouldExpandForMC()) {
- OS << (TIIPtr.empty() ? "TII" : TIIPtr) << "->" << MachineInstrFn;
- OS << (isByRef() ? "(MI)" : "(*MI)");
- return;
- }
-
- OS << MCInstFn << (isByRef() ? "(MI" : "(*MI") << ", MCII)";
-}
-
+void PredicateExpander::expandCheckFunctionPredicateWithTII(
+ raw_ostream &OS, StringRef MCInstFn, StringRef MachineInstrFn,
+ StringRef TIIPtr) {
+ if (!shouldExpandForMC()) {
+ OS << (TIIPtr.empty() ? "TII" : TIIPtr) << "->" << MachineInstrFn;
+ OS << (isByRef() ? "(MI)" : "(*MI)");
+ return;
+ }
+
+ OS << MCInstFn << (isByRef() ? "(MI" : "(*MI") << ", MCII)";
+}
+
void PredicateExpander::expandCheckFunctionPredicate(raw_ostream &OS,
StringRef MCInstFn,
StringRef MachineInstrFn) {
@@ -370,19 +370,19 @@ void PredicateExpander::expandPredicate(raw_ostream &OS, const Record *Rec) {
return expandPredicateSequence(OS, Rec->getValueAsListOfDefs("Predicates"),
/* AllOf */ false);
- if (Rec->isSubClassOf("CheckFunctionPredicate")) {
+ if (Rec->isSubClassOf("CheckFunctionPredicate")) {
return expandCheckFunctionPredicate(
OS, Rec->getValueAsString("MCInstFnName"),
Rec->getValueAsString("MachineInstrFnName"));
- }
-
- if (Rec->isSubClassOf("CheckFunctionPredicateWithTII")) {
- return expandCheckFunctionPredicateWithTII(
- OS, Rec->getValueAsString("MCInstFnName"),
- Rec->getValueAsString("MachineInstrFnName"),
- Rec->getValueAsString("TIIPtrName"));
- }
-
+ }
+
+ if (Rec->isSubClassOf("CheckFunctionPredicateWithTII")) {
+ return expandCheckFunctionPredicateWithTII(
+ OS, Rec->getValueAsString("MCInstFnName"),
+ Rec->getValueAsString("MachineInstrFnName"),
+ Rec->getValueAsString("TIIPtrName"));
+ }
+
if (Rec->isSubClassOf("CheckNonPortable"))
return expandCheckNonPortable(OS, Rec->getValueAsString("CodeBlock"));