Review #145600 and #145770 crossed, which caused compute-copy and
combined-copy tests to fail because of an insufficiently written 'check'
line for a cir.func, which didn't account for the linkage spec being
added. This patch adds that to fix the build.
Some of the 'data' clauses can have a 'modifier-list' which specifies
one of a few keywords from a list. This patch adds support for lowering
them following #144806.
We have to keep a separate enum from MLIR, since we have to keep
'always' around for semantic reasons, whereas the dialect doesn't
differentiate these.
This patch ensures we get these right for the only applicable clause so
far, which is 'copy'.
This change adds support for function linkage and visibility and related
attributes. Most of the test changes are generalizations to allow
'dso_local' to be accepted where we aren't specifically testing for it.
Some tests based on CIR inputs have been updated to add 'private' to
function declarations where required by newly supported interfaces.
The dso-local.c test has been updated to add specific tests for
dso_local being set correctly, and a new test, func-linkage.cpp tests
other linkage settings.
This change sets `comdat` correctly in CIR, but it is not yet applied to
functions when lowering to LLVM IR. That will be handled in a later
change.
These ended up not being too much of a change, it just requires that we
properly emit a member expression,then use it in the varPtr. I also
fixed up the 'name' field to be the expression print, as that was
necessary to get this correct.
Finally, I added a TON of tests to convince myself that I've got this
correct, and hopefully the IR shows that.
The array indexes(and sections) are represented by the acc.bounds
operation, which this ensures we fill in properly. The lowerbound is
required, so we always get that.
The upperbound or extent is required. We typically do extent, since that
is the 'length' as specified by ACC, but in cases where we have implicit
length, we use the extent instead.
It isn't clear when 'stride' should be anything besides 1, though by my
reading, since we have full-types in the emitted code, we should never
have it be anything but 1.
This patch enables these for copy on compute and combined constructs,
and makes sure to test everything I could think of for
combinations/permutations.
These are identical in IR as the 'compute' constructs, but require a
little additional work since we have 2 operations to work around, not
just 1. Note that the test is nearly identical to the compute version,
except that the combined 'tag's are present, plus the 'loop' construct.