platform/upstream/llvm.git
10 years ago[FastISel][X86] Optimize selects when the condition comes from a compare.
Juergen Ributzka [Mon, 23 Jun 2014 21:55:36 +0000 (21:55 +0000)]
[FastISel][X86] Optimize selects when the condition comes from a compare.

Optimize the select instructions sequence to use the EFLAGS directly from a
compare when possible.

llvm-svn: 211543

10 years agoMake ObjectFile and BitcodeReader always own the MemoryBuffer.
Rafael Espindola [Mon, 23 Jun 2014 21:53:12 +0000 (21:53 +0000)]
Make ObjectFile and BitcodeReader always own the MemoryBuffer.

This allows us to just use a std::unique_ptr to store the pointer to the buffer.
The flip side is that they have to support releasing the buffer back to the
caller.

Overall this looks like a more efficient and less brittle api.

llvm-svn: 211542

10 years agoTemporarily roll back the parts of r211241 where I fixed a
Jason Molenda [Mon, 23 Jun 2014 21:30:15 +0000 (21:30 +0000)]
Temporarily roll back the parts of r211241 where I fixed a
mistake in the lock acquistion in HistoryUnwind and HistoryThread.
We've got a deadlock with one use case of HistoryUnwind; I
need to figure out what lock ordering is causing this and fix
it for real.
<rdar://problem/17411904>

llvm-svn: 211541

10 years agoThis reverts commit r211533 and r211539.
Rafael Espindola [Mon, 23 Jun 2014 21:20:58 +0000 (21:20 +0000)]
This reverts commit r211533 and r211539.

 Revert "Fix PR20056: Implement pseudo LDR <reg>, =<literal/label> for AArch64"
 Revert "Fix cmake build."

It was missing a file.

llvm-svn: 211540

10 years agoFix cmake build.
Juergen Ributzka [Mon, 23 Jun 2014 21:15:55 +0000 (21:15 +0000)]
Fix cmake build.

llvm-svn: 211539

10 years agoSimplify memory management with std::unique_ptr.
Rafael Espindola [Mon, 23 Jun 2014 21:15:27 +0000 (21:15 +0000)]
Simplify memory management with std::unique_ptr.

llvm-svn: 211538

10 years agonm-trivial-object.test requires shell since Lit internal runner isn't capable of...
NAKAMURA Takumi [Mon, 23 Jun 2014 21:07:04 +0000 (21:07 +0000)]
nm-trivial-object.test requires shell since Lit internal runner isn't capable of chdir.

llvm-svn: 211537

10 years agoDon't set the ABI to apcs-gnu for non-ARM iOS targets (i.e., the
Sean Callanan [Mon, 23 Jun 2014 21:00:25 +0000 (21:00 +0000)]
Don't set the ABI to apcs-gnu for non-ARM iOS targets (i.e., the
simulator).

<rdar://problem/17399406>

llvm-svn: 211536

10 years agoPart 2 of SBUnitSignals check-in.
Todd Fiala [Mon, 23 Jun 2014 20:56:48 +0000 (20:56 +0000)]
Part 2 of SBUnitSignals check-in.

I missed adding a few new files to the change list.
The build is broken from r211526 without this fix.
(And Ed Maste caught it before I did, so this is
the remainder - the test methods).

llvm-svn: 211535

10 years agoAdd SBUnixSignals.i
Ed Maste [Mon, 23 Jun 2014 20:49:41 +0000 (20:49 +0000)]
Add SBUnixSignals.i

From the patch posted by Russell Harmon.

llvm-svn: 211534

10 years agoFix PR20056: Implement pseudo LDR <reg>, =<literal/label> for AArch64
Weiming Zhao [Mon, 23 Jun 2014 20:44:16 +0000 (20:44 +0000)]
Fix PR20056: Implement pseudo LDR <reg>, =<literal/label> for AArch64

This patch is based on the changes from ARM target [1,2]

Based on ARM doc [3], if the literal value can be loaded with a valid MOV,
it can emit that instruction. This is implemented in this patch.

[1] Fix PR18345: ldr= pseudo instruction produces incorrect code when using in inline assembly
Author: David Peixotto <dpeixott@codeaurora.org>
commit b92cca222898d87bbc764fa22e805adb04ef7f13 (r200777)
[2] Implement the ldr-pseudo opcode for ARM assembly
Author: David Peixotto <dpeixott@codeaurora.org>
commit 0fa193b08627927ccaa0804a34d80480894614b8 (r197708)
[3] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0802a/CJAHAIBC.html

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

llvm-svn: 211533

10 years agoConvert a few methods to use ErrorOr.
Rafael Espindola [Mon, 23 Jun 2014 20:41:02 +0000 (20:41 +0000)]
Convert a few methods to use ErrorOr.

