Commit Graph

98709 Commits

Author SHA1 Message Date
NAKAMURA Takumi
722f58c6b3 GCOV.cpp: Fix format strings, %lf. Don't use %lf to double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197663 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 08:46:28 +00:00
NAKAMURA Takumi
115654f15c Introduce clean-ups in llvm/unittests/Makefile.unittest, to sweep stray *Tests.
Stray *Tests might stay after reverting.

FIXME: Could we apply this feature to clang/unittests?
FIXME: Implement this feature to CMake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197661 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 07:09:28 +00:00
Matt Arsenault
e2c28ad84f R600/SI: Make private pointers be 32-bit.
Different sized address spaces should theoretically work
most of the time now, and since 64-bit add is currently
disabled, using more 32-bit pointers fixes some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197659 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 05:32:55 +00:00
Matt Arsenault
251b9217c7 Fix missing C++ mode comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197658 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 05:32:44 +00:00
Saleem Abdulrasool
304512cf40 ARM IAS: support .inst directive
This adds support for the .inst directive.  This is an ARM specific directive to
indicate an instruction encoded as a constant expression.  The major difference
between .word, .short, or .byte and .inst is that the latter will be
disassembled as an instruction since it does not get flagged as data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197657 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 05:17:58 +00:00
Rafael Espindola
2ad4cf54ee No point in having a "#if 0"ed unittest.
It is also not clear what the value of the test was. The API is used from
existing tools and can (and is) tested with lit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197654 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 03:44:13 +00:00
Josh Magee
5b6af7163d [stackprotector] Use analysis from the StackProtector pass for stack layout in PEI a nd LocalStackSlot passes.
This changes the MachineFrameInfo API to use the new SSPLayoutKind information
produced by the StackProtector pass (instead of a boolean flag) and updates a
few pass dependencies (to preserve the SSP analysis).

The stack layout follows the same approach used prior to this change - i.e.,
only LargeArray stack objects will be placed near the canary and everything
else will be laid out normally.  After this change, structures containing large
arrays will also be placed near the canary - a case previously missed by the
old implementation.

Out of tree targets will need to update their usage of
MachineFrameInfo::CreateStackObject to remove the MayNeedSP argument. 

The next patch will implement the rules for sspstrong and sspreq.  The end goal
is to support ssp-strong stack layout rules.

WIP.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197653 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 03:17:11 +00:00
Anna Zaks
629f3b229e Fix a buffer overrun detected by AddressSanitizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197647 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 02:35:26 +00:00
Rafael Espindola
33f01f9848 Add stack alignment information for Sparc.
This matches the data in clang which was added by Jakob Stoklund Olesen in
r179596.

Thanks for erikjv on irc for pointing me to the relevant documents:
http://sparc.com/standards/64.psabi.1.35.ps.Z
page 25: Every stack frame must be 16-byte aligned.

http://sparc.com/standards/psABI3rd.pdf
page 3-10: Although the architecture requires only word alignment, software convention and the operating system require every stack frame to be doubleword aligned.

I tried to add a test, but it looks like sparc doesn't implement dynamic stack
realignment. This will be tested in clang shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197646 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 02:21:16 +00:00
Reid Kleckner
4b70bfc905 Begin adding docs and IR-level support for the inalloca attribute
The inalloca attribute is designed to support passing C++ objects by
value in the Microsoft C++ ABI.  It behaves the same as byval, except
that it always implies that the argument is in memory and that the bytes
are never copied.  This attribute allows the caller to take the address
of an outgoing argument's memory and execute arbitrary code to store
into it.

This patch adds basic IR support, docs, and verification.  It does not
attempt to implement any lowering or fix any possibly broken transforms.

When this patch lands, a complete description of this feature should
appear at http://llvm.org/docs/InAlloca.html .

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197645 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 02:14:12 +00:00
Adrian Prantl
1d4866ccbf add source in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197642 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 01:41:16 +00:00
Rafael Espindola
960ede2e1d Synchronize the NaCl DataLayout strings with the ones in clang.
Patch by Derek Schuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197640 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 00:44:37 +00:00
Reed Kotler
d18d97abf8 Make cosmetic changes as part of Mips internal post commit review of
patch r196331.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197638 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 00:43:08 +00:00
NAKAMURA Takumi
90a24a560a ArchiveFileDescriptorTests: Fix CMake build. Each unit test is expected to have suffix "*Tests" for lit gtest runner to seek one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 00:41:08 +00:00
NAKAMURA Takumi
2fcb0c34b3 ArchiveFileDescriptorTests: Resurrect part of r197600, but make it invalidated, to appease buildbots.
Please revert this several hours later ;)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197635 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 00:41:03 +00:00
Yuchen Wu
d218959ec5 llvm-cov: Added -f option for function summaries.
Similar to the file summaries, the function summaries output line,
branching and call statistics. The file summaries have been moved
outside the initial loop so that all of the function summaries can be
outputted before file summaries.

