[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type
Bevin Hansson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 24 14:57:06 PDT 2018
ebevhan added inline comments.
Comment at: include/clang/Basic/TargetInfo.h:382
+ // enough bits to fit the minumum.
+ if (getIntWidth() < MinSignedAccumDataBits)
+ return getLongWidth();
I'm not sure I agree with this interpretation. It's simply not correct to consider 'short' the 'underlying type' of 'short _Accum', 'int' the 'underlying type' of '_Accum', etc. They are wholly independent and should have separate settings altogether.
Asserting/ensuring that a target has set an invalid width for its types should be done separately. This currently feels a bit like the TargetInfo is guessing.
(For the record, the reason I'm requesting this change is because this implementation does not work for us downstream.)
More information about the cfe-commits