7 years ago[Orc] Add orcjit to the dependencies list in the Makefile for lli.
Lang Hames [Sat, 24 Jan 2015 00:01:29 +0000 (00:01 +0000)]
[Orc] Add orcjit to the dependencies list in the Makefile for lli.

This should fix a few more broken bots.

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

7 years agoR600/SI: Emit .hsa.version section for amdhsa OS
Tom Stellard [Fri, 23 Jan 2015 23:59:08 +0000 (23:59 +0000)]
R600/SI: Emit .hsa.version section for amdhsa OS

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

7 years agoFix assertion when C++ EH filters are present in functions using SEH
Reid Kleckner [Fri, 23 Jan 2015 23:51:25 +0000 (23:51 +0000)]
Fix assertion when C++ EH filters are present in functions using SEH

Should fix PR22305.

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

7 years agoAddress more review comments for DIExpression::iterator.
Adrian Prantl [Fri, 23 Jan 2015 23:40:47 +0000 (23:40 +0000)]
Address more review comments for DIExpression::iterator.
- input_iterator
- define an operator->
- make constructors private were possible

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

7 years agoInstrProf: debug dumps should go to dbgs(), not outs()
Justin Bogner [Fri, 23 Jan 2015 23:28:30 +0000 (23:28 +0000)]
InstrProf: debug dumps should go to dbgs(), not outs()

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

7 years agollvm-cov: Don't use llvm::outs() in library code
Justin Bogner [Fri, 23 Jan 2015 23:09:27 +0000 (23:09 +0000)]
llvm-cov: Don't use llvm::outs() in library code

Nothing in lib/ should be using llvm::outs() directly. Thread it in
from the caller instead.

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

7 years agollvm-cov: Use range-for (NFC)
Justin Bogner [Fri, 23 Jan 2015 22:57:02 +0000 (22:57 +0000)]
llvm-cov: Use range-for (NFC)

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

7 years agomips: Fix "XPASS" test results by removing 'not' commands
Reid Kleckner [Fri, 23 Jan 2015 22:55:31 +0000 (22:55 +0000)]
mips: Fix "XPASS" test results by removing 'not' commands

These tests are asserting and crashing for me, and 'not' sees that as a
non-zero exit code instead of a signal code for obscure Windows reasons.
This causes the test to pass, giving me an unclean 'ninja check'.

The test is already XFAILd, so just run the test without 'not' and let
lit handle the failure.

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

7 years ago[x86] Combine x86mmx/i64 to v2i64 conversion to use scalar_to_vector
Bruno Cardoso Lopes [Fri, 23 Jan 2015 22:44:16 +0000 (22:44 +0000)]
[x86] Combine x86mmx/i64 to v2i64 conversion to use scalar_to_vector

Handle the poor codegen for i64/x86xmm->v2i64 (%mm -> %xmm) moves. Instead of
using stack store/load pair to do the job, use scalar_to_vector directly, which
in the MMX case can use movq2dq. This was the current behavior prior to
improvements for vector legalization of extloads in r213897.

This commit fixes the regression and as a side-effect also remove some
unnecessary shuffles.

In the new attached testcase, we go from:

pshufw  $-18, (%rdi), %mm0
movq    %mm0, -8(%rsp)
movq    -8(%rsp), %xmm0
pshufd  $-44, %xmm0, %xmm0
movd    %xmm0, %eax


pshufw  $-18, (%rdi), %mm0
movq2dq %mm0, %xmm0
movd    %xmm0, %eax

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

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

7 years agollvm-cov: clang-format the GCOV files (NFC)
Justin Bogner [Fri, 23 Jan 2015 22:38:01 +0000 (22:38 +0000)]
llvm-cov: clang-format the GCOV files (NFC)

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

7 years agoFix the MSVC build with the new Orc JIT APIs
Reid Kleckner [Fri, 23 Jan 2015 22:25:47 +0000 (22:25 +0000)]
Fix the MSVC build with the new Orc JIT APIs

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

7 years ago[YAMLIO] Dirty hack: Force integral conversion to allow strong typedefs to convert.
Michael J. Spencer [Fri, 23 Jan 2015 22:24:57 +0000 (22:24 +0000)]
[YAMLIO] Dirty hack: Force integral conversion to allow strong typedefs to convert.

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

7 years ago[Orc] Remove a bunch of constructors from ObjectLinkingLayer.
Lang Hames [Fri, 23 Jan 2015 22:11:07 +0000 (22:11 +0000)]
[Orc] Remove a bunch of constructors from ObjectLinkingLayer.

These constructors were causing trouble for MSVC and older GCCs. This should
fix more of the build failures from r226940.

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

7 years agoR600/SI: Move i64 -> v2i32 load promotion into AMDGPUDAGToDAGISel::Select()
Tom Stellard [Fri, 23 Jan 2015 22:05:45 +0000 (22:05 +0000)]
R600/SI: Move i64 -> v2i32 load promotion into AMDGPUDAGToDAGISel::Select()