Also updated test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197633 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 00:29:25 +00:00
Reed Kotler
deb8e33163 Fix a problem with mips16 stubs when calls are transformed during
tail call optimization. Some more work may be needed for indirect
calls but this patch fixes the current regression in Prolangc++/trees.
S2 optimization as part of the general cleanup and optimization
of prolog and epilog was not saving S2 in this case and needed to.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197630 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 23:57:48 +00:00
Andrew Trick
9e0f77e34e Revert "Add -mcpu=z10 to SystemZ tests."
This reverts commit r197466.

The MachineCSE fix that required the -mcpu flag has been disabled
until more work can be done to fix downstream issues. Adding -mcpu
wasn't the right workaround anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197624 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 23:04:37 +00:00
Weiming Zhao
4fdb649f3a [aarch32] fix bug 18268: Incorrect condition of vsel
Given vsel_cc, op1, op2, since vsel has no LE/LT, to generate vsel for
such selection, it needs to inverse cc and swap op1 and op2. To inverse
cc, both L/G and E bits should be flipped.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197615 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 22:25:17 +00:00
Adrian Prantl
5112542840 Debug info: Implement (rvalue) reference qualifiers for C++11 non-static
member functions. Paired commit with CFE.

rdar://problem/15356637

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197613 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 21:48:19 +00:00
Adrian Prantl
f5d3392e50 Pull in a couple of new constants from the upcoming DWARF 5 standard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197611 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 21:48:14 +00:00
Adrian Prantl
3fbf1a6989 formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197610 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 21:48:11 +00:00
Rafael Espindola
17ab16a248 Correctly handle the degenerated triple "thumb".
Fixes a crash in llc where some parts think the target is thumb and others think
it is ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197607 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 21:29:44 +00:00
Yuchen Wu
8cb0f6e78e llvm-cov: Print coverage summary to STDOUT.
File summaries will now be optionally outputted which will give line,
branching and call coverage info. Unfortunately, clang's current
instrumentation does not give enough information to deduce function
calls, something that gcc is able to do. Thus, no calls are always
outputted to be consistent with gcov output.

Also updated tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197606 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 21:12:51 +00:00
Owen Anderson
4fc184584c Revert r197600 while I sort out why it's failing on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197602 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 19:25:51 +00:00
Owen Anderson
04946d54db Add a unit test for loading an object file via a file descriptor. Patch by Pete Cooper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197600 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 19:20:29 +00:00
Yuchen Wu
2ceb6aeb66 llvm-cov: s/(.*)Executed/\1Exec/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197595 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 18:46:25 +00:00
Yuchen Wu
f6358f3eef llvm-cov: Added -c option for branch counts.
This will cause llvm-cov to output branch counts instead of branch
probabilities. -b must be enabled.

Also updated tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197594 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 18:40:15 +00:00
Jordan Rose
25acded1b0 [CMake] Don't put every project's tblgen executable in the LLVM bin directory.
This changes Clang standalone builds so that clang-tblgen lives in
clang/build/bin instead of llvm/build/bin, and so that with the Xcode
generator it's in clang/build/bin/Debug instead of llvm/build/bin/Debug/Debug/.
Yes, really.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197590 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 17:50:33 +00:00
Matheus Almeida
0f040daba7 [mips][msa] Update format of RUN lines for every MSA MC test.
1. The arch directive now appears before the cpu directive
2. Long run lines were split across multiple lines
    
No functional changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197588 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 17:31:21 +00:00
Logan Chien
462da4ac3c [arm] Rename Tag_VFP_arch to Tag_FP_arch.
According to "Addenda to ABI for ARM architecture", Tag_FP_arch is the
new name for the equivalent Tag_VFP_arch.  This commit renames
Tag_VFP_arch to Tag_FP_arch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197587 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 17:23:15 +00:00
NAKAMURA Takumi
010a40c080 Revert r197380, "llvm-config: Print SYSTEM_LIBS with --libs, instead of --ldflags."
I will introduce another flag, like --system-libs, later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197583 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 16:21:16 +00:00
NAKAMURA Takumi
b7967ba237 [CMake] Prune LLVM_TOOLS_BINARY_DIR in LLVMConfig.cmake, since it always points build directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197581 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 15:57:58 +00:00
Rafael Espindola
ebd63ff500 Fix f64 and f128 for ppc-darwin.
This patch adds -f64:32:64 to 32 bit ppc darwin since a f64 inside a
structure are only 32 bit aligned.

