diff options
author | Craig Topper <craig.topper@gmail.com> | 2016-01-04 06:28:49 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2016-01-04 06:28:49 +0000 |
commit | 5a6dda53766ee5569ecc18c8b3a1cad33acb6380 (patch) | |
tree | ae847d06d1606488092f7c58bee7d3a55c81a27c /llvm/lib/TableGen/Record.cpp | |
parent | dc6c3fc3d666bedbbb7b1a3b60c1f317cbb2ef8b (diff) | |
download | bcm5719-llvm-5a6dda53766ee5569ecc18c8b3a1cad33acb6380.tar.gz bcm5719-llvm-5a6dda53766ee5569ecc18c8b3a1cad33acb6380.zip |
[TableGen] Use some free space in Init to store the opcode for UnOpInit/BinOpInit/TernOpInit allowing those types to be a little smaller. NFC
llvm-svn: 256733
Diffstat (limited to 'llvm/lib/TableGen/Record.cpp')
-rw-r--r-- | llvm/lib/TableGen/Record.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp index 87a3422b32a..11e35b75375 100644 --- a/llvm/lib/TableGen/Record.cpp +++ b/llvm/lib/TableGen/Record.cpp @@ -722,7 +722,7 @@ Init *UnOpInit::resolveReferences(Record &R, const RecordVal *RV) const { std::string UnOpInit::getAsString() const { std::string Result; - switch (Opc) { + switch (getOpcode()) { case CAST: Result = "!cast<" + getType()->getAsString() + ">"; break; case HEAD: Result = "!head"; break; case TAIL: Result = "!tail"; break; @@ -850,7 +850,7 @@ Init *BinOpInit::resolveReferences(Record &R, const RecordVal *RV) const { std::string BinOpInit::getAsString() const { std::string Result; - switch (Opc) { + switch (getOpcode()) { case CONCAT: Result = "!con"; break; case ADD: Result = "!add"; break; case AND: Result = "!and"; break; @@ -1054,7 +1054,7 @@ Init *TernOpInit::resolveReferences(Record &R, const RecordVal *RV) const { Init *lhs = LHS->resolveReferences(R, RV); - if (Opc == IF && lhs != LHS) { + if (getOpcode() == IF && lhs != LHS) { IntInit *Value = dyn_cast<IntInit>(lhs); if (Init *I = lhs->convertInitializerTo(IntRecTy::get())) Value = dyn_cast<IntInit>(I); @@ -1082,7 +1082,7 @@ Init *TernOpInit::resolveReferences(Record &R, std::string TernOpInit::getAsString() const { std::string Result; - switch (Opc) { + switch (getOpcode()) { case SUBST: Result = "!subst"; break; case FOREACH: Result = "!foreach"; break; case IF: Result = "!if"; break; |