charlessl at free.fr
2014-Jul-17 18:41 UTC
[LLVMdev] LLVM Code Generation on flattened IR code
Hello, I made two flattening transformation filters, one use a switch instruction for the dispatcher, and the other an indirectbranch instruction. Both work well but llc is very time consuming in the second case : 10 minutes for a 500 basic block function, while it takes 10 seconds for the switchcase implementation . The instrumentation of llc shows that most of the time is passed in the Machine Block Frequency Analysis pass I don't understand why there is so huge difference. Is there a way to speed up llc ? Charles Salmon
> On Jul 17, 2014, at 11:41 AM, charlessl at free.fr wrote: > > Hello, > > I made two flattening transformation filters, one use a switch instruction for the dispatcher, and the other an indirectbranch instruction. Both work well but llc is very time consuming in the second case : 10 minutes for a 500 basic block function, while it takes 10 seconds for the switchcase implementation . The instrumentation of llc shows that most of the time is passed in the Machine Block Frequency Analysis pass > > > I don't understand why there is so huge difference. Is there a way to speed up llc ?That’s a bug. Can you try with trunk and provide the LLVM IR test case? You can file a PR it at llvm.org/bugs. There’s been some work on the block frequency algorithm recently, which is shared between LLVM IR and Machine IR, so it would be interesting to get that test case. -Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140718/9d2f97e8/attachment.html>
charlessl at free.fr
2014-Jul-21 09:09 UTC
[LLVMdev] LLVM Code Generation on flattened IR code
Thanks, i will do that how can i attach a LLVM IR source file to a bug report? Charles ----- Mail original ----- De: "Andrew Trick" <atrick at apple.com> À: charlessl at free.fr Cc: llvmdev at cs.uiuc.edu Envoyé: Vendredi 18 Juillet 2014 09:18:41 Objet: Re: [LLVMdev] LLVM Code Generation on flattened IR code On Jul 17, 2014, at 11:41 AM, charlessl at free.fr wrote: Hello, I made two flattening transformation filters, one use a switch instruction for the dispatcher, and the other an indirectbranch instruction. Both work well but llc is very time consuming in the second case : 10 minutes for a 500 basic block function, while it takes 10 seconds for the switchcase implementation . The instrumentation of llc shows that most of the time is passed in the Machine Block Frequency Analysis pass I don't understand why there is so huge difference. Is there a way to speed up llc ? That’s a bug. Can you try with trunk and provide the LLVM IR test case? You can file a PR it at llvm.org/bugs . There’s been some work on the block frequency algorithm recently, which is shared between LLVM IR and Machine IR, so it would be interesting to get that test case. -Andy