C++: Minimal IR support for GNUVectorType
#1750
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lack of support for the GCC vector extensions was causing a bunch of sanity failures in the syntax zoo. This PR adds minimal IR generation support for these types.
Added
VectorAggregateLiteral, and factored most ofArrayAggregateLiteralout into the common base classArrayOrVectorAggregateLiteral. I'd be happy to merge these all intoArrayAggregateLiteralif we don't care about the distinction.Made a few tweaks to
TranslatedArrayExprto compute the element type by looking at the result type of theArrayExpr, not the type of the base operand. Note that this means that forT a[10]; a[i] = foo;, the result of thePointerAddfora[i]will now beglvalue<T>, notT*. This is actually more faithful to the source language, and has no semantic difference on the IR.Added some missing
getInstructionElementSize()overrides.Added the new
BuiltInopcode, renamed the existingBuiltInInstructiontoBuiltInOperationInstruction, and made anyBuiltInOperationthat we don't specifically handle translate toBuiltIn.BuiltInOperationInstructionnow has a way to get the specificBuiltInOperation.Added
getCanonicalQLClass()overrides forGNUVectorTypeandBuiltInOperation.Added a simple IR test for vector types.