oota-llvm.git
10 years agoAdd extern template instantiations of llvm::Calculate.
Rafael Espindola [Fri, 14 Feb 2014 22:36:16 +0000 (22:36 +0000)]
Add extern template instantiations of llvm::Calculate.

This should be a small build time improvement in general and fixes
the build on OS X with -DBUILD_SHARED_LIBS=ON.

The issue is that not all users are including GenericDomTreeConstruction.h,
causing undefined references when ld64 managed to hide the
linkonce_odr symbols.

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

10 years ago[CodeGenPrepare][AddressingModeMatcher] Give up on type promotion if the
Quentin Colombet [Fri, 14 Feb 2014 22:23:22 +0000 (22:23 +0000)]
[CodeGenPrepare][AddressingModeMatcher] Give up on type promotion if the
transformation does not bring any immediate benefits and introduce an illegal
operation.

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

10 years agoTargetLowering: n * r where n > 2 should be an illegal addressing mode
Tom Stellard [Fri, 14 Feb 2014 21:10:34 +0000 (21:10 +0000)]
TargetLowering: n * r where n > 2 should be an illegal addressing mode

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

10 years agoRemove myself as owner of libc++
Howard Hinnant [Fri, 14 Feb 2014 21:09:01 +0000 (21:09 +0000)]
Remove myself as owner of libc++

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

10 years agoRemove unused #include
Eli Bendersky [Fri, 14 Feb 2014 20:15:56 +0000 (20:15 +0000)]
Remove unused #include

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

10 years agoDebugInfo: Don't include the name of the CU file in the line table file list when...
David Blaikie [Fri, 14 Feb 2014 19:51:35 +0000 (19:51 +0000)]
DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded

Recommitting r201380 (reverted in r201389)
Recommitting r201351 and r201355 (reverted in r201351 and r201355)

We weren't emitting the an empty (header only) line table when the line
table was empty - this made the DWARF invalid (the compile unit would
point to the zero-size debug_lines section where there should've been an
empty line table but there was nothing at all). Fix that, and as a
consequence this works around/addresses PR18809.

Also, we emit a non-empty line table to workaround a darwin linker bug,
so XFAILing on darwin too.

Also, mark the test as 'REQUIRES: object-emission' because it does.

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

10 years agoSupport DWARF discriminators in object streamer.
Diego Novillo [Fri, 14 Feb 2014 19:27:53 +0000 (19:27 +0000)]
Support DWARF discriminators in object streamer.

Summary:
This adds support for emitting DWARF path discriminator values in
the object streamer. It also changes the DWARF dumper to show
discriminator values in the line table output.

Reviewers: echristo

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2794

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

10 years agoThis patch has two main functions:
Reed Kotler [Fri, 14 Feb 2014 19:16:39 +0000 (19:16 +0000)]
This patch has two main functions:

1) Fix a specific bug when certain conversion functions are called in a program compiled as mips16 with hard float and
the program is linked as c++. There are two libraries that are reversed in the link order with gcc/g++ and clang/clang++ for
mips16 in this case and the proper stubs will then not be called. These stubs are normally handled in the Mips16HardFloat pass
but in this case we don't know at that time that we need to generate the stubs. This must all be handled later in code generation
and we have moved this functionality to MipsAsmPrinter. When linked as C (gcc or clang) the proper stubs are linked in from libc.

2) Set up the infrastructure to handle 90% of what is in the Mips16HardFloat pass in this new area of MipsAsmPrinter. This is a more
logical place to handle this and we have known for some time that we needed to move the code later and not implement it using
inline asm as we do now but it was not clear exactly where to do this and what mechanism should be used. Now it's clear to us
how to do this and this patch contains the infrastructure to move most of this to MipsAsmPrinter but the actual moving will be done
in a follow on patch. The same infrastructure is used to fix this current bug as described in #1. This change was requested by the list
during the original putback of the Mips16HardFloat pass but was not practical for us do at that time.

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

10 years agoTrivial cleanup: reuse existing variable.
Rafael Espindola [Fri, 14 Feb 2014 19:02:01 +0000 (19:02 +0000)]
Trivial cleanup: reuse existing variable.

Extracted while trying to understand http://llvm-reviews.chandlerc.com/D1764.

Patch by Matt Arsenault.

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

10 years agoGenerate the DWARF stack frame decode operations in the function prologue for ARM...
Artyom Skrobov [Fri, 14 Feb 2014 17:19:07 +0000 (17:19 +0000)]
Generate the DWARF stack frame decode operations in the function prologue for ARM/Thumb functions.

Patch by Keith Walker!

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

10 years ago[AArch64 NEON] Fix a bug to avoid using floating type as condition type in lowering...
Kevin Qin [Fri, 14 Feb 2014 09:41:15 +0000 (09:41 +0000)]
[AArch64 NEON] Fix a bug to avoid using floating type as condition type in lowering SELECT_CC.

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

