X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FTableGen%2FCodeGenInstruction.cpp;h=185db01418b0465f20f7ec3cc65fbb5b23dd3304;hb=63e3e6350b14d04917268be07ca1c29e158fdfd7;hp=37c2069ec7279e3b8af3d4b8b75f5d963cc981af;hpb=8370d38adee63b3a4d87bfe81be4aacc55fe7cda;p=oota-llvm.git diff --git a/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp index 37c2069ec72..185db01418b 100644 --- a/utils/TableGen/CodeGenInstruction.cpp +++ b/utils/TableGen/CodeGenInstruction.cpp @@ -21,7 +21,8 @@ static void ParseConstraint(const std::string &CStr, CodeGenInstruction *I) { // FIXME: Only supports TIED_TO for now. std::string::size_type pos = CStr.find_first_of('='); assert(pos != std::string::npos && "Unrecognized constraint"); - std::string Name = CStr.substr(0, pos); + std::string::size_type start = CStr.find_first_not_of(" \t"); + std::string Name = CStr.substr(start, pos); // TIED_TO: $src1 = $dst std::string::size_type wpos = Name.find_first_of(" \t"); @@ -83,7 +84,7 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) isIndirectBranch = R->getValueAsBit("isIndirectBranch"); isBarrier = R->getValueAsBit("isBarrier"); isCall = R->getValueAsBit("isCall"); - isSimpleLoad = R->getValueAsBit("isSimpleLoad"); + canFoldAsLoad = R->getValueAsBit("canFoldAsLoad"); mayLoad = R->getValueAsBit("mayLoad"); mayStore = R->getValueAsBit("mayStore"); bool isTwoAddress = R->getValueAsBit("isTwoAddress"); @@ -165,7 +166,7 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) } else if (!Rec->isSubClassOf("RegisterClass") && Rec->getName() != "ptr_rc" && Rec->getName() != "unknown") throw "Unknown operand class '" + Rec->getName() + - "' in instruction '" + R->getName() + "' instruction!"; + "' in '" + R->getName() + "' instruction!"; // Check that the operand has a name and that it's unique. if (DI->getArgName(i).empty())