Displaying 16 results from an estimated 16 matches for "gep2".
Did you mean:
gep
2016 Jul 25
3
Alias Analysis with inbound GEPs
Hi,
I'm checking aliasing of two pointers:
%GEP1 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0, i32 1, i64 %indvars.iv41, i64 %indvars.iv39
%GEP2 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0, i32 16
The result I got is "PartialAlias" because the indices of the GEP1 are variable. Shouldn't the "inbounds" keyword mean that the access to sub-array is also in-bounds?
I'm trying to reach "NoAlias"...
2016 Jul 25
2
Alias Analysis with inbound GEPs
I’m checking aliasing of two pointers:
%GEP1 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0, i32 1, i64 %indvars.iv41, i64 %indvars.iv39
%GEP2 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0, i32 16
The result I got is “PartialAlias” because the indices of the GEP1 are variable.
That seems like a bug. PartialAlias should only be returned when we can prove a partial overlap. Otherwise, MayAlias should be returned.
[Demikhovsky, E...
2016 Jul 26
2
Alias Analysis with inbound GEPs
...;
> Sent: Monday, July 25, 2016 9:45:55 AM
> Subject: [llvm-dev] Alias Analysis with inbound GEPs
>
> Hi,
>
> I’m checking aliasing of two pointers:
>
> %GEP1 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0, i32 1, i64 %indvars.iv41, i64 %indvars.iv39
> %GEP2 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0, i32 16
>
> The result I got is “PartialAlias” because the indices of the GEP1 are variable.
> That seems like a bug. PartialAlias should only be returned when we can prove a partial overlap. Otherwise, MayAlias should be returned....
2016 Jul 25
4
Alias Analysis with inbound GEPs
...gt;>>
>>>>
>>>> I’m checking aliasing of two pointers:
>>>>
>>>>
>>>>
>>>> %GEP1 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0, i32 1, i64 %indvars.iv41, i64 %indvars.iv39
>>>>
>>>> %GEP2 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0, i32 16
>>>>
>>>>
>>>>
>>>> The result I got is “PartialAlias” because the indices of the GEP1 are variable.
>>>
>>> That seems like a bug. PartialAlias should only be returned...
2013 Nov 23
2
[LLVMdev] GVN fails with bitcasts
Hi,
i have the following code:
define internal %"struct.dexter::ConditionConstant"*
@_ZN6dexter18BinaryConditionAdd8evaluateEv5(%"class.dexter::BinaryConditionAdd"*)
{
entry:
%1 = getelementptr inbounds %"class.dexter::BinaryConditionAdd"* %0, i32
0, i32 0, i32 1
%2 = load %"class.dexter::BaseCondition"** %1, align 8
%3 = bitcast
2016 Jul 26
2
Alias Analysis with inbound GEPs
...king aliasing of two pointers:
> >>>>
> >>>>
> >>>>
> >>>> %GEP1 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0,
> >>>> i32 1, i64 %indvars.iv41, i64 %indvars.iv39
> >>>>
> >>>> %GEP2 = getelementptr inbounds %struct.s, %struct.s* %0, i64 0,
> >>>> i32 16
> >>>>
> >>>>
> >>>>
> >>>> The result I got is “PartialAlias” because the indices of the
> >>>> GEP1 are variable.
> >>>...
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
...rator itGep1
= geps.begin(); itGep1 != geps.end(); itGep1++){
GetElementPtrInst *gep1 = *itGep1;
Type *t1 = ((PointerType *)gep1->getType())->getElementType();
int64_t size1 = TD.getTypeAllocSize(t1);
std::list<GetElementPtrInst* >::iterator itGep2 = itGep1;
for(; itGep2 != geps.end(); itGep2++){
GetElementPtrInst *gep2 = *itGep2;
gep1->dump();
errs() << "-->";
gep2->dump();
Type *t2 = ((PointerType *)gep2->getType())->getElementType();
int64_t...
2012 Feb 15
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Just want to test out the LLVM's AliasAnalysis::getModRefInfo API. The
input C code is very simple:
void foo(int *a, int *b)
{
for(int i=0; i<10; i++)
b[i] = a[i]*a[i];
}
int main()
{
int a[10];
int b[10];
for(int i=0; i<10; i++)
a[i] = i;
foo(a,b);
return 0;
}
Obviously, for "foo", it only reads from array "a" and only writes to array
2014 Mar 13
2
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...gt; RA.getValueAsString()))
> + return Res;
> + break;
> + }
>
> Attributes already have operator< and operator==. Please reuse them.
>
> 0006:
>
> This looks fine.
>
> 0007:
>
> + int cmpGEP(const GEPOperator *GEP1, const GEPOperator *GEP2);
> + int cmpGEP(const GetElementPtrInst *GEP1,
> + const GetElementPtrInst *GEP2) {
>
> Const members?
>
> + unsigned BitWidth = DL ? DL->getPointerSizeInBits(AS1) : 1;
> + APInt Offset1(BitWidth, 0), Offset2(BitWidth, 0);
> + if (DL &&
> +...
2011 Oct 19
0
[LLVMdev] Question regarding basic-block placement optimization
..., i32 %a, i32 %b)
define i32 @test(i32 %i, i32* %a, i32 %b) {
entry:
%gep1 = getelementptr i32* %a, i32 1
%val1 = load i32* %gep1
%cond1 = icmp ugt i32 %val1, 1
br i1 %cond1, label %then1, label %else1, !prof !0
then1:
call void @error(i32 %i, i32 1, i32 %b)
br label %else1
else1:
%gep2 = getelementptr i32* %a, i32 2
%val2 = load i32* %gep2
%cond2 = icmp ugt i32 %val2, 2
br i1 %cond2, label %then2, label %else2, !prof !0
then2:
call void @error(i32 %i, i32 1, i32 %b)
br label %else2
else2:
%gep3 = getelementptr i32* %a, i32 3
%val3 = load i32* %gep3
%cond3 = icmp...
2014 Jan 21
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
...e?
I also have a few low-level comments (and nitpicks):
- The comments at the top of the file don't match the new implementation!
- Lots of strange tabbing after your changes. E.g.:
+ int cmpGEP(const GetElementPtrInst *GEP1,
const GetElementPtrInst *GEP2) {
- After the FunctionPtr class declaration, you have an extra blank line. There
are a few of these scattered through (e.g., at the beginning of
FunctionComparator::cmpConstants).
- Your new helper functions (such as cmpNumbers) that are local to the file
should be declared 'static'...
2011 Oct 19
3
[LLVMdev] Question regarding basic-block placement optimization
On Tue, Oct 18, 2011 at 6:58 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk>wrote:
>
> On Oct 18, 2011, at 5:22 PM, Chandler Carruth wrote:
>
> As for why it should be an IR pass, mostly because once the selection dag
>> runs through the code, we can never recover all of the freedom we have at
>> the IR level. To start with, splicing MBBs around requires known about
2005 Feb 02
1
[LLVMdev] RE: Question about Global Variable
Thanks for your reply.
After I change Cstr to gI, it compiled successfully. Thanks again.
Another question is for constructing getelementpt.
// C code
char gStrA[10] = "test str"; // here is Global variable,gStrA and initializer "test str"
char gStrB[10]= "test str2";
main(){
int = i;
char *pGVars[20]; // here, the pGVar is for storing the address of each
2018 Mar 19
4
RFC: Devirtualization v2
...i64 0, i32 1 store i32 32, i32* %2, align 8 %3 = bitcast
%struct.A * %0 to void (%struct.A *) ** * %4 = load void (%struct.A *) **,
void (%struct.A *) *** %3, !invariant.group !0 %5 = load void (%struct.A
*)*, void (%struct.A *) ** %4, !invariant.load !0 tail call void
%5(%struct.A * %0) %gep2 = getelementptr inbounds %struct.A,
%struct.A* %0, i64 0, i32 1 %6 = load i32, i32* %gep2, align 8 %7 = load
void (%struct.A *)**, void (%struct.A *)** * %3, !invariant.group !0 %8 =
load void (%struct.A *)*, void (%struct.A *)** %7, !invariant.load !0 tail
call void %8(%struct.A * %0) ret i32...
2014 Feb 27
3
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
Hi Nick,
I tried to rework changes as you requested. One of patches (0004 with
extra assertions) has been removed.
> + bool isEquivalentType(Type *Ty1, Type *Ty2) const {
> + return cmpType(Ty1, Ty2) == 0;
> + }
>
> Why do we still need isEquivalentType? Can we nuke this?
Yup. After applying all the patches isEquivalentType will be totally
replaced with cmpType. All
2014 Jan 17
6
[LLVMdev] MergeFunctions: reduce complexity to O(log(N))
Hi all,
I propose simple improvement for MergeFunctions pass, that reduced its
complexity from O(N^2) to O(log(N)), where N is number of functions in
module.
The idea, is to replace the result of comparison from "bool" to
"-1,0,1". In another words: define order relation on functions set.
To be sure, that functions could be comparable that way, we have to
prove that order