It used to be inconvenient to mix ErrorOr and UniquePtr, but with c++11
they work OK together.

llvm-svn: 211532

10 years agoSupport: Extract ScaledNumbers::matchScale()
Duncan P. N. Exon Smith [Mon, 23 Jun 2014 20:40:45 +0000 (20:40 +0000)]
Support: Extract ScaledNumbers::matchScale()

llvm-svn: 211531

10 years agoFix spelling. s/overloaed/overloaded/
Jim Grosbach [Mon, 23 Jun 2014 20:28:43 +0000 (20:28 +0000)]
Fix spelling. s/overloaed/overloaded/

llvm-svn: 211530

10 years agoChange the default input for llvm-nm to be a.out instead of standard input
Kevin Enderby [Mon, 23 Jun 2014 20:27:53 +0000 (20:27 +0000)]
Change the default input for llvm-nm to be a.out instead of standard input
to match llvm-size and other UNIX systems for their nm(1).

Tweak test cases that used llvm-nm with standard input to add a "-" to
indicate that and add a test case to check the default of a.out for llvm-nm.

llvm-svn: 211529

10 years agoCodeGen: Remove a stray tab character (NFC)
Justin Bogner [Mon, 23 Jun 2014 20:03:28 +0000 (20:03 +0000)]
CodeGen: Remove a stray tab character (NFC)

llvm-svn: 211528

10 years ago[Mips] Add a target streamer when creating a null streamer.
Rafael Espindola [Mon, 23 Jun 2014 19:43:40 +0000 (19:43 +0000)]
[Mips] Add a target streamer when creating a null streamer.

Should fix DebugInfo/global.ll on the mips bot.

llvm-svn: 211527

10 years agoAdd API control of the signal disposition.
Todd Fiala [Mon, 23 Jun 2014 19:30:49 +0000 (19:30 +0000)]
Add API control of the signal disposition.

See http://reviews.llvm.org/D4221 for details.

This commit allows you to control the signals that lldb will suppress, stop or forward using the Python and C++ APIs.

Change by Russell Harmon.

Xcode build system changes (and any mistakes) by Todd Fiala.  Tested on MacOSX 10.9.3 and Xcode 6 beta.  (Xcode 5 is hitting the dependency checker crasher on all my systems).

llvm-svn: 211526

10 years agoRecommit 211309 (StringMap::insert), reverted in 211328 due to issues with private...
David Blaikie [Mon, 23 Jun 2014 18:28:53 +0000 (18:28 +0000)]
Recommit 211309 (StringMap::insert), reverted in 211328 due to issues with private, but non-deleted, move members.

Certain versions of GCC (~4.7) couldn't handle the SFINAE on access
control, but with "= delete" (hidden behind a macro for portability)
this issue is worked around/addressed.

Patch by Agustín Bergé

llvm-svn: 211525

10 years agoR600/SI: Verify restrictions on div_scale operands.
Matt Arsenault [Mon, 23 Jun 2014 18:28:31 +0000 (18:28 +0000)]
R600/SI: Verify restrictions on div_scale operands.

llvm-svn: 211524

10 years agoR600/SI: Fix div_scale intrinsic.
Matt Arsenault [Mon, 23 Jun 2014 18:28:28 +0000 (18:28 +0000)]
R600/SI: Fix div_scale intrinsic.

The operand that must match one of the others does matter,
and implement selecting for it.

llvm-svn: 211523

10 years agoR600: Fix formatting of intrinsic definitions.
Matt Arsenault [Mon, 23 Jun 2014 18:28:23 +0000 (18:28 +0000)]
R600: Fix formatting of intrinsic definitions.

It makes more sense for the GCCBuiltin name to come immediately
after the ID name.

llvm-svn: 211522

10 years agoCleanup r211507
Duncan P. N. Exon Smith [Mon, 23 Jun 2014 18:08:58 +0000 (18:08 +0000)]
Cleanup r211507

llvm-svn: 211521

10 years agoARMEB: Vector extend operations
Christian Pirker [Mon, 23 Jun 2014 18:05:53 +0000 (18:05 +0000)]
ARMEB: Vector extend operations

Reviewed at http://reviews.llvm.org/D4043

llvm-svn: 211520

10 years agoR600: Remove AMDILISelLowering
Matt Arsenault [Mon, 23 Jun 2014 18:00:55 +0000 (18:00 +0000)]
R600: Remove AMDILISelLowering

llvm-svn: 211519

10 years agoR600: Select is not expensive.
Matt Arsenault [Mon, 23 Jun 2014 18:00:52 +0000 (18:00 +0000)]
R600: Select is not expensive.

llvm-svn: 211518

