6 years ago[llvm-readobj/ELF] Dump DT_VERDEF/DT_VERDEFNUM correctly.
Davide Italiano [Thu, 15 Oct 2015 22:04:55 +0000 (22:04 +0000)]
[llvm-readobj/ELF] Dump DT_VERDEF/DT_VERDEFNUM correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250464 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert "[safestack] Fast access to the unsafe stack pointer on AArch64/Android."
Evgeniy Stepanov [Thu, 15 Oct 2015 21:26:49 +0000 (21:26 +0000)]
Revert "[safestack] Fast access to the unsafe stack pointer on AArch64/Android."

Breaks the hexagon buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250461 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoReplace a forward declaration with an #include.
Adrian Prantl [Thu, 15 Oct 2015 20:58:55 +0000 (20:58 +0000)]
Replace a forward declaration with an #include.
When building with modules the forward-declared inner class
DebugLocStream::ListBuilder causes clang to fall over.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250459 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[safestack] Fast access to the unsafe stack pointer on AArch64/Android.
Evgeniy Stepanov [Thu, 15 Oct 2015 20:50:16 +0000 (20:50 +0000)]
[safestack] Fast access to the unsafe stack pointer on AArch64/Android.

Android libc provides a fixed TLS slot for the unsafe stack pointer,
and this change implements direct access to that slot on AArch64 via
__builtin_thread_pointer() + offset.

This change also moves more code into TargetLowering and its
target-specific subclasses to get rid of target-specific codegen
in SafeStackPass.

This change does not touch the ARM backend because ARM lowers
builting_thread_pointer as aeabi_read_tp, which is not available
on Android.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250456 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[CMake] Adding LLVM_CREATE_XCODE_TOOLCHAIN to the CMake documentation page.
Chris Bieneman [Thu, 15 Oct 2015 20:12:08 +0000 (20:12 +0000)]
[CMake] Adding LLVM_CREATE_XCODE_TOOLCHAIN to the CMake documentation page.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250451 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[CMake] [Darwin] Add support for generating Xcode-compatible toolchains that xcodebui...
Chris Bieneman [Thu, 15 Oct 2015 20:09:01 +0000 (20:09 +0000)]
[CMake] [Darwin] Add support for generating Xcode-compatible toolchains that xcodebuild and xcrun can search

Sometimes you want to install a custom compiler and use it like the system compiler without overriding the system compiler. This patch lets you create xctoolchains that the darwin command line tools can use.

To use this patch set LLVM_CREATE_XCODE_TOOLCHAIN=On in your CMake invocation and build the `install-code-toolchain` target.

After installation you can set the envar EXTERNAL_TOOLCHAINS_DIR to your installed Toolchains directory, and the TOOLCHAINS envar to the toolchain identifier (ex org.llvm.3.8.0svn). This will then cause /usr/bin/clang to call your newly installed clang.

Reviewers: Bigcheese, bogner

Subscribers: tobiasfar, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250450 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAdd a missing include of cstddef needed for size_t.
Adrian Prantl [Thu, 15 Oct 2015 19:41:54 +0000 (19:41 +0000)]
Add a missing include of cstddef needed for size_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250446 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agox86: preserve flags when folding atomic operations
JF Bastien [Thu, 15 Oct 2015 18:24:52 +0000 (18:24 +0000)]
x86: preserve flags when folding atomic operations

D4796 taught LLVM to fold some atomic integer operations into a single
instruction. The pattern was unaware that the instructions clobbered
flags. I fixed some of this issue in D13680 but had missed INC/DEC.

This patch adds the missing EFLAGS definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250438 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agodocs: Stop using DEBUG() without DEBUG_TYPE in the ProgrammersManual
Justin Bogner [Thu, 15 Oct 2015 18:17:44 +0000 (18:17 +0000)]
docs: Stop using DEBUG() without DEBUG_TYPE in the ProgrammersManual

The DEBUG() macro has required that a DEBUG_TYPE be set since r206822.
Update the programmers manual to reflect that, and also update the
wording to point out that DEBUG_TYPE should be defined after #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250436 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SelectionDAG] Remove dead code. NFC.
Benjamin Kramer [Thu, 15 Oct 2015 17:54:06 +0000 (17:54 +0000)]
[SelectionDAG] Remove dead code. NFC.

Carefully selected parts without deleting graph stuff and dumping methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250434 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[AsmPrinter] Prune dead code. NFC.
Benjamin Kramer [Thu, 15 Oct 2015 17:16:32 +0000 (17:16 +0000)]
[AsmPrinter] Prune dead code. NFC.

I left all (dead) print and dump methods in place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250433 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoChange test to use FileCheck rather than grep.
Kevin B. Smith [Thu, 15 Oct 2015 17:05:12 +0000 (17:05 +0000)]
Change test to use FileCheck rather than grep.
Differential Revision: http://reviews.llvm.org/D13751

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250431 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert 250343 and 250344
Philip Reames [Thu, 15 Oct 2015 16:51:00 +0000 (16:51 +0000)]
Revert 250343 and 250344

