Displaying 1 50 of 185,977 commits (0.012s)

LLVM — llvm/trunk/lib/IR Verifier.cpp, llvm/trunk/test/Verifier range-1.ll

Extend the verifier to validate range metadata on calls and invokes.

Range metadata applies to loads, call, and invokes.  We were validating that metadata 
applied to loads was correct according to the LangRef, but we were not validating metadata 
applied to calls or invokes.  This change extracts the checking functionality to a common 
location, reuses it for all valid locations, and adds a simple test to ensure a misused 
range on a call gets reported.

LLVM — llvm/trunk/include/llvm/Object ELFObjectFile.h ELFTypes.h, llvm/trunk/include/llvm/Support ELF.h

[MCJIT] Make MCJIT honor symbol visibility settings when populating the global
symbol table.

Patch by Anthony Pesch. Thanks Anthony!

LLVM — cfe/trunk/docs UsersManual.rst, cfe/trunk/lib/Basic Targets.cpp

Switch C compilations to C11 by default.

This is long-since overdue, and matches GCC 5.0. This should also be
backwards-compatible, because we already supported all of C11 as an extension
in C99 mode.

LLVM — cfe/trunk/lib/Driver WindowsToolChain.cpp Tools.cpp

Revert "Improve Windows toolchain support for non-standard environments." (r220226)

In environments where PATH was set to point to the VS installation, Clang would
override that by looking in the registry and finding the latest VS installation.

If the environment is set up to point to a VS installation, that should take

Reverting this until we can fix it.

LLVM — llvm/trunk/lib/Target/X86 X86ISelLowering.cpp, llvm/trunk/test/CodeGen/X86 vselect-avx.ll

[X86] Fix a bug in the lowering of the mask of VSELECT.
X86 code to lower VSELECT messed a bit with the bits set in the mask of VSELECT
when it knows it can be lowered into BLEND. Indeed, only the high bits need to be
set for those and it optimizes those accordingly.
However, when the mask is a compile time constant, the lowering will be handled
by the generic optimizer and those modifications will generate bad code in the
generic optimizer.

This patch fixes that by preventing the optimization if the VSELECT will be
handled by the generic optimizer.


LLVM — cfe/trunk/lib/Driver Driver.cpp Tools.cpp

Driver: Consolidate the logic for naming the module crashdump cache

List the module cache we use for crashdumps as a tempfile. This
simplifies how we pick up this directory when generating the actual
crash diagnostic and removes some duplicate logic.

LLVM — llvm/trunk/docs LangRef.rst, llvm/trunk/lib/Analysis ValueTracking.cpp

Introduce a 'nonnull' metadata on Load instructions.

The newly introduced 'nonnull' metadata is analogous to existing 'nonnull' attributes, but 
applies to load instructions rather than call arguments or returns.  Long term, it would 
be nice to combine these into a single construct.   The value of the load is allowed to 
vary between successive loads, but null is not a valid value to be loaded by any load 
marked nonnull.

Reviewed by: Hal Finkel
Differential Revision:  http://reviews.llvm.org/D5220

LLVM — llvm/trunk/lib/Target/X86 X86InstrInfo.cpp X86InstrInfo.h, llvm/trunk/test/CodeGen/X86 fold-tied-op.ll avx1-stack-reload-folding.ll

[X86] Memory folding for commutative instructions (updated)

This patch improves support for commutative instructions in the x86 memory folding 
implementation by attempting to fold a commuted version of the instruction if the original 
folding fails - if that folding fails as well the instruction is 're-commuted' back to its 
original order before returning.

Updated version of r219584 (reverted in r219595) - the commutation attempt now explicitly 
ensures that neither of the commuted source operands are tied to the destination operand / 
register, which was the source of all the regressions that occurred with the original 
patch attempt.

Added additional regression test case provided by Joerg Sonnenberger.

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

LLVM — cfe/trunk/lib/Driver Driver.cpp

Driver: Name crashdump scripts after the first temp file

In practice there's only ever one temporary output file when
generating a crashdump, but even if there were many iterating over
each and creating a duplicate run script for each one wouldn't make
very much sense.

This updates the behaviour to only generate the script once, based on
the first filename.

This should make it more reasonable to generate extra output files to
include in the crashdump going forward, so I've also added a FIXME to
look into doing just that with the extra module crashdump files.
Delta File
+54 -42 cfe/trunk/lib/Driver/Driver.cpp
+54 -42 1 file

LLVM — llvm/trunk/cmake/modules AddLLVM.cmake

Explain why we don't always use --gc-sections.

LLVM — llvm/trunk/lib/Target/ARM Thumb1RegisterInfo.cpp ARMInstrThumb.td, llvm/trunk/test/CodeGen/ARM thumb1-varalloc.ll

