Commit Graph

76457 Commits

Author SHA1 Message Date
Duncan Sands
9a7d48ae67 Place this bracket according to the LLVM style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140784 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 16:01:46 +00:00
Justin Holewinski
2097d702d4 PTX: Fix broken shared library build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140783 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 14:25:48 +00:00
Jakob Stoklund Olesen
92fb79b7a6 Expand the x86 V_SET0* pseudos right after register allocation.
This also makes it possible to reduce the number of pseudo instructions
and get rid of the encoding information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140776 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 05:10:54 +00:00
NAKAMURA Takumi
13f4a6c940 Target/ARM: Unbreak! CMake! Build!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140774 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 03:32:49 +00:00
Jakob Stoklund Olesen
adcb634d85 Delete NEONMoveFix, now unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140773 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 02:56:45 +00:00
Jakob Stoklund Olesen
8bb3d3cb30 Use ExecutionDepsFix instead of NEONMoveFix.
This enables NEON domain tracking across basic blocks, but should
otherwise do the same thing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140772 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 02:48:41 +00:00
Andrew Trick
5219f86a0b typo + pasto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140769 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 01:53:08 +00:00
Jakob Stoklund Olesen
cc84cda919 Remove NumImplicitOps which is now unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140767 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 01:47:36 +00:00
Andrew Trick
0c01bc385a LSR: rewrite inner loops only.
Rewriting the entire loop nest now requires -enable-lsr-nested.
See PR11035 for some performance data.
A few unit tests specifically test nested LSR, and are now under a flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140762 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 01:33:38 +00:00
Andrew Trick
03b08764d2 whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140761 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 01:31:48 +00:00
Andrew Trick
f47e870015 Fix build failures better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140758 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 01:22:31 +00:00
Daniel Dunbar
7f3654db0c Fix build failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140755 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 01:14:42 +00:00
Bill Wendling
3511cedf36 Move to ISelLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140754 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 01:13:55 +00:00
Justin Holewinski
d57c1bc0b6 PTX: Add new patterns for bitconvert and any_extend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140753 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 01:13:12 +00:00
Michael J. Spencer
75c4abacaa llvm-size: Apply Chris's code review fixes.
This doesn't use formated_raw_ostream because it doesn't support the
functionality needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140751 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 00:59:18 +00:00
Eric Christopher
12eb3ad5d6 Use the local we already set up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140745 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 00:50:59 +00:00
Jakob Stoklund Olesen
3627a46293 Rewrite MachineInstr::addOperand() to avoid NumImplicitOps.
The function needs to scan the implicit operands anyway, so no
performance is won by caching the number of implicit operands added to
an instruction.

This also fixes a bug when adding operands after an implicit operand has
been added manually.  The NumImplicitOps count wasn't kept up to date.

MachineInstr::addOperand() will now consistently place all explicit
operands before all the implicit operands, regardless of the order they
are added.  It is possible to change an MI opcode and add additional
explicit operands.  They will be inserted before any existing implicit
operands.

The only exception is inline asm instructions where operands are never
reordered.  This is because of a hack that marks explicit clobber regs
on inline asm as <implicit-def> to please the fast register allocator.
This hack can go away when InstrEmitter and FastIsel can add exact
<dead> flags to physreg defs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140744 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 00:40:51 +00:00
Daniel Dunbar
caf1912893 tblgen/ClangDiagnostics: Add support for split default warning "no-werror" and
"show-in-system-header" bits, which I will be adding in Clang shortly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140741 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 00:29:04 +00:00
Jakob Stoklund Olesen
5cd4ee7770 Revert r140731, "Define classes for unary and binary FP instructions and use them to define"
It broke the unit tests.  Please reapply with tests fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140735 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 23:59:28 +00:00
Evan Cheng
9b88d2d782 Tighten a ARM dag combine condition to avoid an identity transformation, which
ends up introducing a cycle in the DAG.