Turns out this approach is buggy.  In discussion about follow on work, Sanjoy pointed out that we could be subject to circular logic problems.

 if (i u< L) leave()
 if ((i + 1) u< L) leave()
 print(a[i] + a[i+1])

If we know that L is less than UINT_MAX, we could possible prove (in a control dependent way) that i + 1 does not overflow.  This gives us:
 if (i u< L) leave()
 if ((i +nuw 1) u< L) leave()
 print(a[i] + a[i+1])

If we now do the transform this patch proposed, we end up with:
 if ((i +nuw 1) u< L) leave_appropriately()
 print(a[i] + a[i+1])

That would be a miscompile when i==-1.  The problem here is that the control dependent nuw bits got used to prove something about the first condition.  That's obviously invalid.

This won't happen today, but since I plan to enhance LVI/CVP with exactly that transform at some point in the not too distant future...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250430 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agox86 FP atomic codegen: don't drop globals, stack
JF Bastien [Thu, 15 Oct 2015 16:46:29 +0000 (16:46 +0000)]
x86 FP atomic codegen: don't drop globals, stack

x86 codegen is clever about generating good code for relaxed
floating-point operations, but it was being silly when globals and
immediates were involved, forgetting where the global was and
loading/storing from/to the wrong place. The same applied to hard-coded
address immediates.

Don't let it forget about the displacement.

This fixes https://llvm.org/bugs/show_bug.cgi?id=25171

A very similar bug when doing floating-points atomics to the stack is
also fixed by this patch.

This fixes https://llvm.org/bugs/show_bug.cgi?id=25144

Reviewers: pete

Subscribers: llvm-commits, majnemer, rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250429 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoSample Profiles - Adjust integer types. Mostly NFC.
Diego Novillo [Thu, 15 Oct 2015 16:36:21 +0000 (16:36 +0000)]
Sample Profiles - Adjust integer types. Mostly NFC.

This adjusts all integers in the reader/writer to reflect the types
stored on profile files. They should all be unsigned 32-bit or 64-bit
values. Changed all associated internal types to be uint32_t or

The only place that needed some adjustments is in the sample profile
transformation. Altough the weight read from the profile are 64-bit
values, the internal API for branch weights only accepts 32-bit values.
The pass now saturates weights that overflow uint32_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250427 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoPrevent assertion with "llc -debug" and anonymous symbols.
Tim Northover [Thu, 15 Oct 2015 16:18:27 +0000 (16:18 +0000)]
Prevent assertion with "llc -debug" and anonymous symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250425 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoLit: Rework r249161; Move RLIMIT_NPROC to main.py.
NAKAMURA Takumi [Thu, 15 Oct 2015 15:37:13 +0000 (15:37 +0000)]
Lit: Rework r249161; Move RLIMIT_NPROC to main.py.

The message "raised the process limit..." prevented the progress bar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250420 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ScalarOpts] Remove dead code.
Benjamin Kramer [Thu, 15 Oct 2015 15:08:58 +0000 (15:08 +0000)]
[ScalarOpts] Remove dead code.

Does not touch debug dumpers. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250417 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRecommit r250345, it was reverted in r250366 to investigate a bot failure.
Manman Ren [Thu, 15 Oct 2015 14:59:40 +0000 (14:59 +0000)]
Recommit r250345, it was reverted in r250366 to investigate a bot failure.

Our internal bot is still red after r250366.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250415 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[mips][ias] Implement ulh macro.
Daniel Sanders [Thu, 15 Oct 2015 14:52:58 +0000 (14:52 +0000)]
[mips][ias] Implement ulh macro.

This macro is needed to prevent test/CodeGen/Mips/2008-08-01-AsmInline.ll from
failing after the integrated assembler is enabled by default.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250414 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRequire Windows API of version 6.1 (Windows 7).
Pawel Bylica [Thu, 15 Oct 2015 14:50:31 +0000 (14:50 +0000)]
Require Windows API of version 6.1 (Windows 7).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250413 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[NVPTX] Remove dead code.
Benjamin Kramer [Thu, 15 Oct 2015 14:45:41 +0000 (14:45 +0000)]
[NVPTX] Remove dead code.

I left helpers that look useful for debugging alone. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250410 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[mips][mips16] MIPS16 is not a CPU/Architecture but is an ASE.
Daniel Sanders [Thu, 15 Oct 2015 14:34:23 +0000 (14:34 +0000)]
[mips][mips16] MIPS16 is not a CPU/Architecture but is an ASE.

The -mcpu=mips16 option caused the Integrated Assembler to crash because
it couldn't figure out the architecture revision number to write to the
.MIPS.abiflags section. This CPU definition has been removed because, like
microMIPS, MIPS16 is an ASE to a base architecture.

Reviewers: vkalintiris

