Here’s the implementation of ConstantUnion::replaceUsesOfWithOnConstant(). No tests yet
Two questions:
– Any suggestions as to an existing test I could use as a model for testing this?
– I could also use some advice on what part of the code to work on next (in terms of finishing up union support).
Here’s the implementation of ConstantUnion::replaceUsesOfWithOnConstant(). No tests yet
Seems basically ok, please commit.
I suppose that means that I’ll have to send in the info to get commit access then
Two questions:
– Any suggestions as to an existing test I could use as a model for testing this?
IS this what is causing this to be broken?
No no, nothing’s broken. I just wanted to write some tests for the replaceAllUsesOf case, and wondered if there was an existing test to use as a model.
Here’s the implementation of ConstantUnion::replaceUsesOfWithOnConstant(). No tests yet
Seems basically ok, please commit.
I suppose that means that I’ll have to send in the info to get commit access then
Yep, plz do.
IS this what is causing this to be broken?
No no, nothing’s broken. I just wanted to write some tests for the replaceAllUsesOf case, and wondered if there was an existing test to use as a model.
I’m pointing out that the test doesn’t work with mainline, and was hoping that your patch fixes it.
– I could also use some advice on what part of the code to work on next (in terms of finishing up union support).
What is missing?
Almost everything At this point, the only parts of the code that are aware of unions are:
Derived type definitions (Type.cpp and so on)
BitReader and BitWriter.
LLParser.
Constants.
There’s no code that calculates the offsets of the union fields for example. None of the code generators know about unions yet.
That’s why I was wondering what area to work on next - I’m unfamiliar with the code and could use a few hints
Making TargetData’s handle it would make sense which will teach various GEP iteration stuff about unions. After that I’d try sending various union cases through the code generator to expose the obvious issues there.