rdar://10196296


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140733 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 23:16:31 +00:00
Akira Hatanaka
d42ca4607b Define classes for unary and binary FP instructions and use them to define
multiclasses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140731 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 21:58:01 +00:00
Bill Wendling
cc8cf97be4 Have the SjLjEHPrepare pass do some more heavy lifting.
Upon further review, most of the EH code should remain written at the IR
level. The part which breaks SSA form is the dispatch table, so that part will
be moved to the back-end.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140730 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 21:56:53 +00:00
Michael J. Spencer
7da52dd2fa Fix cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140726 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 21:24:44 +00:00
Eli Friedman
7d3e2b78c7 PR11033: Make sure we don't generate PCMPGTQ and PCMPEQQ if the target CPU does not support them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140723 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 21:00:25 +00:00
Michael J. Spencer
32a12ba8c0 Add llvm-size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140722 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 20:57:46 +00:00
Michael J. Spencer
13afc5eff2 Object: Add isSection{Data,BSS}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140721 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 20:57:30 +00:00
Eli Friedman
f56dc281ce NULL cannot be portably used as the last argument to a function with __attribute((sentinel)), even though it usually works. Use (void*)0 instead. PR11002.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140720 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 20:41:50 +00:00
Bill Wendling
b18abd077e Perform the lowering only if there are invokes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140719 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 20:29:45 +00:00
Bill Wendling
39689c8154 Ahem...actually *add* the ARMSjLjLowering pass to the pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140718 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 20:29:28 +00:00
Eric Christopher
90d6ec5f14 Add a note on removing LLVMC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140715 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 19:47:28 +00:00
Devang Patel
d02c42bb85 Introduce llvm-cov.
Add llvm-cov skeleton. It has initial support to read coverage info generated by GCOVProfiling.cpp. 
Today, you can do
prompt> clang a.c -ftest-coverage -fprofile-arcs -o a
prompt> ./a
prompt> llvm-cov -gcno a.gcno -gcda a.gcda 
a.c
 :	#include "a.h"
 :	
 :	int main() {
 :		int i = 0;
 :		if (i) {
1:			int j = 0;
1:			j = 1;
1:		} else {
 :			int k = 1;
 :			k = 2;
 :		}
1:		return 0;
 :	}
 :	
 :	




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140712 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 18:50:00 +00:00
Justin Holewinski
cfab2be391 PTX: Fix alignment logic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140709 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 18:24:58 +00:00
Akira Hatanaka
aa7579025f Rename predicate In32BitMode to NotFP64bit and add definition of IsFP64bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140705 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 18:11:19 +00:00
Akira Hatanaka
d9f958375f Remove definitions of branch-on-FP-likely instructions. They are deprecated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140704 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 17:56:55 +00:00
Akira Hatanaka
d2d00edc01 Mips64 predicate definitions. Patch by Liu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140703 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 17:50:27 +00:00
Andrew Trick
f63ae2159d indvars: generalize SCEV getPreStartForSignExtend.
Handle general Add expressions to avoid leaving around redundant
32-bit IVs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140701 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 17:02:54 +00:00
Justin Holewinski
ed0e4c85c4 PTX: MC-ize the PTX backend (patch 2 of N)
Get rid of some of the no-longer-needed parts of PTXAsmPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140698 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 14:32:06 +00:00
Justin Holewinski
d8e4ed2686 PTX: MC-ize the PTX back-end (patch 1 of N)
Lay some groundwork for converting to MC-based asm printer. This is the first
of probably many patches to bring the back-end back up-to-date with all of the
recent MC changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140697 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 14:32:04 +00:00
James Molloy
acad68da50 Check in a patch that has already been code reviewed by Owen that I'd forgotten to commit.
Build on previous patches to successfully distinguish between an M-series and A/R-series MSR and MRS instruction. These take different mask names and have a *slightly* different opcode format.

Add decoder and disassembler tests.

Improvement on the previous patch - successfully distinguish between valid v6m and v7m masks (one is a subset of the other). The patch had to be edited slightly to apply to ToT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140696 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 14:21:38 +00:00
Garrison Venn
113aa86120 Changed comments on foreign C++ exceptions (generated with type info 7),
handling with references to 
http://sourcery.mentor.com/public/cxx-abi/abi-eh.html (r 1.22).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140695 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 10:53:56 +00:00
Duncan Sands
42e5c799b6 A typeid of zero means a cleanup, not a catch. This case occurs
when there is both a catch and a cleanup.  Correct the comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140686 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 09:13:02 +00:00
Benjamin Kramer
ca9215970d PTX: Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140680 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 04:32:36 +00:00
Benjamin Kramer
8adae0c940 PTX: Pass param name strings per const reference.
The copies caused use-after-free bugs on std::string implementations without COW (i.e. anything but libstdc++)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140679 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 04:08:02 +00:00
Bill Wendling
adbf7b2c56 Strip off pointer casts when looking at the eh.sjlj.functioncontext's argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140678 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 03:52:41 +00:00
Bill Wendling
eef108d560 Bitcast the alloca to an i8* to match the intrinsic's signature.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140677 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 03:47:11 +00:00
Bill Wendling
6ef94175d1 Create and use an llvm.eh.sjlj.functioncontext intrinsic.
This intrinsic is used to pass the index of the function context to the back-end
for further processing. The back-end is in charge of filling in the rest of the
entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140676 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 03:36:43 +00:00
Bill Wendling
2b6bd7ba58 In the new EH model, setup the function context and the call site info.
The DWARF exception pass uses the call site information, which is set up here. A
pre-RA pass is too late for it to use this information. So create and setup the
function context here, and then insert the call site values here (and map the
call sites for the DWARF EH pass). This is simpler than the original pass, and
doesn't make the CFG lose its SSA-ness.

It's a win-win-win-win-lose-win-win situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140675 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 03:14:05 +00:00
Bill Wendling
4b6736bdb0 Don't conditionalize execution of the SjLj EH prepare pass.
We may need an SjLj EH preparation pass for some call site information, at least
in the short term.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140674 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 03:07:34 +00:00
Andrew Trick
52164eaddc Test case for r140670: indvars should hoist sext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140671 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 02:13:32 +00:00
Andrew Trick
909ef7db3d indvars should hoist [sz]ext because licm is not rerun.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140670 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 01:35:36 +00:00