[llvm-commits] CVS: llvm/lib/Transforms/Utils/LowerSwitch.cpp
Chris Lattner
clattner at apple.com
Tue Mar 13 07:57:16 PDT 2007
On Mar 10, 2007, at 8:50 AM, Nick Lewycky wrote:
>
>> + struct CaseRange {
>> + Constant* Low;
>> + Constant* High;
>> + BasicBlock* BB;
>> +
>> + CaseRange(Constant* _Low = NULL, Constant* _High = NULL,
>> + BasicBlock* _BB = NULL):
>> + Low(_Low), High(_High), BB(_BB) { }
>> + };
>
> Do you ever store non-ConstantInt in Low and High? If not, could you
> either replace this with, or make it a wrapper around ConstantRange?
I agree. Among other things, this means that you'll be using APInt's
instead of Constant*'s. APInt's are more efficient to manipulate.
Thanks,
-Chris
More information about the llvm-commits
mailing list