mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
[AVX] Constify Inits
Make references to Inits const everywhere. This is the final step before making them unique. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136485 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user