summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/FastISelEmitter.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-07-29 19:07:05 +0000
committerDavid Greene <greened@obbligato.org>2011-07-29 19:07:05 +0000
commit1aa0e3e1185d80c9767c71253d83e5f23c3a4973 (patch)
treead334e7b81f3d18436329784f8937d82caf8c888 /llvm/utils/TableGen/FastISelEmitter.cpp
parentcdd64328c7a794c3229aba52e4b5a55cb8400adc (diff)
downloadbcm5719-llvm-1aa0e3e1185d80c9767c71253d83e5f23c3a4973.tar.gz
bcm5719-llvm-1aa0e3e1185d80c9767c71253d83e5f23c3a4973.zip
[AVX] Constify Inits
Make references to Inits const everywhere. This is the final step before making them unique. llvm-svn: 136485
Diffstat (limited to 'llvm/utils/TableGen/FastISelEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/FastISelEmitter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/FastISelEmitter.cpp b/llvm/utils/TableGen/FastISelEmitter.cpp
index f54e8df40f2..2a86b896c0c 100644
--- a/llvm/utils/TableGen/FastISelEmitter.cpp
+++ b/llvm/utils/TableGen/FastISelEmitter.cpp
@@ -241,7 +241,7 @@ struct OperandsSignature {
if (Op->getType(0) != VT)
return false;
- DefInit *OpDI = dynamic_cast<DefInit*>(Op->getLeafValue());
+ const DefInit *OpDI = dynamic_cast<const DefInit*>(Op->getLeafValue());
if (!OpDI)
return false;
Record *OpLeafRec = OpDI->getDef();
@@ -401,12 +401,12 @@ static std::string PhyRegForNode(TreePatternNode *Op,
if (!Op->isLeaf())
return PhysReg;
- DefInit *OpDI = dynamic_cast<DefInit*>(Op->getLeafValue());
+ const DefInit *OpDI = dynamic_cast<const DefInit*>(Op->getLeafValue());
Record *OpLeafRec = OpDI->getDef();
if (!OpLeafRec->isSubClassOf("Register"))
return PhysReg;
- PhysReg += static_cast<StringInit*>(OpLeafRec->getValue( \
+ PhysReg += static_cast<const StringInit*>(OpLeafRec->getValue( \
"Namespace")->getValue())->getValue();
PhysReg += "::";
PhysReg += Target.getRegBank().getReg(OpLeafRec)->getName();
@@ -468,7 +468,7 @@ void FastISelMap::collectPatterns(CodeGenDAGPatterns &CGP) {
// a bit too complicated for now.
if (!Dst->getChild(1)->isLeaf()) continue;
- DefInit *SR = dynamic_cast<DefInit*>(Dst->getChild(1)->getLeafValue());
+ const DefInit *SR = dynamic_cast<const DefInit*>(Dst->getChild(1)->getLeafValue());
if (SR)
SubRegNo = getQualifiedName(SR->getDef());
else
OpenPOWER on IntegriCloud