ARM: rework Thumb1 frame index rewriting

The previous code had a few problems, motivating the choices here.

1. It could create instructions clobbering CPSR, but the incoming MachineInstr
   didn't reflect this. A potential source of corruption. This is why the patch
   has a new PseudoInst for before lowering.
2. Similarly, there was some code to handle the incoming instruction not being
   ARMCC::AL, but this would have caused massive problems if it was actually
   invoked when a complex offset needing more than one instruction was requested.
3. It wasn't designed to handle unaligned pointers (or offsets). These should
   probably be minimised anyway, but the code needs to deal with them properly
4. It had some rather dubious ad-hoc code to avoid calling
   emitThumbRegPlusImmediate, a function which should be designed to do precisely
   this job.

We seem to cover the common cases correctly now, and hopefully can enhance
emitThumbRegPlusImmediate to handle any extra optimisations we need to add in

LLVM — cfe/trunk/lib/Driver Driver.cpp

Driver: Use an early return instead of a long if condition (NFC)

This just flattens an if block by returning early on the "else"
Delta File
+55 -56 cfe/trunk/lib/Driver/Driver.cpp
+55 -56 1 file

LLVM — cfe/trunk/include/clang/Driver Driver.h, cfe/trunk/lib/Driver Driver.cpp

Driver: Make FailingCommand mandatory for generateCompilationDiagnostics

We currently use a null FailingCommand when generating crash reports
as an indication that the cause is FORCE_CLANG_DIAGNOSTICS_CRASH, the
environment variable that exists to test crash dumps. This means that
our tests don't actually cover real crashes at all, and adds a more
complicated code path that's only used in the tests.

Instead, we can have the driver synthesize that every command failed
and just call generateCompilationDiagnostics normally.

LLVM — llvm/trunk/include/llvm/Support ErrorOr.h

Try to fix GCC error about invalid use of const_cast in const version of ErrorOr::get()

LLVM — llvm/trunk/include/llvm/Object ELFObjectFile.h

Constify getELFDynamicSymbolIterators standalone function. NFC.

LLVM — llvm/trunk/include/llvm/Object Binary.h

Add const version of OwningBinary::getBinary

LLVM — llvm/trunk/include/llvm/Object MachOUniversal.h, llvm/trunk/lib/Object MachOUniversal.cpp

Be more specific about return type of MachOUniversalBinary::getObjectForArch

LLVM — cfe/trunk/lib/CodeGen CGDebugInfo.cpp

Fix whitespace introduced in r220221

Post commit review feedback from Yaron Keren.

LLVM — llvm/trunk/include/llvm/DebugInfo DIContext.h, llvm/trunk/include/llvm/Object RelocVisitor.h

Constify input argument of RelocVisitor and DWARFContext constructors. NFC.

LLVM — llvm/trunk/utils/lit/lit TestRunner.py

Teach Lit to catch OSError exceptions when creating a process during the
execution of a shell command. This can happen for example if the
``RUN:`` line calls a python script which can work correctly under
Linux/OSX but will not work under Windows. A more useful error message
is now shown rather than an unhelpful backtrace.

LLVM — cfe/trunk/lib/Driver WindowsToolChain.cpp Tools.cpp

Improve Windows toolchain support for non-standard environments.

Typically clang finds Visual Studio by the user explicitly setting
up a Visual Studio environment via vcvarsall.  But we still try to
behave intelligently and fallback to different methods of finding
Visual Studio when this is not done.  This patch improves various
fallback codepaths to make Visual Studio locating more robust.

Specifically, this patch:

* Adds support for searching environment variables for VS 12.0
* Correctly locates include folders for Windows SDK 8.x (this was
  previously broken, and would cause clang to error)
* Prefers locating link.exe in the same location as cl.exe.  This
  is helpful in case another link.exe is in the path earlier than
  Visual Studio (e.g. GnuWin32)
* Minor cleanup in the registry reading code to make it more
  robust in the presence of long pathnames.

LLVM — llvm/trunk/lib/IR Function.cpp, llvm/trunk/utils/TableGen IntrinsicEmitter.cpp

Moved out IIT_V64 from common values section.
Thanks Juergen Ributzka for notice.

LLVM — cfe/trunk/lib/CodeGen CGDebugInfo.cpp, cfe/trunk/test/CodeGenCXX debug-info-template.cpp

PR21312: Fix a regression in non-type template parameters of function type that are static 
member functions.

LLVM — lldb/trunk/source/Expression ClangExpressionDeclMap.cpp ClangUserExpression.cpp

Don't allow the expression parser to magically
look through 'self' at its ivars.  It produces
surprising results.


LLVM — lldb/trunk/test/lang/objc/objc-new-syntax TestObjCNewSyntax.py

