tejohnson added a comment.

In D67385#1679127 <https://reviews.llvm.org/D67385#1679127>, @khchen wrote:

> @tejohnson when I run the `clang -flto -Wl,-plugin-opt=-help` command, it 
> shows the
>
>   --code-model=<value>                               - Choose code model
>      =tiny                                            -   Tiny code model
>      =small                                           -   Small code model
>      =kernel                                          -   Kernel code model
>      =medium                                          -   Medium code model
>      =large                                           -   Large code model
>
>   so I think the clang driver need to pass this info to LTO codegen, does it 
> make sense?


This is an internal LLVM option, that can be used to override the mcmodel set 
in the Module IR when the code was compiled into Bitcode. I don't think it 
makes sense to have the clang driver automatically set this internal option for 
the plugin, overridding what was set when the code was compiled, it can be set 
manually via a -plugin-opt if one needs to override for debugging etc. Why 
isn't the code model module flag in the Bitcode sufficient for your LTO case?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67385/new/

https://reviews.llvm.org/D67385



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to