diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-11-04 14:58:56 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-11-04 14:58:56 +0000 |
commit | 7ff99155c39edd73ebf1c6adfa023b1048fee9a4 (patch) | |
tree | b4dc751bcee540346911aa4115729eff2f991657 /utils/TableGen | |
parent | d1f06de484602e72707476a6152974847bac1570 (diff) | |
download | FreeBSD-src-7ff99155c39edd73ebf1c6adfa023b1048fee9a4.zip FreeBSD-src-7ff99155c39edd73ebf1c6adfa023b1048fee9a4.tar.gz |
Update LLVM to r86025.
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.cpp | 1 | ||||
-rw-r--r-- | utils/TableGen/CodeGenInstruction.cpp | 2 | ||||
-rw-r--r-- | utils/TableGen/CodeGenInstruction.h | 2 | ||||
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 61 | ||||
-rw-r--r-- | utils/TableGen/InstrInfoEmitter.cpp | 3 | ||||
-rw-r--r-- | utils/TableGen/LLVMCConfigurationEmitter.cpp | 18 | ||||
-rw-r--r-- | utils/TableGen/Record.cpp | 2 | ||||
-rw-r--r-- | utils/TableGen/Record.h | 2 | ||||
-rw-r--r-- | utils/TableGen/TGLexer.h | 2 |
9 files changed, 18 insertions, 75 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 6b8ceae..fab41c5 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -915,7 +915,6 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { bool MadeChange = false; MadeChange |= getChild(0)->ApplyTypeConstraints(TP, NotRegisters); MadeChange |= getChild(1)->ApplyTypeConstraints(TP, NotRegisters); - MadeChange |= UpdateNodeType(getChild(1)->getTypeNum(0), TP); return MadeChange; } else if (const CodeGenIntrinsic *Int = getIntrinsicInfo(CDP)) { bool MadeChange = false; diff --git a/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp index d421fd0..8520d9e 100644 --- a/utils/TableGen/CodeGenInstruction.cpp +++ b/utils/TableGen/CodeGenInstruction.cpp @@ -94,7 +94,7 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) isTerminator = R->getValueAsBit("isTerminator"); isReMaterializable = R->getValueAsBit("isReMaterializable"); hasDelaySlot = R->getValueAsBit("hasDelaySlot"); - usesCustomDAGSchedInserter = R->getValueAsBit("usesCustomDAGSchedInserter"); + usesCustomInserter = R->getValueAsBit("usesCustomInserter"); hasCtrlDep = R->getValueAsBit("hasCtrlDep"); isNotDuplicable = R->getValueAsBit("isNotDuplicable"); hasSideEffects = R->getValueAsBit("hasSideEffects"); diff --git a/utils/TableGen/CodeGenInstruction.h b/utils/TableGen/CodeGenInstruction.h index 04506e9..d22ac3e 100644 --- a/utils/TableGen/CodeGenInstruction.h +++ b/utils/TableGen/CodeGenInstruction.h @@ -97,7 +97,7 @@ namespace llvm { bool isTerminator; bool isReMaterializable; bool hasDelaySlot; - bool usesCustomDAGSchedInserter; + bool usesCustomInserter; bool isVariadic; bool hasCtrlDep; bool isNotDuplicable; diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index bbb8a18..c3520c1 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -114,7 +114,7 @@ static unsigned getResultPatternCost(TreePatternNode *P, if (Op->isSubClassOf("Instruction")) { Cost++; CodeGenInstruction &II = CGP.getTargetInfo().getInstruction(Op->getName()); - if (II.usesCustomDAGSchedInserter) + if (II.usesCustomInserter) Cost += 10; } for (unsigned i = 0, e = P->getNumChildren(); i != e; ++i) @@ -1917,40 +1917,6 @@ void DAGISelEmitter::EmitInstructionSelector(raw_ostream &OS) { } } - // Emit boilerplate. - OS << "SDNode *Select_INLINEASM(SDValue N) {\n" - << " std::vector<SDValue> Ops(N.getNode()->op_begin(), N.getNode()->op_end());\n" - << " SelectInlineAsmMemoryOperands(Ops);\n\n" - - << " std::vector<EVT> VTs;\n" - << " VTs.push_back(MVT::Other);\n" - << " VTs.push_back(MVT::Flag);\n" - << " SDValue New = CurDAG->getNode(ISD::INLINEASM, N.getDebugLoc(), " - "VTs, &Ops[0], Ops.size());\n" - << " return New.getNode();\n" - << "}\n\n"; - - OS << "SDNode *Select_UNDEF(const SDValue &N) {\n" - << " return CurDAG->SelectNodeTo(N.getNode(), TargetInstrInfo::IMPLICIT_DEF,\n" - << " N.getValueType());\n" - << "}\n\n"; - - OS << "SDNode *Select_DBG_LABEL(const SDValue &N) {\n" - << " SDValue Chain = N.getOperand(0);\n" - << " unsigned C = cast<LabelSDNode>(N)->getLabelID();\n" - << " SDValue Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n" - << " return CurDAG->SelectNodeTo(N.getNode(), TargetInstrInfo::DBG_LABEL,\n" - << " MVT::Other, Tmp, Chain);\n" - << "}\n\n"; - - OS << "SDNode *Select_EH_LABEL(const SDValue &N) {\n" - << " SDValue Chain = N.getOperand(0);\n" - << " unsigned C = cast<LabelSDNode>(N)->getLabelID();\n" - << " SDValue Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n" - << " return CurDAG->SelectNodeTo(N.getNode(), TargetInstrInfo::EH_LABEL,\n" - << " MVT::Other, Tmp, Chain);\n" - << "}\n\n"; - OS << "// The main instruction selector code.\n" << "SDNode *SelectCode(SDValue N) {\n" << " MVT::SimpleValueType NVT = N.getNode()->getValueType(0).getSimpleVT().SimpleTy;\n" @@ -1967,6 +1933,7 @@ void DAGISelEmitter::EmitInstructionSelector(raw_ostream &OS) { << " case ISD::TargetConstantPool:\n" << " case ISD::TargetFrameIndex:\n" << " case ISD::TargetExternalSymbol:\n" + << " case ISD::TargetBlockAddress:\n" << " case ISD::TargetJumpTable:\n" << " case ISD::TargetGlobalTLSAddress:\n" << " case ISD::TargetGlobalAddress:\n" @@ -2054,30 +2021,6 @@ void DAGISelEmitter::EmitInstructionSelector(raw_ostream &OS) { << " }\n" << " return NULL;\n" << "}\n\n"; - - OS << "void CannotYetSelect(SDValue N) DISABLE_INLINE {\n" - << " std::string msg;\n" - << " raw_string_ostream Msg(msg);\n" - << " Msg << \"Cannot yet select: \";\n" - << " N.getNode()->print(Msg, CurDAG);\n" - << " llvm_report_error(Msg.str());\n" - << "}\n\n"; - - OS << "void CannotYetSelectIntrinsic(SDValue N) DISABLE_INLINE {\n" - << " errs() << \"Cannot yet select: \";\n" - << " unsigned iid = cast<ConstantSDNode>(N.getOperand(" - << "N.getOperand(0).getValueType() == MVT::Other))->getZExtValue();\n" - << " if (iid < Intrinsic::num_intrinsics)\n" - << " llvm_report_error(\"Cannot yet select: intrinsic %\" + " - << "Intrinsic::getName((Intrinsic::ID)iid));\n"; - if (CGP.hasTargetIntrinsics()) { - OS << " else if (const TargetIntrinsicInfo *tii = TM.getIntrinsicInfo())\n" - << " llvm_report_error(Twine(\"Cannot yet select: target intrinsic " - << "%\") + tii->getName(iid));\n"; - } - OS << " else\n" - << " llvm_report_error(\"Cannot yet select: invalid intrinsic\");\n" - << "}\n\n"; } void DAGISelEmitter::run(raw_ostream &OS) { diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index 3a104ea..adb98fb9 100644 --- a/utils/TableGen/InstrInfoEmitter.cpp +++ b/utils/TableGen/InstrInfoEmitter.cpp @@ -275,8 +275,7 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num, if (Inst.isReMaterializable) OS << "|(1<<TID::Rematerializable)"; if (Inst.isNotDuplicable) OS << "|(1<<TID::NotDuplicable)"; if (Inst.hasOptionalDef) OS << "|(1<<TID::HasOptionalDef)"; - if (Inst.usesCustomDAGSchedInserter) - OS << "|(1<<TID::UsesCustomDAGSchedInserter)"; + if (Inst.usesCustomInserter) OS << "|(1<<TID::UsesCustomInserter)"; if (Inst.isVariadic) OS << "|(1<<TID::Variadic)"; if (Inst.hasSideEffects) OS << "|(1<<TID::UnmodeledSideEffects)"; if (Inst.isAsCheapAsAMove) OS << "|(1<<TID::CheapAsAMove)"; diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp index f5d1139..546988a 100644 --- a/utils/TableGen/LLVMCConfigurationEmitter.cpp +++ b/utils/TableGen/LLVMCConfigurationEmitter.cpp @@ -28,7 +28,6 @@ using namespace llvm; -namespace { //===----------------------------------------------------------------------===// /// Typedefs @@ -40,16 +39,18 @@ typedef std::vector<std::string> StrVector; /// Constants // Indentation. -unsigned TabWidth = 4; -unsigned Indent1 = TabWidth*1; -unsigned Indent2 = TabWidth*2; -unsigned Indent3 = TabWidth*3; +static const unsigned TabWidth = 4; +static const unsigned Indent1 = TabWidth*1; +static const unsigned Indent2 = TabWidth*2; +static const unsigned Indent3 = TabWidth*3; // Default help string. -const char * DefaultHelpString = "NO HELP MESSAGE PROVIDED"; +static const char * const DefaultHelpString = "NO HELP MESSAGE PROVIDED"; // Name for the "sink" option. -const char * SinkOptionName = "AutoGeneratedSinkOption"; +static const char * const SinkOptionName = "AutoGeneratedSinkOption"; + +namespace { //===----------------------------------------------------------------------===// /// Helper functions @@ -1901,7 +1902,8 @@ void EmitGenerateActionMethod (const ToolDescription& D, // For every understood option, emit handling code. if (D.Actions) - EmitCaseConstructHandler(D.Actions, Indent2, EmitActionHandlersCallback(OptDescs), + EmitCaseConstructHandler(D.Actions, Indent2, + EmitActionHandlersCallback(OptDescs), false, OptDescs, O); O << '\n'; diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp index a551166..25fe5c4 100644 --- a/utils/TableGen/Record.cpp +++ b/utils/TableGen/Record.cpp @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include "Record.h" -#include "llvm/Support/DataTypes.h" +#include "llvm/System/DataTypes.h" #include "llvm/Support/Format.h" #include "llvm/ADT/StringExtras.h" diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h index 1b33743..752bd0c 100644 --- a/utils/TableGen/Record.h +++ b/utils/TableGen/Record.h @@ -16,7 +16,7 @@ #define RECORD_H #include "llvm/Support/SourceMgr.h" -#include "llvm/Support/DataTypes.h" +#include "llvm/System/DataTypes.h" #include "llvm/Support/raw_ostream.h" #include <map> diff --git a/utils/TableGen/TGLexer.h b/utils/TableGen/TGLexer.h index 80405ac..6790208 100644 --- a/utils/TableGen/TGLexer.h +++ b/utils/TableGen/TGLexer.h @@ -14,7 +14,7 @@ #ifndef TGLEXER_H #define TGLEXER_H -#include "llvm/Support/DataTypes.h" +#include "llvm/System/DataTypes.h" #include <vector> #include <string> #include <cassert> |