The patch also drop -f128:64:128 from all ppc darwin, since f128 is
128 bit aligned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197574 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 15:06:25 +00:00
Rafael Espindola
fc9b0e6c97 One ppc32-darwin, a i64 inside a structure can have 32 bit alignment.
Thanks for Iain Sandoe for testing this with the original gcc.

Clang was already getting this right.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197572 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 14:35:37 +00:00
Tim Northover
c95108f213 ARM: update comment to match reality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197570 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 14:18:36 +00:00
Matheus Almeida
d0ee4c5302 [mips][msa] Remove unneeded triple directive in MSA MC tests.
No functional changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 11:06:13 +00:00
Tobias Grosser
c4fc004047 DiagnosticInfo: Add missing namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 10:12:06 +00:00
Tim Northover
645efd763d ARM: force soft-float ABI for tests depending on it.
This should fix the ARM bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197555 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 09:58:06 +00:00
Tim Northover
e66345aed4 ARM: set default float ABI based on triple.
Clang sets the float-abi target option manually, but no longer
annotates each function with its ABI. This can lead to confusing
mistmatch between "clang -emit-llvm | llc" and normal clang
invocations.

Besides which, gnueabihf actually *is* hard-float. Defaulting to soft
was just perverse.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197554 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 09:27:33 +00:00
Kevin Qin
0a9ff8776b [AArch64 NEON]Implment loading vector constant form constant pool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197551 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 06:26:04 +00:00
Saleem Abdulrasool
5a445395de AsmParser: add support for .end directive
The .end directive indicates the end of the file.  No further instructions are
processed after a .end directive is encountered.

One potential (glaringly obvious) optimisation that could be pursued here is to
extend MCAsmParser with a DiscardRemainder method to avoid processing lexemes to
the end of the file.  It was unclear at this point if that would be worth
adding, and could easily be added in a follow on change.

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197547 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 02:53:03 +00:00
David Blaikie
2cb3295a53 DebugInfo: Introduce new DIValue, DIETypeSignature to encode references to type units via their signatures
This simplifies type unit and type unit reference creation as well as
setting the stage for inter-type hashing across type unit boundaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197539 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 23:32:35 +00:00
Rafael Espindola
f07d462beb Fix N32 registers and stack alignment.
This patch fixes the "n" and "S" components of the data layout for mips. Clang
already gets this right.

This will be tested in clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 23:15:58 +00:00
Hal Finkel
18b3d1383b Eliminate PPC instruction decoding ambiguities
The instruction definitions in the PPC backend have a number of variants
defined for the same instruction to represent differences between 64-bit and
32-bit semantics. In order to generate a disassembler for the PPC backend, we
need to mark all but one of these as CodeGen only.

No functionality change intended; this is prep work for PPC disassembly
support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197535 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 23:05:18 +00:00
Hal Finkel
af73dfe6f1 Support little-endian encodings in the FixedLenDecoderEmitter
The convention used to specify the PowerPC ISA is that bits are numbered in
reverse order (0 is the index of the high bit). To support this "little endian"
encoding convention, CodeEmitterGen will reverse the bit numberings prior to
generating the encoding tables. In order to generate a disassembler,
FixedLenDecoderEmitter needs to do the same.

This moves the bit reversal logic out of CodeEmitterGen and into CodeGenTarget
(where it can be used by both CodeEmitterGen and FixedLenDecoderEmitter). This
is prep work for disassembly support in the PPC backend (which is the only
in-tree user of this little-endian encoding support).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197532 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 22:37:50 +00:00
Quentin Colombet
51037451f9 [DiagnosticPrinter] Use the appropriate method to print a Twine object in a
raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197531 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 22:35:07 +00:00
Reid Kleckner
65c4329181 MC COFF: Emit the 'b' section flag for .bss sections in GNU assembly
Without this, assembling clang's disassembly would produce an object
file with the IMAGE_SCN_CNT_INITIALIZED_DATA section characteristic
rather than the uninitialized one.  link.exe would warn when merging
comdats with different flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197529 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 22:12:40 +00:00
Rafael Espindola
a5dd89e3c5 On APCS, only try to align aggregates to 32 bits instead of 64.
This matches clang's behavior and since it is only a preference, it is not
an ABI issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197526 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 21:36:54 +00:00
Rafael Espindola
3179bf24b4 Handle i64 first for clarity. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197524 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 21:28:36 +00:00