diff options
| author | Tobias Grosser <tobias@grosser.es> | 2015-08-19 16:04:35 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2015-08-19 16:04:35 +0000 |
| commit | b0da42fb55ed574c5e3ca8351a3b5b48e088ccba (patch) | |
| tree | b6bc35874af52e095748f3350363d19c2c32897f /polly/lib/CodeGen/IRBuilder.cpp | |
| parent | 3b0fd753c4d4357b23efc59b0767edb5dd957c2e (diff) | |
| download | bcm5719-llvm-b0da42fb55ed574c5e3ca8351a3b5b48e088ccba.tar.gz bcm5719-llvm-b0da42fb55ed574c5e3ca8351a3b5b48e088ccba.zip | |
Generate alias metadata even in OpenMP mode
To make alias scope metadata generation work in OpenMP mode we now provide
the ScopAnnotator with information about the base pointer rewrite that happens
when passing arrays into the OpenMP subfunction.
llvm-svn: 245451
Diffstat (limited to 'polly/lib/CodeGen/IRBuilder.cpp')
| -rw-r--r-- | polly/lib/CodeGen/IRBuilder.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/IRBuilder.cpp b/polly/lib/CodeGen/IRBuilder.cpp index 65f6fe84fb7..8374ae673cd 100644 --- a/polly/lib/CodeGen/IRBuilder.cpp +++ b/polly/lib/CodeGen/IRBuilder.cpp @@ -135,8 +135,16 @@ void ScopAnnotator::annotate(Instruction *Inst) { } if (BasePtr) { - Inst->setMetadata("alias.scope", AliasScopeMap[BasePtr]); - Inst->setMetadata("noalias", OtherAliasScopeListMap[BasePtr]); + auto *AliasScope = AliasScopeMap[BasePtr]; + + if (!AliasScope) + BasePtr = AlternativeAliasBases[BasePtr]; + + AliasScope = AliasScopeMap[BasePtr]; + auto *OtherAliasScopeList = OtherAliasScopeListMap[BasePtr]; + + Inst->setMetadata("alias.scope", AliasScope); + Inst->setMetadata("noalias", OtherAliasScopeList); } } |

