This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Allow to annotate alias scopes in the new SCoP.
ClosedPublic

Authored by jdoerfert on Oct 1 2014, 1:53 PM.

Details

Summary
The command line flag -polly-annotate-alias-scopes controls
whether or not Polly annotates alias scopes in the new SCoP.
This can improve later optimizations as the new SCoP is basically
an alias free environment for them.

Diff Detail

Event Timeline

jdoerfert updated this revision to Diff 14292.Oct 1 2014, 1:53 PM
jdoerfert retitled this revision from to [Polly] Allow to annotate alias scopes in the new SCoP..
jdoerfert updated this object.
jdoerfert added reviewers: grosser, sebpop, dpeixott.
jdoerfert added subscribers: Restricted Project, Unknown Object (MLST).
grosser accepted this revision.Oct 1 2014, 11:50 PM
grosser edited edge metadata.

Nice!

Some minor comments inlined.

include/polly/CodeGen/CodeGeneration.h
41

I don't think we need a command line option for this. That seems pure goodness, so why don't we enable it by default?

include/polly/CodeGen/IRBuilder.h
32

The first sentence talks more about the way the LoopAnnotator works and also seems somehow incomplete.

lib/CodeGen/IRBuilder.cpp
34

What are arg0 and arg0? Are you saying this metadata node can (optionally) reference two other metadata nodes? Maybe add this to the example in the documentation.

47

What about writing this like:

std::vector<Value *> Args = {0}

if (arg0)
  Args.push_back(arg0);

if (arg1)
  Args.push_back(arg1);

ID = MDNode::get(Ctx, Args);
63

Please use a data structure which guarantees the order in which we iterate over (SetVector?)

135

Would it be better to use the new to (later) use the newly introduced ScopArrayInfo class to get the base pointer?

lib/CodeGen/IslCodeGeneration.cpp
610

I would enable this by default.

This revision is now accepted and ready to land.Oct 1 2014, 11:50 PM
jdoerfert closed this revision.Oct 2 2014, 2:33 AM
include/polly/CodeGen/CodeGeneration.h
41

This is for example useful for ppl using Polly as an analyzer/annotator with the ignore-aliasing option and without scheduling. In such a case you might don't want the alias scopes.

Could you take a quick look at http://reviews.llvm.org/D5575
I changed it according to your comments and added a second refactoring
patch to rename the LoopAnnotator to ScopAnnotator.