[PATCH] D20769: [IPRA] Interprocedural Register Allocation - Analysis Passes

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 10:40:01 PDT 2016


Hi Vivek,

I was thinking about debug ability and usability of the produced code.
Something to consider in a following patch would be to add in the assembly output comments at the beginning of the function and/or related call site of the function listing what are the register preserved by the function.

The rationale is that now if we play with assembly files produced by different optimization phase, we want a quick way to check if two functions are equivalent.
E.g.,
Let say we have two assembly files produced for the same application:
- bad.s which fails, produced with ipra
- good.s which works, produced without ipra

When bisecting which function causes the failure, it is important to know if it is fine to take a function foo from good.s and replace it into bad.s. This may not be possible if the preserve register are not compatible.

Cheers,
-Quentin
> On Jun 9, 2016, at 9:42 AM, Vivek Pandya <vivekvpandya at gmail.com> wrote:
> 
> vivekvpandya updated this revision to Diff 60189.
> 
> http://reviews.llvm.org/D20769
> 
> Files:
>  include/llvm/Analysis/CallGraphSCCPass.h
>  include/llvm/CodeGen/MachineOperand.h
>  include/llvm/CodeGen/Passes.h
>  include/llvm/CodeGen/RegisterUsageInfo.h
>  include/llvm/InitializePasses.h
>  lib/Analysis/CallGraphSCCPass.cpp
>  lib/CodeGen/CMakeLists.txt
>  lib/CodeGen/RegUsageInfoCollector.cpp
>  lib/CodeGen/RegisterUsageInfo.cpp
>  lib/CodeGen/TargetPassConfig.cpp
>  test/CodeGen/Generic/reg-usage-info.ll
> 
> <D20769.60189.patch>



More information about the llvm-commits mailing list