vangthao added inline comments.

================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:596
+               MF.getFunction().getSubprogram(), &MF.front())
+           << "------------------------------";
+  });
----------------
scott.linder wrote:
> This seems like the wrong place to segment the output; could this be made a 
> part of the emitter itself?
> 
> Or maybe better yet, could all of these values be collected into a single 
> remark? That seems to be how e.g. `llvm/lib/CodeGen/RegAllocGreedy.cpp` does 
> it:
> 
> ```
> Pass:            regalloc                                                     
>                            Name:            SpillReloadCopies                 
>                                                       Function:        f      
>                                                                               
>    Args:                                                                      
>                                 - NumSpills:       '1'                        
>                                                            - String:          
> ' spills '                                                                    
>         - TotalSpillsCost: '1.000000e+00'                                     
>                                    - String:          ' total spills cost '   
>                                                               - NumReloads:   
>    '1'                                                                        
>            - String:          ' reloads '                                     
>                                       - TotalReloadsCost: '1.000000e+00'      
>                                                                  - String:    
>       ' total reloads cost '                                                  
>               - String:          generated in function
> ```
We also want to output this in a readable format for the frontend. Collecting 
it all into a single remark seems to break the output format since clang seems 
to ignore all newlines from a diagnostic remark.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123878

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

Reply via email to