Hlkari

:sweat_smile:

:sweat_smile:

:sweat_smile:
:sweat_smile:

:sweat_smile:

:sweat_smile:
:sweat_smile:

:sweat_smile:

:sweat_smile:

照着抄都不会

1 个赞

冷知识:
冷知识:

不要把Transform Pass丢进Backend啊你这家伙

加个微信细说

开源版是没做对抗优化的,所以要求流水线调度上的一些设计

As for how to workaround the optimizations “properly”, that requires a LOT more than running around randomly inject passes into the pipeline and expects it to work as intended

:arrow_up:
所以要求传O0也是为了类似的目的。

可以,建议看看后端

TargetMachine里有个可选的Hook在DAGConstruction之前跑Pass

llc -filetype=obj -debug

1 个赞

按照经验TargetPassConfig::addIRPasses 应该没有什么负责优化的Pass

AtomicExpand不是拿来做优化的。。。。。。

addIRPasses里多加几个printpass就知道了

所以让你跑上面那串llc指令啊


Debug编译的LLVM才有-debug 我以为这是常识

1 个赞

跑完了可以比较一下DAG,看InitialDAG跟ISelDAG里面有没有混淆

忘了这中间流水线是啥样了。IR到ISel中间流水线还有啥吗 :thinking:

想了一下,我的意见是你先确认一下PreISel的混淆相关的IR指令有user。
DAG Construction的时候会删掉无引用且没有SideEffect的Node

:thinking:具体是:
Initial selection DAG

Optimized lowered selection DAG

还是

Type-legalized selection DAG

还是

Legalized selection DAG