Page MenuHomePhabricator

[FPEnv][AST] WIP!!! For casts, keep FP options in trailing storage of CastExpr

Authored by kpn on Aug 13 2020, 11:46 AM.



This change allows FP options to be in the trailing storage of CastExpr. Needed for proper emitting of uitofp/sitofp later. The implementation is based on BinaryOperator and CallExpr.

THIS IS A WORK IN PROGRESS. I'm opening this now to get feedback on my understanding of how the cast classes are used. I'm not sure I have it correct and would appreciate more knowledgeable eyes on it.

Tests are still needed, Sema needs work, a number of other pieces are missing. Notes to myself need to be removed, etc.

Also, I've included as much context as I could. There's a 2MB limit on patches so I squeeked in under the wire with 1.9MB.

Diff Detail

Event Timeline

kpn created this revision.Aug 13 2020, 11:46 AM
kpn requested review of this revision.Aug 13 2020, 11:46 AM

Unfortunately I also prepared similar patch:
I didn't look into your patch in details yet, but I think they are close, as the implementation looks straightforward.
We need to merge our patches.

martong removed a subscriber: martong.Aug 14 2020, 4:34 AM
kpn planned changes to this revision.Aug 17 2020, 12:44 PM

It would be better to go with D85960. I'll hedge and keep this open until that one gets pushed.

kpn abandoned this revision.Sep 22 2020, 7:52 AM

Unneeded since D85960 landed.