mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Remove the code that limited FastISel to certain fixed signatures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55096 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -164,14 +164,6 @@ void FastISelEmitter::run(std::ostream &OS) {
|
|||||||
typedef std::map<OperandsSignature, OpcodeTypeMap> OperandsOpcodeTypeMap;
|
typedef std::map<OperandsSignature, OpcodeTypeMap> OperandsOpcodeTypeMap;
|
||||||
OperandsOpcodeTypeMap SimplePatterns;
|
OperandsOpcodeTypeMap SimplePatterns;
|
||||||
|
|
||||||
// Create the supported type signatures.
|
|
||||||
OperandsSignature KnownOperands;
|
|
||||||
SimplePatterns[KnownOperands] = OpcodeTypeMap();
|
|
||||||
KnownOperands.Operands.push_back("r");
|
|
||||||
SimplePatterns[KnownOperands] = OpcodeTypeMap();
|
|
||||||
KnownOperands.Operands.push_back("r");
|
|
||||||
SimplePatterns[KnownOperands] = OpcodeTypeMap();
|
|
||||||
|
|
||||||
for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(),
|
for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(),
|
||||||
E = CGP.ptm_end(); I != E; ++I) {
|
E = CGP.ptm_end(); I != E; ++I) {
|
||||||
const PatternToMatch &Pattern = *I;
|
const PatternToMatch &Pattern = *I;
|
||||||
@ -222,19 +214,13 @@ void FastISelEmitter::run(std::ostream &OS) {
|
|||||||
if (!Operands.initialize(InstPatNode, Target, VT, DstRC))
|
if (!Operands.initialize(InstPatNode, Target, VT, DstRC))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// If it's not a known signature, ignore it.
|
|
||||||
if (!SimplePatterns.count(Operands))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Ok, we found a pattern that we can handle. Remember it.
|
// Ok, we found a pattern that we can handle. Remember it.
|
||||||
{
|
|
||||||
InstructionMemo Memo = {
|
InstructionMemo Memo = {
|
||||||
Pattern.getDstPattern()->getOperator()->getName(),
|
Pattern.getDstPattern()->getOperator()->getName(),
|
||||||
DstRC
|
DstRC
|
||||||
};
|
};
|
||||||
SimplePatterns[Operands][OpcodeName][VT] = Memo;
|
SimplePatterns[Operands][OpcodeName][VT] = Memo;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Declare the target FastISel class.
|
// Declare the target FastISel class.
|
||||||
OS << "class FastISel : public llvm::FastISel {\n";
|
OS << "class FastISel : public llvm::FastISel {\n";
|
||||||
|
Reference in New Issue
Block a user