Skip dsym test on !Darwin

r219978 fixed this test to work on Darwin, and removed the expected
failure decorator, but it then started running (and failing) on FreeBSD.

I'd think @dsym_test should skip the test on all non-Darwin operating
systems. It seems not to be the case, so for now skip it the same way as
done for other @dsym_test tests.

LLVM — lldb/trunk/source/Expression ClangExpressionParser.cpp

Don't use mkstemp, as it doesn't exist on Windows.

Differential Revision: http://reviews.llvm.org/D5849
Reviewed by: Jason Molenda

LLVM — lldb/trunk/include/lldb lldb-defines.h, lldb/trunk/include/lldb/Host Host.h

Remove LLDB_DEFAULT_SHELL #define, and determine this at runtime.

Differential Revision: http://reviews.llvm.org/D5805
Reviewed by: Greg Clayton

LLVM — cfe/trunk/lib/CodeGen CGDebugInfo.cpp

Fix indentation.

LLVM — cfe/trunk/include/clang/Sema DeclSpec.h, cfe/trunk/lib/Parse ParseDecl.cpp ParseExprCXX.cpp

Add RestrictQualifierLoc to DeclaratorChunk::FunctionTypeInfo

Clang supports __restrict__ as a function qualifier, but
DeclaratorChunk::FunctionTypeInfo lacked a field to track the qualifier's
source location (as we do with volatile, etc.). This was the subject of a FIXME
in GetFullTypeForDeclarator (in SemaType.cpp). This should also prove useful as
we add more warnings regarding questionable uses of the restrict qualifier.

There is no significant functional change (except for an improved source range
associated with the err_invalid_qualified_function_type diagnostic fixit
generated by GetFullTypeForDeclarator).

LLVM — cfe/trunk/lib/Serialization ASTReader.cpp

Revert most of r215810, which is no longer needed

Now that we no longer add mappings when there are no local entities,
there is no need to always bump the size of the tables that correspond
to ContinuousRangeMaps.

LLVM — cfe/trunk/lib/Serialization ASTReader.cpp ASTWriter.cpp

Don't add ID mappings for offsets with no entities in a module

This is a better fix for 'duplicate key' problems in module continuous
range maps (vs what I added in r215810) by not adding any mappings at
all when there are no local entities. Now it also covers selectors,
which were not always being bumped because the record SELECTOR_OFFSET is
not always emitted.  I'll back out most of r215810 in a future commit,
since it should no longer be needed.

LLVM — llvm/trunk/test/CodeGen/AArch64 arm64-bcc.ll

[AArch64] test case for compfail fixed by r219748

LLVM — llvm/trunk/lib/IR Function.cpp

Fix Intrinsic::getType not working with vararg

VarArg Intrinsic functions are encoded with "void" type as the last
argument. Now Intrinsic::getType can correctly return all the intrinsic
function type.
Delta File
+6 -0 llvm/trunk/lib/IR/Function.cpp
+6 -0 1 file

LLVM — llvm/trunk/lib/Target/ARM ARMInstrThumb2.td, llvm/trunk/test/MC/ARM thumb2-exception-return-mclass.s

[Thumb2] RFE, SRS and "SUBS pc, lr" are undefined on v7M

These instructions are related to the v7[AR] exception model, and are
not defined on v7M.

LLVM — cfe/trunk/lib/Format TokenAnnotator.cpp, cfe/trunk/unittests/Format FormatTest.cpp

