Skip to content
  • Quentin Colombet's avatar
    [PR16882] Ignore noreturn definitions when setting isPhysRegUsed. · fa403ab3
    Quentin Colombet authored
    PEI inserts a save/restore sequence for the link register, according to the
    information it gets from the MachineRegisterInfo.
    MachineRegisterInfo is populated by the VirtRegMap pass.
    This pass was not aware of noreturn calls and was registering the definitions of
    these calls the same way as regular operations.
    
    Modify VirtRegPass so that it does not set the isPhysRegUsed information for
    registers only defined by noreturn calls.
    The rational is that a noreturn call is the "last instruction" of the program
    (if it returns the behavior is undefined), so everything that is defined by it
    cannot be used and will not interfere with anything else. Therefore, it is
    pointless to account for then.
    
    llvm-svn: 191349
    fa403ab3
Loading