We used to do this promotion during DAG legalization, but this
caused an infinite loop in ExpandUnalignedLoad() because it assumed
that i64 loads were legal if i64 was a legal type.

It also seems better to report i64 loads as legal, since they actually
are and we were just promoting them to simplify our tablegen files.

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

7 years ago[Object][ELF] Test unknown type.
Michael J. Spencer [Fri, 23 Jan 2015 21:58:09 +0000 (21:58 +0000)]
[Object][ELF] Test unknown type.

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

7 years ago[YAMLIO] Add support for numeric values in enums.
Michael J. Spencer [Fri, 23 Jan 2015 21:57:50 +0000 (21:57 +0000)]
[YAMLIO] Add support for numeric values in enums.

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

7 years ago[Orc] LLVMLinkInOrcMCJITReplacement shouldn't be in the anonymous namespace.
Lang Hames [Fri, 23 Jan 2015 21:49:12 +0000 (21:49 +0000)]
[Orc] LLVMLinkInOrcMCJITReplacement shouldn't be in the anonymous namespace.

This should fix some of the builder errors from r226940.

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

7 years ago[Orc] New JIT APIs.
Lang Hames [Fri, 23 Jan 2015 21:25:00 +0000 (21:25 +0000)]
[Orc] New JIT APIs.

This patch adds a new set of JIT APIs to LLVM. The aim of these new APIs is to
cleanly support a wider range of JIT use cases in LLVM, and encourage the
development and contribution of re-usable infrastructure for LLVM JIT use-cases.

These APIs are intended to live alongside the MCJIT APIs, and should not affect
existing clients.

Included in this patch:

1) New headers in include/llvm/ExecutionEngine/Orc that provide a set of
   components for building JIT infrastructure.
   Implementation code for these headers lives in lib/ExecutionEngine/Orc.

2) A prototype re-implementation of MCJIT (OrcMCJITReplacement) built out of the
   new components.

3) Minor changes to RTDyldMemoryManager needed to support the new components.
   These changes should not impact existing clients.

4) A new flag for lli, -use-orcmcjit, which will cause lli to use the
   OrcMCJITReplacement class as its underlying execution engine, rather than
   MCJIT itself.

Tests to follow shortly.

Special thanks to Michael Ilseman, Pete Cooper, David Blaikie, Eric Christopher,
Justin Bogner, and Jim Grosbach for extensive feedback and discussion.

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

7 years agoMove the accessor functions from DIExpression::iterator into a wrapper
Adrian Prantl [Fri, 23 Jan 2015 21:24:41 +0000 (21:24 +0000)]
Move the accessor functions  from DIExpression::iterator into a wrapper
DIExpression::Operand, so we can write range-based for loops.

Thanks to David Blaikie for the idea.

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

7 years agolit: Make MCJIT's supported arch check case insensitive
Reid Kleckner [Fri, 23 Jan 2015 21:11:40 +0000 (21:11 +0000)]
lit: Make MCJIT's supported arch check case insensitive

Should make the tests run when using CMake on systems where 'uname -p'
reports "amd64", such as FreeBSD.

Should fix PR21559.

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

7 years agoFix the problem with llvm-objdump and -archive-headers in printing the archive header...
Kevin Enderby [Fri, 23 Jan 2015 21:02:44 +0000 (21:02 +0000)]
Fix the problem with llvm-objdump and -archive-headers in printing the archive header size field.
This problem showed up with the clang-cmake-armv7-a15-full bot.  Thanks to Renato Golin for his help.

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

7 years ago[mips] fix spelling of 'disassembler'
Alexei Starovoitov [Fri, 23 Jan 2015 21:00:08 +0000 (21:00 +0000)]
[mips] fix spelling of 'disassembler'

trivial first commit

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

7 years agoLowerSwitch: replace unreachable default with popular case destination
Hans Wennborg [Fri, 23 Jan 2015 20:43:51 +0000 (20:43 +0000)]
LowerSwitch: replace unreachable default with popular case destination

SimplifyCFG currently does this transformation, but I'm planning to remove that
to allow other passes, such as this one, to exploit the unreachable default.

This patch takes care to keep track of what case values are unreachable even
after the transformation, allowing for more efficient lowering.

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

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

7 years ago[Objdump] Output information about common symbols in a way closer to GNU objdump.
Colin LeMahieu [Fri, 23 Jan 2015 20:06:24 +0000 (20:06 +0000)]
[Objdump] Output information about common symbols in a way closer to GNU objdump.

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

7 years ago[emacs] llvm-mode: fix parens, font-lock i*
Ramkumar Ramachandra [Fri, 23 Jan 2015 19:45:35 +0000 (19:45 +0000)]
[emacs] llvm-mode: fix parens, font-lock i*