clang-format: Fix overloaded operator edge case.

  template <class F>
  void Call(F f) {
    f.template operator() <int>();

  template <class F>
  void Call(F f) {
    f.template operator()<int>();

LLVM — cfe/trunk/test/Driver arm-cortex-cpus.c

D5823: Fix typo in Clang test arm-cortex-cpus.c; patch by Gabor Ballabas!

LLVM — llvm/trunk/lib/Target/Hexagon/InstPrinter HexagonInstPrinter.cpp

Remove unnecessary else.

LLVM — llvm/trunk/cmake/modules AddLLVM.cmake

Revert r220174, "Always use -Wl,-gc-sections on our build."

It dropped required functions for plugins with gnu ld 2.20 and 2.21.

  Failing Tests (1):
      LLVM :: Feature/load_module.ll

  Hello: bin/opt: symbol lookup error: lib/LLVMHello.so: undefined symbol: 

  Failing Tests (1):
      Clang :: Frontend/plugins.c

  error: unable to load plugin 'lib/PrintFunctionNames.so': 'lib/PrintFunctionNames.so: 
undefined symbol: _ZN5clang15PluginASTAction6anchorEv'

I think we should inspect linker's version or behavior to introduce --gc-sections for 

LLVM — cfe/trunk/lib/Format TokenAnnotator.cpp, cfe/trunk/unittests/Format FormatTest.cpp

clang-format: [ObjC] Fix using selector names as macro arguments.

  [self aaaaa:MACRO(a, b :, c :)];

  [self aaaaa:MACRO(a, b:, c:)];

LLVM — llvm/trunk/lib/Target/ARM ARMInstrInfo.td ARMInstrThumb2.td, llvm/trunk/test/CodeGen/ARM smulw.ll

[ARM] Do not select SMULW[BT] or SMLAW[BT]

The current instruction selection patterns for SMULW[BT] and SMLAW[BT]
are incorrect. These instructions multiply a 32-bit and a 16-bit value
(both signed) and return the top 32 bits of the 48-bit result. This
preserves the 16 bits of overflow, whereas the patterns they currently
match truncate the result to 16 bits then sign extend.

To select these instructions, we would need to match an ISD::SMUL_LOHI,
a sign extend, two shifts and an or. There is no way to match SMUL_LOHI
in an instruction pattern as it defines multiple values, so this would
have to be done in C++. I have raised
http://llvm.org/bugs/show_bug.cgi?id=21297 to cover allowing correct
selection of these instructions.

This fixes http://llvm.org/bugs/show_bug.cgi?id=19396

LLVM — cfe/trunk/lib/Format TokenAnnotator.cpp, cfe/trunk/unittests/Format FormatTest.cpp

clang-format: Fix indentation of struct definitions with array init.

  struct {
    int x;
    int y;
  } points[] = {
        {1, 2}, {2, 3},

  struct {
    int x;
    int y;
  } points[] = {
      {1, 2}, {2, 3},

LLVM — llvm/trunk/lib/Target/ARM Thumb1RegisterInfo.cpp, llvm/trunk/test/CodeGen/Thumb large-stack.ll

[Thumb] Fix crash in Thumb1RegisterInfo::rewriteFrameIndex

This function can, for some offsets from the SP, split one instruction
into two. Since it re-uses the original instruction as the first
instruction of the result, we need ensure its result register is not
marked as dead before we use it in the second instruction.

LLVM — llvm/trunk/include/llvm/IR DataLayout.h, llvm/trunk/lib/IR DataLayout.cpp

Switch the default DataLayout to be little endian, and make the variable
be BigEndian so the default can continue to be zero-initialized.

This is one of the prerequisites to making DataLayout a constant and
always available part of every module.

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

Remove some completely superfluous trailing comments and clang-format
this header to remove numerous formatting inconsistencies that impede
making simple changes here without large diffs.
Delta File
+36 -53 llvm/trunk/include/llvm/IR/DataLayout.h
+36 -53 1 file

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

Clean up the comments and doxygen for DataLayout.
Delta File
+99 -96 llvm/trunk/include/llvm/IR/DataLayout.h
+99 -96 1 file

LLVM — llvm/trunk/lib/Analysis Loads.cpp, llvm/trunk/test/Transforms/InstCombine load.ll

Fix a miscompile introduced in r220178.

The original code had an implicit assumption that if the test for
allocas or globals was reached, the two pointers were not equal. With my
changes to make the pointer analysis more powerful here, I also had to
guard against circumstances where the results weren't useful. That in
turn violated the assumption and gave rise to a circumstance in which we
could have a store with both the queried pointer and stored pointer
rooted at *the same* alloca. Clearly, we cannot ignore such a store.
There are other things we might do in this code to better handle the
case of both pointers ending up at the same alloca or global, but it
seems best to at least make the test explicit in what it intends to

I've added tests for both the alloca and global case here.

LLVM — cfe/trunk/test/Layout itanium-union-bitfield.cpp

Commit to test commit access

LLVM — cfe/trunk/lib/CodeGen TargetInfo.cpp

CodeGen: Update for LLVM API change

Callers of DataLayout::RoundUpAlignment should switch to

LLVM — llvm/trunk/include/llvm/IR DataLayout.h, llvm/trunk/include/llvm/Support MathExtras.h

IR: Replace DataLayout::RoundUpAlignment with RoundUpToAlignment

No functional change intended, just cleaning up some code.

LLVM — llvm/trunk/lib/Transforms/Scalar JumpThreading.cpp, llvm/trunk/test/Transforms/JumpThreading thread-loads.ll

Fix a somewhat subtle pair of issues with JumpThreading I introduced in
r220178. First, the creation routine doesn't insert prior to the
terminator of the basic block provided, but really at the end of the
basic block. Instead, get the terminator and insert before that. The
next issue was that we need to ensure multiple PHI node entries for
a single predecessor re-use the same cast instruction rather than
creating new ones.

All of the logic here was without tests previously. I've reduced and
added a test case from the test suite that crashed without both of these