Displaying 3 results from an estimated 3 matches for "isallzeroindices".
Did you mean:
hasallzeroindices
2008 Sep 22
0
[LLVMdev] Overzealous PromoteCastOfAllocation
On Sep 13, 2008, at 1:07 PM, Matthijs Kooijman wrote:
> Hi Dan,
>
>> Changing PromoteCastOfAllocation to not replace aggregate allocas
>> with
>> non-aggregate allocas if they have GEP users sounds reasonable to me.
> This sounds reasonable indeed, but still a bit arbitrary. Haven't
> figured out
> anything better yet, though.
>
>> Finding the
2008 Sep 13
3
[LLVMdev] Overzealous PromoteCastOfAllocation
Hi Dan,
> Changing PromoteCastOfAllocation to not replace aggregate allocas with
> non-aggregate allocas if they have GEP users sounds reasonable to me.
This sounds reasonable indeed, but still a bit arbitrary. Haven't figured out
anything better yet, though.
> Finding the maximum alignment is sometimes still useful though, so
> it would be nice to update the alignment field of
2008 Sep 23
3
[LLVMdev] Overzealous PromoteCastOfAllocation
...s where any of the
- // components are variables.
ConstantInt *IdxVal = dyn_cast<ConstantInt>(I.getOperand());
if (!IdxVal) return MarkUnsafe(Info);
- if (IdxVal->getZExtValue() >= cast<ArrayType>(*I)->getNumElements())
+
+ // Are all indices still zero?
+ IsAllZeroIndices &= IdxVal->isZero();
+
+ if (isa<ArrayType>(*I)) {
+ // Otherwise, we must have an index into an array type. Verify that this is
+ // an in-range constant integer. Specifically, consider A[0][i]. We
+ // cannot know that the user isn't doing invalid things...