10 years agoR600: Move add/sub with overflow out of AMDILISelLowering
Matt Arsenault [Mon, 23 Jun 2014 18:00:49 +0000 (18:00 +0000)]
R600: Move add/sub with overflow out of AMDILISelLowering

Add more tests for these.

llvm-svn: 211517

10 years agoR600: Move more out of AMDILISelLowering
Matt Arsenault [Mon, 23 Jun 2014 18:00:44 +0000 (18:00 +0000)]
R600: Move more out of AMDILISelLowering

llvm-svn: 211516

10 years agoR600: Don't set fp_round_inreg action.
Matt Arsenault [Mon, 23 Jun 2014 18:00:41 +0000 (18:00 +0000)]
R600: Don't set fp_round_inreg action.

There's no point in setting this since it seems to only
by created in 1 place for ppcf128

llvm-svn: 211515

10 years agoR600/SI: Handle i64 sub.
Matt Arsenault [Mon, 23 Jun 2014 18:00:38 +0000 (18:00 +0000)]
R600/SI: Handle i64 sub.

We can handle it the same way as add

llvm-svn: 211514

10 years agoR600/SI: Move selection of i64 add to separate function.
Matt Arsenault [Mon, 23 Jun 2014 18:00:34 +0000 (18:00 +0000)]
R600/SI: Move selection of i64 add to separate function.

Also don't use a SmallVector for fixed size array.

llvm-svn: 211513

10 years agoR600: Rename AMDIL file
Matt Arsenault [Mon, 23 Jun 2014 18:00:31 +0000 (18:00 +0000)]
R600: Rename AMDIL file

llvm-svn: 211512

10 years agoFix missing words in sentence
Matt Arsenault [Mon, 23 Jun 2014 18:00:26 +0000 (18:00 +0000)]
Fix missing words in sentence

llvm-svn: 211511

10 years agoUse helper function
Matt Arsenault [Mon, 23 Jun 2014 18:00:24 +0000 (18:00 +0000)]
Use helper function

llvm-svn: 211510

10 years agoAlphabetize forward declarations
Matt Arsenault [Mon, 23 Jun 2014 18:00:20 +0000 (18:00 +0000)]
Alphabetize forward declarations

llvm-svn: 211509

10 years agoDelete utils/FileUpdate.
Rafael Espindola [Mon, 23 Jun 2014 17:58:39 +0000 (17:58 +0000)]
Delete utils/FileUpdate.

It is unused and it looks like it was never used.

llvm-svn: 211508

10 years agoSupport: Extract ScaledNumbers::compare()
Duncan P. N. Exon Smith [Mon, 23 Jun 2014 17:47:40 +0000 (17:47 +0000)]
Support: Extract ScaledNumbers::compare()

llvm-svn: 211507

10 years agoDriver: correct behaviour of -fmsc-version=MAJOR
Saleem Abdulrasool [Mon, 23 Jun 2014 17:36:36 +0000 (17:36 +0000)]
Driver: correct behaviour of -fmsc-version=MAJOR

Ensure that we properly handle the case where just the major version component
is provided by the user.

Thanks to Alp Toker for pointing out that this was not handled correctly!

llvm-svn: 211506

10 years agoMS ABI: Add an additional test for typeid
David Majnemer [Mon, 23 Jun 2014 17:30:27 +0000 (17:30 +0000)]
MS ABI: Add an additional test for typeid

This tests typeid with polymorphic arguments which have an extendable
virtual function table.

llvm-svn: 211505

10 years agoStop sharing the FileManager in ASTUnit::Parse
Ben Langmuir [Mon, 23 Jun 2014 16:36:40 +0000 (16:36 +0000)]
Stop sharing the FileManager in ASTUnit::Parse

We were using old stat values for any files that had previously been
looked up, leading to badness. There might be a more elegant solution in
invalidating the cache for those file (since we already know which ones
they are), but it seems too likely there are existing references to
them hiding somewhere.

llvm-svn: 211504

10 years agolldb: deal with non-portable PTRACE-related constants
Todd Fiala [Mon, 23 Jun 2014 15:59:04 +0000 (15:59 +0000)]
lldb: deal with non-portable PTRACE-related constants

See http://reviews.llvm.org/D4091 for details.

Change by Paul Osmialowski.

llvm-svn: 211503

10 years agoAllow using .cfi_startproc without a leading symbol.
Rafael Espindola [Mon, 23 Jun 2014 15:34:32 +0000 (15:34 +0000)]
Allow using .cfi_startproc without a leading symbol.

This is possible now that we don't produce .eh symbols. This fixes pr19430.

llvm-svn: 211502

