Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worked on move hints #29

Merged
merged 32 commits into from
Mar 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
30cb3e8
- Removed IBranchInstruction and used FlowControl property instead
tgiphil Mar 24, 2014
b3fd811
Constructed SpinLock for X86 Platform
charsleysa Mar 15, 2014
a28bd3a
Fix and temporary workaround.
charsleysa Mar 19, 2014
bea8cf4
- Fixed use of XOR instruction
tgiphil Mar 19, 2014
6a87bea
- Created Mosa.Compiler.Framework.Analysis name space
tgiphil Mar 19, 2014
7816dff
- Minor refactoring of EnterSSA stage
tgiphil Mar 19, 2014
6e719cb
- Implemented delegate factory for Block Order and Dominance Analysis
tgiphil Mar 21, 2014
b5f7165
- Added Block Order implementations
tgiphil Mar 21, 2014
3efc37c
- Added linker factory
tgiphil Mar 21, 2014
91925f6
- Added boot stage factory
tgiphil Mar 22, 2014
c38aae2
- Refactored base/interface usage
tgiphil Mar 22, 2014
04acd8e
- Refactored base/interface usage
tgiphil Mar 22, 2014
c6e56fb
- Refactored base/interface usage
tgiphil Mar 22, 2014
dd6f72a
- CodeMain
tgiphil Mar 22, 2014
2a1aabd
- Purge Archive
tgiphil Mar 22, 2014
372f5a4
- Worked on EnterSSA
tgiphil Mar 22, 2014
1647cc4
- Fixed Promote Local Variables Stage
tgiphil Mar 22, 2014
e62d359
- Fixed rare bugs with SSA
tgiphil Mar 23, 2014
5bc7d74
- Fixed rare bugs with SSA
tgiphil Mar 23, 2014
65f5411
- Minor
tgiphil Mar 24, 2014
ba86911
- Fixed various bugs to enable SSA copy propagation for I4/U4
tgiphil Mar 24, 2014
53ffa93
- Added constant folding optimization for shift operations
tgiphil Mar 24, 2014
f8eb2a5
- Converted KeyValuePair to Tuple
tgiphil Mar 26, 2014
6c9160d
- Minor update for Explorer (incomplete)
tgiphil Mar 27, 2014
05d6502
- Added MoveHints to register (incomplete)
tgiphil Mar 27, 2014
b6daa5b
- Fixed reloading metadata not resolving ID for strings
kiootic Mar 28, 2014
7171cc5
Merge branch 'master' of https://github.com/kiootic/MOSA-Project
tgiphil Mar 28, 2014
f1214da
Merge remote-tracking branch 'upstream/master'
charsleysa Mar 30, 2014
bfc53f2
Fixed CoolWorld crash
charsleysa Mar 30, 2014
61d9314
Merge branch 'master' of https://github.com/charsleysa/MOSA-Project
tgiphil Mar 30, 2014
6196624
Merge branch 'master' of https://github.com/mosa/MOSA-Project
tgiphil Mar 30, 2014
38ec304
- Minor fixes
tgiphil Mar 30, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Source/Mosa.Compiler.Common/SimplePriorityQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ namespace Mosa.Compiler.Common
{
public class SimpleKeyPriorityQueue<T>
{
private readonly LinkedList<KeyValuePair<int, T>> items;
private readonly LinkedList<Tuple<int, T>> items;

public int Count { get { return items.Count; } }

public bool IsEmpty { get { return items.Count == 0; } }

public SimpleKeyPriorityQueue()
{
items = new LinkedList<KeyValuePair<int, T>>();
items = new LinkedList<Tuple<int, T>>();
}

public void Enqueue(int priority, T item)
{
var keyitem = new KeyValuePair<int, T>(priority, item);
var keyitem = new Tuple<int, T>(priority, item);

if (IsEmpty)
{
Expand All @@ -36,7 +36,7 @@ public void Enqueue(int priority, T item)

var at = items.First;

while (at != null && priority < at.Value.Key)
while (at != null && priority < at.Value.Item1)
{
at = at.Next;
}
Expand All @@ -55,7 +55,7 @@ public T Dequeue()
{
var item = items.First.Value;
items.RemoveFirst();
return item.Value;
return item.Item2;
}
}
}
7 changes: 7 additions & 0 deletions Source/Mosa.Compiler.Framework/BaseArchitecture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ public abstract class BaseArchitecture
/// <param name="source2">The source2.</param>
public abstract void InsertSubInstruction(Context context, Operand destination, Operand source1, Operand source2);

/// <summary>
/// Determines whether [is instruction move] [the specified instruction].
/// </summary>
/// <param name="instruction">The instruction.</param>
/// <returns></returns>
public abstract bool IsInstructionMove(BaseInstruction instruction);

#endregion Methods
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Mosa.Compiler.Framework.CIL
/// <summary>
///
/// </summary>
public sealed class BinaryBranchInstruction : BinaryInstruction, IBranchInstruction
public sealed class BinaryBranchInstruction : BinaryInstruction
{
#region Construction

Expand Down Expand Up @@ -106,11 +106,5 @@ protected override string GetModifier(Context context)
}

#endregion Methods

/// <summary>
/// Determines if the branch is conditional.
/// </summary>
/// <value></value>
public bool IsConditional { get { return true; } }
}
}
8 changes: 1 addition & 7 deletions Source/Mosa.Compiler.Framework/CIL/BranchInstruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Mosa.Compiler.Framework.CIL
/// <summary>
///
/// </summary>
public class BranchInstruction : BaseCILInstruction, IBranchInstruction
public class BranchInstruction : BaseCILInstruction
{
#region Construction

Expand Down Expand Up @@ -68,11 +68,5 @@ public override void Visit(ICILVisitor visitor, Context context)
}

