Permalink
Browse files

- Added integer constant folding and multiplication strength reductio…

…n optimizations
  • Loading branch information...
1 parent 765ba0d commit 042ac2cefbce8957527c97f56c21634f6a56c791 @tgiphil committed Jul 2, 2012
@@ -116,7 +116,6 @@
<Compile Include="Platform\IRegisterUsage.cs" />
<Compile Include="RegisterBitmap.cs" />
<Compile Include="StackLayout.cs" />
- <Compile Include="RegisterMap.cs" />
<Compile Include="Stages\RegisterUsageAnalyzerStage.cs" />
<Compile Include="Stages\OperandUsageAnalyzerStage.cs" />
<Compile Include="Stages\MultipleDefinitionMarkerStage.cs" />
@@ -286,7 +285,6 @@
<Compile Include="CIL\BaseCILInstruction.cs" />
<Compile Include="Stages\ReverseBlockOrderStage.cs" />
<Compile Include="RuntimeMethodData.cs" />
- <Compile Include="Stages\StrengthReductionStage.cs" />
<Compile Include="Stages\SimpleTraceBlockOrderStage.cs" />
<Compile Include="Stages\LocalCSEStage.cs" />
<Compile Include="IMethodCompiler.cs" />
@@ -1,81 +0,0 @@
-/*
- * (c) 2012 MOSA - The Managed Operating System Alliance
- *
- * Licensed under the terms of the New BSD License.
- *
- * Authors:
- * Phil Garcia (tgiphil) <phil@thinkedge.com>
- */
-
-namespace Mosa.Compiler.Framework
-{
- /// <summary>
- /// </summary>
- public class RegisterMap
- {
- #region Data members
-
- protected RegisterBitmap[] map;
-
- protected InstructionSet instructionSet;
-
- #endregion
-
- RegisterMap(InstructionSet instructionSet)
- {
- this.instructionSet = instructionSet;
- map = new RegisterBitmap[instructionSet.Size];
- }
-
- protected void CheckAndResize()
- {
- if (instructionSet.Size <= map.Length)
- return;
-
- RegisterBitmap[] newmap = new RegisterBitmap[instructionSet.Size];
- map.CopyTo(newmap, 0);
- map = newmap;
- }
-
- public void Set(int index, Register register)
- {
- map[index].Set(register);
- }
-
- public void Clear(int index, Register register)
- {
- map[index].Clear(register);
- }
-
- public void Not(int index)
- {
- map[index].Not();
- }
-
- public void And(int dest, int src)
- {
- map[dest].And(map[src]);
- }
-
- public void Or(int dest, int src)
- {
- map[dest].And(map[src]);
- }
-
- public void Xor(int dest, int src)
- {
- map[dest].Xor(map[src]);
- }
-
- public void ClearAll(int index)
- {
- map[index].ClearAll();
- }
-
- public void SetAll(int index)
- {
- map[index].SetAll();
- }
-
- }
-}
Oops, something went wrong.

0 comments on commit 042ac2c

Please sign in to comment.