10 years agoclang-format initializer to reduce noise in another patch.
Rafael Espindola [Mon, 23 Jun 2014 15:17:34 +0000 (15:17 +0000)]
clang-format initializer to reduce noise in another patch.

llvm-svn: 211501

10 years agoStop producing func.eh symbols on Darwin.
Rafael Espindola [Mon, 23 Jun 2014 15:13:23 +0000 (15:13 +0000)]
Stop producing func.eh symbols on Darwin.

According Nick Kledzik (http://llvm.org/bugs/show_bug.cgi?id=19430#c2):
"... mach-o no longer needs names in the __eh_frame section (and has not for
years)."

Iain Sandoe confirms it is also unnecessary for their old darwin support.

llvm-svn: 211500

10 years agoRemove a temporary hack.
Rafael Espindola [Mon, 23 Jun 2014 14:22:55 +0000 (14:22 +0000)]
Remove a temporary hack.

Amusingly this survived a lot longer than the CFI transition. We don't even
support non-cfi assemblers any more.

llvm-svn: 211498

10 years ago[PowerPC] Refactor getMinCallFrameSize / getMinCallArgumentsSize
Ulrich Weigand [Mon, 23 Jun 2014 14:15:53 +0000 (14:15 +0000)]
[PowerPC] Refactor getMinCallFrameSize / getMinCallArgumentsSize

As of r211495, the only remaining users of getMinCallFrameSize are in
core ABI code (LowerFormalParameter / LowerCall).  This is actually a
good thing, since the details of the parameter save area are ABI specific.

With the new ELFv2 ABI in particular, the rules defining the size of the
save area will become significantly more complex, so it wouldn't make
sense to implement those outside ABI code that has all required
information.

In preparation, this patch eliminates the getMinCallFrameSize (and
associated getMinCallArgumentsSize) routines, and inlines them into all
callers.  Note that since nearly all call arguments are constant, this
allows simplifying the inlined copies to a single line everywhere.

No change in generate code expected.

llvm-svn: 211497

10 years agoProtect functions taking double by #ifdef cl_khr_fp64
Jeroen Ketema [Mon, 23 Jun 2014 14:15:39 +0000 (14:15 +0000)]
Protect functions taking double by #ifdef cl_khr_fp64

Also change the order of the functions to be consistent with
the order in the header files.

llvm-svn: 211496

10 years ago[PowerPC] Allow stack frames without parameter save area
Ulrich Weigand [Mon, 23 Jun 2014 13:47:52 +0000 (13:47 +0000)]
[PowerPC] Allow stack frames without parameter save area

The PPCFrameLowering::determineFrameLayout routine currently ensures
that every function that allocates a stack frame provides space for the
parameter save area (via PPCFrameLowering::getMinCallFrameSize).

This is actually not necessary.  There may be functions that never call
another routine but still allocate a frame; those do not require the
parameter save area.  In the future, with the ELFv2 ABI, even some
routines that do call other functions do not need to allocate the
parameter save area.

While it is not a bug to allocate the parameter area when it is not
needed, it is better to avoid it to save stack space.

Note that when any particular function call requires the parameter save
area, this space will already have been included by ABI code in the size
the CALLSEQ_START insn is annotated with, and therefore included in the
size returned by MFI->getMaxCallFrameSize().

This means that determineFrameLayout simply does not need to care about
the parameter save area.  (It still needs to ensure that every frame
provides the linkage area.)  This is implemented by this patch.

Note that this exposed a bug in the new fast-isel code where the parameter
area was *not* included in the CALLSEQ_START size; this is also fixed.

A couple of test cases needed to be adapted for the new (smaller) stack
frame size those tests now see.

llvm-svn: 211495

10 years ago[PowerPC] Fix IsDarwin arg in PPCFrameLowering:: calls
Ulrich Weigand [Mon, 23 Jun 2014 13:21:43 +0000 (13:21 +0000)]
[PowerPC] Fix IsDarwin arg in PPCFrameLowering:: calls

As remarked in the commit message to r211493, in several places
throughout the 64-bit SVR4 ABI code there are calls to
PPCFrameLowering::getLinkageSize and getMinCallFrameSize
using an incorrect IsDarwin argument of "true".

(Some of those were made explicit by the above refactoring patch, others
have been there all along.)

This patch fixes those places to pass "false" for IsDarwin.

No change in generated code expected.

llvm-svn: 211494

10 years ago[PowerPC] Refactor setMinReservedArea and CalculateParameterAndLinkageAreaSize
Ulrich Weigand [Mon, 23 Jun 2014 13:08:27 +0000 (13:08 +0000)]
[PowerPC] Refactor setMinReservedArea and CalculateParameterAndLinkageAreaSize

