diff options
author | Tobias Grosser <tobias@grosser.es> | 2017-01-28 11:39:02 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2017-01-28 11:39:02 +0000 |
commit | 682c51143d6dfb740cfeaca18f650c9ea151c3fa (patch) | |
tree | 7bb36776cfe6145529875c0a9ef3985b8eb4192c | |
parent | b96a945bf57ba645930cfb66f70e38281571378a (diff) | |
download | bcm5719-llvm-682c51143d6dfb740cfeaca18f650c9ea151c3fa.tar.gz bcm5719-llvm-682c51143d6dfb740cfeaca18f650c9ea151c3fa.zip |
[BlockGenerator] Comment corretions for r293374 [NFC]
This addresses some additional comments from Michael Kruse for commit r293374
as expressed in https://reviews.llvm.org/D28901.
llvm-svn: 293378
-rw-r--r-- | polly/include/polly/CodeGen/BlockGenerators.h | 2 | ||||
-rw-r--r-- | polly/lib/CodeGen/BlockGenerators.cpp | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/polly/include/polly/CodeGen/BlockGenerators.h b/polly/include/polly/CodeGen/BlockGenerators.h index 62a6b62c1a7..b2ab376033e 100644 --- a/polly/include/polly/CodeGen/BlockGenerators.h +++ b/polly/include/polly/CodeGen/BlockGenerators.h @@ -348,7 +348,7 @@ protected: /// Handle users of @p Array outside the SCoP. /// /// @param S The current SCoP. - /// @param Inst The ScopArray to handle. + /// @param Inst The ScopArrayInfo to handle. void handleOutsideUsers(const Scop &S, ScopArrayInfo *Array); /// Find scalar statements that have outside users. diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index 1bd8df43f1a..7109d6a0650 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -380,12 +380,15 @@ Value *BlockGenerator::getOrCreateAlloca(const ScopArrayInfo *Array) { // to the parallel subfunction and each request for a scalar alloca slot // must be forwared to the temporary in-subfunction slot. This mapping is // removed when the subfunction has been generated and again normal host - // code is generated. As GlobalMap may be changed multiple times (for - // each parallel loop), is commonly only known after the initial alloca - // has been generated, and the original alloca value must be restored at - // the end, it is not possible to perform the GlobalMap lookup right after - // creating the alloca below, but instead we need to check GlobalMap at - // call to getOrCreateAlloca. + // code is generated. Due to the following reasons it is not possible to + // perform the GlobalMap lookup right after creating the alloca below, but + // instead we need to check GlobalMap at each call to getOrCreateAlloca: + // + // 1) GlobalMap may be changed multiple times (for each parallel loop), + // 2) The temporary mapping is commonly only known after the initial + // alloca has already been generated, and + // 3) The original alloca value must be restored after leaving the + // sub-function. if (Value *NewAddr = GlobalMap.lookup(&*Addr)) return NewAddr; return Addr; |