[flang] Added LoopInvariantCodeMotion pass for [HL]FIR. (#173438)
The new pass allows hoisting some `fir.load` operations early
in MLIR. For example, many descriptor load might be hoisted
out of the loops, though it does not make much difference
in performance, because LLVM is able to optimize such loads
(which are lowered as `llvm.memcpy` into temporary descriptors),
given that proper TBAA information is generated by Flang.
Further hoisting improvements are possible in [HL]FIR LICM,
e.g. getting proper mod-ref results for Fortran runtime calls
may allow hoisting loads from global variables, which LLVM
cannot do due to lack of alias information.
This patch also contains improvements for FIR mod-ref analysis:
We may recurse into `HasRecursiveMemoryEffects` operations and
use `getModRef` recursively to get more precise results for
regions with `fir.call` operations.
[3 lines not shown]
[lldb-dap] Add an introductory message on startup. (#170795)
This adds an introductory message to try to inform users on how the
debug console works and adds a little more information on the current
target/process, similiar to the lldb driver.
Here is an example of the introduction:
```
To get started with the debug console try "<variable>", "<lldb-cmd>" or "help [<lldb-cmd>]".
For more information visit https://lldb.llvm.org/use/lldbdap.html#debug-console.
Executable binary set to 'a.out' (arm64-apple-macosx15.0.0).
Attached to process 1234.
```
vm_object.h: tweak OBJ_ONEMAPPING comment even more
The formulation that pages are allowed to have at most one mapping is
not quite clear. Nothing prevents pages from having more than one
mapping, but the flag must be cleared then.
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D54570
[LLDB] Fix buildbot breakage (#174886)
Remove DIL type-cast test that's failing on aarch64. Test makes
assumption that's not valid on that architecture.
[clang-doc] Don't serialize non-existant locations in HTML
The function template didn't check to see if a `Location` existed before
emitting the definition location line.
devel/libthai: Update to 0.1.30
* Drop DOCS, can't build/generate due to old version of Doxygen in tree
see PR 279330
* Drop static archive, nothing in tree uses it
* Drop dependency of gmake
* Enable "make test"
* Adjust Makefile to more closely follow Porters Handbook
Changelog: https://github.com/tlwg/libthai/releases/tag/v0.1.30
PR: 292145
Reviewed by: otis (maintainer)
misc/iso-codes: Use upstream release archive and improve port
* Use release release archive as recommended by Porters Handbook
* Add USES= shebangfix
* Replace calls to python3 with PYTHON_CMD variable
* Style Makefile to follow Porters Handbook more closely
PR: 291749
Approved by: maintainer timeout, 3+ weeks
[clang] Allow enabling sandbox for direct `-cc1` invocations (#174653)
This PR enables the FS sandbox for direct `clang -cc1` invocations.
https://github.com/llvm/llvm-project/pull/165350 unintentionally
implemented the sandbox only for the code path where `clang -cc1` gets
invoked after being expanded from a driver command line, which reduced
the expected test coverage.
Support data-dir from cabal package dependencies
Update to happy-2.1.7 include the Hackage package split into a library
and the binary packages. The data-dir is now a part of the library
dependent package. We previously didn't have support for installing
such packages with data files provided by dependency libraries. This
patch adds such support by iterating through the dependencies and
collecting their data files.
This also means preparing more complicated wrapper scripts which
slightly longer data files installation paths. The change is visible
in the PLIST of alex which otherwise could remain unchanged.
One side effect of this patch is MODCABAL_DATA_DIR no longer needs to
have any particular value, it just needs to be enabled to have this
automated machinery find the relevant pieces. I can change the meaning
of the variable to be a simple flag enabling the feature. We only have
these two packages use the feature so far so it'd be simple
documentation update with no ports churn.
[3 lines not shown]
[LLDB] Add type casting to DIL, part 2 or 3 (#170332)
This PR implements the actual type casting part. With this, type casting
to builtin types should work. The third PR, which will be put up after
this one is merged, will expand the type name parsing to allow casting
to user-defined types.
[lldb][TypeSystemClang] Set access specifier for EnumConstantDecl's (#174865)
LLDB was already setting the access specifier on `EnumDecl`s
unconditionally to `AS_public`. But it wasn't doing so for the
`EnumConstantDecl`s. This triggered a Clang assertion during
auto-completion of expressions
(https://github.com/llvm/llvm-project/issues/171913).
Ideally the code-completion accessibility check would honor the
`AccessControl` language option, but that change is harder to
test/justify. Since this is a pretty straight-forward change I want to
land this before trying to do that.
There is no test coverage for this because it relies on the order in
which Clang decides to check the decls in scope for auto-completion,
which seems fragile. It's also consistent with how we handle access to
other decls in `TypeSystemClang`.
Fixes https://github.com/llvm/llvm-project/issues/171913
[CIR] Implement simple folding for integer casts (#174861)
This extends the CastOp folder to handle integral casts between
different integer types. This only handles scalar values at this time.
This is in preparation for a change that will attempt to fold casts as
they are generated, but this change only performs the folding via the
cir-canonicalize pass.
Revert previous: Don't compile with -std=gnu2x. static_assert in pre 2023
environments is defined in assert.h. In 2013 assert.h was added to localtime.c
because a _DIAGASSERT was added which is no longer there. Remove assert.h since
it is no longer needed and the clang error goes away since static_assert is
no longer defined in pre-2023 environments. Thanks Paul Eggert.
linuxkpi: Add `rol32()`
`rol64()` and `rol32()` are used by <linux/siphash.h>. The former was
added previously, before <linux/siphash.h> was added. However the latter
was not, and it broke the build on armv7.
Reported by: adrian
Reviewed by: adrian, rpokala
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54588