Subscribers: rkotler, llvm-commits, dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250407 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Rip out orphaned method declarations and other dead code. NFC.
Benjamin Kramer [Thu, 15 Oct 2015 14:09:59 +0000 (14:09 +0000)]
[X86] Rip out orphaned method declarations and other dead code. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250406 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[DebugInfo] Remove dead forwarding accessors. NFC.
Benjamin Kramer [Thu, 15 Oct 2015 13:56:02 +0000 (13:56 +0000)]
[DebugInfo] Remove dead forwarding accessors. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250405 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoSilencing a -Wtype-limits warning; an unsigned value will always be >= 0; NFC.
Aaron Ballman [Thu, 15 Oct 2015 13:55:43 +0000 (13:55 +0000)]
Silencing a -Wtype-limits warning; an unsigned value will always be >= 0; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250404 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAVX512: Implemented DAG lowering for shuff62x2/shufi62x2 instructions ( shuffle packe...
Igor Breger [Thu, 15 Oct 2015 13:29:07 +0000 (13:29 +0000)]
AVX512: Implemented DAG lowering for shuff62x2/shufi62x2 instructions ( shuffle packed values at 128-bit granularity )

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250400 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[CMake] check-llvm requires llvm-pdbdump.
NAKAMURA Takumi [Thu, 15 Oct 2015 13:22:38 +0000 (13:22 +0000)]
[CMake] check-llvm requires llvm-pdbdump.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250399 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAVX512: Implemented encoding and intrinsics for vpternlogd/q.
Igor Breger [Thu, 15 Oct 2015 12:33:24 +0000 (12:33 +0000)]
AVX512: Implemented encoding and intrinsics for vpternlogd/q.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250396 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAVX-512: Fixed a bug in shuffle lowering 32-bit mode
Elena Demikhovsky [Thu, 15 Oct 2015 11:35:33 +0000 (11:35 +0000)]
AVX-512: Fixed a bug in shuffle lowering 32-bit mode

AVX-512 bit shuffle fails on 32 bit since we create a vector of 64-bit constants.
I split 8x64-bit const vector to 16x32 on 32-bit mode.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250390 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86] Merge test pr24562.ll into x86-fold-pshufb.ll. NFC.
Andrea Di Biagio [Thu, 15 Oct 2015 09:54:25 +0000 (09:54 +0000)]
[x86] Merge test pr24562.ll into x86-fold-pshufb.ll. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250387 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMake windows.h less evil.
Benjamin Kramer [Thu, 15 Oct 2015 09:38:45 +0000 (09:38 +0000)]
Make windows.h less evil.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250386 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-pdbdump] Remove oddly placed parens that MSVC doesn't like
Benjamin Kramer [Thu, 15 Oct 2015 09:32:54 +0000 (09:32 +0000)]
[llvm-pdbdump] Remove oddly placed parens that MSVC doesn't like

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250385 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoDon't pretend AMDGPU backend knows how to custom-lower UDIVREM for vector types;...
Artyom Skrobov [Thu, 15 Oct 2015 09:18:47 +0000 (09:18 +0000)]
Don't pretend AMDGPU backend knows how to custom-lower UDIVREM for vector types; it can't

Reviewers: arsenm, jvesely, tstellarAMD

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250384 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoSpeculatively unbreak Windows build
David Majnemer [Thu, 15 Oct 2015 09:17:15 +0000 (09:17 +0000)]
Speculatively unbreak Windows build

<windows.h> defines macros named min and max in conflict with
<algorithm>.  Prevent macro expansion by wrapping std::min in

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250383 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[mips][microMIPS] Implement DPA.W.PH, DPAQ_S.W.PH, DPAQ_SA.L.W, DPAQX_S.W.PH, DPAQX_S...
Zlatko Buljan [Thu, 15 Oct 2015 08:59:45 +0000 (08:59 +0000)]
[mips][microMIPS] Implement DPA.W.PH, DPAQ_S.W.PH, DPAQ_SA.L.W, DPAQX_S.W.PH, DPAQX_SA.W.PH, DPAU.H.QBL, DPAU.H.QBR and DPAX.W.PH instructions
Differential Revision: http://reviews.llvm.org/D13376

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250382 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[mips][microMIPS] Implement BREAK16, LI16, MOVE16, SDBBP16, SUBU16 and XOR16 instructions
Hrvoje Varga [Thu, 15 Oct 2015 08:39:07 +0000 (08:39 +0000)]
[mips][microMIPS] Implement BREAK16, LI16, MOVE16, SDBBP16, SUBU16 and XOR16 instructions
Differential Revision: http://reviews.llvm.org/D11292#inline-103143

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250381 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[mips][microMIPS] Implement LLE and SCE instructions
Hrvoje Varga [Thu, 15 Oct 2015 08:11:50 +0000 (08:11 +0000)]
[mips][microMIPS] Implement LLE and SCE instructions
Differential Revision: http://reviews.llvm.org/D11630

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250379 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[mips][microMIPS] Implement LWLE, LWRE, SWLE and SWRE instructions
Hrvoje Varga [Thu, 15 Oct 2015 07:23:06 +0000 (07:23 +0000)]
[mips][microMIPS] Implement LWLE, LWRE, SWLE and SWRE instructions
Differential Revision: http://reviews.llvm.org/D11631

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250377 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[RuntimeDyld] Drop the '.s' suffix off the COFF test case - the MIPS bot started
Lang Hames [Thu, 15 Oct 2015 07:16:40 +0000 (07:16 +0000)]
[RuntimeDyld] Drop the '.s' suffix off the COFF test case - the MIPS bot started
failing when the suffix was added.

