-
Notifications
You must be signed in to change notification settings - Fork 112
More array splitting, handle select and phi #179
Conversation
NewPhi->addIncoming(EV, IncomingBB); | ||
} | ||
|
||
// Reconstruct the original struct value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/struct/array
Value *NewStruct = UndefValue::get(ATy); | ||
|
||
bool NeedsAnotherPass = false; | ||
// Create a separate select instruction for each struct field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/struct/array/
Select); | ||
NeedsAnotherPass = NeedsAnotherPass || DoAnotherPass(NewSelect); | ||
|
||
// Reconstruct the struct value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/struct/array
I am a bit surprised that it's not easy to handle load/store/select/phi for both structs and arrays a bit more uniformly, but I suppose C++ and LLVM don't make it easy 😞. |
Thanks, a bunch of places needed struct=>array renaming, fixed. And yeah, it's a little sad we can't use a template for both. But we hit things like getElementType() needing an index for structs but not for arrays, so indeed C++ and LLVM make that tricky... |
For #178