10 years agoRevert "DebugInfo: Don't include the name of the CU file in the line table file list...
Eric Christopher [Fri, 14 Feb 2014 05:33:16 +0000 (05:33 +0000)]
Revert "DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded"

This reverts commit r201380 for now while we investigate.

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

10 years agollvm/test/DebugInfo/empty.ll: Mark it as XFAIL:win32 lacking of line table.
NAKAMURA Takumi [Fri, 14 Feb 2014 05:26:49 +0000 (05:26 +0000)]
llvm/test/DebugInfo/empty.ll: Mark it as XFAIL:win32 lacking of line table.

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

10 years agoEnable AArch64 NEON by default.
Jiangning Liu [Fri, 14 Feb 2014 04:38:09 +0000 (04:38 +0000)]
Enable AArch64 NEON by default.

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

10 years ago[PR18809] Remove XFAIL from DebugInfo/empty.ll.
NAKAMURA Takumi [Fri, 14 Feb 2014 03:59:43 +0000 (03:59 +0000)]
[PR18809] Remove XFAIL from DebugInfo/empty.ll.

I added it in r201211.

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

10 years ago[AArch64]Fix the assertion failure caused by "v1i1 SETCC" DAG node.
Hao Liu [Fri, 14 Feb 2014 02:21:56 +0000 (02:21 +0000)]
[AArch64]Fix the assertion failure caused by "v1i1 SETCC" DAG node.
As v1i1 is illegal, the type legalizer tries to scalarize such node. But if the type operands of SETCC is legal, the scalarization algorithm will cause an assertion failure.

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

10 years agoDebugInfo: Don't include the name of the CU file in the line table file list when...
David Blaikie [Fri, 14 Feb 2014 01:57:59 +0000 (01:57 +0000)]
DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded

Recommitting r201351 and r201355 (reverted in r201351 and r201355)

We weren't emitting the an empty (header only) line table when the line
table was empty - this made the DWARF invalid (the compile unit would
point to the zero-size debug_lines section where there should've been an
empty line table but there was nothing at all). Fix that, and as a
consequence this works around/addresses PR18809.

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

10 years agoDisable emission of aranges by default and add a command line
Eric Christopher [Fri, 14 Feb 2014 01:26:55 +0000 (01:26 +0000)]
Disable emission of aranges by default and add a command line
option to enable again that will be matched with a commit to enable
in clang.

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

10 years ago[X86] Don't mark movabsq as cheap-as-move - it isn't that cheap.
Juergen Ributzka [Fri, 14 Feb 2014 00:51:13 +0000 (00:51 +0000)]
[X86] Don't mark movabsq as cheap-as-move - it isn't that cheap.

A simple register copy on X86 is just 3 bytes, whereas movabsq is a 10 byte
instruction. Marking movabsq as not beeing cheap will allow LICM to move it
out of the loop and it also prevents unnecessary rematerializations if the
value is needed in more than one register.

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

10 years agoDo more addrspacecast transforms that happen for bitcast.
Matt Arsenault [Fri, 14 Feb 2014 00:49:12 +0000 (00:49 +0000)]
Do more addrspacecast transforms that happen for bitcast.

Makes addrspacecast (gep) do addrspacecast (gep) instead.

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

10 years agoR600/SI: Expand all v8[if]32 operations
Tom Stellard [Thu, 13 Feb 2014 23:34:15 +0000 (23:34 +0000)]
R600/SI: Expand all v8[if]32 operations

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

10 years agoR600/SI: Add a pattern for i32 anyext
Tom Stellard [Thu, 13 Feb 2014 23:34:13 +0000 (23:34 +0000)]
R600/SI: Add a pattern for i32 anyext

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201370 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoR600/SI: Completely Disable TypeRewriter on compute
Tom Stellard [Thu, 13 Feb 2014 23:34:12 +0000 (23:34 +0000)]
R600/SI: Completely Disable TypeRewriter on compute

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

10 years agoR600/SI: Split global vector loads with more than 4 elements
Tom Stellard [Thu, 13 Feb 2014 23:34:10 +0000 (23:34 +0000)]
R600/SI: Split global vector loads with more than 4 elements

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

10 years agoR600/SI: Add ShaderType attribute to some tests
Tom Stellard [Thu, 13 Feb 2014 23:34:07 +0000 (23:34 +0000)]
R600/SI: Add ShaderType attribute to some tests

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

10 years agoUse __literal16. It has been supported by the linker since 2005.
Rafael Espindola [Thu, 13 Feb 2014 23:16:11 +0000 (23:16 +0000)]
Use __literal16. It has been supported by the linker since 2005.

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

10 years agoMSBuild integration: get the LibraryPath right (PR18707)
Hans Wennborg [Thu, 13 Feb 2014 22:01:35 +0000 (22:01 +0000)]
MSBuild integration: get the LibraryPath right (PR18707)

It was pointing to lib\clang\3.4, but now we're on 3.5.
Make CMake insert the right version automatically.

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

