• Jamie Gennis's avatar
    6g,8g: make constant propagation inlining-friendly. · fff732ea
    Jamie Gennis authored
    This changes makes constant propagation compare 'from' values using node
    pointers rather than symbol names when checking to see whether a set
    operation is redundant. When a function is inlined multiple times in a
    calling function its arguments will share symbol names even though the values
    are different. Prior to this fix the bug409 test would hit a case with 6g
    where an LEAQ instruction was incorrectly eliminated from the second inlined
    function call. 8g appears to have had the same bug, but the test did not fail
    there.
    
    R=golang-dev, rsc
    CC=golang-dev
    https://golang.org/cl/5646044
    fff732ea
peep.c 15.8 KB