[PATCH] D70605: [OpenCL] Fix address space for implicit conversion (PR43145)

2020-07-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. I know this is some really late feedback on this patch. I struck upon some issues with while rebasing D62574 . Comment at: clang/lib/Sema/SemaExprCXX.cpp:4106 + NewToType = Context.getAddrSpaceQualType(NewToType, +

[PATCH] D62574: Initial draft of target-configurable address spaces.

2020-07-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. It seems that D70605 attempted to ameliorate the issues that I observed (pointer-conversion doing too much), but it didn't manage to solve the problem fully. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62574/new/ https://rev

[PATCH] D70605: [OpenCL] Fix address space for implicit conversion (PR43145)

2020-07-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:4106 + NewToType = Context.getAddrSpaceQualType(NewToType, + FromPteeType.getAddressSpace()); + if (ToType->isObjCObjectPointerType()) ---

[PATCH] D83325: [Sema] Be more thorough when unpacking the AS-qualified pointee for a pointer conversion.

2020-07-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: svenvh, rjmccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. When performing a pointer conversion as the second conversion in an SCS where the conversion is a derived-to-base and the address space of the type wants

[PATCH] D62574: Initial draft of target-configurable address spaces.

2020-07-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D62574#2136553 , @danilaml wrote: > In D62574#2135662 , @ebevhan wrote: > > > It's generally not safe to alter address spaces below the top level. C is > > just very permissive about it.

[PATCH] D62574: Initial draft of target-configurable address spaces.

2020-07-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 276163. ebevhan added a comment. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62574/new/ https://reviews.llvm.org/D62574 Files: clang-tools-extra/clang-tidy/bugprone/VirtualNearMissCheck.cpp clan

[PATCH] D83294: [Fixed Point] Add codegen for fixed-point shifts.

2020-07-09 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3603-3604 auto ResultFixedSema = Ctx.getFixedPointSemantics(ResultTy); - auto CommonFixedSema = LHSFixedSema.getCommonSemantics(RHSFixedSema, true); + auto

[PATCH] D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations.

2020-07-09 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D82663#2140507 , @leonardchan wrote: > In D82663#2130355 , @ebevhan wrote: > > > Well, it's not so much as adding the bit, but adding the information that > > the bit exists. That means

[PATCH] D83294: [Fixed Point] Add codegen for fixed-point shifts.

2020-07-10 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3857 + + // TODO: This misses out on the sanitizer check below. + if (Ops.isFixedPointOp()) leonardchan wrote: > I don't suppose you could fi

[PATCH] D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations.

2020-07-10 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D82663#2142426 , @rjmccall wrote: > Would it be sensible to use a technical design more like what the matrix > folks are doing, where LLVM provides a small interface for emitting > operations with various semantics? FixedPoin

[PATCH] D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations.

2020-07-15 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D82663#2144551 , @rjmccall wrote: > In D82663#2144219 , @ebevhan wrote: > > > In D82663#2142426 , @rjmccall > > wrote: > > > > > Would it be sens

[PATCH] D73186: [AST] Add fixed-point multiplication constant evaluation.

2020-06-25 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. The last patchset contains the comment about rounding, so I think I will consider this accepted. As a final addendum to the discussion on rounding and overflow... The last Appendix to the E-C TR does actually say: 2. In the first edition requires that overflow hand

[PATCH] D73187: [AST] Add fixed-point division constant evaluation.

2020-06-26 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG94e8ec631dda: [AST] Add fixed-point division constant evaluation. (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73187/new/ https://re

[PATCH] D73188: [AST] Improve overflow diagnostics for fixed-point constant evaluation.

2020-06-26 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG474177c05381: [AST] Improve overflow diagnostics for fixed-point constant evaluation. (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73

[PATCH] D73189: [AST] Fix certain consteval assignment and comma operator issues with fixed-point types.

2020-06-26 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGda2f852e1913: [AST] Fix certain consteval assignment and comma operator issues with fixed… (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D73186: [AST] Add fixed-point multiplication constant evaluation.

2020-06-26 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG53f5c8b4a14c: [AST] Add fixed-point multiplication constant evaluation. (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73186/new/ http

[PATCH] D73185: [AST] Add fixed-point subtraction constant evaluation.

2020-06-26 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeccf7fc7b31a: [AST] Add fixed-point subtraction constant evaluation. (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73185/new/ https:/

[PATCH] D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations.

2020-06-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: leonardchan, rjmccall, bjope. Herald added a project: clang. Herald added a subscriber: cfe-commits. The design of unsigned fixed-point with padding did not really work as originally intended downstream. The issue with the design is that the

[PATCH] D82662: [CodeGen] Use the common semantic for fixed-point codegen, not the result semantic.

2020-06-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added a reviewer: leonardchan. Herald added a project: clang. Herald added a subscriber: cfe-commits. Using the result semantic is wrong in some cases, such as unsigned fixed-point + signed integer. In this case, the result semantic is unsigned and the common

[PATCH] D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations.

2020-06-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 273762. ebevhan added a comment. Fixed some broken CHECK lines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82663/new/ https://reviews.llvm.org/D82663 Files: clang/include/clang/Basic/FixedPoint.h clang/

[PATCH] D82662: [CodeGen] Use the common semantic for fixed-point codegen, not the result semantic.

2020-06-29 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfefa34faf551: [CodeGen] Use the common semantic for fixed-point codegen, not the result… (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations.

2020-06-30 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D82663#2117451 , @rjmccall wrote: > Why not legalize to the signed operation? My feeling was that it wasn't right do so in LLVM, because LLVM has no notion of the padding bit and therefore doesn't really care about Clang's ra

[PATCH] D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations.

2020-06-30 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Another point is, if we for example have an i16 umul.fix in legalization, we have no way of knowing in the general case that it is safe to replace it with an smul.fix, since the information that the MSB is not significant does not exist on IR level. This is the 'loss of

[PATCH] D78294: [Fixed Point] Move the compassign LHS type correction a bit further down. NFCI.

2020-04-16 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added a reviewer: leonardchan. Herald added a project: clang. Herald added a subscriber: cfe-commits. We can simplify the LHSTy correction for fixed-point compassign by moving it below the point where we know we have a compound assignment. Also, we shouldn't

[PATCH] D78294: [Fixed Point] Move the compassign LHS type correction a bit further down. NFCI.

2020-04-17 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfd7a34186137: [Fixed Point] Move the compassign LHS type correction a bit further down. NFCI. (authored by ebevhan). Changed prior to commit: https://reviews.llvm.org/D78294?vs=258033&id=258251#toc Rep

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-08-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1778 -std::pair FieldInfo = - Context.getTypeInfoInChars(D->getType()); -EffectiveFieldSize = FieldSize = FieldInfo.first; It seems that in factoring out this to setDecl

[PATCH] D83325: [Sema] Be more thorough when unpacking the AS-qualified pointee for a pointer conversion.

2020-08-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D83325#2170813 , @rjmccall wrote: > `removeAddrSpaceQualType` should guarantee that it removes the address space > qualifier; you shouldn't need to do something special here. That means it > needs to iteratively desugar and c

[PATCH] D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder.

2020-08-04 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: jasonliu, efriedma. Herald added a project: clang. Herald added a subscriber: cfe-commits. ebevhan requested review of this revision. In D79719 , LayoutField was refactored to fetch the size of field types in

[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

2020-08-04 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. I submitted a patch with the changes at D85191 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79719/new/ https://reviews.llvm.org/D79719 ___ cf

[PATCH] D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder.

2020-08-04 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1841 auto setDeclInfo = [&](bool IsIncompleteArrayType) { -TypeInfo TI = Context.getTypeInfo(D->getType()); -FieldAlign = Context.toCharUnitsFromBits(TI.Align); +auto TI = Context.getT

[PATCH] D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder.

2020-08-05 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D85191#2193645 , @rsmith wrote: >> This is not ideal, since it makes the calculations char size dependent, and >> breaks for sizes that are not a multiple of the char size. > > How can we have a non-bitfield member whose size i

[PATCH] D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder.

2020-08-05 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1841 auto setDeclInfo = [&](bool IsIncompleteArrayType) { -TypeInfo TI = Context.getTypeInfo(D->getType()); -FieldAlign = Context.toCharUnitsFromBits(TI.Align); +auto TI = Context.getT

[PATCH] D85312: [ADT] Move FixedPoint.h from Clang to LLVM.

2020-08-05 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. Herald added subscribers: llvm-commits, cfe-commits, dexonsmith, hiraditya, mgorny. Herald added projects: clang, LLVM. ebevhan requested review of this revision. This patch moves FixedPointSemantics and APFixedPoint from Clang to LLVM ADT. This will make it easier

[PATCH] D62574: Initial draft of target-configurable address spaces.

2020-08-06 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D62574#2183294 , @Anastasia wrote: > In D62574#2136423 , @ebevhan wrote: > >> It seems that D70605 attempted to >> ameliorate the issues that I observed

[PATCH] D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder.

2020-08-06 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D85191#2197550 , @bjope wrote: > In D85191#2196863 , @rsmith wrote: > >> In D85191#2195923 , @ebevhan wrote: >> >>> In D85191#2193645

[PATCH] D85312: [ADT] Move FixedPoint.h from Clang to LLVM.

2020-08-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 283873. ebevhan added a comment. Fix some formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85312/new/ https://reviews.llvm.org/D85312 Files: clang/include/clang/AST/APValue.h clang/include/clang/A

[PATCH] D83212: [Fixed Point] Add fixed-point shift operations and consteval.

2020-08-07 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGaa0d19a0c8f5: [Fixed Point] Add fixed-point shift operations and consteval. (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D83325: [Sema] Iteratively strip sugar when removing address spaces.

2020-08-10 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 284395. ebevhan retitled this revision from "[Sema] Be more thorough when unpacking the AS-qualified pointee for a pointer conversion." to "[Sema] Iteratively strip sugar when removing address spaces.". ebevhan edited the summary of this revision. ebevhan add

[PATCH] D83325: [Sema] Iteratively strip sugar when removing address spaces.

2020-08-11 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D83325#2209589 , @svenvh wrote: > LGTM, but just wondering if the test actually belongs to this patch, as it > doesn't demonstrate the problem without one of your other patches? Mm, that is true, but then I'd be submitting the

[PATCH] D83325: [Sema] Iteratively strip sugar when removing address spaces.

2020-08-11 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG956582aa1658: [Sema] Iteratively strip sugar when removing address spaces. (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83325/new/ h

[PATCH] D81904: [clang] Do not crash for unsupported fixed point to floating point conversion

2020-08-11 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd4408fe17f33: [clang] Do not crash for unsupported fixed point to floating point conversion (authored by gousemoodhin, committed by ebevhan). Herald added a project: clang. Herald added a subscriber: cfe-

[PATCH] D62574: Add support for target-configurable address spaces.

2020-08-11 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 284765. ebevhan retitled this revision from "Initial draft of target-configurable address spaces." to "Add support for target-configurable address spaces.". ebevhan edited the summary of this revision. ebevhan added a comment. Rebased and updated summary. R

[PATCH] D62574: Add support for target-configurable address spaces.

2020-08-11 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. I think this works now. It should probably be given a few more reviewers to have a look. Do you have some suggestions, @Anastasia ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62574/new/ https://reviews.llvm.org/D62574

[PATCH] D85312: [ADT] Move FixedPoint.h from Clang to LLVM.

2020-08-13 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Thanks for reviewing! I'm not really sure who to add as reviewers for D85314 , though, and no one has replied to the RFC on the mailing list yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder.

2020-08-18 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. It doesn't feel like this patch got a very positive reception, but I'd still like to try a bit more to get it in. Even though it's difficult to test this particular change upstream, would it still be acceptable to take the patch since it reverts the behavior to what it

[PATCH] D62574: Add support for target-configurable address spaces.

2022-07-14 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 444638. ebevhan added a comment. Herald added a subscriber: steakhal. Rebased and addressed some comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62574/new/ https://reviews.llvm.org/D62574 Files: clang-tools-extra/clang-tidy/bugprone/Virtu

[PATCH] D62574: Add support for target-configurable address spaces.

2022-07-14 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Sorry for the delay! I rebased the patch onto latest and it mostly worked, with a few hitches. Comment at: clang/lib/Sema/SemaCast.cpp:2617-2619 + (Self.getLangOpts().OpenCL && + (DestPPointee->isFunctionType() || +

[PATCH] D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point.

2020-09-11 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 291203. ebevhan added a comment. Using Type::getFloatingPointTy now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86632/new/ https://reviews.llvm.org/D86632 Files: clang/lib/CodeGen/CGExprScalar.cpp clang

[PATCH] D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point.

2020-09-11 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: llvm/include/llvm/IR/FixedPointBuilder.h:126 + /// \p Ty, or a floating point type with a larger exponent than Ty. + Type *getAccommodatingFloatType(Type *Ty, const FixedPointSemantics &Sema) { +const fltSemantics *FloatSema = &Ty-

[PATCH] D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point.

2020-09-11 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 291211. ebevhan added a comment. Fix typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86632/new/ https://reviews.llvm.org/D86632 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/test/Frontend/fixed_point

[PATCH] D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point.

2020-09-21 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Ping. Any further comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86632/new/ https://reviews.llvm.org/D86632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder.

2020-08-19 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1847 +IsIncompleteArrayType ? CharUnits::Zero() : TI.first; +AlignIsRequired = Context.getTypeInfo(D->getType()).AlignIsRequired; }; efriedma wrote: > Can we fix getTy

[PATCH] D85312: [ADT] Move FixedPoint.h from Clang to LLVM.

2020-08-20 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1a995a0af3c4: [ADT] Move FixedPoint.h from Clang to LLVM. (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D85191: [AST] Get field size in chars rather than bits in RecordLayoutBuilder.

2020-08-20 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1e7ec4842c1a: [AST] Get field size in chars rather than bits in RecordLayoutBuilder. (authored by ebevhan). Repository: rG LLVM Github Monorepo C

[PATCH] D86282: [Fixed Point] Use FixedPointBuilder to codegen fixed-point IR.

2020-08-20 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: leonardchan, rjmccall. Herald added a subscriber: bjope. Herald added a project: clang. ebevhan requested review of this revision. This changes the methods in CGExprScalar to use FixedPointBuilder to generate IR for fixed-point conversions an

[PATCH] D83294: [Fixed Point] Add codegen for fixed-point shifts.

2020-08-21 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 286968. ebevhan added a comment. Revamped patch. It's now based on the FixedPointBuilder. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83294/new/ https://reviews.llvm.org/D83294 Files: clang/lib/CodeGen/CGE

[PATCH] D86447: [AST] Change return type of getTypeInfoInChars to a proper struct instead of std::pair.

2020-08-24 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added a reviewer: efriedma. Herald added subscribers: bjope, martong, jfb. Herald added a project: clang. ebevhan requested review of this revision. Followup to D85191 . This changes getTypeInfoInChars to return a TypeInfoCha

[PATCH] D86282: [Fixed Point] Use FixedPointBuilder to codegen fixed-point IR.

2020-08-24 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG808ac5464521: [Fixed Point] Use FixedPointBuilder to codegen fixed-point IR. (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D83294: [Fixed Point] Add codegen for fixed-point shifts.

2020-08-24 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG577f8b157a03: [Fixed Point] Add codegen for fixed-point shifts. (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D82663: [CodeGen] Have CodeGen for fixed-point unsigned with padding emit signed operations.

2020-08-24 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan abandoned this revision. ebevhan added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82663/new/ https://reviews.llvm.org/D82663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D86631: [Fixed Point] Add fixed-point to floating point cast types and consteval.

2020-08-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: leonardchan, rjmccall. Herald added subscribers: bjope, martong. Herald added a project: clang. ebevhan requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D86631 Files: clang/include/clang/AS

[PATCH] D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point.

2020-08-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: leonardchan, rjmccall. Herald added subscribers: llvm-commits, cfe-commits, bjope. Herald added projects: clang, LLVM. ebevhan requested review of this revision. The patch adds the required methods to FixedPointBuilder for converting between

[PATCH] D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point.

2020-08-27 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: llvm/include/llvm/IR/FixedPointBuilder.h:171-172 +// lossless, except for overflow to infinity which is unlikely. +return B.CreateFMul(Result, +ConstantFP::get(DstTy, std::pow(2, -(int)SrcSema.getScale(; + }

[PATCH] D86796: [Sema] Address-space sensitive index check for unbounded arrays

2020-09-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13966 if (index.isUnsigned() || !index.isNegative()) { -// It is possible that the type of the base expression after -// IgnoreParenCasts is incomplete, even though the type of the base -//

[PATCH] D62574: Add support for target-configurable address spaces.

2020-09-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D62574#2242471 , @Anastasia wrote: > The only thing is that it would be good to test the new target setting logic > somehow... do you have any ideas in mind? We could think of creating a dummy > target for that or adding a dum

[PATCH] D62574: Add support for target-configurable address spaces.

2020-09-02 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:10963 +bool +ASTContext::isExplicitAddrSpaceConversionLegal(LangAS From, LangAS To) const { + // If From and To overlap, the cast is legal. ebevhan wrote: > Anastasia wrote: > > Btw I assume

[PATCH] D86796: [Sema] Address-space sensitive index check for unbounded arrays

2020-09-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13981 +bool overflow; +llvm::APInt product(index); +product += 1; What if index is wider than AddrBits, but the active bits are fewer? Then you might miss out on t

[PATCH] D86796: [Sema] Address-space sensitive index check for unbounded arrays

2020-09-04 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:14063 + if (isUnboundedArray) { +if (index.isUnsigned() || !index.isNegative()) { + const auto &ASTC = getASTContext(); This could be early return to avoid the indentation. ===

[PATCH] D86796: [Sema] Address-space sensitive index check for unbounded arrays

2020-09-04 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13981 +bool overflow; +llvm::APInt product(index); +product += 1; ebevhan wrote: > chrish_ericsson_atx wrote: > > ebevhan wrote: > > > What if index is wider than A

[PATCH] D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point.

2020-09-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 290245. ebevhan added a comment. Added promotion mechanism. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86632/new/ https://reviews.llvm.org/D86632 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/test/Fro

[PATCH] D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point.

2020-09-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 290267. ebevhan added a comment. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86632/new/ https://reviews.llvm.org/D86632 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/test/Frontend/fixed_point_

[PATCH] D86631: [Fixed Point] Add fixed-point to floating point cast types and consteval.

2020-09-07 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 290266. ebevhan added a comment. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86631/new/ https://reviews.llvm.org/D86631 Files: clang/include/clang/AST/OperationKinds.def clang/lib/AST/Expr.cpp

[PATCH] D86632: [Fixed Point] Add codegen for conversion between fixed-point and floating point.

2020-09-08 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 290502. ebevhan added a comment. Updated method name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86632/new/ https://reviews.llvm.org/D86632 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/test/Frontend/

[PATCH] D88174: [Sema] Address-space sensitive check for unbounded arrays (v2)

2020-09-29 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan accepted this revision. ebevhan added a comment. This revision is now accepted and ready to land. LGTM, but @aaron.ballman should probably give his two cents as well for completion's sake. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88174

[PATCH] D88648: Refactor fixed point conversion test.

2020-10-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. Herald added subscribers: cfe-commits, bjope. Herald added a project: clang. ebevhan requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D88648 Files: clang/test/Frontend/fixed_point_conversions.c clang/test/Fronten

[PATCH] D88648: Refactor fixed point conversion test.

2020-10-09 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG9c26eb8b915e: Refactor fixed point conversion test. (authored by ebevhan). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D86447: [AST] Change return type of getTypeInfoInChars to a proper struct instead of std::pair.

2020-10-13 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG101309fe048e: [AST] Change return type of getTypeInfoInChars to a proper struct instead of… (authored by ebevhan). Repository: rG LLVM Github Mono

[PATCH] D86631: [Fixed Point] Add fixed-point to floating point cast types and consteval.

2020-10-13 Thread Bevin Hansson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9fa7f4845976: [Fixed Point] Add fixed-point to floating point cast types and consteval. (authored by ebevhan). Repository: rG LLVM Github Monorepo

[PATCH] D130510: Missing tautological compare warnings due to unary operators

2022-09-27 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Hi! A bit of late feedback on this patch. We found a failure in our downstream testing likely originating from here. The failing case is: void f(int a) { (0 != (a | !0LL)); } built with `clang -cc1 -emit-llvm-bc -O2 -v -o foo.bc -x c foo.c` =

[PATCH] D62574: Add support for target-configurable address spaces.

2022-06-01 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. I've been away from LLVM development for a while, and sadly this patch has languished a bit. I don't think there were any strong objections to its inclusion, though. If there is still interest in reviewing this, I could try to rebase the patch (or something resembling

[PATCH] D125862: [clang][driver] Add gcc-toolset/devtoolset 12 to prefixes

2022-06-09 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Hi! This test is failing in some of our downstream builds. Comment at: clang/unittests/Driver/ToolChainTest.cpp:647 +std::unique_ptr C( +TheDriver.BuildCompilation({"--gcc-toolchain="})); +ASSERT_TRUE(C); There's a binar

[PATCH] D76696: [AST] Build recovery expressions by default for C++.

2020-03-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. We found an odd case in our downstream fork after this patch landed. We have a diagnostic in `CheckVariableDeclarationType` that checks for automatic variables that are too large for the stack address space, and it chokes on the testcase `Parser/objcxx11-invalid-lambda.

[PATCH] D73186: [AST] Add fixed-point multiplication constant evaluation.

2020-02-19 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Basic/FixedPoint.cpp:242 + } else +Overflowed = Result < Min || Result > Max; + rjmccall wrote: > ebevhan wrote: > > rjmccall wrote: > > > leonardchan wrote: > > > > ebevhan wrote: > > > > > rjmccall wrote

[PATCH] D73186: [AST] Add fixed-point multiplication constant evaluation.

2020-02-21 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Basic/FixedPoint.cpp:242 + } else +Overflowed = Result < Min || Result > Max; + rjmccall wrote: > leonardchan wrote: > > ebevhan wrote: > > > rjmccall wrote: > > > > ebevhan wrote: > > > > > rjmccall wrote

[PATCH] D73186: [AST] Add fixed-point multiplication constant evaluation.

2020-02-28 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. So, any more on this or are we in agreement? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73186/new/ https://reviews.llvm.org/D73186 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D69393: [RFC][DebugInfo] emit user specified address_space in dwarf

2019-11-12 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. For what it's worth, in our downstream fork of Clang we have added the ability for function types to possess an address space. Though technically, even in our fork it is not possible to actually declare functions/function pointers with an address space; the target-speci

[PATCH] D62574: Initial draft of target-configurable address spaces.

2019-11-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked 2 inline comments as done. ebevhan added a comment. Sorry for the very late response on this. Hope it's not completely off your radar. Comment at: include/clang/AST/ASTContext.h:2598 + /// Returns true if address space A overlaps with B. + bool isAddressSpaceO

[PATCH] D58634: [PR40778] Generate address space conversion when binding reference to a temporary value in different address space

2019-12-06 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/Sema/SemaInit.cpp:4806-4808 + if ((RefRelationship == Sema::Ref_Related && + (T1CVRQuals | T2CVRQuals) != T1CVRQuals) || + !T1Quals.isAddressSpaceSupersetOf(T2Quals)) { Sorry for the really late comment o

[PATCH] D73186: [AST] Add fixed-point multiplication constant evaluation.

2020-02-18 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Basic/FixedPoint.cpp:242 + } else +Overflowed = Result < Min || Result > Max; + rjmccall wrote: > leonardchan wrote: > > ebevhan wrote: > > > rjmccall wrote: > > > > ebevhan wrote: > > > > > ebevhan wrote:

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2020-01-16 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13384 case Stmt::MemberExprClass: { expr = cast(expr)->getBase(); break; ilya wrote: > rsmith wrote: > > ilya wrote: > > > rsmith wrote: > > > > Hmm, don't we need

[PATCH] D73182: [CodeGen] Emit IR for fixed-point multiplication and division.

2020-01-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: rjmccall, leonardchan. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73182 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/test/Frontend/fixed_poin

[PATCH] D73183: [CodeGen] Emit IR for fixed-point unary operators.

2020-01-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: rjmccall, leonardchan. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73183 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/test/Frontend/fixed_poin

[PATCH] D73184: [CodeGen] Emit IR for compound assignment with fixed-point operands.

2020-01-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: rjmccall, leonardchan. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73184 Files: clang/lib/CodeGen/CGExprScalar.cpp clang/lib/Sema/SemaExpr.cpp

[PATCH] D73185: [AST] Add fixed-point subtraction constant evaluation.

2020-01-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: rjmccall, leonardchan. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73185 Files: clang/include/clang/Basic/FixedPoint.h clang/lib/AST/ExprConstant

[PATCH] D73187: [AST] Add fixed-point division constant evaluation.

2020-01-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: rjmccall, leonardchan, bjope. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73187 Files: clang/include/clang/Basic/FixedPoint.h clang/lib/AST/ExprC

[PATCH] D73186: [AST] Add fixed-point multiplication constant evaluation.

2020-01-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: rjmccall, leonardchan, bjope. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73186 Files: clang/include/clang/Basic/FixedPoint.h clang/lib/AST/ExprC

[PATCH] D73188: [AST] Improve overflow diagnostics for fixed-point constant evaluation.

2020-01-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: rjmccall, leonardchan, bjope. Herald added a project: clang. Herald added a subscriber: cfe-commits. Diagnostics for overflow were not being produced for fixed-point evaluation. This patch refactors a bit of the evaluator and adds a proper di

[PATCH] D73189: [AST] Fix certain consteval assignment and comma operator issues with fixed-point types.

2020-01-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan created this revision. ebevhan added reviewers: rjmccall, leonardchan, bjope. Herald added a project: clang. Herald added a subscriber: cfe-commits. Assignment and comma operators for fixed-point types were being constevaled as other binary operators, but they need special treatment. Re

[PATCH] D73185: [AST] Add fixed-point subtraction constant evaluation.

2020-01-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: clang/include/clang/Basic/FixedPoint.h:82 + unsigned IsSaturated: 1; + unsigned HasUnsignedPadding : 1; }; rjmccall wrote: > These changes should probably be done in a sep

[PATCH] D73185: [AST] Add fixed-point subtraction constant evaluation.

2020-01-23 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 239791. ebevhan added a comment. Move packing of FixedPointSemantics to a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73185/new/ https://reviews.llvm.org/D73185 Files: clang/include/clang/B

<    1   2   3   4   >