willi19 / swpp202301-compiler-team6

MIT License
0 stars 0 forks source link

Suggestion #40

Open willi19 opened 1 year ago

willi19 commented 1 year ago

How about writing a document of each pass so we can check the dependancy between each pass and choose the order to apply path. Also useful when we try to improve other's code during wrap up.

Before review of sprint3, it would be nice to have a meeting and read code together while writer explaining the code. This is to understand other's code efficiently.

By doing this we can have aligned thoughts on the tasks to be completed in this wrap-up and proceed efficiently.

sharaelong commented 1 year ago

In short,

  1. oracle and load2aload is counterproductive pass since they are targeting same region of code.
  2. functioninline needs to be performed before heap2stack.
  3. It is recommended that performing oracle after GVN, since it will reduce arithmetic instruction counts in high probability. It will broaden the candidates of oracle loops.
  4. arithmetic needs to be performed after many of llvm existing pass.
sharaelong commented 1 year ago

For summary,

  1. GVN < oracle < load2aload
  2. functioninline < heap2stack
  3. arithmetic has to be located in final phase of optimization.
  4. functioninline < oracle, or exceptionally treat oracle

Please give me more constraints what I missed here! @goranmoomin @germanium32

germanium32 commented 1 year ago

oracle < incrdecr Passes creating intrinsics are dangerous, and also might invalidate all loops of oracle since i++ is transformed to incr i.