microsoft / llvm-mctoll

llvm-mctoll
Other
816 stars 125 forks source link

Add Mcinst pretty dump and [ARM] dump SelectionDAG in the debug output #181

Closed sv99 closed 2 years ago

sv99 commented 2 years ago

Improve debug output:

  1. Add MCInst pretty dump - show instruction and register Instead of indexes
  2. Add dump SelectionDAG in the ARM subsystem
sv99 commented 2 years ago

I have some next work for moving to the OpaquePoiter (llvm-project [release/15.x] tag) - now not worked 7 tests - all other worked

bharadwajy commented 2 years ago

I have some next work for moving to the OpaquePoiter (llvm-project [release/15.x] tag) - now not worked 7 tests - all other worked

Sounds good.

Wanted to finish up clang-tidy related changes - which I pushed.

Please update the PR changes. Thanks!

sv99 commented 2 years ago

PR rebased

sv99 commented 2 years ago

What means [NFC] in the commit description?

bharadwajy commented 2 years ago

What means [NFC] in the commit description?

https://llvm.org/docs/Lexicon.html#n

sv99 commented 2 years ago

Thanks

sv99 commented 2 years ago

Next PR result

user@vm-ubuntu-204:~/work/llvm-project/build-debug [(HEAD detached at llvmorg-15.0.1)]$ ninja check-mctoll
...
********************
********************
Unsupported Tests (17):
  mctoll :: smoke_test/ARM/factorial-test.c
  mctoll :: smoke_test/ARM/fibfunc-test.c
  mctoll :: smoke_test/ARM/func-arg-liveness.c
  mctoll :: smoke_test/ARM/global-array-access.c
  mctoll :: smoke_test/ARM/globalvar-test.c
  mctoll :: smoke_test/ARM/hello.c
  mctoll :: smoke_test/ARM/short.c
  mctoll :: smoke_test/ARM/simple-phi-test.c
  mctoll :: smoke_test/ARM/strcmp-test.c
  mctoll :: smoke_test/ARM/switch_test.c
  mctoll :: smoke_test/ARM/test-1-test.c
  mctoll :: smoke_test/ARM/test-2-test.c
  mctoll :: smoke_test/ARM/test-3-test.c
  mctoll :: smoke_test/ARM/variadic-call-test.c
  mctoll :: unittests/ARM/FuncArgsAndReturn/seven_args.c
  mctoll :: unittests/ARM/FunctionPrototype/no_ret_and_args.c
  mctoll :: unittests/ARM/FunctionPrototype/six_args.c

********************
Failed Tests (7):
  mctoll :: asm_test/X86/raise-cmovns.s
  mctoll :: bug_fixes/issue-69.c
  mctoll :: bug_fixes/issue-70.c
  mctoll :: dhrystone/dhry.test
  mctoll :: smoke_test/global-array-access.c
  mctoll :: smoke_test/raise-not-regop-and-memop-inst.c
  mctoll :: smoke_test/simple-phi-test.c

Testing Time: 146.45s
  Unsupported      :  17
  Passed           : 214
  Expectedly Failed:   2
  Failed           :   7
sv99 commented 2 years ago

[X86] Worked moving to opaquer pointer

user@vm-ubuntu-204:~/work/llvm-project/build-debug [(HEAD detached at llvmorg-15.0.1)]$ ninja check-mctoll
...
********************
********************
Unsupported Tests (4):
  mctoll :: smoke_test/ARM/switch_test.c
  mctoll :: unittests/ARM/FuncArgsAndReturn/seven_args.c
  mctoll :: unittests/ARM/FunctionPrototype/no_ret_and_args.c
  mctoll :: unittests/ARM/FunctionPrototype/six_args.c

********************
Failed Tests (6):
  mctoll :: smoke_test/ARM/func-arg-liveness.c
  mctoll :: smoke_test/ARM/global-array-access.c
  mctoll :: smoke_test/ARM/hello.c
  mctoll :: smoke_test/ARM/short.c
  mctoll :: smoke_test/ARM/strcmp-test.c
  mctoll :: smoke_test/ARM/variadic-call-test.c

Testing Time: 80.88s
  Unsupported      :   4
  Passed           : 227
  Expectedly Failed:   3
  Failed           :   6
sv99 commented 2 years ago

?? Merging ??

bharadwajy commented 2 years ago

?? Merging ??

Reviewing...

sv99 commented 2 years ago

This PR for ARM subsystem. Why does the arm use a different raising algorithm compared to X86 subsystem? Why the intermediate SelectionDAG is used?

bharadwajy commented 2 years ago

This PR for ARM subsystem. Why does the arm use a different raising algorithm compared to X86 subsystem? Why the intermediate SelectionDAG is used?

It was one of the contributed options considered during the earlier stages of the project. Unfortunately it was not followed through to keep pace with development to raise x64 binaries, for the lack of time/help/resources.

sv99 commented 2 years ago

Corrected