In llvm-mode, with electric-pair-mode turned on, typing a literal '['
would print out '[[', and '(' would print a '(('. This was a very
annoying bug caused by overzealous syntax-table entries: the parens are
already part of the '(' and ')' class by default. Fix this.

While at it, notice that i32, i64, i1 etc. are not font-locked despite a
clear intent to do so. The issue is that regexp-opt doesn't accept
regular expressions. So, spell out the common literal integers with
different widths.

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

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

7 years agoAdd the option, -data-in-code, to llvm-objdump used with -macho to print the Mach...
Kevin Enderby [Fri, 23 Jan 2015 18:52:17 +0000 (18:52 +0000)]
Add the option, -data-in-code, to llvm-objdump used with -macho to print the Mach-O data in code table.

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

7 years agoClassify functions by EH personality type rather than using the triple
Reid Kleckner [Fri, 23 Jan 2015 18:49:01 +0000 (18:49 +0000)]
Classify functions by EH personality type rather than using the triple

This mostly reverts commit r222062 and replaces it with a new enum. At
some point this enum will grow at least for other MSVC EH personalities.

Also beefs up the way we were sniffing the personality function.
Previously we would emit the Itanium LSDA despite using

Reviewers: majnemer

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

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

7 years agoDebug Info / PR22309: Allow union types to be emitted as unsigned constants.
Adrian Prantl [Fri, 23 Jan 2015 18:01:39 +0000 (18:01 +0000)]
Debug Info / PR22309: Allow union types to be emitted as unsigned constants.

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

7 years agoRemove some local variables in place of just querying for them
Eric Christopher [Fri, 23 Jan 2015 17:22:44 +0000 (17:22 +0000)]
Remove some local variables in place of just querying for them
in the couple of asserts.

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

7 years ago[mips] Add new error message and improve testing for parsing the .module directive.
Toma Tabacu [Fri, 23 Jan 2015 10:40:19 +0000 (10:40 +0000)]
[mips] Add new error message and improve testing for parsing the .module directive.

We used to silently ignore any empty .module's and we used to give an error saying that we found
an "unexpected token at start of statement" when the value of the option wasn't an identifier (e.g. if it was a number).

We now give an error saying that we "expected .module option identifier" in both of those cases.

I also fixed the other tests in mips-abi-bad.s, which all seemed to be broken.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

7 years agoThis patch fixes issue with lowering below mentioned pattern :-
Jyoti Allur [Fri, 23 Jan 2015 09:10:03 +0000 (09:10 +0000)]
This patch fixes issue with lowering below mentioned pattern :-
        smull  r0, r1, r1, r0
smull  r2, r3, r3, r2
adds r0, r2, r0
adc r1, r3, r1
bx lr


        smull  r0, r1, r1, r0
smlal  r0, r1, r3, r2
bx lr

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

7 years ago[x86] Change u8imm operands to always print as unsigned. This makes shuffle masks...
Craig Topper [Fri, 23 Jan 2015 08:00:59 +0000 (08:00 +0000)]
[x86] Change u8imm operands to always print as unsigned. This makes shuffle masks and the like make way more sense.

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

7 years agoDAGCombine: always constant fold FMA when target disable FP exceptions
Mehdi Amini [Fri, 23 Jan 2015 07:07:20 +0000 (07:07 +0000)]
DAGCombine: always constant fold FMA when target disable FP exceptions

Summary: When trying to constant fold an FMA in the DAG, getNode()
fails to fold the FMA if an operand is not finite. In this case this
patch allows the constant folding if !TLI->hasFloatingPointExceptions()

Reviewers: resistor

Reviewed By: resistor

Subscribers: hfinkel, llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

7 years ago[ADT] Add move operations to SmallVector<T,N> from SmallVectorImpl<T>.
Lang Hames [Fri, 23 Jan 2015 06:25:17 +0000 (06:25 +0000)]
[ADT] Add move operations to SmallVector<T,N> from SmallVectorImpl<T>.

This makes it possible to move between SmallVectors of different sizes.

Thanks to Dave Blaikie and Duncan Smith for patch feedback.

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

7 years agoFix 80 column violation
Craig Topper [Fri, 23 Jan 2015 06:18:35 +0000 (06:18 +0000)]
Fix 80 column violation

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

7 years ago[X86] Add IntrNoMem to the AVX512 conflict intrinsics.
Craig Topper [Fri, 23 Jan 2015 06:11:45 +0000 (06:11 +0000)]
[X86] Add IntrNoMem to the AVX512 conflict intrinsics.

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

7 years agoAdd STB_GNU_UNIQUE to the ELF writer.
Rafael Espindola [Fri, 23 Jan 2015 04:44:35 +0000 (04:44 +0000)]
Add STB_GNU_UNIQUE to the ELF writer.

This lets llvm-mc assemble files produced by gcc.

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

