[llvm-commits] [LLVM, SwitchInst, case ranges] Auxiliary patch #1

Stepan Dyatkovskiy STPWORLD at narod.ru
Thu Jan 5 11:17:39 PST 2012


> If we were only interested in solving #1, we'd want to have a [start,end] range value for each edge out of a switch.  However, this isn't enough to solve #2...
I think solving #2 solves #1 too. After analysing code I saw that it is more profitable to use case-ranges internal representation.

> Given a structure like this, I revise my stance and think that it would be easiest to represent this with a ConstantArray, and maybe even represent the ranges as ConstantVectors or something.
>
> What do you think?
I think that ConstantArray is fine. But what the difference for our case between ConstantArray and ConstantVector? Low level implementation? IMHO the main point is that it is inherited from Constant and will stored in LLVMContext. How it will stored in operands collection?

-Stepan.




More information about the llvm-commits mailing list