[llvm-dev] Dependency checking in LoopAccessAnalysis

Nema, Ashutosh via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 19 22:16:00 PST 2016


<Copied llvm-dev>

Thanks Silviu.

> "getRuntimePointerChecking()->getChecks().empty()":
> Wouldn't that mean that you won't emit run-time alias checks?
Yes, if generated checks are empty then we won't emit alias check.
As we are dependent on LAA for runtime checks, will not perform
versioning if alias checks doesn't exists.

> I think you could filter the set of checks (something like
> collectMemchecks from LoopLoadElimination).
Sure, will look into it.

Regards,
Ashutosh

From: Silviu Baranga [mailto:Silviu.Baranga at arm.com]
Sent: Tuesday, January 19, 2016 6:20 PM
To: Nema, Ashutosh; anemet at apple.com; Hal Finkel; listmail at philipreames.com; Charlie Turner
Cc: tobias at grosser.es; mehdi.amini at apple.com
Subject: RE: Dependency checking in LoopAccessAnalysis

Correct, you wouldn't check canVectorizeMemory() in this case.

"getRuntimePointerChecking()->getChecks().empty()":
Wouldn't that mean that you won't emit run-time alias checks?

I think you could filter the set of checks (something like collectMemchecks from LoopLoadElimination).

Also, should this be on llvm-dev (perhaps you've accidentally not added it?).

Thanks,
Silviu

From: Nema, Ashutosh [mailto:Ashutosh.Nema at amd.com]
Sent: 19 January 2016 12:11
To: Silviu Baranga; anemet at apple.com<mailto:anemet at apple.com>; Hal Finkel; listmail at philipreames.com<mailto:listmail at philipreames.com>; Charlie Turner
Cc: tobias at grosser.es<mailto:tobias at grosser.es>; mehdi.amini at apple.com<mailto:mehdi.amini at apple.com>
Subject: RE: Dependency checking in LoopAccessAnalysis

Sorry there was a typo in my previous mail:

"getRuntimePointerChecking()->empty()" ==> "getRuntimePointerChecking()->getChecks().empty()"

Regards,
Ashutosh

From: Nema, Ashutosh
Sent: Tuesday, January 19, 2016 5:30 PM
To: 'Silviu Baranga'; anemet at apple.com<mailto:anemet at apple.com>; Hal Finkel; listmail at philipreames.com<mailto:listmail at philipreames.com>; Charlie Turner
Cc: tobias at grosser.es<mailto:tobias at grosser.es>; mehdi.amini at apple.com<mailto:mehdi.amini at apple.com>
Subject: RE: Dependency checking in LoopAccessAnalysis

Thanks Silviu.

Instead of checking "canVectorizeMemory" we can "getRuntimePointerChecking()->empty()"
If runtime checks are empty then avoid versioning, else go ahead with LoopVersioningLICM.

Regards,
Ashutosh

From: Silviu Baranga [mailto:Silviu.Baranga at arm.com]
Sent: Tuesday, January 19, 2016 4:28 PM
To: Nema, Ashutosh; anemet at apple.com<mailto:anemet at apple.com>; Hal Finkel; listmail at philipreames.com<mailto:listmail at philipreames.com>; Charlie Turner
Cc: tobias at grosser.es<mailto:tobias at grosser.es>; mehdi.amini at apple.com<mailto:mehdi.amini at apple.com>
Subject: RE: Dependency checking in LoopAccessAnalysis

Hi Ashutosh,

The interface to LoopAccessAnalysis allows a user to reason about the dependences
and construct a set of appropriate run-time checks.

The best example I can think of for this would be the LoopLoadElimination pass, which
doesn't require the loop to be vectorizable and can work with unknown dependences.
It should be possible to do the same for LICM versioning.

Note that we also use parts of the dependence checking to reduce the number of
run-time checks emitted.

I hope this helps.

Thanks,
Silviu



From: Nema, Ashutosh [mailto:Ashutosh.Nema at amd.com]
Sent: 19 January 2016 10:28
To: anemet at apple.com<mailto:anemet at apple.com>; Hal Finkel; listmail at philipreames.com<mailto:listmail at philipreames.com>; Charlie Turner
Cc: tobias at grosser.es<mailto:tobias at grosser.es>; mehdi.amini at apple.com<mailto:mehdi.amini at apple.com>; Silviu Baranga
Subject: Dependency checking in LoopAccessAnalysis

Hi,

Found LoopAccessAnalysis is tied up with memory dependency checking.

This dependency checking is important for LoopVectorizer but may not for other optimizations.

i.e. LoopVersioningLICM may not require this dependency checking.

Only it need is runtime pointer checks to assert the no-alias behavior.

Please correct this understand if wrong.

If this is correct, can we make this dependency checking optional in LoopAccessAnalysis ?

Thanks,
Ashutosh

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160120/71616680/attachment-0001.html>


More information about the llvm-dev mailing list