7 years agoPrune an out-of-date \param since r226476. [-Wdocumentation]
NAKAMURA Takumi [Fri, 23 Jan 2015 01:05:12 +0000 (01:05 +0000)]
Prune an out-of-date \param since r226476. [-Wdocumentation]

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

7 years agoReformat.
NAKAMURA Takumi [Fri, 23 Jan 2015 01:02:07 +0000 (01:02 +0000)]

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

7 years agoMipsAsmParser.cpp: Suppress a warning introduced in r226657. [-Wunused-variable]
NAKAMURA Takumi [Fri, 23 Jan 2015 01:01:52 +0000 (01:01 +0000)]
MipsAsmParser.cpp: Suppress a warning introduced in r226657. [-Wunused-variable]

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

7 years agoR600: Try to use lower types for 64bit division if possible
Jan Vesely [Thu, 22 Jan 2015 23:42:43 +0000 (23:42 +0000)]
R600: Try to use lower types for 64bit division if possible

v2: add and enable tests for SI

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226881 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSelectionDAG: Add KnownBits and SignBits computation for EXTRACT_ELEMENT
Jan Vesely [Thu, 22 Jan 2015 23:42:41 +0000 (23:42 +0000)]
SelectionDAG: Add KnownBits and SignBits computation for EXTRACT_ELEMENT

v2: use getZExtValue
    add missing break

v3: add few more comments

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226880 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoR600: Simplify LowerUDIVREM
Jan Vesely [Thu, 22 Jan 2015 23:42:39 +0000 (23:42 +0000)]
R600: Simplify LowerUDIVREM

optimizations can handle removing the Hi part operations.
The generated code is identical for R600, ~10% icount reduction for SI

v2: rebase

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226879 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoIR: Change GenericDwarfNode::getHeader() to StringRef
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 23:10:55 +0000 (23:10 +0000)]
IR: Change GenericDwarfNode::getHeader() to StringRef

Simplify the API to use a `StringRef` directly rather than exposing the
`MDString` bits underneath.

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

7 years agoIR: DwarfNode => DebugNode, NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 22:47:44 +0000 (22:47 +0000)]
IR: DwarfNode => DebugNode, NFC

These things are potentially used for non-DWARF data (see the discussion
in PR22235), so take the `Dwarf` out of the name.  Since the new name
gives fewer clues, update the doxygen to properly describe what they

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

7 years ago[X86][AVX] Added (V)MOVDDUP / (V)MOVSLDUP / (V)MOVSHDUP memory folding + tests.
Simon Pilgrim [Thu, 22 Jan 2015 22:39:59 +0000 (22:39 +0000)]
[X86][AVX] Added (V)MOVDDUP / (V)MOVSLDUP / (V)MOVSHDUP memory folding + tests.

Minor tweak now that D7042 is complete, we can enable stack folding for (V)MOVDDUP and do proper testing.

Added missing AVX ymm folding patterns and fixed alignment for AVX VMOVSLDUP / VMOVSHDUP.

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

7 years agoLine endings fixes. NFC.
Simon Pilgrim [Thu, 22 Jan 2015 22:27:37 +0000 (22:27 +0000)]
Line endings fixes. NFC.

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

7 years ago[X86][SSE] Simplified PSUBUS tests
Simon Pilgrim [Thu, 22 Jan 2015 22:19:58 +0000 (22:19 +0000)]
[X86][SSE] Simplified PSUBUS tests

Removed loops from PSUBUS tests - ensures folding is tested. Also renamed SSE2 tests SSSE3 to match cpu.

This is a follow up commit agreed in http://reviews.llvm.org/D7094

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

7 years ago[Object] Fix a bug in a condition introduced in r226217 - visibility can't be
Lang Hames [Thu, 22 Jan 2015 22:04:47 +0000 (22:04 +0000)]
[Object] Fix a bug in a condition introduced in r226217 - visibility can't be
both hidden and default.

Bug found by inspection by Rafael Espindola. No test: As discussed in the commit
message for r226217 we don't have a good way to test this yet.

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

7 years ago[PM] Actually add the new pass manager support for the assumption cache.
Chandler Carruth [Thu, 22 Jan 2015 21:53:09 +0000 (21:53 +0000)]
[PM] Actually add the new pass manager support for the assumption cache.

I had already factored this analysis specifically to enable doing this,
but hadn't actually committed the necessary wiring to get at this from
the new pass manager. This also nicely shows how the separate cache
object can be directly managed by the new pass manager.

This analysis didn't have any direct tests and so I've added a printer
pass and a boring test case. I chose to print the i1 value which is
being assumed rather than the call to llvm.assume as that seems much
more useful for testing... but suggestions on an even better printing
strategy welcome. My main goal was to make sure things actually work. =]

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

