[LLVMdev] Linker Question
Chris Lattner
clattner at apple.com
Mon Oct 5 23:43:01 PDT 2009
On Oct 5, 2009, at 3:31 PM, David Greene 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?
It is intentional because there are two things going on here: the
linker needs to unify the prototypes, then something needs to massage
the call to pass the arguments to the new prototype. Just violating
the type system won't work. Doing this in two steps (the linker does
something simple and always correct + instcombine improving
performance/analyzability) is much better than the old and buggy thing
we had before where the linker tried to do both.
-Chris
More information about the llvm-dev
mailing list