I assume the lack of a '.s' suffix means that the test case just wasn't running
before, and it has never worked on MIPS. I'll investigate that tomorrow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250376 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoUpdate for llvm API change.
Eric Christopher [Thu, 15 Oct 2015 07:01:16 +0000 (07:01 +0000)]
Update for llvm API change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250375 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRemove DIFile from createSubroutineType.
Eric Christopher [Thu, 15 Oct 2015 06:56:10 +0000 (06:56 +0000)]
Remove DIFile from createSubroutineType.

Patch by Amaury Sechet with a small modification by me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250374 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[RuntimeDyld] Don't try to get the contents of sections that don't have any
Lang Hames [Thu, 15 Oct 2015 06:41:45 +0000 (06:41 +0000)]
[RuntimeDyld] Don't try to get the contents of sections that don't have any
(e.g. bss sections).

MachO and ELF have been silently letting this pass, but COFFObjectFile contains
an assertion to catch this kind of (ab)use of the getSectionContents, and this
was causing the JIT to crash on COFF objects with BSS sections. This patch
should fix that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250371 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[MachO] Stop generating *coal* sections.
Akira Hatanaka [Thu, 15 Oct 2015 05:28:38 +0000 (05:28 +0000)]
[MachO] Stop generating *coal* sections.

Recommit r250342: move coal-sections-powerpc.s to subdirectory for powerpc.

Some background on why we don't have to use *coal* sections anymore:
Long ago when C++ was new and "weak" had not been standardized, an attempt was
made in cctools to support C++ inlines that can be coalesced by putting them
into their own section (TEXT/textcoal_nt instead of TEXT/text).

The current macho linker supports the weak-def bit on any symbol to allow it to
be coalesced, but the compiler still puts weak-def functions/data into alternate
section names, which the linker must map back to the base section name.

This patch makes changes that are necessary to prevent the compiler from using
the "coal" sections and have it use the non-coal sections instead when the
target architecture is not powerpc:

TEXT/textcoal_nt instead use TEXT/text
TEXT/const_coal instead use TEXT/const
DATA/datacoal_nt instead use DATA/data

If the target is powerpc, we continue to use the *coal* sections since anyone
targeting powerpc is probably using an old linker that doesn't have support for
the weak-def bits.

Also, have the assembler issue a warning if it encounters a *coal* section in
the assembly file and inform the users to use the non-coal sections instead.


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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250370 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoTest commit.
Hrvoje Varga [Thu, 15 Oct 2015 05:20:51 +0000 (05:20 +0000)]
Test commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250367 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoTemporarily revert r250345 to sort out bot failure.
Manman Ren [Thu, 15 Oct 2015 04:58:24 +0000 (04:58 +0000)]
Temporarily revert r250345 to sort out bot failure.

With r250345 and r250343, we start to observe the following failure
when bootstrap clang with lto and pgo:
PHI node entries do not match predecessors!
  %.sroa.029.3.i = phi %"class.llvm::SDNode.13298"* [ null, %30953 ], [ null, %31017 ], [ null, %30998 ], [ null, %_ZN4llvm8dyn_castINS_14ConstantSDNodeENS_7SDValueEEENS_10cast_rettyIT_T0_E8ret_typeERS5_.exit.i.1804 ], [ null, %30975 ], [ null, %30991 ], [ null, %_ZNK4llvm3EVT13getScalarTypeEv.exit.i.1812 ], [ %..sroa.029.0.i, %_ZN4llvm11SmallVectorIiLj8EED1Ev.exit.i.1826 ], !dbg !451895
label %30998
label %_ZNK4llvm3EVTeqES0_.exit19.thread.i
LLVM ERROR: Broken function found, compilation aborted!

I will re-commit this if the bot does not recover.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250366 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAdd XSAVE/XSAVEOPT to KNL processor.
Craig Topper [Thu, 15 Oct 2015 03:56:54 +0000 (03:56 +0000)]
Add XSAVE/XSAVEOPT to KNL processor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250362 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agos/NumFiles/NumStreams/
David Majnemer [Thu, 15 Oct 2015 01:39:00 +0000 (01:39 +0000)]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250357 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-pdbdump] Provide a mechanism to dump the raw contents of a PDB
David Majnemer [Thu, 15 Oct 2015 01:27:19 +0000 (01:27 +0000)]
[llvm-pdbdump] Provide a mechanism to dump the raw contents of a PDB

A PDB can be thought of as a very simple file system.  It is
occasionally illuminating to see the contents of the underlying files.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250356 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoFix -Wmismatched-tags error in modules build by removing unused forward declaration.
Richard Smith [Thu, 15 Oct 2015 01:15:26 +0000 (01:15 +0000)]
Fix -Wmismatched-tags error in modules build by removing unused forward declaration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250355 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[bugpoint] llvm-gcc doesn't exist anymore ...
Davide Italiano [Thu, 15 Oct 2015 01:12:01 +0000 (01:12 +0000)]
[bugpoint] llvm-gcc doesn't exist anymore ...

