[CodeGen] Improve documentation for SUBREG_TO_REG (#180504)
The most important change is to remove the claim that the extra bits are
necessarily set to zero.
[Clang] Fix missing -Warray-bounds warning on member function calls. (#179647)
Fixes #179128.
This patch fixes a false negative where Clang failed to detect
out-of-bounds access when calling a member function on an invalid array
index. It adds handling for CXXMemberCallExpr in CheckArrayAccess.
Signed-off-by: prajwal jalwadi<prajwaljalwadi at gmail.com>
[lld] Add explicit std::move(...) to avoid a few vector copies (#180474)
In corner cases, it is profitable to move an llvm::SmallString instead
of copying it.
It is almost always profitable to move an std::vector
Changes suggested by performance-use-std-move from
https://github.com/llvm/llvm-project/pull/179467
[VPlan] Propagate FastMathFlags from phis to blends (#180226)
If a phi has fast math flags, we can propagate it to the widened select.
To do this, this patch makes VPPhi and VPBlendRecipe subclasses of
VPRecipeWithIRFlags, and propagates it through PlainCFGBuilder and
VPPredicator.
Alive2 proofs for some of the FMFs (it looks like it can't reason about
the full "fast" set yet)
nnan: https://alive2.llvm.org/ce/z/f0bRd4
nsz: https://alive2.llvm.org/ce/z/u9P96T
The actual motivation for this to eventually be able to move the special
casing for tail folding in
LoopVectorizationPlanner::addReductionResultComputation into the CFG in
#176143, which requires passing through FMFs.
[flang][NFC] Converted five tests from old lowering to new lowering (part 15) (#179854)
Tests converted from test/Lower: equivalence-with-host-assoc.f90,
explicit-interface-results-2.f90, explicit-interface-results.f90,
ext-proc-as-actual-argument-1.f90, ext-proc-as-actual-argument-2.f90
[clang] Add explicit std::move(...) to avoid a few copies (#180482)
Moving an std::vector is almost always profitable.
A clang::CXXScopeSpec contains an owned
clang::NestedNameSpecifierLocBuilder which currently does not benefit
from being moved, but may structurally in the future.
A clang::MultiLevelTemplateArgumentList contains an llvm::SmalVector
which may benefit from being moved dependiong on its size.
A clang::Environment contains an llvm::ImmutableMap which itself
contains an llvm::IntrusiveRefCntPtr that benefits from being moved.
Changes suggested by performance-use-std-move from #179467
---------
Co-authored-by: Timm Baeder <tbaeder at redhat.com>
[clang] Add explicit std::move(...) to avoid a few copies (#180477)
Moving a clang::MultilibSet is almost always profitable.
Changes suggested by performance-use-std-move from #179467
[clangd] Add explicit std::move(...) to avoid a few copies (#180475)
Moving an std::map is almost always profitable (DiagnosticToDiagRefMap).
Changes suggested by performance-use-std-move from #179467
[clang][bytecode] Implement constexpr step limit (#176150)
This only calls `noteStep()` on jump opcodes, so this works for loops.
It does not prevent "hangs" when a function is just _very_ long (could
be interesting how this interfaces with expand statements?).
Fixes https://github.com/llvm/llvm-project/issues/165951
[flang][NFC] Remove dependency on FIRBuilder from FIRAnalysis. (#180300)
The dependency actually appears to be unused.
Co-authored-by: Matt P. Dziubinski <matt-p.dziubinski at hpe.com>
[X86] Allow handling of i128/256/512 SELECT on the FPU (#180197)
If the scalar integer selection sources are freely transferable to the
FPU, then splat to create an allbits select condition and create a
vector select instead
[AMDGPU] Fix V_INDIRECT_REG_READ_GPR_IDX expansion with immediate index (#179699)
The definition for V_INDIRECT_REG_READ_GPR_IDX_B32_V*'s SSrc_b32 operand
allows immediates, but the expansion logic handles only register cases
now. This can result in expansion failures when e.g.
llvm.amdgcn.wave.reduce.umin.i32 is folded into a constant and then used
as an insertelement idx.
[GlobalISel] Use named constant for impossible repair cost (#180490)
replace magic value `std::numeric_limits<unsigned>::max()` with a named
constant `ImpossibleRepairCost` to improve readability
[SimplifyLibCalls] Directly convert fmin/fmax to intrinsics (#177988)
Drop the custom shrinking code, which we'll also do for intrinsics.
Having libcall-only optimizations is confusing, as these are typically
directly emitted as intrinsics by the frontend.