10 years agoDon't build DFSan functionality for Android.
Stephen Hines [Thu, 13 Feb 2014 21:21:09 +0000 (21:21 +0000)]
Don't build DFSan functionality for Android.

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

10 years agoSimplify checks in MC/AsmParser/directive_loc.s
Diego Novillo [Thu, 13 Feb 2014 20:16:42 +0000 (20:16 +0000)]
Simplify checks in MC/AsmParser/directive_loc.s

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

10 years agoFix generation of 'isa' and 'discriminator' keywords.
Diego Novillo [Thu, 13 Feb 2014 20:05:03 +0000 (20:05 +0000)]
Fix generation of 'isa' and 'discriminator' keywords.

Summary:
There should be a space before each of these two keywords to avoid
generating invalid assembly files.

NOTE: I could not find an obvious maintainers in CODE_OWNERS.TXT, but
      this seems related to debug info.

Reviewers: echristo

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2791

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

10 years agoTweak an _MSC_VER ifdef to use typename with clang in a unittest
Reid Kleckner [Thu, 13 Feb 2014 19:51:13 +0000 (19:51 +0000)]
Tweak an _MSC_VER ifdef to use typename with clang in a unittest

In theory, Clang should figure out how to parse this correctly without
typename, but since this is the last TU that Clang falls back on in the
self-host, I'm going to compromise and check for __clang__.

And now Clang can self-host on -win32 without fallback!  The 'check' and
'check-clang' targets both pass.

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

