[PATCH] D42720: [CodeGen] Switch non-SJLJ EH encoding to uleb128

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 15:09:09 PST 2018


Ryan Prichard <rprichard at google.com> writes:

> I'll add a comment above absoluteSymbolDiff.
>
> I don't think the optimization prevents the creation of new fragments. For
> an absolute (Hi - Lo) expression, the general code path calls
> MCObjectStreamer::EmitValueImpl,
> then MCObjectStreamer::EmitBytes. EmitValueImpl and EmitBytes do a lot of
> the same work. With the optimization, EmitValueImpl is skipped, and EmitBytes
> is called more directly. I think the important part is that it avoids
> allocating and evaluating an MCExpr tree.

Oh, that is less than what I would expect. It is tempting to remove the
optimization in a followup patch.

> Yeah, that should be possible.
>
> Before my patch, LLVM outputs the TTBase offset for non-SJLJ mode even when
> the type table is empty. After my patch, the offset is omitted. I'll
> include that change in the second patch.
>
> I assume each patch needs to pass check-llvm cleanly, so I'll need to fix
> up some of the same tests twice. It shouldn't be much trouble.
>
> The first patch will still change how the type table is aligned. i.e. It
> will typically replace TTBase LEB padding with alignment padding before the
> type info table.

Sounds good.

Thanks,
Rafael


More information about the llvm-commits mailing list