Commit Graph

100311 Commits

Author SHA1 Message Date
David Blaikie
906c8deb9e DwarfUnit: Remove unnecessary (void)t; that was previously used to suppress -Wunused-member-variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201442 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 22:47:55 +00:00
David Blaikie
705991f2fc DwarfUnit: Refactor out DW_AT_stmt_list creation into common function for fission and non-fission cases
This probably also addresses the FIXME in the fission case regarding
multiple compile units, though I haven't tested that.

This code still confuses me (the literal zero offset makes little sense,
the limitations surrounding asm output I'm not sure about either - but
perhaps we should just always emit one line table? Or should we not rely
on .loc/.file even in assembly so we can produce the same output between
asm and object output?) but this maintains the existing functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201441 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 22:41:51 +00:00
Rafael Espindola
d4762e88fd 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
2014-02-14 22:36:16 +00:00
Quentin Colombet
038600b42e [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
2014-02-14 22:23:22 +00:00
Tom Stellard
5f80594797 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
2014-02-14 21:10:34 +00:00
Howard Hinnant
3b0acd4ef4 Remove myself as owner of libc++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201432 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 21:09:01 +00:00
Eli Bendersky
2220abe879 Remove unused #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201430 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 20:15:56 +00:00
David Blaikie
c4e1b13b08 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
2014-02-14 19:51:35 +00:00
Diego Novillo
837c54fa7b 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
2014-02-14 19:27:53 +00:00
Reed Kotler
fba2a769a1 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
2014-02-14 19:16:39 +00:00
Rafael Espindola
034b8f9d31 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
2014-02-14 19:02:01 +00:00
Artyom Skrobov
e228078ca6 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
2014-02-14 17:19:07 +00:00
Kevin Qin
54136cad2e [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
2014-02-14 09:41:15 +00:00
Eric Christopher
89eb5dc65d 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
2014-02-14 05:33:16 +00:00
NAKAMURA Takumi
f46135e47f 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
2014-02-14 05:26:49 +00:00
Jiangning Liu
255181f2b8 Enable AArch64 NEON by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201385 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 04:38:09 +00:00
NAKAMURA Takumi
5e8aa01449 [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
2014-02-14 03:59:43 +00:00
Hao Liu
9c4127a6a5 [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
2014-02-14 02:21:56 +00:00
David Blaikie
35d2f61510 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
2014-02-14 01:57:59 +00:00
Eric Christopher
5483012b4d 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
2014-02-14 01:26:55 +00:00
Juergen Ributzka
5cb9925acd [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
2014-02-14 00:51:13 +00:00
Matt Arsenault
f222ebe86c 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
2014-02-14 00:49:12 +00:00
Tom Stellard
0f2e653317 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
2014-02-13 23:34:15 +00:00
Tom Stellard
9757ba1206 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
2014-02-13 23:34:13 +00:00
Tom Stellard
130f271259 R600/SI: Completely Disable TypeRewriter on compute
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201369 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-13 23:34:12 +00:00
Tom Stellard
1a52c2b25a 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
2014-02-13 23:34:10 +00:00
Tom Stellard
c4fea3594f 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
2014-02-13 23:34:07 +00:00
Rafael Espindola
cac25de43d 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
2014-02-13 23:16:11 +00:00
Hans Wennborg
c5887a2385 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
2014-02-13 22:01:35 +00:00
Stephen Hines
d60c43b4f3 Don't build DFSan functionality for Android.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201362 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-13 21:21:09 +00:00
Diego Novillo
3e5fe1426a 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
2014-02-13 20:16:42 +00:00
Diego Novillo
86dd0f939f 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
2014-02-13 20:05:03 +00:00
Reid Kleckner
f2df02b355 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
2014-02-13 19:51:13 +00:00
NAKAMURA Takumi
fa9ce5c791 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
2014-02-13 18:28:28 +00:00
Rafael Espindola
573c0503e3 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
2014-02-13 18:26:41 +00:00
Duncan P. N. Exon Smith
efe40a5a1d 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
2014-02-13 18:26:15 +00:00
Benjamin Kramer
62356fc694 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
2014-02-13 18:23:24 +00:00
NAKAMURA Takumi
d8be721249 [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
2014-02-13 18:18:56 +00:00
Rafael Espindola
e08aac49ea 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
2014-02-13 16:58:19 +00:00
Rafael Espindola
5645e5fd14 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
2014-02-13 16:49:47 +00:00
Benjamin Kramer
8ed2c8e99f 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
2014-02-13 16:48:38 +00:00
Rafael Espindola
7fd806d94a .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
2014-02-13 15:38:16 +00:00
Rafael Espindola
ad15c9d64b "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
2014-02-13 15:33:35 +00:00
Rafael Espindola
0f25a45f23 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
2014-02-13 15:30:06 +00:00
Daniel Sanders
38c6b58eec 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
2014-02-13 14:44:26 +00:00
Rafael Espindola
5d9d24daef Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201327 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-13 13:45:45 +00:00
NAKAMURA Takumi
621c80f4d7 [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
2014-02-13 11:25:17 +00:00
NAKAMURA Takumi
069bd29ec4 [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
2014-02-13 11:19:21 +00:00
NAKAMURA Takumi
74c3f7dc5b [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
2014-02-13 11:19:11 +00:00
NAKAMURA Takumi
38a10d0596 [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
2014-02-13 11:19:00 +00:00