10 years agoTweak llvm/test/DebugInfo/X86/generate-odr-hash.ll corresponding to r201351 (Revert...
NAKAMURA Takumi [Thu, 13 Feb 2014 18:28:28 +0000 (18:28 +0000)]
Tweak llvm/test/DebugInfo/X86/generate-odr-hash.ll corresponding to r201351 (Revert r201187).

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

10 years agoCheck that GlobalAliases don't have section or alignment.
Rafael Espindola [Thu, 13 Feb 2014 18:26:41 +0000 (18:26 +0000)]
Check that GlobalAliases don't have section or alignment.

An alias is always in the section of its aliasee and has the same alignment
(since it has the same address).

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

10 years agoSCCIterator: Merge MinVisitNumStack and VisitStack
Duncan P. N. Exon Smith [Thu, 13 Feb 2014 18:26:15 +0000 (18:26 +0000)]
SCCIterator: Merge MinVisitNumStack and VisitStack

This patch merges MinVisitNumStack with VisitStack using a StackElement
struct.

Patch by Mehdi Amini!

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

10 years agoInstCombine: Replace custom constant folding code with ConstantExpr.
Benjamin Kramer [Thu, 13 Feb 2014 18:23:24 +0000 (18:23 +0000)]
InstCombine: Replace custom constant folding code with ConstantExpr.

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

10 years ago[PR18809] Revert r201187, "DebugInfo: Don't include the name of the CU file in the...
NAKAMURA Takumi [Thu, 13 Feb 2014 18:18:56 +0000 (18:18 +0000)]
[PR18809] Revert r201187, "DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded"

It really crashes cygwin's stage2 configure with "clang -g".

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

10 years agoUse mkdir instead of stat+mkdir.
Rafael Espindola [Thu, 13 Feb 2014 16:58:19 +0000 (16:58 +0000)]
Use mkdir instead of stat+mkdir.

This is an optimistic version of create_diretories: it tries to create the
directory first and looks at the parent only if that fails.

Running strace on "mkdir -p" shows that it is pessimistic, calling mkdir on
every element of the path. We could implement that if needed.

In any case, with both strategies there is no reason to call stat, just check
the return of mkdir.

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

10 years agoAdd triples to try to fix the windows bots.
Rafael Espindola [Thu, 13 Feb 2014 16:49:47 +0000 (16:49 +0000)]
Add triples to try to fix the windows bots.

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

10 years agoReduce code duplication resulting from the ConstantVector/ConstantDataVector split.
Benjamin Kramer [Thu, 13 Feb 2014 16:48:38 +0000 (16:48 +0000)]
Reduce code duplication resulting from the ConstantVector/ConstantDataVector split.

No intended functionality change.

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

10 years ago.file is only available on ELF, use a triple instead of -march.
Rafael Espindola [Thu, 13 Feb 2014 15:38:16 +0000 (15:38 +0000)]
.file is only available on ELF, use a triple instead of -march.

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

10 years ago"foo" is not a ppc instruction, don't try to parse it.
Rafael Espindola [Thu, 13 Feb 2014 15:33:35 +0000 (15:33 +0000)]
"foo" is not a ppc instruction, don't try to parse it.

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

10 years agoSpecify a triple. MachO AArch64 support is missing.
Rafael Espindola [Thu, 13 Feb 2014 15:30:06 +0000 (15:30 +0000)]
Specify a triple. MachO AArch64 support is missing.

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

10 years agoRe-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTe...
Daniel Sanders [Thu, 13 Feb 2014 14:44:26 +0000 (14:44 +0000)]
Re-commit: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call

Summary:
AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for
targets with mature MC support. Such targets will always parse the inline
assembly (even when emitting assembly). Targets without mature MC support
continue to use EmitRawText() for assembly output.

The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced
with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler
to parse inline assembly (even when emitting assembly output). UseIntegratedAs
is set to true for targets that consider any failure to parse valid assembly
to be a bug. Target specific subclasses generally enable the integrated
assembler in their constructor. The default value can be overridden with
-no-integrated-as.

All tests that rely on inline assembly supporting invalid assembly (for example,
those that use mnemonics such as 'foo' or 'hello world') have been updated to
disable the integrated assembler.

Changes since review (and last commit attempt):
- Fixed test failures that were missed due to configuration of local build.
  (fixes crash.ll and a couple others).
- Fixed tests that happened to pass because the local build was on X86
  (should fix 2007-12-17-InvokeAsm.ll)
- mature-mc-support.ll's should no longer require all targets to be compiled.
  (should fix ARM and PPC buildbots)
- Object output (-filetype=obj and similar) now forces the integrated assembler
  to be enabled regardless of default setting or -no-integrated-as.
  (should fix SystemZ buildbots)

Reviewers: rafael

Reviewed By: rafael

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2686

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

10 years agoRemove dead code.
Rafael Espindola [Thu, 13 Feb 2014 13:45:45 +0000 (13:45 +0000)]
Remove dead code.

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

10 years ago[CMake] Let llvm_add_library(MODULE) check capability of loadable module.
NAKAMURA Takumi [Thu, 13 Feb 2014 11:25:17 +0000 (11:25 +0000)]
[CMake] Let llvm_add_library(MODULE) check capability of loadable module.

On unsupported platforms, llvm_add_library(MODULE) doesn't create any targets.
Caller may be responsible to check and add extra target properties.

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

10 years ago[CMake] Move the target property PREFIX from add_llvm_loadable_module() to llvm_add_l...
NAKAMURA Takumi [Thu, 13 Feb 2014 11:19:21 +0000 (11:19 +0000)]
[CMake] Move the target property PREFIX from add_llvm_loadable_module() to llvm_add_library().

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

10 years ago[CMake] llvm_add_library(MODULE) may use CMAKE_MODULE_LINKER_FLAGS instead of target...
NAKAMURA Takumi [Thu, 13 Feb 2014 11:19:11 +0000 (11:19 +0000)]
[CMake] llvm_add_library(MODULE) may use CMAKE_MODULE_LINKER_FLAGS instead of target property LINK_FLAGS.

I mis-dropped Darwin's link flags (in clang side) since r201073.

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

10 years ago[CMake] LLVM_PLUGIN_EXT: Use CMAKE_SHARED_LIBRARY_SUFFIX rather than CMAKE_SHARED_MOD...
NAKAMURA Takumi [Thu, 13 Feb 2014 11:19:00 +0000 (11:19 +0000)]
[CMake] LLVM_PLUGIN_EXT: Use CMAKE_SHARED_LIBRARY_SUFFIX rather than CMAKE_SHARED_MODULE_SUFFIX in llvm tree.

FIXME: llvm/test may be aware of LLVM_PLUGIN_EXT, like as clang/test does.
FIXME: CMAKE_*_SUFFIX may be set in HandleLLVMOptions if those variables could be writable, rather than to set one as target properties.

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

10 years agollvm/test/CodeGen/AArch64/cpus.ll: Tweak to use -mtriple=aarch64-unknown-unknown...
NAKAMURA Takumi [Thu, 13 Feb 2014 11:06:23 +0000 (11:06 +0000)]
llvm/test/CodeGen/AArch64/cpus.ll: Tweak to use -mtriple=aarch64-unknown-unknown, or this would crash for targeting pecoff like *-mingw32.

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

10 years agoARM: remove floating-point patterns for @llvm.arm.neon.vabs
Tim Northover [Thu, 13 Feb 2014 10:44:30 +0000 (10:44 +0000)]
ARM: remove floating-point patterns for @llvm.arm.neon.vabs

The front-end is now generating the generic @llvm.fabs for this
operation now, so the extra patterns are no longer needed.

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

10 years agoAdd Cortex-A53 and Cortex-A57 cores to the AArch64 backend
Oliver Stannard [Thu, 13 Feb 2014 09:46:11 +0000 (09:46 +0000)]
Add Cortex-A53 and Cortex-A57 cores to the AArch64 backend

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

10 years agoRemove unused method declaration.
Craig Topper [Thu, 13 Feb 2014 07:12:40 +0000 (07:12 +0000)]
Remove unused method declaration.

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

10 years agoRemove filtering concept from X86 disassembler table generation. It's no longer neces...
Craig Topper [Thu, 13 Feb 2014 07:07:16 +0000 (07:07 +0000)]
Remove filtering concept from X86 disassembler table generation. It's no longer necessary.

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

10 years ago[AArch64]Fix the problems that can't select mul/add/sub of v1i8/v1i16/v1i32 types.
Hao Liu [Thu, 13 Feb 2014 05:42:33 +0000 (05:42 +0000)]
[AArch64]Fix the problems that can't select mul/add/sub of v1i8/v1i16/v1i32 types.
As this problems are similar to shl/sra/srl, also add patterns for shift nodes.

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

10 years ago[RegAlloc] Fix the assertion in the last chance recoloring to match the
Quentin Colombet [Thu, 13 Feb 2014 05:17:37 +0000 (05:17 +0000)]
[RegAlloc] Fix the assertion in the last chance recoloring to match the
condition at the call site.

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

10 years agoCopy dll storage in copyAttributes.
Rafael Espindola [Thu, 13 Feb 2014 05:11:35 +0000 (05:11 +0000)]
Copy dll storage in copyAttributes.

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

10 years ago[DAG] Fix the recognition of opaque constants in the SelectionDAGBuilder.
Juergen Ributzka [Thu, 13 Feb 2014 04:19:26 +0000 (04:19 +0000)]
[DAG] Fix the recognition of opaque constants in the SelectionDAGBuilder.

This fix checks the original LLVM IR node to identify opaque constants by
looking for the bitcast-constant pattern. Originally we looked at the generated
SDNode, but this might lead to incorrect results. The SDNode could have been
generated by an constant expression that was folded to a constant.

This fixes <rdar://problem/16050719>

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

10 years agoUse simpler version of sys::fs::exists when possible.
Rafael Espindola [Thu, 13 Feb 2014 04:00:35 +0000 (04:00 +0000)]
Use simpler version of sys::fs::exists when possible.

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

10 years ago[AArch64]Add support for spilling FPR8/FPR16.
Hao Liu [Thu, 13 Feb 2014 02:36:58 +0000 (02:36 +0000)]
[AArch64]Add support for spilling FPR8/FPR16.

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

10 years agoGlobalOpt: Aliases don't have sections, don't copy them when replacing
Reid Kleckner [Thu, 13 Feb 2014 02:18:36 +0000 (02:18 +0000)]
GlobalOpt: Aliases don't have sections, don't copy them when replacing

As defined in LangRef, aliases do not have sections.  However, LLVM's
GlobalAlias class inherits from GlobalValue, which means we can read and
set its section.  We should probably ban that as a separate change,
since it doesn't make much sense for an alias to have a section that
differs from its aliasee.

Fixes PR18757, where the section was being lost on the global in code
from Clang like:

extern "C" {
__attribute__((used, section("CUSTOM"))) static int in_custom_section;
}

Reviewers: rafael.espindola

Differential Revision: http://llvm-reviews.chandlerc.com/D2758

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

10 years ago[CMake] llvm_add_library: Add handling of the parameter ADDITIONAL_HEADERS to pass...
NAKAMURA Takumi [Thu, 13 Feb 2014 01:00:52 +0000 (01:00 +0000)]
[CMake] llvm_add_library: Add handling of the parameter ADDITIONAL_HEADERS to pass through to process_source.

I was insightless then about unknown optional parameters.
(Consider that LINK_LIBS foo bar ADDITIONAL_HEADERS qux quux)

Suggested by Michael Kruse. Thanks!

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

10 years agoFix misleading comment.
Lang Hames [Thu, 13 Feb 2014 00:31:14 +0000 (00:31 +0000)]
Fix misleading comment.

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

10 years agoThe new MCJIT C-API unit test is generating objects without constant data
Lang Hames [Thu, 13 Feb 2014 00:16:36 +0000 (00:16 +0000)]
The new MCJIT C-API unit test is generating objects without constant data
sections, at least on MachO. Relax expectations to keep the bots green while I
investigate.

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

10 years agoRemove a very old instcombine where we would turn sequences of selects into
Owen Anderson [Wed, 12 Feb 2014 23:54:07 +0000 (23:54 +0000)]
Remove a very old instcombine where we would turn sequences of selects into
logical operations on the i1's driving them.  This is a bad idea for every
target I can think of (confirmed with micro tests on all of: x86-64, ARM,
AArch64, Mips, and PowerPC) because it forces the i1 to be materialized into
a general purpose register, whereas consuming it directly into a select generally
allows it to exist only transiently in a predicate or flags register.

Chandler ran a set of performance tests with this change, and reported no
measurable change on x86-64.

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

10 years ago[Vectorizer] Add a new 'OperandValueKind' in TargetTransformInfo called
Andrea Di Biagio [Wed, 12 Feb 2014 23:43:47 +0000 (23:43 +0000)]
[Vectorizer] Add a new 'OperandValueKind' in TargetTransformInfo called
'OK_NonUniformConstValue' to identify operands which are constants but
not constant splats.

The cost model now allows returning 'OK_NonUniformConstValue'
for non splat operands that are instances of ConstantVector or
ConstantDataVector.

With this change, targets are now able to compute different costs
for instructions with non-uniform constant operands.
For example, On X86 the cost of a vector shift may vary depending on whether
the second operand is a uniform or non-uniform constant.

This patch applies the following changes:
 - The cost model computation now takes into account non-uniform constants;
 - The cost of vector shift instructions has been improved in
   X86TargetTransformInfo analysis pass;
 - BBVectorize, SLPVectorizer and LoopVectorize now know how to distinguish
   between non-uniform and uniform constant operands.

Added a new test to verify that the output of opt
'-cost-model -analyze' is valid in the following configurations: SSE2,
SSE4.1, AVX, AVX2.

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

10 years ago[X86] Teach the backend how to lower vector shift left into multiply rather than...
Andrea Di Biagio [Wed, 12 Feb 2014 23:42:28 +0000 (23:42 +0000)]
[X86] Teach the backend how to lower vector shift left into multiply rather than scalarizing it.

Instead of expanding a packed shift into a sequence of scalar shifts,
the backend now tries (when possible) to convert the vector shift into a
vector multiply.

Before this change, a shift of a MVT::v8i16 vector by a
build_vector of constants was always scalarized into a long sequence of "vector
extracts + scalar shifts + vector insert".
With this change, if there is SSE2 support, we emit a single vector multiply.

This change also affects SSE4.1, AVX, AVX2 shifts:
 - A shift of a MVT::v4i32 vector by a build_vector of non uniform constants
is now lowered when possible into a single SSE4.1 vector multiply.
 - Packed v16i16 shift left by constant build_vector are now expanded when
possible into a single AVX2 vpmullw.
This change also improves the lowering of AVX512f vector shifts.

Added test CodeGen/X86/vec_shift6.ll with some code examples that are affected
by this change.

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

10 years agoVS Integration: install toolsets for x64 too (PR18738)
Hans Wennborg [Wed, 12 Feb 2014 23:26:29 +0000 (23:26 +0000)]
VS Integration: install toolsets for x64 too (PR18738)

This does exactly the same thing as for Win32, except it passes -m64 to
the compiler and the files go in a different directory.

Differential Revision: http://llvm-reviews.chandlerc.com/D2749

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

10 years agoDebugInfo: Demonstrate that we're not currently uniquing address table entries in...
David Blaikie [Wed, 12 Feb 2014 23:03:54 +0000 (23:03 +0000)]
DebugInfo: Demonstrate that we're not currently uniquing address table entries in fission

Since I just discovered this while poking at other things, here's the
test case so I have it to come back to later.

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

10 years agoDebugInfo: Merge fission and non-fission (and 32 and 64 bit) tests for TLS support.
David Blaikie [Wed, 12 Feb 2014 23:03:51 +0000 (23:03 +0000)]
DebugInfo: Merge fission and non-fission (and 32 and 64 bit) tests for TLS support.

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

10 years agoReformat a few lines with clang-format.
Eric Christopher [Wed, 12 Feb 2014 22:47:09 +0000 (22:47 +0000)]
Reformat a few lines with clang-format.

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

10 years ago80-col.
Eric Christopher [Wed, 12 Feb 2014 22:38:04 +0000 (22:38 +0000)]
80-col.

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

10 years ago[Stackmaps] Improve the stackmap lowering code in the SelectionDAGBuilder.
Juergen Ributzka [Wed, 12 Feb 2014 22:17:13 +0000 (22:17 +0000)]
[Stackmaps] Improve the stackmap lowering code in the SelectionDAGBuilder.

We are now no longer relying on the target-specific call lowering implementation
to lower a stackmap intrinsic call. Instead we perform the call lowering in a
target-independent way directly in the stackmap lowering code. This simplifies
the code and removes the need to fixup the code after the target-specific call
lowering.

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

10 years ago[Stackmaps] Fix the ID type to be i64 also for stackmaps (as we claim in the documena...
Juergen Ributzka [Wed, 12 Feb 2014 22:17:10 +0000 (22:17 +0000)]
[Stackmaps] Fix the ID type to be i64 also for stackmaps (as we claim in the documenation)

The ID type for the stackmap and patchpoint intrinsics are in both cases i64.
This fixes an zero extend in the SelectionDAGBuilder that still used i32. This
also updates the target independent instructions STACKMAP and PATCHPOINT to use
the correct type.

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

10 years agoDon't try to build ExceptionDemo on ARM.
Rafael Espindola [Wed, 12 Feb 2014 21:47:15 +0000 (21:47 +0000)]
Don't try to build ExceptionDemo on ARM.

The demo uses _Unwind_GetIP which is not available on that platform.

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

10 years agoExtend RTDyld API to enable optionally precomputing the total amount of memory
Lang Hames [Wed, 12 Feb 2014 21:30:07 +0000 (21:30 +0000)]
Extend RTDyld API to enable optionally precomputing the total amount of memory
required for all sections in a module. This can be useful when targets or
code-models place strict requirements on how sections must be laid out
in memory.

If RTDyldMemoryManger::needsToReserveAllocationSpace() is overridden to return
true then the JIT will call the following method on the memory manager, which
can be used to preallocate the necessary memory.

void RTDyldMemoryManager::reserveAllocationSpace(uintptr_t CodeSize,
                                                 uintptr_t DataSizeRO,
                                                 uintptr_t DataSizeRW)

Patch by Vaidas Gasiunas. Thanks very much Viadas!

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

10 years agoRename Windows.h to WindowsSupport.h to avoid ambiguity
Reid Kleckner [Wed, 12 Feb 2014 21:26:20 +0000 (21:26 +0000)]
Rename Windows.h to WindowsSupport.h to avoid ambiguity

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

10 years ago_CS_DARWIN_USER macros available on darwin>=9. Thanks, Dave Odell!
David Fang [Wed, 12 Feb 2014 21:02:12 +0000 (21:02 +0000)]
_CS_DARWIN_USER macros available on darwin>=9.  Thanks, Dave Odell!

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

10 years agoDebug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
Adrian Prantl [Wed, 12 Feb 2014 19:34:44 +0000 (19:34 +0000)]
Debug info: Bugfix for r201190: DW_OP_piece takes bytes, not bits.
rdar://problem/16015314

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

10 years agoPass edges weights to MachineBasicBlock::addSuccessor in TailDuplicatePass to
Akira Hatanaka [Wed, 12 Feb 2014 18:09:18 +0000 (18:09 +0000)]
Pass edges weights to MachineBasicBlock::addSuccessor in TailDuplicatePass to
preserve branch probability information.

<rdar://problem/15893208>

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

10 years agoPC-rel implemented in AArch64, test now pass
Renato Golin [Wed, 12 Feb 2014 17:17:41 +0000 (17:17 +0000)]
PC-rel implemented in AArch64, test now pass

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

10 years agoMove more self-contained functionality away from tools/opt/opt.cpp
Eli Bendersky [Wed, 12 Feb 2014 16:48:02 +0000 (16:48 +0000)]
Move more self-contained functionality away from tools/opt/opt.cpp

BreakpointPrinter moves to its own module.

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

10 years agoRevert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and...
Daniel Sanders [Wed, 12 Feb 2014 15:39:20 +0000 (15:39 +0000)]
Revert r201237+r201238: Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call

It introduced multiple test failures in the buildbots.

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

10 years agoDemote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport...
Daniel Sanders [Wed, 12 Feb 2014 14:44:54 +0000 (14:44 +0000)]
Demote EmitRawText call in AsmPrinter::EmitInlineAsm() and remove hasRawTextSupport() call

Summary:
AsmPrinter::EmitInlineAsm() will no longer use the EmitRawText() call for targets with mature MC support. Such targets will always parse the inline assembly (even when emitting assembly). Targets without mature MC support continue to use EmitRawText() for assembly output.

The hasRawTextSupport() check in AsmPrinter::EmitInlineAsm() has been replaced with MCAsmInfo::UseIntegratedAs which when true, causes the integrated assembler to parse inline assembly (even when emitting assembly output). UseIntegratedAs is set to true for targets that consider any failure to parse valid assembly to be a bug. Target specific subclasses generally enable the integrated assembler in their constructor. The default value can be overridden with -no-integrated-as.

All tests that rely on inline assembly supporting invalid assembly (for example, those that use mnemonics such as 'foo' or 'hello world') have been updated to disable the integrated assembler.

Reviewers: rafael

Reviewed By: rafael

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2686

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

10 years agoWindows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.
NAKAMURA Takumi [Wed, 12 Feb 2014 11:50:22 +0000 (11:50 +0000)]
Windows/Path.inc: Move <shlobj.h> after "Windows.h" for some API available.

  I found that swapping the order of some header files helped fix a
  build issue that we're seeing on mingw32. Without the swap, windows.h
  was being included before _WIN32_WINNT was being defined and the
  CreateHardLinkW function was #ifdef'd out.

  It looks like the header is mainly used to get the SHGetFolderPathW
  function, so I don't think that there'll be much fallout from the
  switch.

Suggested by Alex Crichton. Thanks!

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

10 years agoTeach tablegen() macro to check needed variables
NAKAMURA Takumi [Wed, 12 Feb 2014 11:50:11 +0000 (11:50 +0000)]
Teach tablegen() macro to check needed variables

This macro depends on several variables to be set in the calling
context.  Check them and report an error if they are not set.
Without this, custom commands may be silently specified that
will fail at build time.

Patch by Brad King.

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

10 years agoR600: Always implement both versions of isTruncateFree and add a sanity check.
Benjamin Kramer [Wed, 12 Feb 2014 10:17:54 +0000 (10:17 +0000)]
R600: Always implement both versions of isTruncateFree and add a sanity check.

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

10 years agoRemove special case filtering for instructions with lock prefix as they are all marke...
Craig Topper [Wed, 12 Feb 2014 08:09:20 +0000 (08:09 +0000)]
Remove special case filtering for instructions with lock prefix as they are all marked with isCodeGenOnly already.

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

10 years agoMark XACQUIRE_PREFIX/XRELEASE_PREFIX as isAsmParserOnly so they'll disappear from...
Craig Topper [Wed, 12 Feb 2014 08:02:29 +0000 (08:02 +0000)]
Mark XACQUIRE_PREFIX/XRELEASE_PREFIX as isAsmParserOnly so they'll disappear from the disassembler table build without custom filtering code.

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

10 years ago[PR18809] Mark DebugInfo/empty.ll as XFAIL:cygming.
NAKAMURA Takumi [Wed, 12 Feb 2014 07:15:05 +0000 (07:15 +0000)]
[PR18809] Mark DebugInfo/empty.ll as XFAIL:cygming.

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

10 years agoTest case I forgot to 'add' for r201126.
Craig Topper [Wed, 12 Feb 2014 03:58:47 +0000 (03:58 +0000)]
Test case I forgot to 'add' for r201126.

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

10 years agoRemove unneeded include
Matt Arsenault [Wed, 12 Feb 2014 01:00:24 +0000 (01:00 +0000)]
Remove unneeded include

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

10 years agoDwarfUnit: Include type unit's file strings in the defining compile unit's file_names...
David Blaikie [Wed, 12 Feb 2014 00:40:47 +0000 (00:40 +0000)]
DwarfUnit: Include type unit's file strings in the defining compile unit's file_names table

There's still one piece missing here, which is adding the
DW_AT_stmt_list to the type unit that refer's to the compile unit's line
table. Working on that.

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

10 years agoFix some formatting in my last commit (r201196)
David Blaikie [Wed, 12 Feb 2014 00:32:05 +0000 (00:32 +0000)]
Fix some formatting in my last commit (r201196)

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

10 years agoDwarfUnit: Provide a reference to a defining DwarfCompileUnit from DwarfTypeUnit.
David Blaikie [Wed, 12 Feb 2014 00:31:30 +0000 (00:31 +0000)]
DwarfUnit: Provide a reference to a defining DwarfCompileUnit from DwarfTypeUnit.

Type units need to insert their file strings into the compile unit's
line/file table. This is preliminary work to that end.

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

10 years agoDwarfUnit: Refactor DW_AT_file creation into a common function.
David Blaikie [Wed, 12 Feb 2014 00:11:25 +0000 (00:11 +0000)]
DwarfUnit: Refactor DW_AT_file creation into a common function.

This is preliminary work to fix type unit file strings so they appear in
their originating CU's line table - but it's also just good/simple
cleanup, so I'm committing it ahead of time.

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

10 years agoDwarfUnit: Replace unnecessary conditionals with asserts.
David Blaikie [Tue, 11 Feb 2014 23:57:03 +0000 (23:57 +0000)]
DwarfUnit: Replace unnecessary conditionals with asserts.

We used to be pretty vague about what debug entities were what, with
many conditionals to silently drop/skip/accept things. These don't seem
to be relevant anymore.

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

10 years agoTweak ARM fastcc by adopting these two AAPCS rules:
Evan Cheng [Tue, 11 Feb 2014 23:49:31 +0000 (23:49 +0000)]
Tweak ARM fastcc by adopting these two AAPCS rules:
* CPRCs may be allocated to co-processor registers or the stack – they may never be allocated to core registers
* When a CPRC is allocated to the stack, all other VFP registers should be marked as unavailable

The difference is only noticeable in rare cases where there are a large number of floating point arguments (e.g.
7 doubles + additional float, double arguments). Although it's probably still better to avoid vmov as it can cause
stalls in some older ARM cores. The other, more subtle benefit, is to minimize difference between the various
calling conventions.

rdar://16039676

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

10 years agoReapply r201180 with an additional error path.
Adrian Prantl [Tue, 11 Feb 2014 22:22:15 +0000 (22:22 +0000)]
Reapply r201180 with an additional error path.
Debug info: Emit values in subregisters that do not have a separate
DWARF register number by emitting a super-register + DW_OP_bit_piece.
This is necessary because on x86_64, there are no DWARF register numbers
for i386-style subregisters.
Fixes a bunch of FIXMEs.

rdar://problem/16015314

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

10 years agoRevert "Debug info: Emit values in subregisters that do not have a separate"
Adrian Prantl [Tue, 11 Feb 2014 22:03:30 +0000 (22:03 +0000)]
Revert "Debug info: Emit values in subregisters that do not have a separate"

This reverts commit r201179 for buildbot breakage.

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

10 years agoDebugInfo: Don't include the name of the CU file in the line table file list when...
David Blaikie [Tue, 11 Feb 2014 21:49:46 +0000 (21:49 +0000)]
DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded

This comes up in empty files or files containing #file directives that
never reference the actual source file name. Came up in a small test of
line tables I was playing with.

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