Hi, How would I disable dead code elimination in llc? Can that be done via the command line or do I need to modify llc's source? Thanks Andrew Lukefahr andrewlukefahr at gmail.com Open Source, Open Minds -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101206/cf656247/attachment.html>
Hi Andrew,> How would I disable dead code elimination in llc? Can that be done via the > command line or do I need to modify llc's source?I don't think llc does non-trivial dead code elimination (though I could be wrong). Did you mean "opt"? Ciao, Duncan.
On 12/6/10 11:39 AM, Andrew Lukefahr wrote:> Hi, > > How would I disable dead code elimination in llc? Can that be done > via the command line or do I need to modify llc's source?You can use llc --help-hidden to see a list of options. There are several -disable-xxx options that disable various code generator optimizations. That said, I, like Duncan, wasn't aware that llc did any dead-code elimination (beyond peephole optimization). Are you sure llc is removing the instructions you care about? -- John T.> > Thanks > > Andrew Lukefahr > andrewlukefahr at gmail.com <mailto:andrewlukefahr at gmail.com> > > Open Source, Open Minds-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101206/4a7673b2/attachment.html>
On Dec 6, 2010, at 10:57 AM, John Criswell wrote:> On 12/6/10 11:39 AM, Andrew Lukefahr wrote: >> Hi, >> >> How would I disable dead code elimination in llc? Can that be done via the command line or do I need to modify llc's source? > > You can use llc --help-hidden to see a list of options. There are several -disable-xxx options that disable various code generator optimizations. > > That said, I, like Duncan, wasn't aware that llc did any dead-code elimination (beyond peephole optimization). Are you sure llc is removing the instructions you care about? >Perhaps the dead machine instruction elimination pass? (DeadMachineInstructionElim.cpp) I don't think there's a way to disable that. -Jim