[Mesa-dev] [PATCH v2 1/1] clover: Dump linked binary to a different file

Jan Vesely jan.vesely at rutgers.edu
Mon Feb 27 21:20:45 UTC 2017


On Sat, 2017-02-25 at 20:46 -0800, Francisco Jerez wrote:
> Jan Vesely <jan.vesely at rutgers.edu> writes:
> 
> > this allows to pass the generated files directly to llc or bugpoint
> > 
> > v2: add atomic counter ID
> > 
> > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> > ---
> >  src/gallium/state_trackers/clover/llvm/invocation.cpp | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> > index f63ff3d..bb9d95d 100644
> > --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
> > +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> > @@ -281,8 +281,12 @@ clover::llvm::link_program(const std::vector<module> &modules,
> >  
> >     optimize(*mod, c->getCodeGenOpts().OptimizationLevel, !create_library);
> >  
> > +   static ::std::atomic_uint seq(0);
> 
> The leading double colon here and below seem redundant (it's used in some
> places to disambiguate the top level llvm namespace, but it shouldn't be
> necessary for the std namespace).
> 
> > +   ::std::string id = "." + mod->getModuleIdentifier() + "-" +
> > +      ::std::to_string(seq++);
> > +
> 
> Mark as const.  With that cleaned up:
> 
> Reviewed-by: Francisco Jerez <currojerez at riseup.net>

thank you. fixed locally and pushed.

Jan
> 
> >     if (has_flag(debug::llvm))
> > -      debug::log(".ll", print_module_bitcode(*mod));
> > +      debug::log(id + ".ll", print_module_bitcode(*mod));
> >  
> >     if (create_library) {
> >        return build_module_library(*mod, module::section::text_library);
> > @@ -292,7 +296,7 @@ clover::llvm::link_program(const std::vector<module> &modules,
> >  
> >     } else if (ir == PIPE_SHADER_IR_NATIVE) {
> >        if (has_flag(debug::native))
> > -         debug::log(".asm", print_module_native(*mod, target));
> > +         debug::log(id +  ".asm", print_module_native(*mod, target));
> >  
> >        return build_module_native(*mod, target, *c, r_log);
> >  
> > -- 
> > 2.9.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170227/52259417/attachment.sig>


More information about the mesa-dev mailing list