... so this comment is stale. Remove it. Range-loopify while here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250354 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[ARM] Make sure we do not dereference the end iterator when accessing debug
Quentin Colombet [Thu, 15 Oct 2015 00:41:26 +0000 (00:41 +0000)]
[ARM] Make sure we do not dereference the end iterator when accessing debug
Although the problem was always here, it would only be exposed when
shrink-wrapping is enable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250352 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert r250349.
Akira Hatanaka [Thu, 15 Oct 2015 00:11:03 +0000 (00:11 +0000)]
Revert r250349.

Test case coal-sections-powerpc.s is still failing on some buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250351 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[JIT] TrivialMemoryManager: Fail if we can't allocate memory.
Davide Italiano [Thu, 15 Oct 2015 00:05:32 +0000 (00:05 +0000)]
[JIT] TrivialMemoryManager: Fail if we can't allocate memory.

TrivialMemoryManager currently doesn't check the return type of AllocateRWX --
and returns a 'null' MemoryBlock to its caller. As pointed out by Lang,
this exposes some serious issues with the MemoryManager interface. There's,
in fact, no way to report back an error to clients rather than aborting in
case memory can't be allocated. Eventually the interface will grow to support
this, but for now, fail sooner rather than later.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250350 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[MachO] Stop generating *coal* sections.
Akira Hatanaka [Wed, 14 Oct 2015 23:48:10 +0000 (23:48 +0000)]
[MachO] Stop generating *coal* sections.

Recommit r250342: add -arch=ppc32 to the RUN lines of powerpc tests.

Some background on why we don't have to use *coal* sections anymore:
Long ago when C++ was new and "weak" had not been standardized, an attempt was
made in cctools to support C++ inlines that can be coalesced by putting them
into their own section (TEXT/textcoal_nt instead of TEXT/text).

The current macho linker supports the weak-def bit on any symbol to allow it to
be coalesced, but the compiler still puts weak-def functions/data into alternate
section names, which the linker must map back to the base section name.

This patch makes changes that are necessary to prevent the compiler from using
the "coal" sections and have it use the non-coal sections instead when the
target architecture is not powerpc:

TEXT/textcoal_nt instead use TEXT/text
TEXT/const_coal instead use TEXT/const
DATA/datacoal_nt instead use DATA/data

If the target is powerpc, we continue to use the *coal* sections since anyone
targeting powerpc is probably using an old linker that doesn't have support for
the weak-def bits.

Also, have the assembler issue a warning if it encounters a *coal* section in
the assembly file and inform the users to use the non-coal sections instead.


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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250349 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert r250342.
Akira Hatanaka [Wed, 14 Oct 2015 23:29:10 +0000 (23:29 +0000)]
Revert r250342.

Investigate why coal-sections-powerpc.s is failing on some buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250346 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoUpdate the branch weight metadata in JumpThreading pass.
Cong Hou [Wed, 14 Oct 2015 23:14:17 +0000 (23:14 +0000)]
Update the branch weight metadata in JumpThreading pass.

Currently in JumpThreading pass, the branch weight metadata is not updated after CFG modification. Consider the jump threading on PredBB, BB, and SuccBB. After jump threading, the weight on BB->SuccBB should be adjusted as some of it is contributed by the edge PredBB->BB, which doesn't exist anymore. This patch tries to update the edge weight in metadata on BB->SuccBB by scaling it by 1 - Freq(PredBB->BB) / Freq(BB->SuccBB).

This is the third attempt to submit this patch, while the first two led to failures in some FDO tests. After investigation, it is the edge weight normalization that caused those failures. In this patch the edge weight normalization is fixed so that there is no zero weight in the output and the sum of all weights can fit in 32-bit integer. Several unit tests are added.

Differential revision: http://reviews.llvm.org/D10979

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250345 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoTest case which should have been part of 250343
Philip Reames [Wed, 14 Oct 2015 22:47:06 +0000 (22:47 +0000)]
Test case which should have been part of 250343

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250344 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SimplifyCFG] Speculatively flatten CFG based on profiling metadata
Philip Reames [Wed, 14 Oct 2015 22:46:19 +0000 (22:46 +0000)]
[SimplifyCFG] Speculatively flatten CFG based on profiling metadata

If we have a series of branches which are all unlikely to fail, we can possibly combine them into a single check on the fastpath combined with a bit of dispatch logic on the slowpath. We don't want to do this unconditionally since it requires speculating instructions past a branch, but if the profiling metadata on the branch indicates profitability, this can reduce the number of checks needed along the fast path.

The canonical example this is trying to handle is removing the second bounds check implied by the Java code: a[i] + a[i+1]. Note that it can currently only do so for really simple conditions and the values of a[i] can't be used anywhere except in the addition. (i.e. the load has to have been sunk already and not prevent speculation.) I plan on extending this transform over the next few days to handle alternate sequences.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250343 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[MachO] Stop generating *coal* sections.
Akira Hatanaka [Wed, 14 Oct 2015 22:45:36 +0000 (22:45 +0000)]
[MachO] Stop generating *coal* sections.

Some background on why we don't have to use *coal* sections anymore:
Long ago when C++ was new and "weak" had not been standardized, an attempt was
made in cctools to support C++ inlines that can be coalesced by putting them
into their own section (TEXT/textcoal_nt instead of TEXT/text).