7 years agoRemove dead leak detector parts that fell out of use in r224703.
Benjamin Kramer [Thu, 22 Jan 2015 21:43:01 +0000 (21:43 +0000)]
Remove dead leak detector parts that fell out of use in r224703.

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

7 years agoIR: Update references to temporaries before deleting
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 21:36:45 +0000 (21:36 +0000)]
IR: Update references to temporaries before deleting

During `MDNode::deleteTemporary()`, call `replaceAllUsesWith(nullptr)`
to update all tracking references to `nullptr`.

This fixes PR22280, where inverted destruction order between tracking
references and the temporaries themselves caused a use-after-free in

An alternative fix would be to add an assertion that there are no users,
and continue to fix inverted destruction order in clients (like
`LLParser`), but instead I decided to make getting-teardown-right easy.
(If someone disagrees let me know.)

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

7 years agoRefactoring cl::parser construction and initialization.
Chris Bieneman [Thu, 22 Jan 2015 21:01:12 +0000 (21:01 +0000)]
Refactoring cl::parser construction and initialization.

Some parsers need references back to the option they are members of. This is used for handling the argument string as well as by the various pass name parsers for making pass names into flags.

Making parsers that need to refer back to the option have a reference to the option eliminates some of the members of various parsers, and enables further code cleanup.

Reviewers: dexonsmith

Subscribers: llvm-commits

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

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

7 years agoDon't use -z,defs on FreeBSD.
Rafael Espindola [Thu, 22 Jan 2015 20:57:30 +0000 (20:57 +0000)]
Don't use -z,defs on FreeBSD.

Looks like environ is defined only in the main binary.

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

7 years ago[emacs] Use c-mode-common-hook, derive from "gnu"
Ramkumar Ramachandra [Thu, 22 Jan 2015 20:56:25 +0000 (20:56 +0000)]
[emacs] Use c-mode-common-hook, derive from "gnu"

Make it clear that the "llvm.org" style is deriving from "gnu" style,
and use the c-mode-common-hook instead of c-mode-hook and c++-mode-hook.

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

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

7 years agoIntrinsics: introduce llvm_any_ty aka ValueType Any
Ramkumar Ramachandra [Thu, 22 Jan 2015 20:14:38 +0000 (20:14 +0000)]
Intrinsics: introduce llvm_any_ty aka ValueType Any

Specifically, gc.result benefits from this greatly. Instead of:


We now have a gc.result.* that can specialize to literally any type.

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

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

7 years agoRevert "Don't remove a landing pad if the invoke requires a table entry."
Reid Kleckner [Thu, 22 Jan 2015 19:29:46 +0000 (19:29 +0000)]
Revert "Don't remove a landing pad if the invoke requires a table entry."

This reverts commit r176827.

Bj√∂rn Steinbrink pointed out that this didn't actually fix the bug
(PR15555) it was attempting to fix.

With this reverted, we can now remove landingpad cleanups that
immediately resume unwinding, converting the invoke to a call.

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

7 years agoAdd the option, -indirect-symbols, used with -macho to print the Mach-O indirect...
Kevin Enderby [Thu, 22 Jan 2015 18:55:27 +0000 (18:55 +0000)]
Add the option, -indirect-symbols, used with -macho to print the Mach-O indirect symbol table to llvm-objdump.

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

7 years agomerge consecutive stores of extracted vector elements (PR21711)
Sanjay Patel [Thu, 22 Jan 2015 18:21:26 +0000 (18:21 +0000)]
merge consecutive stores of extracted vector elements (PR21711)

This is a 2nd try at the same optimization as http://reviews.llvm.org/D6698.
That patch was checked in at r224611, but reverted at r225031 because it
caused a failure outside of the regression tests.

The cause of the crash was not recognizing consecutive stores that have mixed
source values (loads and vector element extracts), so this patch adds a check
to bail out if any store value is not coming from a vector element extract.

This patch also refactors the shared logic of the constant source and vector
extracted elements source cases into a helper function.

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

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

7 years agoFix the condition in this assertion, and also make it into an unreachable.
Adrian Prantl [Thu, 22 Jan 2015 17:52:08 +0000 (17:52 +0000)]
Fix the condition in this assertion, and also make it into an unreachable.

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

7 years agoRevert "PR21408: Workaround the appearance of duplicate variables due to problems...
David Blaikie [Thu, 22 Jan 2015 17:49:59 +0000 (17:49 +0000)]
Revert "PR21408: Workaround the appearance of duplicate variables due to problems when inlining two calls to the same function from the same call site."

The underlying bug has been fixed in r226736 so there's no need to
workaround this anymore.

This reverts commit r220923.

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

7 years agoAArch64: decode all MRS/MSR forms early to avoid saving FeatureBits.
Tim Northover [Thu, 22 Jan 2015 17:23:04 +0000 (17:23 +0000)]
AArch64: decode all MRS/MSR forms early to avoid saving FeatureBits.

