Skip to content
  • Andreas Klebinger's avatar
    NCG: Codelayout: Distinguish conditional and other branches. · edc2cc58
    Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
    In #18053 we ended up with a suboptimal code layout because
    the code layout algorithm didn't distinguish between conditional
    and unconditional control flow.
    
    We can completely eliminate unconditional control flow instructions
    by placing blocks next to each other, not so much for conditionals.
    
    In terms of implementation we simply give conditional branches less
    weight before computing the layout.
    
    Fixes #18053
    edc2cc58