The current macho linker supports the weak-def bit on any symbol to allow it to
be coalesced, but the compiler still puts weak-def functions/data into alternate
section names, which the linker must map back to the base section name.

This patch makes changes that are necessary to prevent the compiler from using
the "coal" sections and have it use the non-coal sections instead when the
target architecture is not powerpc:

TEXT/textcoal_nt instead use TEXT/text
TEXT/const_coal instead use TEXT/const
DATA/datacoal_nt instead use DATA/data

If the target is powerpc, we continue to use the *coal* sections since anyone
targeting powerpc is probably using an old linker that doesn't have support for
the weak-def bits.

Also, have the assembler issue a warning if it encounters a *coal* section in
the assembly file and inform the users to use the non-coal sections instead.


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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250342 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoTighten known bits for ctpop based on zero input bits
Philip Reames [Wed, 14 Oct 2015 22:42:12 +0000 (22:42 +0000)]
Tighten known bits for ctpop based on zero input bits

This is a cleaned up patch from the one written by John Regehr based on the findings of the Souper superoptimizer.

The basic idea here is that input bits that are known zero reduce the maximum count that the intrinsic could return. We know that the number of bits required to represent a particular count is at most log2(N)+1.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250338 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[CMake] Make LLVM_VERSION_* variables user definable
Chris Bieneman [Wed, 14 Oct 2015 21:50:09 +0000 (21:50 +0000)]
[CMake] Make LLVM_VERSION_* variables user definable

CMake's set command overwrites existing values. Package maintainers may want or need to set the version variables manually, so we need to only set them if they are not already defined. Note I use the "if(NOT DEFINED ...)" syntax deliberately in the last case because empty string is a valid value for the suffx, but not the other variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250333 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoadd x86 codegen tests for 'add nsw' followed by 'sext'
Sanjay Patel [Wed, 14 Oct 2015 21:47:03 +0000 (21:47 +0000)]
add x86 codegen tests for 'add nsw' followed by 'sext'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250332 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[PowerPC] Fix invalid lxvdsx optimization (PR25157)
Bill Schmidt [Wed, 14 Oct 2015 20:45:00 +0000 (20:45 +0000)]
[PowerPC] Fix invalid lxvdsx optimization (PR25157)

PR25157 identifies a bug where a load plus a vector shuffle is
incorrectly converted into an LXVDSX instruction.  That optimization
is only valid if the load is of a doubleword, and in the noted case,
it was not.  This corrects that problem.

Joint patch with Eric Schweitz, who provided the bugpoint-reduced test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250324 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Bugpoint] Use 'CC' instead of 'GCC' for variable naming.
Davide Italiano [Wed, 14 Oct 2015 20:29:54 +0000 (20:29 +0000)]
[Bugpoint] Use 'CC' instead of 'GCC' for variable naming.

We now use clang by default and fallback to gcc when requested.
With this commit, names reflect reality. No functional change

Discussed with: Rafael Espindola.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250321 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[IDFCalculator] Use DominatorTreeBase instead of DominatorTree
Daniel Berlin [Wed, 14 Oct 2015 19:54:24 +0000 (19:54 +0000)]
[IDFCalculator] Use DominatorTreeBase instead of DominatorTree

IDFCalculator used a DominatorTree instance for its calculations. Since the PostDominatorTree struct is not a subclass of DominatorTree, it wasn't possible to use PDT in IDFCalculator to compute post-dominance frontiers.

This patch makes IDFCalculator work with a DominatorTreeBase<BasicBlock> instead, which enables PDTs to be utilized.

Patch by Victor Campos (vhscampos@gmail.com)

Reviewers: dberlin

Subscribers: dberlin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250320 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[Bugpoint] Use clang by default.
Davide Italiano [Wed, 14 Oct 2015 19:48:01 +0000 (19:48 +0000)]
[Bugpoint] Use clang by default.

We now rely on gcc only if either of the following is true:
1) -gcc option is passed by the user
2) clang is not found in the default path.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250318 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[LoopUnswitch] Correct misleading comments.
Chen Li [Wed, 14 Oct 2015 19:47:43 +0000 (19:47 +0000)]
[LoopUnswitch] Correct misleading comments.

Reviewers: reames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250317 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAdd 'other' in description of extractvalue operands.
Arch D. Robison [Wed, 14 Oct 2015 19:10:45 +0000 (19:10 +0000)]
Add 'other' in description of extractvalue operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250314 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoSample profiles - Add documentation for binary profile encoding. NFC.
Diego Novillo [Wed, 14 Oct 2015 18:36:30 +0000 (18:36 +0000)]
Sample profiles - Add documentation for binary profile encoding. NFC.

This adds documentation for the binary profile encoding and moves the
documentation for the text encoding into the header file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250309 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoA doccomment for CombineTo, and some NFC refactorings
Artyom Skrobov [Wed, 14 Oct 2015 17:18:35 +0000 (17:18 +0000)]
A doccomment for CombineTo, and some NFC refactorings

Caching SDLoc(N), instead of recreating it in every single
function call, keeps the code denser, and allows to unwrap long lines.