Currently, we're adding a uint64_t describing the current subtarget so
that matching can check whether the specified register is valid.
However, we want to move to a bitset for those bits (x86 has more than
64 of them).

This can't live in a union so it's probably better to do the checks
early (especially as there are only 3 of them).

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

7 years agoRun clang-format on parts of DebugInfo.h
Adrian Prantl [Thu, 22 Jan 2015 16:55:27 +0000 (16:55 +0000)]
Run clang-format on parts of DebugInfo.h

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

7 years agoDocument DIExpression.
Adrian Prantl [Thu, 22 Jan 2015 16:55:24 +0000 (16:55 +0000)]
Document DIExpression.

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

7 years agoRewrite DIExpression::printInternal() to use the iterator interface.
Adrian Prantl [Thu, 22 Jan 2015 16:55:22 +0000 (16:55 +0000)]
Rewrite DIExpression::printInternal() to use the iterator interface.

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

7 years agoRename DIExpressionIterator to DIExpression::iterator.
Adrian Prantl [Thu, 22 Jan 2015 16:55:20 +0000 (16:55 +0000)]
Rename DIExpressionIterator to DIExpression::iterator.
Addresses review feedback from Duncan.

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

7 years agoFix a comment.
Adrian Prantl [Thu, 22 Jan 2015 16:55:16 +0000 (16:55 +0000)]
Fix a comment.

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

7 years ago[pr21886] Change MCJIT/ELF to support MSVC C++ mangled symbol.
Rafael Espindola [Thu, 22 Jan 2015 14:20:45 +0000 (14:20 +0000)]
[pr21886] Change MCJIT/ELF to support MSVC C++ mangled symbol.

The ELF format is used on Windows by the MCJIT engine. Thus, on Windows, the
ELFObjectWriter can encounter symbols mangled using the MS Visual Studio C++
name mangling. Symbols mangled using the MSVC C++ name mangling can legally
have "@@@" as a substring. The EFLObjectWriter should not interpret the "@@@"
substring as specifying GNU-style symbol versioning. The ELFObjectWriter
therefore check for the MSVC C++ name mangling prefix which is either "?", "@?",
"imp_?" or "imp_?@".

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

7 years agoPass -Wl,-z,defs when building shared libraries, but not with the sanitizers.
Rafael Espindola [Thu, 22 Jan 2015 14:06:51 +0000 (14:06 +0000)]
Pass -Wl,-z,defs when building shared libraries, but not with the sanitizers.

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

