Displaying 1 50 of 269,659 commits (0.024s)

LLVM — llvm/trunk/lib/Target/ARM ARMInstrThumb.td, llvm/trunk/test/MC/ARM cps.s

[ARM] Remove tCPS alias which just crashed

This alias caused a crash when trying to print the "cps #0" instruction in a
diagnostic for thumbv6 (which doesn't have that instruction).
The comment was incorrect, this instruction is UNPREDICTABLE if no flag bits
are set, so I don't think it's worth keeping.

Differential Revision: https://reviews.llvm.org/D39191

LLVM — llvm/trunk/include/llvm/Support Chrono.h, llvm/trunk/lib/Support Chrono.cpp

Support formatv of TimePoint with strftime-style formats.

Support formatv of TimePoint with strftime-style formats.

Extensions for millis/micros/nanos are added.
Inital use case is HH:MM:SS.MMM timestamps in clangd logs.

Reviewers: bkramer, ilya-biryukov

Subscribers: labath, llvm-commits

Differential Revision: https://reviews.llvm.org/D38992

LLVM — lld/trunk/ELF MarkLive.cpp InputSection.h, lld/trunk/test/ELF emit-relocs-gc.s

[ELF] - Do not collect SHT_REL[A] sections unconditionally when --gc-sections and 
--emit-relocs used together.

This is "Bug 34836 - --gc-sections remove relocations from --emit-relocs",

When --emit-relocs is used, LLD currently always drops SHT_REL[A] sections from
output if --gc-sections is present. Patch fixes the issue.

Differential revision: https://reviews.llvm.org/D38724

LLVM — llvm/trunk/lib/CodeGen CodeGenPrepare.cpp

[CodeGen][ExpandMemcmp][NFC] Allow memcmp to expand to vector loads (1)

Refactor ExpandMemcmp:

 - Stop duplicating the logic for computation of the sequence of loads to
   generate (thsi was done in three different places), this is now done
   only once in MemCmpExpansion::MemCmpExpansion().

 - Add a FIXME to expose a bug with the computation of the number of loads
   when not all sizes are loadable. For example, on X86-32 + SSE, possible
   loads are {16,4,2,1} bytes. The current code considers that all loads
   starting at MaxLoadSize are possible. This is not an issue right now as
   vector loads are not enabled, so I'm not fixing the issue here to keep
   the change as small as possible. I'm going to address this in a
   subsequent revision, where I enable vector loads.

See https://bugs.llvm.org/show_bug.cgi?id=34887

Differential Revision: https://reviews.llvm.org/D38498
Delta File
+199 -194 llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
+199 -194 1 file

LLVM — llvm/trunk/lib/Target/X86 X86CallFrameOptimization.cpp, llvm/trunk/test/CodeGen/X86 movtopush.ll cmpxchg-clobber-flags.ll

X86: Fix X86CallFrameOptimization to search for the COPY StackPointer

SelectionDAG inserts a copy of ESP into a virtual register.
X86CallFrameOptimization assumed that the COPY, if present, is always
right after the call-frame setup instruction (ADJCALLSTACKDOWN). This was a
wrong assumption as the COPY can be located anywhere between the call-frame setup
instruction and its first use. If the COPY happened to be located in a different
location than what X86CallFrameOptimization assumed, visiting it while
processing the call chain would lead to a conservative bail-out.

The fix is quite straightfoward, scan ahead for the stack-pointer copy and make note
of it so it can be ignored while processing the call chain.

Fixes pr34903

Differential Revision: https://reviews.llvm.org/D38730

LLVM — llvm/trunk/include/llvm module.modulemap.build

[Modules] Add module for Config/llvm-config.h

Besides all the goodness from modularizing a header, this is necessary
to compile ToT with modules with the clang host compiler from Xcode 9 in
macOS 10.13, which our bots don't use yet.


LLVM — llvm/trunk/include/llvm/CodeGen AsmPrinter.h, llvm/trunk/include/llvm/MC MCCodePadder.h MCFragment.h

[MC] Adding code padding for performance stability - infrastructure. NFC.

Infrastructure designed for padding code with nop instructions in key places such that 
preformance improvement will be achieved.
The infrastructure is implemented such that the padding is done in the Assembler after the 
layout is done and all IPs and alignments are known.
This patch by itself in a NFC. Future patches will make use of this infrastructure to 
implement required policies for code padding.


Differential revision: https://reviews.llvm.org/D34393

Change-Id: I92110d0c0a757080a8405636914a93ef6f8ad00e

LLVM — llvm/trunk/lib/Target/X86 X86CallFrameOptimization.cpp X86TargetMachine.cpp, llvm/trunk/test/CodeGen/X86 movtopush.mir

X86: Register the X86CallFrameOptimization pass

The motivation of this change is to enable .mir testing for this pass.
Added one test case to cover the functionality, this same case will be improved by
a future patch.

Reviewers: igorb, guyblank, DavidKreitzer

Reviewed By: guyblank, DavidKreitzer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D38729

LLVM — cfe/trunk/test/Unit lit.cfg.py

[test] Fix clang-test for FreeBSD and NetBSD

Lit tries to inject the shared library paths, but no action is taken
when platform.system() is not recognized, results in an environment
variable with an empty name, which is illegal.

The patch fixes this mechanism for FreeBSD and NetBSD, and gives an
warning on other platforms, so that the latecomers don't have to spend
time on debugging lit.

Thanks Zhihao Yuan for the patch!

Differential Revision: https://reviews.llvm.org/D39162
Delta File
+19 -13 cfe/trunk/test/Unit/lit.cfg.py
+19 -13 1 file

LLVM — cfe/trunk/lib/AST ExprConstant.cpp, cfe/trunk/test/SemaCXX warn-global-constructors.cpp constant-expression-cxx11.cpp

Unnamed bitfields don't block constant evaluation of constexpr ctors

C++14 [dcl.constexpr]p4 states that in the body of a constexpr

> every non-variant non-static data member and base class sub-object
  shall be initialized

However, [class.bit]p2 notes that

> Unnamed bit-fields are not members and cannot be initialized.

Therefore, we should make sure to filter them out of the check that
all fields are initialized.

Fixing this makes the constant evaluator a bit smarter, and
specifically allows constexpr constructors to avoid tripping
-Wglobal-constructors when the type contains unnamed bitfields.

Reviewed at https://reviews.llvm.org/D39035.

LLVM — llvm/trunk/utils/TableGen GlobalISelEmitter.cpp

[globalisel][tablegen] Remove unused InstructionMatcher's. NFC

LLVM — cfe/trunk/lib/Sema SemaTemplate.cpp

Fix template parameter default args missed if redecled

This bug was found via self-build on lld, and worked around
here: https://reviews.llvm.org/rL316180

The issue is that the 'using' causes the lookup to pick up the
first decl. However, when setting inherited default parameters,
we only update 'forward', not 'backward'. SO, only the newest param
list has all the information about the default arguments.

This patch ensures that the list of parameters we look through checks
the newest decl's template parameter list so it doesn't miss a default.

Differential Revision: https://reviews.llvm.org/D39127

LLVM — llvm/trunk/include/llvm/Support raw_ostream.h LockFileManager.h, llvm/trunk/lib/IR Core.cpp

[raw_fd_ostream] report actual error in error messages

Previously, we would emit error messages like "IO failure on output
stream". This change causes use to include information about what
actually went wrong, e.g. "No space left on device".

Reviewers: sunfish, rnk

Reviewed By: rnk

Subscribers: mehdi_amini, llvm-commits, hiraditya

Differential Revision: https://reviews.llvm.org/D39203

LLVM — cfe/trunk/lib/Analysis AnalysisDeclContext.cpp

[Analyzer] Fix for the memory leak: fix typo in if-statement.

LLVM — cfe/trunk/lib/Analysis BodyFarm.cpp, cfe/trunk/test/Analysis call_once.cpp

[Analyzer] Handle implicit function reference in bodyfarming std::call_once

Differential Revision: https://reviews.llvm.org/D39201

LLVM — llvm/trunk/lib/Transforms/ObjCARC PtrState.cpp, llvm/trunk/test/Transforms/ObjCARC invoke-2.ll

ObjCARC: do not increment past the end of the BB

The `BasicBlock::getFirstInsertionPt` call may return `std::end` for the
BB.  Dereferencing the end iterator results in an assertion failure
"(!NodePtr->isKnownSentinel()), function operator*".  Ensure that the
returned iterator is valid before dereferencing it.  If the end is
returned, move one position backward to get a valid insertion point.

LLVM — cfe/trunk/include/clang/Analysis BodyFarm.h AnalysisDeclContext.h, cfe/trunk/lib/Analysis BodyFarm.h AnalysisDeclContext.cpp

[Analyzer] Do not use static storage to for implementations created in BodyFarm.cpp

Differential Revision: https://reviews.llvm.org/D39208

LLVM — cfe/trunk/lib/StaticAnalyzer/Core Store.cpp, cfe/trunk/test/Analysis ptr-arith.c

[analyzer] Fix handling of labels in getLValueElement

In getLValueElement Base may represent the address of a label 
(as in the newly-added test case), in this case it's not a loc::MemRegionVal 
and Base.castAs<loc::MemRegionVal>() triggers an assert, this diff makes 
getLValueElement return UnknownVal instead.

Differential revision: https://reviews.llvm.org/D39174

LLVM — llvm/trunk/include/llvm/DebugInfo/CodeView CodeViewSymbols.def, llvm/trunk/lib/DebugInfo/CodeView TypeIndexDiscovery.cpp

[codeview] Add support for inlinee lists

This adds type index discovery and dumper support for symbol record kind
0x1168, which is a list of inlined function ids. This symbol kind is
undocumented, but S_INLINEES is consistent with the existing

Fixes PR34222

LLVM — llvm/trunk/include/llvm/IR PassManager.h

[PM] Fix Typo

Patch by Nick Sarnie.

LLVM — llvm/trunk/lib/CodeGen MachineOutliner.cpp, llvm/trunk/test/CodeGen/AArch64 machine-outliner-remarks.ll

[MachineOutliner] Add optimisation remarks for successful outlining

This commit adds optimisation remarks for outlining which fire when a function
is successfully outlined.

To do this, OutlinedFunctions must now contain references to their Candidates.
Since the Candidates must still be sorted and worked on separately, this is
done by working on everything in terms of shared_ptrs to Candidates. This is
good; it means that we can easily move everything to outlining in terms of
the OutlinedFunctions rather than the individual Candidates. This is far more
intuitive than what's currently there!

(Remarks are output when a function is created for some group of Candidates.
In a later commit, all of the outlining logic should be rewritten so that we
loop over OutlinedFunctions rather than over Candidates.)

LLVM — libcxx/trunk/fuzzing fuzzing.cpp fuzzing.h

More fuzzing interfaces

LLVM — lldb/trunk/packages/Python/lldbsuite/test dotest.py

[lldbtests] Handle errors instead of crashing.

If you pass an invalid compiler/debugger path on the cmdline to `dotest.py`  this is what 
you get.

  Traceback (most recent call last):
    File "dotest.py", line 7, in <module>

And with the patch applied:

  /home/davide/work/build-lldb/bin/clandasfasg is not a valid path, exiting

Differential Revision:  https://reviews.llvm.org/D39199

LLVM — lld/trunk/test/COFF pdb-thunk.yaml

[PDB] Add test for S_THUNK32 records

I locally reverted r316385 and confirmed that this test fails without

Really fixes the cause of PR35014.
Delta File
+2,747 -0 lld/trunk/test/COFF/pdb-thunk.yaml
+2,747 -0 1 file

LLVM — lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server gdbremote_testcase.py

Use ipv4 localhost address in lldb-server tests

Since the ipv6 patch, we've experienced occasional flakyness in
lldb-server tests. This was due to the fact that lldb-server was trying
to listen on both v4 and v6 localhost sockets (and consider it a success
if at least one of them succeeded), while the test framework was only
trying to connect to the v4 one.

This change makes sure lldb-server only listens on the v4 socket.

LLVM — lldb/trunk/source/Symbol Symtab.cpp

[Symbol] Remove dead code. NFCI.
Delta File
+0 -23 lldb/trunk/source/Symbol/Symtab.cpp
+0 -23 1 file

LLVM — llvm/trunk/lib/Target/AMDGPU AMDGPUSubtarget.cpp Processors.td

AMDGPU: Initialize WavefrontSize from TD files

Differential Revision: https://reviews.llvm.org/D39205

LLVM — llvm/trunk/test/CodeGen/ARM/GlobalISel arm-legalize-divmod.mir arm-instruction-select.mir

[GISel][ARM]: Fix illegal Generic copies in tests

This is in preparation for a verifier check that makes sure
copies are of the same size (when generic virtual registers are involved).

LLVM — llvm/trunk/test/CodeGen/AArch64/GlobalISel select-int-ext.mir select-store.mir

[GISel][AArch64]: Fix illegal Generic copies in tests

This is in preparation for a verifier check that makes sure copies are
of the same size (when generic virtual registers are involved).

LLVM — lld/trunk/COFF PDB.cpp

[PDB] Fix logging of bad type indices
Delta File
+1 -1 lld/trunk/COFF/PDB.cpp
+1 -1 1 file

LLVM — llvm/trunk/lib/DebugInfo/CodeView TypeIndexDiscovery.cpp

[codeview] Recognize two records with no type index fields

Thunk records do not have types and frame cookies do not have types.

These were found while linking libconcrt.lib from MSVC.

LLVM — llvm/trunk/lib/Passes PassBuilder.cpp, llvm/trunk/test/Other new-pm-pgo.ll

[PM] Add pgo-memop-opt pass to the new pass manager

This pass adds pgo-memop-opt pass to the new pass manager.
It is in the old pass manager but somehow left out in the new pass manager.

Differential Revision: http://reviews.llvm.org/D39145

LLVM — llvm/trunk/lib/Target/X86 X86ISelLowering.cpp, llvm/trunk/test/CodeGen/X86 bitcast-and-setcc-128.ll bitcast-setcc-256.ll

[X86][SSE] combineBitcastvxi1 - use PACKSSWB directly to pack v8i16 to v16i8

Avoid difficulties determining the number of sign bits later on in shuffle lowering to 
lower to PACKSS

LLVM — cfe/trunk/include/clang/Basic DiagnosticSemaKinds.td DiagnosticGroups.td, cfe/trunk/lib/Sema SemaDecl.cpp SemaDeclObjC.cpp

[Sema] Add support for flexible array members in Obj-C.

Allow Obj-C ivars with incomplete array type but only as the last ivar.
Also add a requirement for ivars that contain a flexible array member to
be at the end of class too. It is possible to add in a subclass another
ivar at the end but we'll emit a warning in this case. Also we'll emit a
warning if a variable sized ivar is declared in class extension or in
implementation because subclasses won't know they should avoid adding
new ivars.

In ARC incomplete array objects are treated as __unsafe_unretained so
require them to be marked as such.

Prohibit synthesizing ivars with flexible array members because order of
synthesized ivars is not obvious and tricky to control. Spelling out
ivar explicitly gives control to developers and helps to avoid surprises
with unexpected ivar ordering.

For C and C++ changed diagnostic to tell explicitly a field is not the
last one and point to the next field. It is not as useful as in Obj-C
but it is an improvement and it is consistent with Obj-C. For C for
unions emit more specific err_flexible_array_union instead of generic


    [8 lines not shown]

LLVM — llvm/trunk/include/llvm/ADT Triple.h, llvm/trunk/lib/Support Triple.cpp

Add a new Simulator entry for the target triple environment.

Apple's iOS, tvOS and watchOS simulator platforms have never been clearly
distinguished in the target triples. Even though they are intended to
behave similarly to the corresponding device platforms, they have separate
SDKs and are really separate platforms from the compiler's perspective.
Clang now defines a macro when building for one of these simulator platforms
(r297866) but that relies on the very indirect mechanism of checking to see
which option was used to specify the minimum deployment target. That is not
so great. Swift would also like to distinguish these simulator platforms in
a similar way, but unlike Clang, Swift does not use a separate option to
specify the minimum deployment target -- it uses a -target option to
specify the target triple directly, including the OS version number.
Using a different target triple for the simulator platforms is a much
more direct and obvious way to specify this. Putting the "simulator" in
the environment component of the triple means the OS values can stay the
same and existing code the looks at the OS field will not be affected.


LLVM — cfe/trunk/lib/Driver/ToolChains Fuchsia.cpp Fuchsia.h, cfe/trunk/test/Driver fuchsia.c fuchsia.cpp

[Driver] Use ld.lld directly for Fuchsia rather than passing flavor

Passing a flavor to LLD requires command line argument, but if these
are being passed through a response file, this will fail because LLD
needs to know which driver to use before processing the response file.
Use ld.lld directly instead to avoid this issue.

Differential Revision: https://reviews.llvm.org/D39176

LLVM — lld/trunk/ELF LinkerScript.cpp LinkerScript.h

Make Ctx a plain pointer again.

If a struct has a std::unique_ptr member, the logical interpretation
is that that member will be destroyed with the struct.

That is not the case for Ctx. It is has to be deleted earlier and its
lifetime is defined by the functions where the AddressState is

LLVM — llvm/trunk/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

Fix buildbot breakage

SP is only used in an assert. Caused by r316374.

LLVM — lld/trunk/test/ELF got32-i386-pie-rw.s

Document a change of behavior in r315552.

We used to reject this, but we now accept. The output seems
reasonable, so this is probably an OK extension over bfd/gold.

LLVM — llvm/trunk/tools/llvm-cfi-verify/lib FileAnalysis.cpp FileAnalysis.h, llvm/trunk/unittests/tools/llvm-cfi-verify GraphBuilder.cpp FileAnalysis.cpp

Made llvm-cfi-verify not execute unit tests on non-x86 builds.

Patched out from D38427.

Reviewers: vlad.tsyrklevich

Reviewed By: vlad.tsyrklevich

Subscribers: llvm-commits, kcc, pcc, mgorny

Differential Revision: https://reviews.llvm.org/D39197

LLVM — llvm/trunk/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp LegalizeTypes.h, llvm/trunk/test/CodeGen/AArch64 no-fp-asm-clobbers-crash.ll

Don't crash when we see unallocatable registers in clobbers

This fixes a bug where we'd crash given code like the test-case from
https://bugs.llvm.org/show_bug.cgi?id=30792 . Instead, we let the
offending clobber silently slide through.

This doesn't fully fix said bug, since the assembler will still complain
the moment it sees a crypto/fp/vector op, and we still don't diagnose
calls that require vector regs.

Differential Revision: https://reviews.llvm.org/D39030

LLVM — llvm/trunk/tools/llvm-cfi-verify CMakeLists.txt, llvm/trunk/tools/llvm-cfi-verify/lib GraphBuilder.cpp GraphBuilder.h

Graph builder implementation.

Implement a localised graph builder for indirect control flow
instructions. Main interface is through GraphBuilder::buildFlowGraph,
which will build a flow graph around an indirect CF instruction. Various
modifications to FileVerifier are also made to const-expose some members
needed for machine code analysis done by the graph builder.

Reviewers: vlad.tsyrklevich

Reviewed By: vlad.tsyrklevich

Subscribers: llvm-commits, kcc, pcc

Differential Revision: https://reviews.llvm.org/D38427

LLVM — llvm/trunk/lib/Target/PowerPC PPCMIPeephole.cpp, llvm/trunk/test/CodeGen/PowerPC ppc64-peephole-swap.ll

Revert "[PowerPC] Try to simplify a Swap if it feeds a Splat"

Revert commit r316366.
Previous commit causes p8-scalar_vector_conversions.ll to fail.

This reverts commit 990e764ad8a2eec206ce5dda6aefab059ccd4e92.

LLVM — lld/trunk/COFF Driver.cpp Error.cpp, lld/trunk/MinGW Driver.cpp

lld::COFF: better behavior when using as a library

Previously, the COFF driver would call exit(0) when called
as a library.  Now it takes `ExitEarly` option, and if it
is false, it doesn't exit.  So it is now more library-friendly.

Furthermore, link() calls freeArena() before returning, to
clean up resources.

Based on an Andrew Kelley's patch.

Differential Revision: https://reviews.llvm.org/D39202

LLVM — llvm/trunk/lib/Transforms/Scalar GVNSink.cpp

[GVNSink] Fix failing GVNSink tests in the reverse iteration bot


The elts of ActivePreds which is defined as a SmallPtrSet are copied
into Blocks using std::copy. This makes the resultant order of Blocks
non-deterministic. We cannot simply sort Blocks as they need to match
the corresponding Values. So a better approach is to define ActivePreds
as SmallSetVector.

This fixes the following failures in
  LLVM :: Transforms/GVNSink/indirect-call.ll
  LLVM :: Transforms/GVNSink/sink-common-code.ll
  LLVM :: Transforms/GVNSink/struct.ll

Reviewers: dberlin, jmolloy, bkramer, efriedma

Reviewed By: dberlin

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D39025

LLVM — lldb/trunk/include/lldb/Utility Log.h Logging.h, lldb/trunk/source/Host/posix ProcessLauncherPosixFork.cpp

Logging: Disable logging after fork()

We had a bug where if we had forked (in the ProcessLauncherPosixFork)
while another thread was writing a log message, we would deadlock. This
happened because the fork child inherited the locked log rwmutex, which
would never get unlocked. This meant the child got stuck trying to
disable all log channels.

The bug existed for a while but only started being apparent after
D37930, which started using ThreadLauncher (which uses logging) instead
of std::thread (which does not) for launching TaskPool threads.

The fix is to use pthread_atfork to disable logging in the forked child.

Reviewers: zturner, eugene, clayborg

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D38938

LLVM — llvm/trunk/lib/Target/Hexagon HexagonISelLowering.cpp, llvm/trunk/test/CodeGen/Hexagon call-ret-i1.ll

[Hexagon] Return the correct chain edge for i1 function calls

In HexagonISelLowering, there is code to handle the case when
a function returns an i1 type. In this case, we need to generate
extra nodes to copy the result from R0 to a predicate register.

The code was returning the wrong value for the chain edge which
caused an assert "Wrong topological sorting" when converting the
instructions to MIs.

This patch fixes the problem by returning the chain for the final

Patch by Brendon Cahoon.

LLVM — llvm/trunk/lib/Target/PowerPC PPCMIPeephole.cpp, llvm/trunk/test/CodeGen/PowerPC ppc64-peephole-swap.ll

[PowerPC] Try to simplify a Swap if it feeds a Splat

If we have the situation where a Swap feeds a Splat we can sometimes change the
index on the Splat and then remove the Swap instruction.

Differential Revision: https://reviews.llvm.org/D39009

LLVM — lld/trunk/ELF InputSection.h

LLD: Fix large integer implicitly truncated to unsigned type gcc warning

This fixes gcc warning.

Change by Brian Sumner
Delta File
+1 -1 lld/trunk/ELF/InputSection.h
+1 -1 1 file

LLVM — llvm/trunk/lib/Target/Hexagon HexagonPatterns.td, llvm/trunk/test/CodeGen/Hexagon addaddi.ll

[Hexagon] Add extra pattern for S4_addaddi

One combination was missing: add(add(x,y),c).