Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
include/polly/CodeGen/Utils.h
Show All 9 Lines | |||||
// This file contains utility functions for the code generation. | // This file contains utility functions for the code generation. | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#ifndef POLLY_CODEGEN_UTILS_H | #ifndef POLLY_CODEGEN_UTILS_H | ||||
#define POLLY_CODEGEN_UTILS_H | #define POLLY_CODEGEN_UTILS_H | ||||
namespace llvm { | namespace llvm { | ||||
class Pass; | class Pass; | ||||
class Value; | |||||
class BasicBlock; | class BasicBlock; | ||||
} | } | ||||
namespace polly { | namespace polly { | ||||
class Scop; | class Scop; | ||||
/// @brief Execute a Scop conditionally. | /// @brief Execute a Scop conditionally wrt @p RTC. | ||||
/// | /// | ||||
/// In the CFG the optimized code of the Scop is generated next to the | /// In the CFG the optimized code of the Scop is generated next to the | ||||
/// original code. Both the new and the original version of the code remain | /// original code. Both the new and the original version of the code remain | ||||
/// in the CFG. A branch statement decides which version is executed. | /// in the CFG. A branch statement decides which version is executed based on | ||||
/// For now, we always execute the new version (the old one is dead code | /// the runtime value of @p RTC. | ||||
grosser: We already wasted too much time on this, if you feel strong about this, leave it as it is. | |||||
Not Done ReplyInline ActionsTo much time,... indeed. Wrt. "well know": https://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-65F1FC0F-16CB-441E-8E38-3A49DED905F6.htm http://msdn.microsoft.com/en-us/library/6kasb93x.aspx I don't mind you changing my variable names to whatever if you think that helps to understand the code or is otherwise contradicting the developer policy but I don't see it here. (Btw. there are other variable names not according to the policy, you could change those too.) jdoerfert: To much time,... indeed.
Wrt. "well know":
https://software.intel. | |||||
/// eliminated by the cleanup passes). In the future we may decide to execute | |||||
/// the new version only if certain run time checks succeed. This will be | |||||
/// useful to support constructs for which we cannot prove all assumptions at | |||||
/// compile time. | |||||
/// | /// | ||||
grosserUnsubmitted Not Done ReplyInline ActionsThis comment was really outdated. It is good that we replace it. grosser: This comment was really outdated. It is good that we replace it. | |||||
/// Before transformation: | /// Before transformation: | ||||
/// | /// | ||||
/// bb0 | /// bb0 | ||||
/// | | /// | | ||||
/// orig_scop | /// orig_scop | ||||
/// | | /// | | ||||
/// bb1 | /// bb1 | ||||
/// | /// | ||||
/// After transformation: | /// After transformation: | ||||
/// bb0 | /// bb0 | ||||
/// | | /// | | ||||
/// polly.splitBlock | /// polly.splitBlock | ||||
/// / \. | /// / \. | ||||
/// | startBlock | /// | startBlock | ||||
/// | | | /// | | | ||||
/// orig_scop new_scop | /// orig_scop new_scop | ||||
/// \ / | /// \ / | ||||
/// \ / | /// \ / | ||||
/// bb1 (joinBlock) | /// bb1 (joinBlock) | ||||
/// | /// | ||||
/// @param S The Scop to execute conditionally. | /// @param S The Scop to execute conditionally. | ||||
/// @param PassInfo A reference to the pass calling this function. | /// @param P A reference to the pass calling this function. | ||||
/// @return BasicBlock The 'StartBlock' to which new code can be added. | /// @param RTC The runtime condition checked before executing the new SCoP. | ||||
llvm::BasicBlock *executeScopConditionally(Scop &S, llvm::Pass *PassInfo); | /// | ||||
/// @return The 'StartBlock' to which new code can be added. | |||||
llvm::BasicBlock *executeScopConditionally(Scop &S, llvm::Pass *P, | |||||
llvm::Value *RTC); | |||||
} | } | ||||
#endif | #endif |
We already wasted too much time on this, if you feel strong about this, leave it as it is.
However, I still think we should use a more descriptive name instead of RTC. To explain you this is not just me not _liking_ your names, I cite the LLVM developer policy:
"Avoid abbreviations unless they are well known"
http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
In LLVM there are a couple of uses of RT to abbreviate run time, and in fact RTCheck or RTCondition is a lot clearer to me. Maybe that works for you as well.