7 years agoSilencing a -Wsign-compare warning (all uses of this constant are within unsigned...
Aaron Ballman [Thu, 22 Jan 2015 13:57:41 +0000 (13:57 +0000)]
Silencing a -Wsign-compare warning (all uses of this constant are within unsigned expressions anyway); NFC.

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

7 years ago[DAGCombine] Produce better code for constant splats
Michael Kuperstein [Thu, 22 Jan 2015 13:07:28 +0000 (13:07 +0000)]
[DAGCombine] Produce better code for constant splats

This solves PR22276.
Splats of constants would sometimes produce redundant shuffles, sometimes ridiculously so (see the PR for details). Fold these shuffles into BUILD_VECTORs early on instead.

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

Fixed recommit of r226811.

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

7 years agoMark |TLI| variables used to suppress -Wunused-variable warnings.
Alexander Potapenko [Thu, 22 Jan 2015 13:03:33 +0000 (13:03 +0000)]
Mark |TLI| variables used to suppress -Wunused-variable warnings.
(These vars are only used in assertions)

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

7 years agoRevert r226811, MSVC accepts code sane compilers don't.
Michael Kuperstein [Thu, 22 Jan 2015 12:48:07 +0000 (12:48 +0000)]
Revert r226811, MSVC accepts code sane compilers don't.

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

7 years ago[DAGCombine] Produce better code for constant splats
Michael Kuperstein [Thu, 22 Jan 2015 12:37:23 +0000 (12:37 +0000)]
[DAGCombine] Produce better code for constant splats

This solves PR22276.
Splats of constants would sometimes produce redundant shuffles, sometimes ridiculously so (see the PR for details). Fold these shuffles into BUILD_VECTORs early on instead.

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

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

7 years ago[ASan/Win] Move the shadow to 0x30000000
Timur Iskhodzhanov [Thu, 22 Jan 2015 12:24:21 +0000 (12:24 +0000)]
[ASan/Win] Move the shadow to 0x30000000

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

7 years agoFixed a bug in type legalizer for masked load/store intrinsics.
Elena Demikhovsky [Thu, 22 Jan 2015 12:07:59 +0000 (12:07 +0000)]
Fixed a bug in type legalizer for masked load/store intrinsics.
The problem occurs when after vectorization we have type
<2 x i32>. This type is promoted to <2 x i64> and then requires
additional efforts for expanding loads and truncating stores.
I added EXPAND / TRUNCATE attributes to the masked load/store
SDNodes. The code now contains additional shuffles.
I've prepared changes in the cost estimation for masked memory
operations, it will be submitted separately.

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

7 years agoFixed a comment
Elena Demikhovsky [Thu, 22 Jan 2015 10:01:36 +0000 (10:01 +0000)]
Fixed a comment

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

7 years agoFixed a bug in narrowing store operation.
Elena Demikhovsky [Thu, 22 Jan 2015 09:39:08 +0000 (09:39 +0000)]
Fixed a bug in narrowing store operation.
Type MVT::i1 became legal in KNL, but store operation can't be narrowed to this type,
since the size of VT (1 bit) is not equal to its actual store size(8 bits).

Added a test provided by David (dag@cray.com)

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

7 years ago[NFC] Introduce a 'struct Range' for IRCE
Sanjoy Das [Thu, 22 Jan 2015 09:32:02 +0000 (09:32 +0000)]
[NFC] Introduce a 'struct Range' for IRCE

Use the struct instead of a std::pair<Value *, Value *>.  This makes a
Range an obviously immutable object, and we can now assert that a
range is well-typed (Begin->getType() == End->getType()) on its

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

7 years agoRevert r226798. Guess I missed the patterns.
Craig Topper [Thu, 22 Jan 2015 09:01:20 +0000 (09:01 +0000)]
Revert r226798. Guess I missed the patterns.

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

7 years agoUse u8imm instead of i32i8imm on a couple instructions that have no patterns and...
Craig Topper [Thu, 22 Jan 2015 08:53:11 +0000 (08:53 +0000)]
Use u8imm instead of i32i8imm on a couple instructions that have no patterns and thus no reason to use a larger operand size.

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

7 years ago[X86] Remove some unused multiclasses from AVX512 instruction file.
Craig Topper [Thu, 22 Jan 2015 08:53:08 +0000 (08:53 +0000)]
[X86] Remove some unused multiclasses from AVX512 instruction file.

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

7 years agoFix crashes in IRCE caused by mismatched types
Sanjoy Das [Thu, 22 Jan 2015 08:29:18 +0000 (08:29 +0000)]
Fix crashes in IRCE caused by mismatched types

There are places where the inductive range check elimination pass
depends on two llvm::Values or llvm::SCEVs to be of the same
llvm::Type when they do not need to be. This patch relaxes those
restrictions (by bailing out of the optimization if the types
mismatch), and adds test cases to trigger those paths.

These issues were found by bootstrapping clang with IRCE running in
the -O3 pass ordering.

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

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

7 years agoSLPVectorizer: add a second limit for the number of alias checks.
Erik Eckstein [Thu, 22 Jan 2015 08:20:51 +0000 (08:20 +0000)]
SLPVectorizer: add a second limit for the number of alias checks.

Even with the current limit on the number of alias checks, the containing loop has quadratic complexity.
This begins to hurt for blocks containing > 1K load/store instructions.
This commit introduces a limit for the loop count. It reduces the runtime for such very large blocks.

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

7 years agoFixed a bug in masked load/store in reversed loop.
Elena Demikhovsky [Thu, 22 Jan 2015 08:20:06 +0000 (08:20 +0000)]
Fixed a bug in masked load/store in reversed loop.
Added a test.

The bug was submitted to bugzilla:

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

7 years ago[PM] Rename InstCombine.h to InstCombineInternal.h in preparation for
Chandler Carruth [Thu, 22 Jan 2015 05:25:13 +0000 (05:25 +0000)]
[PM] Rename InstCombine.h to InstCombineInternal.h in preparation for
creating a non-internal header file for the InstCombine pass.

I thought about calling this InstCombiner.h or in some way more clearly
associating it with the InstCombiner clas that it is primarily defining,
but there are several other utility interfaces defined within this for
InstCombine. If, in the course of refactoring, those end up moving
elsewhere or going away, it might make more sense to make this the
combiner's header alone.

Naturally, this is a bikeshed to a certain degree, so feel free to lobby
for a different shade of paint if this name just doesn't suit you.

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

7 years ago[canonicalize] Teach InstCombine to canonicalize loads which are only
Chandler Carruth [Thu, 22 Jan 2015 05:08:12 +0000 (05:08 +0000)]
[canonicalize] Teach InstCombine to canonicalize loads which are only
ever stored to always use a legal integer type if one is available.

Regardless of whether this particular type is good or bad, it ensures we
don't get weird differences in generated code (and resulting
performance) from "equivalent" patterns that happen to end up using
a slightly different type.

After some discussion on llvmdev it seems everyone generally likes this
canonicalization. However, there may be some parts of LLVM that handle
it poorly and need to be fixed. I have at least verified that this
doesn't impede GVN and instcombine's store-to-load forwarding powers in
any obvious cases. Subtle cases are exactly what we need te flush out if
they remain.

