-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add entrypoint for optimizer #263
Conversation
2.增加EntryPoint[] 数组,传递到优化器 3.处理不恰当的多遍优化外循环
@ShawnYun test this when you have time. |
} | ||
|
||
addrConvertTable = null; | ||
// 10 iterations max |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lightszero we need to execute it multiple times, this logic was moved ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a parser should do loops in itself ,I moved this to Parser_DeleteUselessEqual.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it's better to do it outside, because one optimizer, could optimize the next one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if that happens need to redesign optimizer parser pipeline. make sure one pass can finish the job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Push1
JMP test
test:
push01
drop
drop
this require two repetitions in order to return an empty script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like this we need change parser to make sure that can be done by single parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can revert this loop part first and discuss this in other issue later.
make this pr is only for abi multi entrypoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that it's easier with multiple pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related #266
…om/neo-project/neo-devpack-dotnet into Branch_lights_optimizer_entrypoint
Waiting for me, I'm reviewing this pr. |
@@ -13,24 +13,29 @@ public OptimizeParserAttribute(Type type) | |||
} | |||
} | |||
|
|||
public enum OptimizeParserType : byte | |||
[Flags] | |||
public enum OptimizeParserType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public enum OptimizeParserType | |
public enum OptimizeParserFlag |
} | ||
|
||
addrConvertTable = null; | ||
// 10 iterations max |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related #266
//insert EntryPointLabel | ||
for (var i = 0; i < entryPoints.Length; i++) | ||
{ | ||
if (i > 0 && entryPoints[i - 1] == entryPoints[i]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we don't have to do this verification, as the caller should guarantee it?
@@ -10,33 +10,29 @@ public class NefOptimizer | |||
/// <summary> | |||
/// Instructions | |||
/// </summary> | |||
private List<INefItem> Items; | |||
//private List<INefItem> Items; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line we can remove now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erikzhang can you give @Tommo-L permission for this respository.
I think it is good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function is okay.
close #246
still working on it.
1.修正不恰当的枚举使用方式
2.增加EntryPoint[] 数组,传递到优化器
3.处理不恰当的多遍优化外循环