search for: arrayitem

Displaying 4 results from an estimated 4 matches for "arrayitem".

2012 Jan 20
2
[LLVMdev] How to force the creation of arrays with zeroes?
Hi all. I propose to use wrapper for this kind of constant objects. Consider next code: Constant* C = reinterpret_cast<Constant*>(I->getOperand(idx)); Constant* ArrayItem; if (!isa<ConstantAggregateZero>(C)) ArrayItem = reinterpret_cast<Constant*>(I->getOperand(ArrItemIdx)); else ArrayItem = ZeroInt; Code analog within wrapper: ConstOrZero C(I->getOperand(idx)); Constant* ArrayItem = C.getOperand(ArrItemIdx); // Unpleasant work with isa<...
2012 Jan 21
0
[LLVMdev] How to force the creation of arrays with zeroes?
.... -Chris On Jan 20, 2012, at 12:16 PM, Stepan Dyatkovskiy <STPWORLD at narod.ru> wrote: > Hi all. I propose to use wrapper for this kind of constant objects. > > Consider next code: > > Constant* C = reinterpret_cast<Constant*>(I->getOperand(idx)); > Constant* ArrayItem; > if (!isa<ConstantAggregateZero>(C)) > ArrayItem = reinterpret_cast<Constant*>(I->getOperand(ArrItemIdx)); > else > ArrayItem = ZeroInt; > > Code analog within wrapper: > > ConstOrZero C(I->getOperand(idx)); > Constant* ArrayItem = C.getOperand(Arr...
2012 Jan 20
0
[LLVMdev] How to force the creation of arrays with zeroes?
Hi Anton, >> you can't, you can only get a ConstantAggregateZero. This is actually kind of >> annoying, and means that places expecting a ConstantArray have to remember to >> also check for ConstantAggregateZero. Perhaps there's a good reason for the >> current design, but if not it would be great to eliminate this wart. > Well, I think the main reason it so
2012 Jan 20
2
[LLVMdev] How to force the creation of arrays with zeroes?
> you can't, you can only get a ConstantAggregateZero.  This is actually kind of > annoying, and means that places expecting a ConstantArray have to remember to > also check for ConstantAggregateZero.  Perhaps there's a good reason for the > current design, but if not it would be great to eliminate this wart. Well, I think the main reason it so reduce the size of .ll / .bc when