The PPCISelLowering.cpp routines PPCTargetLowering::setMinReservedArea and
CalculateParameterAndLinkageAreaSize are currently used as subroutines
from both 64-bit SVR4 and Darwin ABI code.

However, the two ABIs are already quite different w.r.t. AltiVec
conventions, and they will become more different when the ELFv2 ABI is
supported.  Also, in general it seems better to disentangle ABI support
routines for different ABIs to avoid accidentally affecting one ABI when
intending to change only the other.

(Actually, the current code strictly speaking already contains a bug:
these routines call PPCFrameLowering::getMinCallFrameSize and
PPCFrameLowering::getLinkageSize with the IsDarwin parameter set to
"true" even on 64-bit SVR4.  This bug currently has no adverse effect
since those routines always return the same for 64-bit SVR4 and 64-bit
Darwin, but it still seems wrong ...  I'll fix this in a follow-up
commit shortly.)

To remove this code sharing, I'm simply inlining both routines into all
call sites (there are just two each, one for 64-bit SVR4 and one for
Darwin), and simplifying due to constant parameters where possible.

A small piece of code that *does* make sense to share is refactored into
the new routine EnsureStackAlignment, now also called from 32-bit SVR4
ABI code.

No change in generated code is expected.

llvm-svn: 211493

10 years ago[PowerPC] Fix on-stack AltiVec arguments with 64-bit SVR4
Ulrich Weigand [Mon, 23 Jun 2014 12:36:34 +0000 (12:36 +0000)]
[PowerPC] Fix on-stack AltiVec arguments with 64-bit SVR4

Current 64-bit SVR4 code seems to have some remnants of Darwin code
in AltiVec argument handing.  This had the effect that AltiVec arguments
(or subsequent arguments) were not correctly placed in the parameter area
in some cases.

The correct behaviour with the 64-bit SVR4 ABI is:
- All AltiVec arguments take up space in the parameter area, just like
  any other arguments, whether vararg or not.
- They are always 16-byte aligned, skipping a parameter area doubleword
  (and the associated GPR, if any), if necessary.

This patch implements the correct behaviour and adds a test case.
(Verified against GCC behaviour via the ABI compat test suite.)

llvm-svn: 211492

10 years ago[Mips] Make rel-dynamic-03.test test case independent from external input files.
Simon Atanasyan [Mon, 23 Jun 2014 12:28:11 +0000 (12:28 +0000)]
[Mips] Make rel-dynamic-03.test test case independent from external input files.

llvm-svn: 211491

10 years agoARM: mark UBFX as not allowing PC.
Tim Northover [Mon, 23 Jun 2014 09:20:02 +0000 (09:20 +0000)]
ARM: mark UBFX as not allowing PC.

Strictly, it's unpredictable. But we don't quite model that yet and an error is
better than ignoring the issue. This one somehow got left out before though.

rdar://problem/15997748

llvm-svn: 211490

10 years ago[OPENMP] Reformatting and code improvement.
Alexey Bataev [Mon, 23 Jun 2014 08:21:53 +0000 (08:21 +0000)]
[OPENMP] Reformatting and code improvement.

llvm-svn: 211489

10 years agoclang-format: [proto] Add required space before absolute references.
Daniel Jasper [Mon, 23 Jun 2014 07:36:25 +0000 (07:36 +0000)]
clang-format: [proto] Add required space before absolute references.

llvm-svn: 211488

10 years agoclang-format: Fix corner case in pointer/reference detection.
Daniel Jasper [Mon, 23 Jun 2014 07:36:18 +0000 (07:36 +0000)]
clang-format: Fix corner case in pointer/reference detection.

llvm-svn: 211487

10 years agoMC: Cleanup parseMSInlineAsm
David Majnemer [Mon, 23 Jun 2014 02:17:16 +0000 (02:17 +0000)]
MC: Cleanup parseMSInlineAsm

Utilize range based for-loops to simplify some code.
Use insert() instead of a loop for simplicity/efficiency.

No functionality change.

llvm-svn: 211486

10 years agoParse: Simplify construction of the clobber list
David Majnemer [Mon, 23 Jun 2014 02:16:41 +0000 (02:16 +0000)]
Parse: Simplify construction of the clobber list

This avoids going over the clobber list twice.

No functionality change.

llvm-svn: 211485

10 years agoStaticAnalyzer: Switch a loop to a range-based for
David Majnemer [Mon, 23 Jun 2014 02:16:38 +0000 (02:16 +0000)]
StaticAnalyzer: Switch a loop to a range-based for

Merely a code simplification, no functionality change.

llvm-svn: 211484

10 years agoAST: Add ranges for AsmStmt's inputs and outputs
David Majnemer [Mon, 23 Jun 2014 02:16:34 +0000 (02:16 +0000)]
AST: Add ranges for AsmStmt's inputs and outputs