Reviewers: sunfish, atrick, sdmitrouk

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250305 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerge DAGCombiner::visitSREM and DAGCombiner::visitUREM (NFC)
Artyom Skrobov [Wed, 14 Oct 2015 16:54:14 +0000 (16:54 +0000)]
Merge DAGCombiner::visitSREM and DAGCombiner::visitUREM (NFC)

Summary: The two implementations had more code in common than not.

Reviewers: sunfish, MatzeB, sdmitrouk

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250302 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-readobj/ELF] fix: add correct test inputs
Igor Kudrin [Wed, 14 Oct 2015 12:21:30 +0000 (12:21 +0000)]
[llvm-readobj/ELF] fix: add correct test inputs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250292 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[llvm-readobj/ELF] Print GNU Hash section
Igor Kudrin [Wed, 14 Oct 2015 12:11:50 +0000 (12:11 +0000)]
[llvm-readobj/ELF] Print GNU Hash section

Add a new command line switch, -gnu-hash-table, to print the content of that section.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250291 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[x86][FastISel] Teach how to select nontemporal stores.
Andrea Di Biagio [Wed, 14 Oct 2015 10:03:13 +0000 (10:03 +0000)]
[x86][FastISel] Teach how to select nontemporal stores.

This patch teaches x86 fast-isel how to select nontemporal stores.

On x86, we can use MOVNTI for nontemporal stores of doublewords/quadwords.
Instructions (V)MOVNTPS/PD/DQ can be used for SSE2/AVX aligned nontemporal
vector stores.

Before this patch, fast-isel always selected 'movd/movq' instead of 'movnti'
for doubleword/quadword nontemporal stores. In the case of nontemporal stores
of aligned vectors, fast-isel always selected movaps/movapd/movdqa instead of

With this patch, if we use SSE2/AVX intrinsics for nontemporal stores we now
always get the expected (V)MOVNT instructions.
The lack of fast-isel support for nontemporal stores was spotted when analyzing
the -O0 codegen for nontemporal stores.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250285 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[CMake] Add LLVM_VERSION_PATCH to the -current_version flag for libLTO and libLLVM.
Chris Bieneman [Wed, 14 Oct 2015 07:50:21 +0000 (07:50 +0000)]
[CMake] Add LLVM_VERSION_PATCH to the -current_version flag for libLTO and libLLVM.

