This will make it possible for tablegen to make subtarget
dependent decisions without adding new arguments to every
target.
---------
Co-authored-by: Sergei Barannikov <barannikov88@gmail.com>
Use `declRefExpr` matcher to match callee so that we can get the
`SourceRange` of the identifier of the callee for replacement.
Drive-by changes:
- Use `hasConditionVariableStatement` matcher to handle `if` statements
with init-statement.
- Support `for` loops.
Fixes#154790
If a standalone schedule data relates to a vectorized instruction, still
need to schedule it as a part of pseudo-bundle to correctly handle
dependencies between its child nodes.
This API takes a const char* with a default nullptr value and immdiately
passes it down to an API taking a StringRef. All of the places this is
called from are either using compile time string literals, the default
argument, or string objects that have known length. Discarding the
length known from a calling API to just have to strlen it to call the
next layer down that requires a StringRef is a bit silly, so this change
updates CodeGenModule::GetAddrOfConstantCString to use StringRef instead
of const char* for the GlobalName parameter.
It might be worth also replacing the first parameter with an llvm ADT
type that avoids allocation, but that change would have wider impact so
we should consider it separately.
So far, the clang-tidy check `modernize-avoid-c-arrays` also diagnosed
array types for type template parameters even though no actual array
type got written there but it got deduced to one. In such case, there is
nothing a developer can do at that location to fix the diagnostic. Since
in this case, the location where the template got actually instantiated
would have to be adjusted. And this is in most cases some totally
distant code where implementers of a template do not have access to.
Also adding suppressions to the declaration of the template is not an
option since that would clutter the code unnecessarily and is in many
cases also simply not possible (e.g. for users of a template). Hence, we
propose to not diagnose any occurrence of an array type in an implicit
instantiation of a template but rather at the point where template
arguments involve array types.
This change will allow to remove `-ignore-non-decodable-operands`
TableGen option.
The J(AL)R(C) instructions still have incorrect encodings, but it seems
there is only one mips16 test that only checks that `nop` can be
assembled.
If a standalone schedule data relates to a vectorized instruction, still
need to schedule it as a part of pseudo-bundle to correctly handle
dependencies between its child nodes.
These removes another test that otherwise needs a shell. This does
remove test coverage for pipefail in the external shell, but the
external shell should be disabled by default pretty soon. This also adds
test coverage for the internal shell which did not exist before.
Reviewers: jh7370, ilovepi, petrhosek
Reviewed By: ilovepi, petrhosek
Pull Request: https://github.com/llvm/llvm-project/pull/157223
We have two implementations of IsResizableBase that are selected with
a boolean template parameter. This patch consolidates them into one
with "constexpr if". The "constexpr if" condition uses
llvm::is_detected to check the availability of resize().
fwd_or_bidi_tag selects one of two implementations of
fwd_or_bidi_tag_impl depending on the condition. We can replace it
with std::conditional_t, eliminating the need for helper structs
fwd_or_bidi_tag_impl.
This patch also converts the fwd_or_bidi_tag struct into an alias
template, making "using filter_iterator" a little more readable.
This patch combines two implementations of get_hashable_data into one
with "constexpr if". I'm retaining the original return type of the
second variant, size_t, with static_cast<size_t>. Moving away from
template metaprogramming should improve readability.
Look through extractvalue to simplify umul_with_overflow where one of
the operands is 1.
This removes some redundant instructions when expanding SCEVs, which in
turn makes the runtime check cost estimate more accurate, reducing the
minimum iterations for which vectorization is profitable.
PR: https://github.com/llvm/llvm-project/pull/157307
All in-tree targets store target-specific TRI in target-specific
Subtarget/InstrInfo class by value, but some downstream targets may
prefer to store it as `std::unique_ptr<const TargetRegisterInfo>` (to
avoid inclusion of MyTargetRegisterInfo.h in MySubtarget.h).
Making the destructor public makes this possible, and also follows
general C++ guidelines (the destructor should be either public virtual
or protected non-virtual).
All other related classes already have their destructors public.
This is a refactoring PR. It sinks RemoteJITUtils into Interpreter and IncrementalExecutor classes.
---------
Co-authored-by: kr-2003 <kumar.kr.abhinav@gmail.com>
The SCEV predicate in the existing tests for optimizing for size is
known to be false. Add additional test with a predicate that cannot be
proven true/false.
Also generate checks with latest version of script.
The generated decoder can now decode these operands. All we need to do
is to add `bits<0>` for these operands to instruction records and
provide operand decoders.
While here, reformat adjacent lines.
Resolves#157067
APFloat::convertToInteger returns opInvalidOp when the conversion has
unspecified value. The int-to-float narrowing detection logic doesn't
check for this when comparing the converted-back integer with the
original integer.
PR adds a check for this, and test cases.
This provides a structured collection of the source files used in the
compiler-rt builtins library in Bazel.
Normal build rules often don't work for runtime libraries as they may
need to be built for a specific target platform and in an environment
with the associated SDK available to build for that target. Instead,
this PR exports the sources in a structured way that can be used by
downstream users to collect and build these runtimes in a
target-appropriate manner.
Currently, this includes AArch64, AArch32 (with and without VFP),
x86-64, i386, PPC, and RISC-V. Where I could see a useful division of
functionality, those are also exposed.
The rules use over-wide globs to minimize the need to manually update
lists of files or to risk things slipping out of date.
Remove instcombine, simplifycfg and dce from some tests, as they make it
a bit more difficult to see the codegen coming out of LV and most
simplifications are already done on the VPlan-level.
Also modernizes some check lines.
Apply hints even if the attribute is the default "notcold" or
"ambiguous", to enable better tracking through the allocator.
Add an option to control the ambiguous allocation hint value.
This commit contains executor-side support for ORC allocation actions
(see e50aea58d5).
An AllocAction is a function pointer with type
orc_rt_WrapperFunctionBuffer (*)(const char *ArgData, size_t ArgSize),
along with an associated blob of argument bytes.
An AllocActionPair is a pair of AllocActions, one to be run at memory
finalization time and another to be run at deallocation time.
The runFinalizeActions function can be used to run all non-null finalize
actions in a sequence of AllocActionPairs, returning the corresponding
sequence of deallocation actions on success.
The runDeallocActions function can be used to run a sequence of dealloc
actions returned by runFinalizeActions.