- User Since
- Nov 9 2017, 10:58 AM (159 w, 3 d)
Mar 11 2020
LGTM, thank you!
Dec 2 2018
May 15 2018
LGTM - thank you!
I believe that we need to behave as is LegalAddressingMode is supposed to behave in general(see 469 in TargetTransformInfo.h):
/// Return true if the addressing mode represented by AM is legal for /// this target, for a load/store of the specified type. /// The type may be VoidTy, in which case only return true if the addressing /// mode is legal for a load/store of any legal type. /// If target returns true in LSRWithInstrQueries(), I may be valid.
When I looked at it, it was the case that VoidTy is essentially a tag type in this case. Other targets such as AArch64 also acknowledge that an unsized type may be passed through all the way to isLegalAddressingMode.
Dec 4 2017
Nov 23 2017
Nov 20 2017
Apologies for the delayed update. The new version tries to deal with two issues:
- the non-compliant style identified by Aaron in various spots, hopefully this is correct now;
- there was an issue with the existing logic, which only came up with additional testing:
- for AMDGPUFlatWorkGroupSizeAttr and AMDGPUWavesPerEU, it is valid for the user to have passed an integer literal for the minimum and a dependent expression for the maximum;
- in this case, iff the expression for the maximum could not be evaluated in Sema, then a spurious error case would obtain in which the minimum would signalled as greater than the maximum, which would have been pegged at 0;
- this is fixed by having the maximum be at least equal to the minimum before any attempt of evaluating it is made - iff the actual user passed arguments to the attribute violate its invariants the error is signalled.
- the relevant changes are on lines 5495 and 5529 in SemaDeclAttr.cpp.