No functionality change.

llvm-svn: 211483

10 years agocindex.py: remove obsolete workaround and FIXME
Alp Toker [Sun, 22 Jun 2014 23:28:54 +0000 (23:28 +0000)]
cindex.py: remove obsolete workaround and FIXME

clang_getCursorSpelling() doesn't assert on non-declarations any more and the
behaviour is covered by c-index tests.

Passes nosetests.

llvm-svn: 211482

10 years agoMC: adjust text section flags for WoA
Saleem Abdulrasool [Sun, 22 Jun 2014 22:25:01 +0000 (22:25 +0000)]
MC: adjust text section flags for WoA

Correct the section flags for code built for Windows on ARM with
`-ffunction-sections`.  Windows on ARM uses solely Thumb-2 instructions, and
indicates that the function is thumb by placing it in a text section that has
IMAGE_SCN_MEM_16BIT flag set.

When we encounter a .section directive, a new section is constructed.  This may
be a text segment.  In order to identify that we need the additional flag,
expose the target triple through the ObjectFileInfo as this information is lost
otherwise.

Since any modern ARM targeting environment on Windows would be Thumb-2 (Windows
ARM NT or Windows Embedded Compact), introducing a new flag to indicate the
section attribute seems to be a bit overkill.  Simply depend on the target
triple.  Since there is one location that this information is currently needed,
creating a target specific assembly parser and delegating the parsing of section
switches also feels a bit heavy handed.  If it turns out that this information
ends up changing additional behaviour, then it may be worth considering that
alternative.

llvm-svn: 211481

10 years agoRevert r211399, "Generate native unwind info on Win64"
NAKAMURA Takumi [Sun, 22 Jun 2014 22:00:56 +0000 (22:00 +0000)]
Revert r211399, "Generate native unwind info on Win64"

It broke Legacy JIT Tests on x86_64-{mingw32|msvc}, aka Windows x64.

llvm-svn: 211480

10 years agoDiagnosticIDs: use diagnostic severities to simplify extension handling
Alp Toker [Sun, 22 Jun 2014 21:58:33 +0000 (21:58 +0000)]
DiagnosticIDs: use diagnostic severities to simplify extension handling

llvm-svn: 211479

10 years agoR600: Use LowerSDIVREM for i64 node replace
Jan Vesely [Sun, 22 Jun 2014 21:43:01 +0000 (21:43 +0000)]
R600: Use LowerSDIVREM for i64 node replace

v2: move div/rem node replacement to R600ISelLowering
    make lowerSDIVREM protected

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 211478

10 years agoR600: Implement custom SDIVREM.
Jan Vesely [Sun, 22 Jun 2014 21:43:00 +0000 (21:43 +0000)]
R600: Implement custom SDIVREM.

Instead of separate SDIV/SREM. SDIV used UDIV which in turn used UDIVREM anyway.
SREM used SDIV(UDIV->UDIVREM)+MUL+SUB, using UDIVREM directly is more efficient.

v2: Don't use all caps names

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 211477

10 years agoR600: Add udivrem test
Jan Vesely [Sun, 22 Jun 2014 21:42:58 +0000 (21:42 +0000)]
R600: Add udivrem test

v2: move < %s to the end of the line
    space after ;
    add v4i32 test

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 211476

10 years agoFix the category name for hash-warnings and hash-errors
Alp Toker [Sun, 22 Jun 2014 21:16:50 +0000 (21:16 +0000)]
Fix the category name for hash-warnings and hash-errors

llvm-svn: 211475

10 years agoDriver: Skip the -ivfsoverlay argument in driver crash diags
Justin Bogner [Sun, 22 Jun 2014 20:35:10 +0000 (20:35 +0000)]
Driver: Skip the -ivfsoverlay argument in driver crash diags

llvm-svn: 211474

10 years agoRevert "Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and...
David Majnemer [Sun, 22 Jun 2014 19:05:33 +0000 (19:05 +0000)]
Revert "Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid" It crashes msvc codegen in clang/test/SemaCXX/undefined-internal.cpp."

This reverts commit r211467 which reverted r211408,r211410, it caused
crashes in test/SemaCXX/undefined-internal.cpp for i686-win32 targets.

llvm-svn: 211473

10 years agoFix PR20087 by using the source index when changing the vector load
Filipe Cabecinhas [Sun, 22 Jun 2014 17:21:37 +0000 (17:21 +0000)]
Fix PR20087 by using the source index when changing the vector load

llvm-svn: 211472

10 years ago[cxx_status] Minor wording tweaks.
Richard Smith [Sun, 22 Jun 2014 16:00:05 +0000 (16:00 +0000)]
[cxx_status] Minor wording tweaks.

