[llvm] r178416 - [NVPTX] Add NVVMReflect pass to allow compile-time selection of

Vinod Grover vgrover528 at gmail.com
Sat Apr 13 19:21:36 PDT 2013


It is the moral equivalent of #if defined(FOO) at the IR level, sort of.

Vinod



On Sat, Mar 30, 2013 at 8:58 AM, Sean Silva <silvas at purdue.edu> wrote:

> 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
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130413/a19e67b2/attachment.html>


More information about the llvm-commits mailing list