[PATCH] WIP: AddDiscriminators: Check more carefully for equivalent locations

Diego Novillo dnovillo at google.com
Fri Apr 10 10:09:25 PDT 2015


On Fri, Apr 10, 2015 at 12:56 PM, David Blaikie <dblaikie at gmail.com> wrote:

> I don't really understand why line information is any more or less reliable
> than column information, though?

The macro expansion example is the biggest offender. You get a whole
subgraph at the same line and column. The path discriminator wiki also
shows the problems you run into with codegen when the compiler decides
to open code certain constructs (like switch or memcpy).


> Certainly that's true - that's why we need discriminators, for when things
> aren't /otherwise/ disambiguated (eg: if they're on different lines they're
> different, that's easy - it's when it's two basic blocks on the same line
> that it gets hard - but if, again, they're in different columns that seems
> as good as when they're on different lines - and again, falling back to
> discriimnators when they happen to be at the same column as well)

Sure. But, the point remains, we cannot trust column numbers to make
this distinction.

> That description doesn't seem to mention column info or its limitations...
> does it? (I just searched for column, the only mention I can find is
> describing the line table itself and the discriminator column, not column
> info)

Yeah, you're right. The examples it uses, however, would not be doable
even with column information enabled. Now that I read it again, it
doesn't even mention the macro expansion problem.


Diego



More information about the llvm-commits mailing list