This is to match autoconf where LLVM_SUBMIT_SUBVERSION is usually set to ${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250277 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[CMake] Fixing the bots I broke.
Chris Bieneman [Wed, 14 Oct 2015 07:40:34 +0000 (07:40 +0000)]
[CMake] Fixing the bots I broke.

I meant to put the POLICY setting below the version defaults.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250276 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[CMake] Set Policy CMP0048 to NEW
Chris Bieneman [Wed, 14 Oct 2015 07:37:00 +0000 (07:37 +0000)]
[CMake] Set Policy CMP0048 to NEW

CMake 3.0 introduced the VERSION option for the project() command. If you don't specify the VERSION in the function it will clear out variables matching ${PROJECT_NAME}_VERSION_${MAJOR|MINOR|PATCH|TWEAK}.

This makes overriding LLVM_VERSION_* not work properly with newer versions of CMake. To make this work properly we need to:

(1) Optionally set the policy to NEW
(2) Move default versions and setting PACKAGE_VERSION to before the call to project()
(3) If the policy is set, pass the VERSION and LANGUAGES options in the new format

This change should have no behavioral change for CMake versions before 3.0, and it makes the behavior of later versions match the earlier versions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250275 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAdd a instrumentation test for Linux
Xinliang David Li [Wed, 14 Oct 2015 07:24:14 +0000 (07:24 +0000)]
Add a instrumentation test for Linux

Make sure __llvm_profile_init is not emitted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250274 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Update CPU detection to only enable XSAVE features if the OS has enabled them...
Craig Topper [Wed, 14 Oct 2015 05:37:42 +0000 (05:37 +0000)]
[X86] Update CPU detection to only enable XSAVE features if the OS has enabled them and the saving of YMM state. This seems to be consistent with gcc behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250269 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add XSAVE feature flags to their various processors.
Craig Topper [Wed, 14 Oct 2015 05:37:38 +0000 (05:37 +0000)]
[X86] Add XSAVE feature flags to their various processors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250268 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoUse range-based for loops. NFC
Craig Topper [Wed, 14 Oct 2015 04:36:00 +0000 (04:36 +0000)]
Use range-based for loops. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250266 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert r250204 and r250240 due to bot failure. We failed to build PGO-ed clang.
Manman Ren [Wed, 14 Oct 2015 03:04:03 +0000 (03:04 +0000)]
Revert r250204 and r250240 due to bot failure. We failed to build PGO-ed clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250264 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[msan] Fix crash on multiplication by a non-integer constant.
Evgeniy Stepanov [Wed, 14 Oct 2015 00:21:13 +0000 (00:21 +0000)]
[msan] Fix crash on multiplication by a non-integer constant.

Fixes PR25160.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250260 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[asan] Disabling speculative loads under asan. Patch by Mike Aizatsky
Kostya Serebryany [Wed, 14 Oct 2015 00:21:05 +0000 (00:21 +0000)]
[asan] Disabling speculative loads under asan. Patch by Mike Aizatsky

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250259 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRename one of our two llvm::GCOVOptions classes to llvm::GCOV::Options. We used
Richard Smith [Wed, 14 Oct 2015 00:04:19 +0000 (00:04 +0000)]
Rename one of our two llvm::GCOVOptions classes to llvm::GCOV::Options. We used
to get away with this because llvm/Support/GCOV.h was an implementation detail
of the llvm-gcov tool, but it's now being used by FDO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250258 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoSplit -pedantic and -Wno-long-long into two separate flags so libc++ can remove ...
Eric Fiselier [Tue, 13 Oct 2015 23:51:58 +0000 (23:51 +0000)]
Split -pedantic and -Wno-long-long into two separate flags so libc++ can remove -pedantic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250255 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[SCEV] Use `SCEV::isAllOnesValue` directly; NFC.
Sanjoy Das [Tue, 13 Oct 2015 23:28:31 +0000 (23:28 +0000)]
[SCEV] Use `SCEV::isAllOnesValue` directly; NFC.

Instead of `dyn_cast` ing to `SCEVConstant` and checking the contained

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250251 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[CMake] Add compatibility and current versioning to libLTO to match autoconf support.
Chris Bieneman [Tue, 13 Oct 2015 22:54:29 +0000 (22:54 +0000)]
[CMake] Add compatibility and current versioning to libLTO to match autoconf support.

This also adds LLVM_LTO_VERSION_OFFSET to support functional equivalence to autoconf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250245 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[CMake] libLLVM's compatibility version should be 1.
Chris Bieneman [Tue, 13 Oct 2015 22:54:27 +0000 (22:54 +0000)]
[CMake] libLLVM's compatibility version should be 1.

This is in matching with the autoconf build system.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250244 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoSample profile reader - remove dead code. NFC.
Diego Novillo [Tue, 13 Oct 2015 22:48:48 +0000 (22:48 +0000)]
Sample profile reader - remove dead code. NFC.

This removes old remnants from the gcov reader. I missed these when I
re-wrote it recently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250242 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoSample profiles - Add a name table to the binary encoding.
Diego Novillo [Tue, 13 Oct 2015 22:48:46 +0000 (22:48 +0000)]
Sample profiles - Add a name table to the binary encoding.

Binary encoded profiles used to encode all function names inline at
every reference.  This is clearly suboptimal in terms of space.  This
patch fixes this by adding a name table to the header of the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250241 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoUpdate MachineBranchProbabilityInfo::normalizeEdgeWeights to make sure there is no...
Cong Hou [Tue, 13 Oct 2015 22:27:41 +0000 (22:27 +0000)]
Update MachineBranchProbabilityInfo::normalizeEdgeWeights to make sure there is no zero weight in the output, and also add a missing test for JumpThreading.

The test is for the patch in http://reviews.llvm.org/D10979 but was missing when committing that patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250240 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAdd missing #include, found by modules build.
Richard Smith [Tue, 13 Oct 2015 22:24:10 +0000 (22:24 +0000)]
Add missing #include, found by modules build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250239 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[InlineFunction] Correctly inline TerminatePadInst
David Majnemer [Tue, 13 Oct 2015 22:08:17 +0000 (22:08 +0000)]
[InlineFunction] Correctly inline TerminatePadInst

We forgot to append the terminatepad's arguments which resulted in us
treating the old terminatepad as an argument to the new terminatepad
causing us to crash immediately.  Instead, add the old terminatepad's
arguments to the new terminatepad.

This fixes PR25155.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250234 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[WebAssembly] Remove a TODO comment which is no longer needed. NFC.
Dan Gohman [Tue, 13 Oct 2015 22:06:40 +0000 (22:06 +0000)]
[WebAssembly] Remove a TODO comment which is no longer needed. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250233 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[uselistorder] Insert blank line, NFC
Vedant Kumar [Tue, 13 Oct 2015 21:51:02 +0000 (21:51 +0000)]
[uselistorder] Insert blank line, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250231 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoFix layering violation: Analysis should not include headers from Transforms
Richard Smith [Tue, 13 Oct 2015 21:32:32 +0000 (21:32 +0000)]
Fix layering violation: Analysis should not include headers from Transforms
(and in this case isn't even using anything from those headers).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250228 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoTypo.
Chad Rosier [Tue, 13 Oct 2015 20:59:16 +0000 (20:59 +0000)]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250224 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoTweak to r250117 and change to use ErrorOr and drop isSizeValid for
Kevin Enderby [Tue, 13 Oct 2015 20:48:04 +0000 (20:48 +0000)]
Tweak to r250117 and change to use ErrorOr and drop isSizeValid for
ArchiveMemberHeader, suggestion by Rafael EspĂ­ndola.

Also The clang-x86-win2008-selfhost bot still does not like the
malformed-machos 00000031.a test, so removing it for now.  All
the other bots are fine with it however.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250222 91177308-0d34-0410-b5e6-96231b3b80d8