Also note that this IR pattern should already be hitting LLVM from Clang
at least because it is exactly the IR which would be produced if you
used memcpy to copy a pointer or floating point between memory instead
of a variable.

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

7 years agoARM: fail less catastrophically on invalid Windows input
Saleem Abdulrasool [Thu, 22 Jan 2015 04:03:32 +0000 (04:03 +0000)]
ARM: fail less catastrophically on invalid Windows input

Windows supports a restricted set of relocations (compared to ARM ELF).  In some
cases, we may end up generating an unsupported relocation.  This can occur with
bad input to the assembler in particular (the frontend should never generate
code that cannot be compiled).  Generate an error rather than just aborting.

The change in the API is driven by the desire to provide a slightly more helpful
message for debugging purposes.

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

7 years ago[canonicalize] Move a helper function further up the file so it can be
Chandler Carruth [Thu, 22 Jan 2015 03:34:54 +0000 (03:34 +0000)]
[canonicalize] Move a helper function further up the file so it can be
used earlier. NFC.

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

7 years agoDIBuilder: Make header iterator constructor explicit, NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 03:20:09 +0000 (03:20 +0000)]
DIBuilder: Make header iterator constructor explicit, NFC

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

7 years agoDIBuilder: Extract header_begin() and header_end(), NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 03:17:43 +0000 (03:17 +0000)]
DIBuilder: Extract header_begin() and header_end(), NFC

Use begin/end functions so that users don't need to know how these weird
things work.

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

7 years agoDIBuilder: Stop abusing DIExpressionIterator::operator*(), NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 03:13:35 +0000 (03:13 +0000)]
DIBuilder: Stop abusing DIExpressionIterator::operator*(), NFC

This code was confusing, since it created a `DIExpressionIterator` from
an invalid start point (although it wasn't wrong: it never actually
iterated).  Now that the underlying iterator has `getNumber()`, just use
it directly.

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

7 years agoDIBuilder: Extract DIHeaderFieldIterator::getNumber(), NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 03:11:13 +0000 (03:11 +0000)]
DIBuilder: Extract DIHeaderFieldIterator::getNumber(), NFC

Reduce code duplication between `DIBuilder` and `DIExpressionIterator`
by implementing a `getNumber()` directly in the iterator.

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

7 years agoDIBuilder: Create a getHeaderIterator() helper, NFC
Duncan P. N. Exon Smith [Thu, 22 Jan 2015 03:00:01 +0000 (03:00 +0000)]
DIBuilder: Create a getHeaderIterator() helper, NFC

Extract this so it can be reused.

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

7 years agoMaking deleted copy constructors and operators to be private for better diagnostics...
Chris Bieneman [Thu, 22 Jan 2015 02:51:33 +0000 (02:51 +0000)]
Making deleted copy constructors and operators to be private for better diagnostics when deleted is not available.

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

7 years agoSEH: Finish writing the catch-all test case
Reid Kleckner [Thu, 22 Jan 2015 02:31:09 +0000 (02:31 +0000)]
SEH: Finish writing the catch-all test case

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

7 years agoWin64 SEH: Emit the constant 1 for catch-all into xdata
Reid Kleckner [Thu, 22 Jan 2015 02:27:44 +0000 (02:27 +0000)]
Win64 SEH: Emit the constant 1 for catch-all into xdata

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

7 years agoAssigning and copying command line option objects shouldn't be allowed.
Chris Bieneman [Thu, 22 Jan 2015 01:49:59 +0000 (01:49 +0000)]
Assigning and copying command line option objects shouldn't be allowed.

The default copy and assignment operators for these objects probably don't actually do what the clients intend, so they should be deleted.

Places using the assignment operator to set the value of an option should cast to the option's data type first to call into the override for operator=. Places using the copy constructor just need to be changed to not copy (i.e. passing by const reference instead of value).

Reviewers: dexonsmith, chandlerc

Subscribers: llvm-commits

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

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

7 years agoMake ScalarEvolution less aggressive with respect to no-wrap flags.
Sanjoy Das [Thu, 22 Jan 2015 00:48:47 +0000 (00:48 +0000)]
Make ScalarEvolution less aggressive with respect to no-wrap flags.

ScalarEvolution currently lowers a subtraction recurrence to an add
recurrence with the same no-wrap flags as the subtraction.  This is
incorrect because `sub nsw X, Y` is not the same as `add nsw X, -Y`
and `sub nuw X, Y` is not the same as `add nuw X, -Y`.  This patch
fixes the issue, and adds two test cases demonstrating the bug.

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

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

7 years agoExplicitly describe '///' versus '//' comment delimiters.
Paul Robinson [Thu, 22 Jan 2015 00:19:56 +0000 (00:19 +0000)]
Explicitly describe '///' versus '//' comment delimiters.

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