Refactor intermediate instructions from value to pointer type
This commit is contained in:
parent
37828f2baf
commit
1d761886b5
File diff suppressed because it is too large
Load Diff
|
@ -221,19 +221,19 @@ public:
|
||||||
void IntConstToAddr(__int64 val);
|
void IntConstToAddr(__int64 val);
|
||||||
void FloatConstToAccu(double val);
|
void FloatConstToAccu(double val);
|
||||||
void FloatConstToWork(double val);
|
void FloatConstToWork(double val);
|
||||||
void CopyValue(InterCodeProcedure* proc, const InterInstruction& ins);
|
void CopyValue(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void LoadConstant(InterCodeProcedure* proc, const InterInstruction& ins);
|
void LoadConstant(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void StoreDirectValue(InterCodeProcedure* proc, const InterInstruction & ins);
|
void StoreDirectValue(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void LoadDirectValue(InterCodeProcedure* proc, const InterInstruction& ins);
|
void LoadDirectValue(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void LoadEffectiveAddress(InterCodeProcedure* proc, const InterInstruction& ins);
|
void LoadEffectiveAddress(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void CallFunction(InterCodeProcedure* proc, const InterInstruction& ins);
|
void CallFunction(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void CallAssembler(InterCodeProcedure* proc, const InterInstruction& ins);
|
void CallAssembler(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void BinaryOperator(InterCodeProcedure* proc, const InterInstruction& ins);
|
void BinaryOperator(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void UnaryOperator(InterCodeProcedure* proc, const InterInstruction& ins);
|
void UnaryOperator(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void BinaryRROperator(InterCodeProcedure* proc, const InterInstruction& ins);
|
void BinaryRROperator(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
ByteCode RelationalOperator(InterCodeProcedure* proc, const InterInstruction& ins);
|
ByteCode RelationalOperator(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void BinaryIntOperator(InterCodeProcedure* proc, const InterInstruction& ins, ByteCode code);
|
void BinaryIntOperator(InterCodeProcedure* proc, const InterInstruction * ins, ByteCode code);
|
||||||
void NumericConversion(InterCodeProcedure* proc, const InterInstruction& ins);
|
void NumericConversion(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
|
|
||||||
void PeepHoleOptimizer(void);
|
void PeepHoleOptimizer(void);
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -115,7 +115,7 @@ typedef GrowingArray<InterType> GrowingTypeArray;
|
||||||
typedef GrowingArray<int> GrowingIntArray;
|
typedef GrowingArray<int> GrowingIntArray;
|
||||||
typedef GrowingArray<InterInstructionPtr> GrowingInstructionPtrArray;
|
typedef GrowingArray<InterInstructionPtr> GrowingInstructionPtrArray;
|
||||||
typedef GrowingArray<InterCodeBasicBlockPtr> GrowingInterCodeBasicBlockPtrArray;
|
typedef GrowingArray<InterCodeBasicBlockPtr> GrowingInterCodeBasicBlockPtrArray;
|
||||||
typedef GrowingArray<InterInstruction> GrowingInstructionArray;
|
typedef GrowingArray<InterInstruction *> GrowingInstructionArray;
|
||||||
typedef GrowingArray<InterCodeProcedurePtr > GrowingInterCodeProcedurePtrArray;
|
typedef GrowingArray<InterCodeProcedurePtr > GrowingInterCodeProcedurePtrArray;
|
||||||
|
|
||||||
|
|
||||||
|
@ -139,9 +139,9 @@ public:
|
||||||
void FlushCallAliases(void);
|
void FlushCallAliases(void);
|
||||||
|
|
||||||
void RemoveValue(int index);
|
void RemoveValue(int index);
|
||||||
void InsertValue(InterInstruction& ins);
|
void InsertValue(InterInstruction * ins);
|
||||||
|
|
||||||
void UpdateValue(InterInstruction& ins, const GrowingInstructionPtrArray& tvalue, const NumberSet& aliasedLocals, const NumberSet& aliasedParams);
|
void UpdateValue(InterInstruction * ins, const GrowingInstructionPtrArray& tvalue, const NumberSet& aliasedLocals, const NumberSet& aliasedParams);
|
||||||
void Intersect(ValueSet& set);
|
void Intersect(ValueSet& set);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -308,7 +308,10 @@ public:
|
||||||
double mFloatValue;
|
double mFloatValue;
|
||||||
Location mLocation;
|
Location mLocation;
|
||||||
|
|
||||||
|
bool mInUse;
|
||||||
|
|
||||||
InterInstruction(void);
|
InterInstruction(void);
|
||||||
|
|
||||||
void SetCode(const Location & loc, InterCode code);
|
void SetCode(const Location & loc, InterCode code);
|
||||||
|
|
||||||
void CollectLocalAddressTemps(GrowingIntArray& localTable, GrowingIntArray& paramTable);
|
void CollectLocalAddressTemps(GrowingIntArray& localTable, GrowingIntArray& paramTable);
|
||||||
|
@ -408,7 +411,7 @@ public:
|
||||||
InterCodeBasicBlock(void);
|
InterCodeBasicBlock(void);
|
||||||
~InterCodeBasicBlock(void);
|
~InterCodeBasicBlock(void);
|
||||||
|
|
||||||
void Append(InterInstruction & code);
|
void Append(InterInstruction * code);
|
||||||
void Close(InterCodeBasicBlock* trueJump, InterCodeBasicBlock* falseJump);
|
void Close(InterCodeBasicBlock* trueJump, InterCodeBasicBlock* falseJump);
|
||||||
|
|
||||||
void CollectEntries(void);
|
void CollectEntries(void);
|
||||||
|
@ -440,7 +443,7 @@ public:
|
||||||
void BuildGlobalRenameRegisterTable(const GrowingIntArray& renameTable, GrowingIntArray& globalRenameTable);
|
void BuildGlobalRenameRegisterTable(const GrowingIntArray& renameTable, GrowingIntArray& globalRenameTable);
|
||||||
void GlobalRenameRegister(const GrowingIntArray& renameTable, GrowingTypeArray& temporaries);
|
void GlobalRenameRegister(const GrowingIntArray& renameTable, GrowingTypeArray& temporaries);
|
||||||
|
|
||||||
void CheckValueUsage(InterInstruction& ins, const GrowingInstructionPtrArray& tvalue);
|
void CheckValueUsage(InterInstruction * ins, const GrowingInstructionPtrArray& tvalue);
|
||||||
void PerformTempForwarding(TempForwardingTable& forwardingTable);
|
void PerformTempForwarding(TempForwardingTable& forwardingTable);
|
||||||
void PerformValueForwarding(const GrowingInstructionPtrArray& tvalue, const ValueSet& values, FastNumberSet& tvalid, const NumberSet& aliasedLocals, const NumberSet& aliasedParams);
|
void PerformValueForwarding(const GrowingInstructionPtrArray& tvalue, const ValueSet& values, FastNumberSet& tvalid, const NumberSet& aliasedLocals, const NumberSet& aliasedParams);
|
||||||
void PerformMachineSpecificValueUsageCheck(const GrowingInstructionPtrArray& tvalue, FastNumberSet& tvalid);
|
void PerformMachineSpecificValueUsageCheck(const GrowingInstructionPtrArray& tvalue, FastNumberSet& tvalid);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -83,25 +83,25 @@ public:
|
||||||
void PutWord(uint16 code);
|
void PutWord(uint16 code);
|
||||||
|
|
||||||
void CheckFrameIndex(int & reg, int & index, int size);
|
void CheckFrameIndex(int & reg, int & index, int size);
|
||||||
void LoadValueToReg(InterCodeProcedure* proc, const InterInstruction& ins, int reg, const NativeCodeInstruction * ainsl, const NativeCodeInstruction* ainsh);
|
void LoadValueToReg(InterCodeProcedure* proc, const InterInstruction * ins, int reg, const NativeCodeInstruction * ainsl, const NativeCodeInstruction* ainsh);
|
||||||
void LoadConstantToReg(InterCodeProcedure* proc, const InterInstruction& ins, InterType type, int reg);
|
void LoadConstantToReg(InterCodeProcedure* proc, const InterInstruction * ins, InterType type, int reg);
|
||||||
|
|
||||||
void LoadConstant(InterCodeProcedure* proc, const InterInstruction& ins);
|
void LoadConstant(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void StoreValue(InterCodeProcedure* proc, const InterInstruction& ins);
|
void StoreValue(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void LoadValue(InterCodeProcedure* proc, const InterInstruction& ins);
|
void LoadValue(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void LoadStoreValue(InterCodeProcedure* proc, const InterInstruction& rins, const InterInstruction& wins);
|
void LoadStoreValue(InterCodeProcedure* proc, const InterInstruction * rins, const InterInstruction * wins);
|
||||||
void BinaryOperator(InterCodeProcedure* proc, const InterInstruction& ins, const InterInstruction* sins1, const InterInstruction* sins0);
|
void BinaryOperator(InterCodeProcedure* proc, const InterInstruction * ins, const InterInstruction* sins1, const InterInstruction* sins0);
|
||||||
void UnaryOperator(InterCodeProcedure* proc, const InterInstruction& ins);
|
void UnaryOperator(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void RelationalOperator(InterCodeProcedure* proc, const InterInstruction& ins, NativeCodeProcedure * nproc, NativeCodeBasicBlock* trueJump, NativeCodeBasicBlock * falseJump);
|
void RelationalOperator(InterCodeProcedure* proc, const InterInstruction * ins, NativeCodeProcedure * nproc, NativeCodeBasicBlock* trueJump, NativeCodeBasicBlock * falseJump);
|
||||||
void LoadEffectiveAddress(InterCodeProcedure* proc, const InterInstruction& ins, const InterInstruction* sins1, const InterInstruction* sins0);
|
void LoadEffectiveAddress(InterCodeProcedure* proc, const InterInstruction * ins, const InterInstruction* sins1, const InterInstruction* sins0);
|
||||||
void NumericConversion(InterCodeProcedure* proc, const InterInstruction& ins);
|
void NumericConversion(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void CopyValue(InterCodeProcedure* proc, const InterInstruction& ins, NativeCodeProcedure* nproc);
|
void CopyValue(InterCodeProcedure* proc, const InterInstruction * ins, NativeCodeProcedure* nproc);
|
||||||
|
|
||||||
void CallAssembler(InterCodeProcedure* proc, const InterInstruction& ins);
|
void CallAssembler(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
void CallFunction(InterCodeProcedure* proc, const InterInstruction& ins);
|
void CallFunction(InterCodeProcedure* proc, const InterInstruction * ins);
|
||||||
|
|
||||||
void ShiftRegisterLeft(InterCodeProcedure* proc, int reg, int shift);
|
void ShiftRegisterLeft(InterCodeProcedure* proc, int reg, int shift);
|
||||||
int ShortMultiply(InterCodeProcedure* proc, const InterInstruction& ins, const InterInstruction* sins, int index, int mul);
|
int ShortMultiply(InterCodeProcedure* proc, const InterInstruction * ins, const InterInstruction* sins, int index, int mul);
|
||||||
|
|
||||||
bool CheckPredAccuStore(int reg);
|
bool CheckPredAccuStore(int reg);
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ __forceinline bool FastNumberSet::operator[](int elem)
|
||||||
{
|
{
|
||||||
uint32 dw = buffer[size + elem];
|
uint32 dw = buffer[size + elem];
|
||||||
|
|
||||||
return (dw < num&& buffer[dw] == elem);
|
return (dw < num && buffer[dw] == elem);
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline FastNumberSet& FastNumberSet::operator+=(int elem)
|
__forceinline FastNumberSet& FastNumberSet::operator+=(int elem)
|
||||||
|
|
Loading…
Reference in New Issue