#endregion Methods

/// <summary>
/// Determines if the branch is conditional.
/// </summary>
/// <value></value>
public bool IsConditional { get { return false; } }
}
}
26 changes: 0 additions & 26 deletions Source/Mosa.Compiler.Framework/CIL/IBranchInstruction.cs

This file was deleted.

8 changes: 1 addition & 7 deletions Source/Mosa.Compiler.Framework/CIL/ReturnInstruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Mosa.Compiler.Framework.CIL
/// <summary>
///
/// </summary>
public sealed class ReturnInstruction : UnaryInstruction, IBranchInstruction
public sealed class ReturnInstruction : UnaryInstruction
{
#region Construction

Expand Down Expand Up @@ -78,11 +78,5 @@ public override void Visit(ICILVisitor visitor, Context context)
}

#endregion Methods

/// <summary>
/// Determines if the branch is conditional.
/// </summary>
/// <value></value>
public bool IsConditional { get { return false; } }
}
}
8 changes: 1 addition & 7 deletions Source/Mosa.Compiler.Framework/CIL/UnaryBranchInstruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Mosa.Compiler.Framework.CIL
/// <remarks>
/// This instruction is used to represent brfalse[.s] and brtrue[.s].
/// </remarks>
public class UnaryBranchInstruction : UnaryInstruction, IBranchInstruction
public class UnaryBranchInstruction : UnaryInstruction
{
#region Construction

Expand Down Expand Up @@ -106,11 +106,5 @@ protected override string GetModifier(Context context)
}

#endregion Methods

/// <summary>
/// Determines if the branch is conditional.
/// </summary>
/// <value></value>
public bool IsConditional { get { return true; } }
}
}
4 changes: 2 additions & 2 deletions Source/Mosa.Compiler.Framework/Mosa.Compiler.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<Compile Include="IR\CompoundMove.cs" />
<Compile Include="IR\CompoundStore.cs" />
<Compile Include="Analysis\IBlockOrderAnalysis.cs" />
<Compile Include="RegisterAllocator\MoveHint.cs" />
<Compile Include="ShiftType.cs" />
<Compile Include="ConditionCodeExtension.cs" />
<Compile Include="BasicBlocks.cs" />
Expand All @@ -101,7 +102,7 @@
<Compile Include="RegisterAllocator\MoveResolver.cs" />
<Compile Include="RegisterAllocator\Interval.cs" />
<Compile Include="RegisterAllocator\SlotIndex.cs" />
<Compile Include="RegisterAllocator\LiveIntervalUnion.cs" />
<Compile Include="RegisterAllocator\LiveIntervalTrack.cs" />
<Compile Include="RegisterAllocator\ExtendedBlock.cs" />
<Compile Include="RegisterAllocator\LiveInterval.cs" />
<Compile Include="RegisterAllocator\VirtualRegister.cs" />
Expand Down Expand Up @@ -212,7 +213,6 @@
<Compile Include="CIL\DupInstruction.cs" />
<Compile Include="CIL\EndFilterInstruction.cs" />
<Compile Include="CIL\EndFinallyInstruction.cs" />
<Compile Include="CIL\IBranchInstruction.cs" />
<Compile Include="CIL\InitblkInstruction.cs" />
<Compile Include="CIL\InitObjInstruction.cs" />
<Compile Include="CIL\InvokeInstruction.cs" />
Expand Down
Loading