[LLVMdev] Linker Question

Eli Friedman eli.friedman at gmail.com
Mon Oct 5 17:02:09 PDT 2009


On Mon, Oct 5, 2009 at 3:31 PM, David Greene <dag at cray.com> wrote:
> On Monday 05 October 2009 17:21, Chris Lattner wrote:
>
>> > Would it break things horribly if I went in and taught
>> > RecursiveResolveTypes
>> > how to handle this or would that violate some deep-level assumption?
>>
>> This is intentional, but instcombine should clean it up.  Are you not
>> seeing this?  If not, instcombine should be improved.
>
> The problem is I need to examine this before instcombine and do various
> nefarious things like spitting out IR and/or generating code without any
> modifications to improve debuggability of our compiler.  Why is this
> intentional?

The type system fundamentally depends on identity; you can't just
screw around with types like that.  If I had to guess, things will
explode if something uses a pointer to such a function in some way
other than calling it.

If you really need this, you can always copy the relevant code out of
instcombine and create your own pass to which just performs this fix.

-Eli




More information about the llvm-dev mailing list