lp:~vcs-imports/llvm/clang-trunk

Created by Jelmer Vernooij on 2011-06-07 and last modified on 2017-12-17
Get this branch:
bzr branch lp:~vcs-imports/llvm/clang-trunk

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
VCS imports
Project:
LLVM
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the Subversion branch from http://llvm.org/svn/llvm-project/cfe/trunk.

The next import is scheduled to run in 4 hours.

Last successful import was 1 hour ago.

Import started 1 hour ago on pear and finished 1 hour ago taking 40 seconds — see the log
Import started 7 hours ago on pear and finished 7 hours ago taking 25 seconds — see the log
Import started 13 hours ago on pear and finished 13 hours ago taking 30 seconds — see the log
Import started 19 hours ago on pear and finished 19 hours ago taking 30 seconds — see the log
Import started on 2017-12-16 on pear and finished on 2017-12-16 taking 30 seconds — see the log
Import started on 2017-12-16 on pear and finished on 2017-12-16 taking 40 seconds — see the log
Import started on 2017-12-16 on russkaya and finished on 2017-12-16 taking 1 minute — see the log
Import started on 2017-12-15 on russkaya and finished on 2017-12-15 taking 1 minute — see the log
Import started on 2017-12-15 on pear and finished on 2017-12-15 taking 30 seconds — see the log
Import started on 2017-12-15 on russkaya and finished on 2017-12-15 taking 40 seconds — see the log

Recent revisions

71645. By a.sidorin 3 hours ago

[ASTImporter] Support importing FunctionTemplateDecl and CXXDependentScopeMemberExpr

* Also introduces ImportTemplateArgumentListInfo facility (A. Sidorin)

Patch by Peter Szecsi!

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

71644. By spatel on 2017-12-16

[Driver, CodeGen] pass through and apply -fassociative-math

There are 2 parts to getting the -fassociative-math command-line flag translated to LLVM FMF:

1. In the driver/frontend, we accept the flag and its 'no' inverse and deal with the
   interactions with other flags like -ffast-math -fno-signed-zeros -fno-trapping-math.
   This was mostly already done - we just need to translate the flag as a codegen option.
   The test file is complicated because there are many potential combinations of flags here.
   Note that we are matching gcc's behavior that requires 'nsz' and no-trapping-math.

2. In codegen, we map the codegen option to FMF in the IR builder. This is simple code and
   corresponding test.

For the motivating example from PR27372:

float foo(float a, float x) { return ((a + x) - x); }

$ ./clang -O2 27372.c -S -o - -ffast-math -fno-associative-math -emit-llvm | egrep 'fadd|fsub'
  %add = fadd nnan ninf nsz arcp contract float %0, %1
  %sub = fsub nnan ninf nsz arcp contract float %add, %2

So 'reassoc' is off as expected (and so is the new 'afn' but that's a different patch).
This case now works as expected end-to-end although the underlying logic is still wrong:

$ ./clang -O2 27372.c -S -o - -ffast-math -fno-associative-math | grep xmm
 addss %xmm1, %xmm0
 subss %xmm1, %xmm0

We're not done because the case where 'reassoc' is set is ignored by optimizer passes. Example:

$ ./clang -O2 27372.c -S -o - -fassociative-math -fno-signed-zeros -fno-trapping-math -emit-llvm | grep fadd
  %add = fadd reassoc float %0, %1

$ ./clang -O2 27372.c -S -o - -fassociative-math -fno-signed-zeros -fno-trapping-math | grep xmm
 addss %xmm1, %xmm0
 subss %xmm1, %xmm0

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

71643. By ctopper on 2017-12-16

[X86] Implement kand/kandn/kor/kxor/kxnor/knot intrinsics using native IR.

71642. By ctopper on 2017-12-16

[X86] Add the two files I forgot to commit in r320915.

71641. By ctopper on 2017-12-16

[X86] Add builtins and tests for 128 and 256 bit vpopcntdq.

71640. By hfinkel on 2017-12-16

[VerifyDiagnosticConsumer] support -verify=<prefixes>

This mimics FileCheck's --check-prefixes option.

The default prefix is "expected". That is, "-verify" is equivalent to
"-verify=expected".

The goal is to permit exercising a single test suite source file with different
compiler options producing different sets of diagnostics. While cpp can be
combined with the existing -verify to accomplish the same goal, source is often
easier to maintain when it's not cluttered with preprocessor directives or
duplicate passages of code. For example, this patch also rewrites some existing
clang tests to demonstrate the benefit of this feature.

Patch by Joel E. Denny, thanks!

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

71639. By hfinkel on 2017-12-16

[TextDiagnosticBuffer] Fix diagnostic note emission order

The frontend currently groups diagnostics from the command line according to
diagnostic level, but that places all notes last. Fix that by emitting such
diagnostics in the order they were generated.

Patch by Joel E. Denny, thanks!

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

71638. By vedantk on 2017-12-16

[CodeGen] Specialize mixed-sign mul-with-overflow (fix PR34920)

This patch introduces a specialized way to lower overflow-checked
multiplications with mixed-sign operands. This fixes link failures and
ICEs on code like this:

  void mul(int64_t a, uint64_t b) {
    int64_t res;
    __builtin_mul_overflow(a, b, &res);
  }

The generic checked-binop irgen would use a 65-bit multiplication
intrinsic here, which requires runtime support for _muloti4 (128-bit
multiplication), and therefore fails to link on i386. To get an ICE
on x86_64, change the example to use __int128_t / __uint128_t.

Adding runtime and backend support for 65-bit or 129-bit checked
multiplication on all of our supported targets is infeasible.

This patch solves the problem by using simpler, specialized irgen for
the mixed-sign case.

llvm.org/PR34920, rdar://34963321

Testing: Apart from check-clang, I compared the output from this fairly
comprehensive test driver using unpatched & patched clangs:
https://gist.github.com/vedantk/3eb9c88f82e5c32f2e590555b4af5081

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

71637. By arphaman on 2017-12-15

__is_target_environment: Check the environment after parsing it

This ensures that target triples with environment versions can still work with
__is_target_environment.

71636. By arphaman on 2017-12-15

__is_target_arch: Check the arch and subarch instead of the arch name

This ensures that when compiling for "arm64" __is_target_arch will succeed for
both "arm64" and "aarch64".

Thanks to Bob Wilson who pointed this out!

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers

No subscribers.