HomePhabricator

[Local] Clean up EmitGEPOffset

Authored by nikic on Wed, Nov 4, 1:13 PM.

Description

[Local] Clean up EmitGEPOffset

Handle the emission of the add in a single place, instead of three
different ones.

Don't emit an unnecessary add with zero to start with. It will get
dropped by InstCombine, but we may as well not create it in the
first place. This also means that InstCombine does not need to
specially handle this extra add.

This is conceptually NFC, but can affect worklist order etc.

Details

Committed
nikicFri, Nov 13, 9:30 AM
Parents
rGe5a82b4594d7: [lldb] Fix SymbolFile/PDB/udt-layout.test
Branches
Unknown
Tags
Unknown