[llvm] r178416 - [NVPTX] Add NVVMReflect pass to allow compile-time selection of
Sean Silva
silvas at purdue.edu
Sat Mar 30 08:58:43 PDT 2013
Could you give a bit more background on the motivation for this? I wasn't
able to find any discussion on llvmdev.
+// This pass replaces occurences of __nvvm_reflect("string") with an
+// integer based on -nvvm-reflect-list string=<int> option given to this
pass.
Please give an example of usage here.
It also seems that in some places you say "0/1", but in this description
you say "<int>". Is any int allowed? Please clarify.
+ int reflectVal = 0; // The default value is 0
Please put this information in the top-of-the-file comment.
+ for (unsigned i = 0, e = ReflectList.size(); i != e; ++i) {
+ // DEBUG(dbgs() << "Option : " << ReflectList[i] << std::endl);
+ reflectArg = reflectArg.substr(0, reflectArg.size() - 1);
+ // DEBUG(dbgs() << "Arg of _reflect : " << reflectArg << std::endl);
+ //std::map<std::string, int> VarMap;
+ StringMap<int> VarMap;
Please remove commented-out code.
+static std::vector<std::string>
+Tokenize(const std::string &str, const std::string &delim) {
+ std::vector<std::string> tokens;
Is there a particular reason you aren't following the LLVM naming
convention here and throughout?
-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130330/14b69712/attachment.html>
More information about the llvm-commits
mailing list