[PATCH] [llgo] irgen: generate switch instructions
Peter Collingbourne
peter at pcc.me.uk
Tue Jan 6 18:37:39 PST 2015
I wonder if there is a way to do this without modifying the go/ssa IR. In particular, I don't feel very comfortable about any attempt to define an instruction outside the ssa package. Maybe we can build a mapping to keep track of which ssa.If instructions are to be treated as switch instructions?
I believe LLVM already has a transformation to convert chains of branch instructions into switches, at least in some cases. Have you measured a performance improvement with this change at all? (Asking just out of curiosity. I think it would be worth exploring the performance impact of extending this to support type switches, so I have no objection to this change in principle.)
REPOSITORY
rL LLVM
http://reviews.llvm.org/D6831
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list