llvm-svn: 211471

10 years ago[cxx_status] Be a bit more precise.
Richard Smith [Sun, 22 Jun 2014 15:56:23 +0000 (15:56 +0000)]
[cxx_status] Be a bit more precise.

llvm-svn: 211470

10 years agoFix dead link.
Richard Smith [Sun, 22 Jun 2014 15:54:54 +0000 (15:54 +0000)]
Fix dead link.

llvm-svn: 211469

10 years agoRemove useless declaration
Sylvestre Ledru [Sun, 22 Jun 2014 13:18:53 +0000 (13:18 +0000)]
Remove useless declaration

llvm-svn: 211468

10 years agoRevert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid...
NAKAMURA Takumi [Sun, 22 Jun 2014 12:42:29 +0000 (12:42 +0000)]
Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid" It crashes msvc codegen in clang/test/SemaCXX/undefined-internal.cpp.

It is reproducible with:

  $ clang -cc1 -triple i686-win32 -emit-llvm-only clang/test/SemaCXX/undefined-internal.cpp

llvm-svn: 211467

10 years agoIntroduce a Lit feature "debug_frame" and apply it to llvm/test/MC/ELF/cfi-version.ll.
NAKAMURA Takumi [Sun, 22 Jun 2014 12:35:39 +0000 (12:35 +0000)]
Introduce a Lit feature "debug_frame" and apply it to llvm/test/MC/ELF/cfi-version.ll.

.debug_frame is not emitted for targeting Windows x64.

llvm-svn: 211466

10 years agoAdd a description to the test from r211433 explaining why it's written that way.
Benjamin Kramer [Sun, 22 Jun 2014 12:22:04 +0000 (12:22 +0000)]
Add a description to the test from r211433 explaining why it's written that way.

llvm-svn: 211465

10 years agoRemove unused diagnostic and diagnostic group.
Benjamin Kramer [Sun, 22 Jun 2014 12:16:35 +0000 (12:16 +0000)]
Remove unused diagnostic and diagnostic group.

llvm-svn: 211464

10 years ago[Mips] Make rel-dynamic-01.test test case independent from external input files.
Simon Atanasyan [Sun, 22 Jun 2014 11:58:08 +0000 (11:58 +0000)]
[Mips] Make rel-dynamic-01.test test case independent from external input files.

llvm-svn: 211463

10 years agoTextDiagnosticPrinter: use the mapped level for remark flag computation
Alp Toker [Sun, 22 Jun 2014 10:08:06 +0000 (10:08 +0000)]
TextDiagnosticPrinter: use the mapped level for remark flag computation

Custom diagnostics don't have a builtin class so this wouldn't have worked.
Reduces surface area of remark-related changes.

No test coverage.

llvm-svn: 211462

10 years agoEnable WindowsToolChain on all native Windows builds
Alp Toker [Sun, 22 Jun 2014 04:31:15 +0000 (04:31 +0000)]
Enable WindowsToolChain on all native Windows builds

Make binaries built by MSVC, mingw and clang functionally equivalent. The
checks are trivially performed at runtime to eliminate functional differences
between supported configurations that used to be hard-coded.

llvm-svn: 211461

10 years agoLoopVectorizer: Fix a dominance issue
Arnold Schwaighofer [Sun, 22 Jun 2014 03:38:59 +0000 (03:38 +0000)]
LoopVectorizer: Fix a dominance issue

The induction variables start value needs to be defined before we branch
(overflow check) to the scalar preheader where we used it.

llvm-svn: 211460

10 years agoWindowsToolChain: decouple build environment from the toolchain
Alp Toker [Sun, 22 Jun 2014 03:27:52 +0000 (03:27 +0000)]
WindowsToolChain: decouple build environment from the toolchain

Don't try to find the MSVC version that the binaries were built with. Doing so
defeats testing by causing invalid test passes on the build servers.

Whichever Visual Studio (or clang-cl.exe) edition was used to build the clang
package, it's strictly orthogonal and has no relation to software versions
available on the user's PC.

llvm-svn: 211459

10 years agoMake WindowsToolChain portable
Alp Toker [Sun, 22 Jun 2014 03:27:45 +0000 (03:27 +0000)]
Make WindowsToolChain portable

De-conditionalize as much as possible so we can start to fix this code.

No change in functionality.

llvm-svn: 211458

10 years agoMergeFunctions Pass, removed DenseMap helpers.
Stepan Dyatkovskiy [Sun, 22 Jun 2014 01:53:30 +0000 (01:53 +0000)]
MergeFunctions Pass, removed DenseMap helpers.

Patch removes rest part of code related to old implementation.

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

This one was the final patch.

llvm-svn: 211457

