杨勇勇
2013-Sep-04 06:56 UTC
[LLVMdev] How to prevent Dead-Code-Elimination pass removing pseudo-instructions ADJCALLSTACK(DOWN | UP)?
Hi, LLVMer. I use pseudo-instructions ADJCALLSTACK(DOWN | UP) to adjust call stacks, and it works well with "-O0" option. However, ADJCALLSTACK(DOWN | UP) are removed during codegen DCE pass under "-O2". What have I ignored? Thanks. -- 杨勇勇 (Yang Yong-Yong) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130904/3e51f557/attachment.html>
Marcello Maggioni
2013-Sep-04 10:11 UTC
[LLVMdev] How to prevent Dead-Code-Elimination pass removing pseudo-instructions ADJCALLSTACK(DOWN | UP)?
You should set them as using/defining your stack register with : let Defs = [STACKREG], Uses = [STACKREG] in { __ YOUR INSTRUCTION __ } Marcello On 04/09/13 07:56, 杨勇勇 wrote:> I use pseudo-instructions ADJCALLSTACK(DOWN | UP) to adjust call > stacks, and it works well with "-O0" option. However, > ADJCALLSTACK(DOWN | UP) are removed during codegen DCE pass under "-O2".
杨勇勇
2013-Sep-07 02:00 UTC
[LLVMdev] How to prevent Dead-Code-Elimination pass removing pseudo-instructions ADJCALLSTACK(DOWN | UP)?
Thank you, Marcello. It works. 2013/9/4 Marcello Maggioni <marcello at codeplay.com>> You should set them as using/defining your stack register with : > > let Defs = [STACKREG], Uses = [STACKREG] in { > __ YOUR INSTRUCTION __ > } > > Marcello > > > On 04/09/13 07:56, 杨勇勇 wrote: > >> I use pseudo-instructions ADJCALLSTACK(DOWN | UP) to adjust call stacks, >> and it works well with "-O0" option. However, ADJCALLSTACK(DOWN | UP) are >> removed during codegen DCE pass under "-O2". >> > > ______________________________**_________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev> >-- 杨勇勇 (Yang Yong-Yong) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130907/4ae7dec2/attachment.html>
Seemingly Similar Threads
- [LLVMdev] How to prevent Dead-Code-Elimination pass removing pseudo-instructions ADJCALLSTACK(DOWN | UP)?
- Changes to 'ADJCALLSTACK*' and 'callseq_*' between LLVM v4.0 and v5.0
- [LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
- [LLVMdev] Register Class assignment for integer and pointer types
- [LLVMdev] Register Class assignment for integer and pointer types