10 years agoMergeFunctions Pass, updated header comments.
Stepan Dyatkovskiy [Sun, 22 Jun 2014 00:57:09 +0000 (00:57 +0000)]
MergeFunctions Pass, updated header comments.

Added short description for new comparison algorithm, that introduces
total ordering among functions set.

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

llvm-svn: 211456

10 years agoReport error for non-zero data in .bss
Weiming Zhao [Sun, 22 Jun 2014 00:33:44 +0000 (00:33 +0000)]
Report error for non-zero data in .bss

User may initialize a var with non-zero value and specify .bss section.
E.g. : int a __attribute__((section(".bss"))) = 2;

This patch converts an assertion to error report for better user
experience.

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

llvm-svn: 211455

10 years agoRemove useless call
Sylvestre Ledru [Sat, 21 Jun 2014 23:51:07 +0000 (23:51 +0000)]
Remove useless call

llvm-svn: 211454

10 years ago[analyzer] Check for NULL passed to CFAutorelease.
Jordan Rose [Sat, 21 Jun 2014 23:50:40 +0000 (23:50 +0000)]
[analyzer] Check for NULL passed to CFAutorelease.

Patch by Sean McBride, tests adjusted by me.

llvm-svn: 211453

10 years agoSimplify the code (variable bValid is not really interesting)
Sylvestre Ledru [Sat, 21 Jun 2014 23:48:45 +0000 (23:48 +0000)]
Simplify the code (variable bValid is not really interesting)

llvm-svn: 211452

10 years agoRemove useless declaration
Sylvestre Ledru [Sat, 21 Jun 2014 23:47:20 +0000 (23:47 +0000)]
Remove useless declaration

llvm-svn: 211451

10 years agoTrack changes from clang r211448.
Alp Toker [Sat, 21 Jun 2014 23:33:00 +0000 (23:33 +0000)]
Track changes from clang r211448.

llvm-svn: 211450

10 years agoMake MS i128 suffix test from r211446 more robust
Alp Toker [Sat, 21 Jun 2014 23:32:05 +0000 (23:32 +0000)]
Make MS i128 suffix test from r211446 more robust

We want to catch both negative and positive failure conditions.

llvm-svn: 211449

10 years agoDiagnosticRenderer: emit basic notes as real diagnostics
Alp Toker [Sat, 21 Jun 2014 23:31:59 +0000 (23:31 +0000)]
DiagnosticRenderer: emit basic notes as real diagnostics

Fixes terminal column wrapping and vestigial 'note:' prefixes that would appear
when using emitBasicNote().

llvm-svn: 211448

10 years agoTextDiagnostic: print remark level diagnostics in bold too
Alp Toker [Sat, 21 Jun 2014 23:31:52 +0000 (23:31 +0000)]
TextDiagnostic: print remark level diagnostics in bold too

The purpose of bolding these is to make them visually distinct from
continuations (supplemental note diagnostics). Therefore, the bolding applies
to all severities _including_ remarks -- it's not in any way an indicator of
priority. Also simplify and comment.

No tests.

llvm-svn: 211447

10 years agoThe i128 suffix isn't always available.
David Majnemer [Sat, 21 Jun 2014 22:49:50 +0000 (22:49 +0000)]
The i128 suffix isn't always available.

This Lexer test unconditionally used the i128 integer literal suffix.
This suffix is only available to targets that have 128-bit arithmetic
support.

llvm-svn: 211446

10 years agoMergeFunctions Pass, FnSet has been replaced with FnTree.
Stepan Dyatkovskiy [Sat, 21 Jun 2014 20:54:36 +0000 (20:54 +0000)]
MergeFunctions Pass, FnSet has been replaced with FnTree.

Patch activates new implementation.
So from now, merging process should take time O(N*log(N)).
Where N size of module (we are free to measure it in
functions or in instructions). Internally FnTree represents
binary tree. So every lookup operation takes O(log(N)) time.

It is still not the last patch in series, we also have to
clean-up pass from old code, and update pass comments.

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

llvm-svn: 211445

10 years agoMergeFunctions Pass, removed unused methods from old implementation.
Stepan Dyatkovskiy [Sat, 21 Jun 2014 20:13:24 +0000 (20:13 +0000)]
MergeFunctions Pass, removed unused methods from old implementation.

Patch removed next old FunctionComparator methods:
    * enumerate
    * isEquivalentOperation
    * isEquivalentGEP
    * isEquivalentType

This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

llvm-svn: 211444

10 years agoMergeFunctions, doSanityCheck: fixed body comments.
Stepan Dyatkovskiy [Sat, 21 Jun 2014 19:07:51 +0000 (19:07 +0000)]
MergeFunctions, doSanityCheck: fixed body comments.

llvm-svn: 211443