oota-llvm.git
13 years agoRegenerate.
Mikhail Glushenkov [Sun, 24 Apr 2011 14:17:37 +0000 (14:17 +0000)]
Regenerate.

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

13 years agoRemove all references to plugins from the LLVMC docs.
Mikhail Glushenkov [Sun, 24 Apr 2011 14:17:32 +0000 (14:17 +0000)]
Remove all references to plugins from the LLVMC docs.

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

13 years agoPR9214: Convert the DIBuilder API to use ArrayRef.
Jay Foad [Sun, 24 Apr 2011 10:11:03 +0000 (10:11 +0000)]
PR9214: Convert the DIBuilder API to use ArrayRef.

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

13 years agoRemove unused STL header includes.
Jay Foad [Sat, 23 Apr 2011 19:53:52 +0000 (19:53 +0000)]
Remove unused STL header includes.

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

13 years agoLike the coding standards say, do not use "using namespace std".
Jay Foad [Sat, 23 Apr 2011 09:06:00 +0000 (09:06 +0000)]
Like the coding standards say, do not use "using namespace std".

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

13 years agoSilence an overzealous uninitialized variable warning from GCC.
Benjamin Kramer [Sat, 23 Apr 2011 08:21:06 +0000 (08:21 +0000)]
Silence an overzealous uninitialized variable warning from GCC.

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

13 years agoAccidental function name mangling.
Andrew Trick [Sat, 23 Apr 2011 04:08:15 +0000 (04:08 +0000)]
Accidental function name mangling.

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

13 years agoThumb2 and ARM add/subtract with carry fixes.
Andrew Trick [Sat, 23 Apr 2011 03:55:32 +0000 (03:55 +0000)]
Thumb2 and ARM add/subtract with carry fixes.

Fixes Thumb2 ADCS and SBCS lowering: <rdar://problem/9275821>.
t2ADCS/t2SBCS are now pseudo instructions, consistent with ARM, so the
assembly printer correctly prints the 's' suffix.

Fixes Thumb2 adde -> SBC matching to check for live/dead carry flags.

Fixes the internal ARM machine opcode mnemonic for ADCS/SBCS.
Fixes ARM SBC lowering to check for live carry (potential bug).

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

13 years agoComment edit.
Andrew Trick [Sat, 23 Apr 2011 03:27:19 +0000 (03:27 +0000)]
Comment edit.

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

13 years agowhitespace
Andrew Trick [Sat, 23 Apr 2011 03:24:11 +0000 (03:24 +0000)]
whitespace

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

13 years agodocs: Introduce cascading style <div> and <p> continued on <h[2-5]>.
NAKAMURA Takumi [Sat, 23 Apr 2011 00:30:22 +0000 (00:30 +0000)]
docs: Introduce cascading style <div> and <p> continued on <h[2-5]>.

<h2>Section Example</h2>
<div> <!-- h2+div is applied -->
<p>Section preamble.</p>

<h3>Subsection Example</h3>
<p> <!-- h3+p is applied -->
Subsection body
</p>

<!-- End of section body -->
</div>

FIXME: Care H5 better.

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

13 years agotest/CodeGen/X86/shrink-compare.ll: Relax expressions for Win64.
NAKAMURA Takumi [Sat, 23 Apr 2011 00:15:45 +0000 (00:15 +0000)]
test/CodeGen/X86/shrink-compare.ll: Relax expressions for Win64.

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

13 years agoTeach FastISel to deal with instructions that have two immediate operands.
Owen Anderson [Fri, 22 Apr 2011 23:38:06 +0000 (23:38 +0000)]
Teach FastISel to deal with instructions that have two immediate operands.

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

13 years agoLet front-end tie subprogram declaration with subprogram definition directly.
Devang Patel [Fri, 22 Apr 2011 23:10:17 +0000 (23:10 +0000)]
Let front-end tie subprogram declaration with subprogram definition directly.

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

13 years agoFix comment.
Eric Christopher [Fri, 22 Apr 2011 23:08:45 +0000 (23:08 +0000)]
Fix comment.

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

13 years agoAlways compare the cost of region splitting with the cost of per-block splitting.
Jakob Stoklund Olesen [Fri, 22 Apr 2011 22:47:40 +0000 (22:47 +0000)]
Always compare the cost of region splitting with the cost of per-block splitting.

Sometimes it is better to split per block, and we missed those cases.

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

13 years agoThe .inc file is auto-generated and must not be edited by hand.
Mikhail Glushenkov [Fri, 22 Apr 2011 22:05:29 +0000 (22:05 +0000)]
The .inc file is auto-generated and must not be edited by hand.

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

13 years agoRecommit the fix for rdar://9289512 with a couple tweaks to
Chris Lattner [Fri, 22 Apr 2011 21:59:37 +0000 (21:59 +0000)]
Recommit the fix for rdar://9289512 with a couple tweaks to
fix bugs exposed by the gcc dejagnu testsuite:
1. The load may actually be used by a dead instruction, which
   would cause an assert.
2. The load may not be used by the current chain of instructions,
   and we could move it past a side-effecting instruction. Change
   how we process uses to define the problem away.

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

13 years agoDisassembly of A8.6.59 LDR (literal) Encoding T1 (16-bit thumb instruction) should
Johnny Chen [Fri, 22 Apr 2011 19:12:43 +0000 (19:12 +0000)]
Disassembly of A8.6.59 LDR (literal) Encoding T1 (16-bit thumb instruction) should
print out ldr, not ldr.n.

rdar://problem/9267772

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

13 years agoDAGCombine: fold "(zext x) == C" into "x == (trunc C)" if the trunc is lossless.
Benjamin Kramer [Fri, 22 Apr 2011 18:47:44 +0000 (18:47 +0000)]
DAGCombine: fold "(zext x) == C" into "x == (trunc C)" if the trunc is lossless.

On x86 this allows to fold a load into the cmp, greatly reducing register pressure.
  movzbl (%rdi), %eax
  cmpl $47, %eax
->
  cmpb $47, (%rdi)

This shaves 8k off gcc.o on i386. I'll leave applying the patch in README.txt to Chris :)

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

13 years agoDo not leak argument's DbgVariables.
Devang Patel [Fri, 22 Apr 2011 18:09:57 +0000 (18:09 +0000)]
Do not leak argument's DbgVariables.

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

13 years agoAdd asserts.
Devang Patel [Fri, 22 Apr 2011 16:44:29 +0000 (16:44 +0000)]
Add asserts.

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

13 years agoX86: Try to use a smaller encoding by transforming (X << C1) & C2 into (X & (C2 ...
Benjamin Kramer [Fri, 22 Apr 2011 15:30:40 +0000 (15:30 +0000)]
X86: Try to use a smaller encoding by transforming (X << C1) & C2 into (X & (C2 >> C1)) & C1. (Part of PR5039)

This tends to happen a lot with bitfield code generated by clang. A simple example for x86_64 is
uint64_t foo(uint64_t x) { return (x&1) << 42; }
which used to compile into bloated code:
shlq $42, %rdi               ## encoding: [0x48,0xc1,0xe7,0x2a]
movabsq $4398046511104, %rax    ## encoding: [0x48,0xb8,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00]
andq %rdi, %rax              ## encoding: [0x48,0x21,0xf8]
ret                             ## encoding: [0xc3]

with this patch we can fold the immediate into the and:
andq $1, %rdi                ## encoding: [0x48,0x83,0xe7,0x01]
movq %rdi, %rax              ## encoding: [0x48,0x89,0xf8]
shlq $42, %rax               ## encoding: [0x48,0xc1,0xe0,0x2a]
ret                             ## encoding: [0xc3]

It's possible to save another byte by using 'andl' instead of 'andq' but I currently see no way of doing
that without making this code even more complicated. See the TODOs in the code.

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

13 years agoComment out some unused parameter names to silence out-of-tree -Wunused warnings.
Frits van Bommel [Fri, 22 Apr 2011 11:36:45 +0000 (11:36 +0000)]
Comment out some unused parameter names to silence out-of-tree -Wunused warnings.

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

13 years agoUse enums for constant values.
Eric Christopher [Fri, 22 Apr 2011 06:34:01 +0000 (06:34 +0000)]
Use enums for constant values.

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

13 years agoMake the file format strings a little prettier for mach-o.
Eric Christopher [Fri, 22 Apr 2011 04:08:58 +0000 (04:08 +0000)]
Make the file format strings a little prettier for mach-o.

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

13 years agoAdd MachOObjectFile.cpp to cmake.
Eric Christopher [Fri, 22 Apr 2011 04:06:24 +0000 (04:06 +0000)]
Add MachOObjectFile.cpp to cmake.

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

13 years agoHook in mach-o object files into Object interface.
Eric Christopher [Fri, 22 Apr 2011 03:50:50 +0000 (03:50 +0000)]
Hook in mach-o object files into Object interface.

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

13 years agoAdd support for 64-bit object files to Path.
Eric Christopher [Fri, 22 Apr 2011 03:50:19 +0000 (03:50 +0000)]
Add support for 64-bit object files to Path.

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

13 years agoAdd an ObjectFile implementation for mach-o.
Eric Christopher [Fri, 22 Apr 2011 03:19:48 +0000 (03:19 +0000)]
Add an ObjectFile implementation for mach-o.

Patch by Patrick Walton!

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

13 years ago80-col fix.
Eric Christopher [Fri, 22 Apr 2011 03:07:06 +0000 (03:07 +0000)]
80-col fix.

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

13 years agoinclude/llvm/Target/TargetAsmInfo.h: Fix a warning.
NAKAMURA Takumi [Fri, 22 Apr 2011 01:56:59 +0000 (01:56 +0000)]
include/llvm/Target/TargetAsmInfo.h: Fix a warning.

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

13 years agoIn Thumb2 mode, lower frame indix references to:
Evan Cheng [Fri, 22 Apr 2011 01:42:52 +0000 (01:42 +0000)]
In Thumb2 mode, lower frame indix references to:
add <rd>, sp, #<imm8>
ldr <rd>, [sp, #<imm8>]
When the offset from sp is multiple of 4 and in range of 0-1020.
This saves code size by utilizing 16-bit instructions.

rdar://9321541

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

13 years agoTypo
Evan Cheng [Fri, 22 Apr 2011 01:40:20 +0000 (01:40 +0000)]
Typo

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

13 years agoDelete the other unused variable in this function. Sorry I missed this
Chandler Carruth [Fri, 22 Apr 2011 01:29:18 +0000 (01:29 +0000)]
Delete the other unused variable in this function. Sorry I missed this
the first time through.

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

13 years agoRemove an unused variable from a function. This is a likely cut-paste-o.
Chandler Carruth [Fri, 22 Apr 2011 01:21:06 +0000 (01:21 +0000)]
Remove an unused variable from a function. This is a likely cut-paste-o.
Silences GCC warning.

I wonder why Clang doesn't warn on this...

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

13 years agoBranch folding is folding a landing pad into a regular BB.
Bill Wendling [Fri, 22 Apr 2011 01:07:09 +0000 (01:07 +0000)]
Branch folding is folding a landing pad into a regular BB.

An exception is thrown via a call to _cxa_throw, which we don't expect to
return. Therefore, the "true" part of the invoke goes to a BB that has
'unreachable' as its only instruction. This is lowered into an empty MachineBB.
The landing pad for this invoke, however, is directly after the "true" MBB.
When the empty MBB is removed, the landing pad is directly below the BB with the
invoke call. The unconditional branch is removed and then the two blocks are
merged together.

The testcase is too big for a regression test.
<rdar://problem/9305728>

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

13 years agoDefine Neon load/store intrinsics for Clang as macros instead of functions.
Bob Wilson [Fri, 22 Apr 2011 00:37:01 +0000 (00:37 +0000)]
Define Neon load/store intrinsics for Clang as macros instead of functions.
This is needed so the front-end can see "aligned" attributes on the type
for the pointer arguments.  Radar 9311427.

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

13 years agoCompute the size of the FDE encoding instead of hard coding it. Update
Rafael Espindola [Fri, 22 Apr 2011 00:08:43 +0000 (00:08 +0000)]
Compute the size of the FDE encoding instead of hard coding it. Update
X8664_ELFTargetObjectFile::getFDEEncoding to match reality.

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

13 years agoRemove unused argument.
Rafael Espindola [Thu, 21 Apr 2011 23:39:26 +0000 (23:39 +0000)]
Remove unused argument.

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

13 years agoDon't pass address spaces to EmitULEB128IntValue.
Rafael Espindola [Thu, 21 Apr 2011 23:26:40 +0000 (23:26 +0000)]
Don't pass address spaces to EmitULEB128IntValue.

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

13 years agoFix DWARF description of Q registers.
Devang Patel [Thu, 21 Apr 2011 23:22:35 +0000 (23:22 +0000)]
Fix DWARF description of Q registers.

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

13 years agoFix DWARF description of S registers.
Devang Patel [Thu, 21 Apr 2011 22:48:26 +0000 (22:48 +0000)]
Fix DWARF description of S registers.

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

13 years agoAdd DW_OP_bit_piece.
Devang Patel [Thu, 21 Apr 2011 22:26:13 +0000 (22:26 +0000)]
Add DW_OP_bit_piece.

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

13 years agoRefactor.
Devang Patel [Thu, 21 Apr 2011 21:07:35 +0000 (21:07 +0000)]
Refactor.

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

13 years agoTest case for r129922
Devang Patel [Thu, 21 Apr 2011 20:16:43 +0000 (20:16 +0000)]
Test case for r129922

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

13 years agoPR9214: Convert Metadata API to use ArrayRef.
Jay Foad [Thu, 21 Apr 2011 19:59:31 +0000 (19:59 +0000)]
PR9214: Convert Metadata API to use ArrayRef.

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

13 years agoDon't recycle loop variables.
Matt Beaumont-Gay [Thu, 21 Apr 2011 19:46:23 +0000 (19:46 +0000)]
Don't recycle loop variables.

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

13 years agoAllow allocatable ranges from global live range splitting to be split again.
Jakob Stoklund Olesen [Thu, 21 Apr 2011 18:38:15 +0000 (18:38 +0000)]
Allow allocatable ranges from global live range splitting to be split again.

These intervals are allocatable immediately after splitting, but they may be
evicted because of later splitting. This is rare, but when it happens they
should be split again.

The remainder intervals that cannot be allocated after splitting still move
directly to spilling.

SplitEditor::finish can optionally provide a mapping from new live intervals
back to the original interval indexes returned by openIntv().

Each original interval index can map to multiple new intervals after connected
components have been separated. Dead code elimination may also add existing
intervals to the list.

The reverse mapping allows the SplitEditor client to treat the new intervals
differently depending on the split region they came from.

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

13 years agoFix relative relocations. This is sufficient for running the rust testsuite with
Rafael Espindola [Thu, 21 Apr 2011 18:36:50 +0000 (18:36 +0000)]
Fix relative relocations. This is sufficient for running the rust testsuite with
MC :-)

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

13 years agoAs per ARM docs, register Dx is described as DW_OP_regx(256+x) in DWARF.
Devang Patel [Thu, 21 Apr 2011 17:51:06 +0000 (17:51 +0000)]
As per ARM docs, register Dx is described as DW_OP_regx(256+x) in DWARF.

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

13 years agoAdd comment in output stream.
Devang Patel [Thu, 21 Apr 2011 17:50:24 +0000 (17:50 +0000)]
Add comment in output stream.

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

13 years agoRevert r1296656, "Fix rdar://9289512 - not folding load into compare at -O0...",
Daniel Dunbar [Thu, 21 Apr 2011 16:14:46 +0000 (16:14 +0000)]
Revert r1296656, "Fix rdar://9289512 - not folding load into compare at -O0...",
which broke a couple GCC test suite tests at -O0.

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

13 years agoPTX: Expand useable register space
Justin Holewinski [Thu, 21 Apr 2011 16:08:02 +0000 (16:08 +0000)]
PTX: Expand useable register space

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

13 years agoptx: fix parameter ordering
Che-Liang Chiou [Thu, 21 Apr 2011 10:56:58 +0000 (10:56 +0000)]
ptx: fix parameter ordering

This patch depends on the prior fix r129908 that changes to use std::find,
rather than std::binary_search, on unordered array.

Patch by Dan Bailey

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

13 years agoptx: PTXMachineFunctionInfo no longer sort registers and so should not use std::binar...
Che-Liang Chiou [Thu, 21 Apr 2011 10:16:20 +0000 (10:16 +0000)]
ptx: PTXMachineFunctionInfo no longer sort registers and so should not use std::binary_search

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

13 years agoDon't allow per-register spill size and alignment.
Jakob Stoklund Olesen [Thu, 21 Apr 2011 03:43:21 +0000 (03:43 +0000)]
Don't allow per-register spill size and alignment.

These values were not used for anything. Spill size and alignment is a property
of the register class, not the register.

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

13 years agoIn gcov profiling, give all functions an extra unified return block. This is
Nick Lewycky [Thu, 21 Apr 2011 03:18:00 +0000 (03:18 +0000)]
In gcov profiling, give all functions an extra unified return block. This is
necessary since gcov counts transitions between blocks. It can't see if you've
run every line in a straight-line function, so we add an edge for it to notice.

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

13 years agoFix think-o: emit all 8 bytes of the EOF marker. Also reflow a line in a
Nick Lewycky [Thu, 21 Apr 2011 02:48:39 +0000 (02:48 +0000)]
Fix think-o: emit all 8 bytes of the EOF marker. Also reflow a line in a
comment for 80 columns.

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

13 years agoAdd independent controls for whether GCOV profiling should emit .gcno files or
Nick Lewycky [Thu, 21 Apr 2011 01:56:25 +0000 (01:56 +0000)]
Add independent controls for whether GCOV profiling should emit .gcno files or
instrument the program to emit .gcda.
TODO: we should emit slightly different .gcda files when .gcno emission is off.

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

13 years agoFix typo in comment.
Nick Lewycky [Thu, 21 Apr 2011 01:54:08 +0000 (01:54 +0000)]
Fix typo in comment.

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

13 years agodocs/llvm.css: Introduce cascading style <div> and <p> continued on <h[2-5]>. For...
NAKAMURA Takumi [Thu, 21 Apr 2011 01:52:00 +0000 (01:52 +0000)]
docs/llvm.css: Introduce cascading style <div> and <p> continued on <h[2-5]>. For now, it is applied in AliasAnalysis.html and ReleaseNotes.html.

<h2>Section Example</h2>
<div> <!-- h2+div is applied -->
<p>Section preamble.</p>

<h3>Subsection Example</h3>
<p> <!-- h3+p is applied -->
Subsection body
</p>

<!-- End of section body -->
</div>

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

13 years agodocs/Passes.html: Fix a garbage.
NAKAMURA Takumi [Thu, 21 Apr 2011 01:32:19 +0000 (01:32 +0000)]
docs/Passes.html: Fix a garbage.

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

13 years agoStructs have elements not parameters. I'm surprised this ever compiled...
Nick Lewycky [Wed, 20 Apr 2011 22:52:37 +0000 (22:52 +0000)]
Structs have elements not parameters. I'm surprised this ever compiled...

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

13 years agoRemove -use-divmod-libcall. Let targets opt in when they are available.
Evan Cheng [Wed, 20 Apr 2011 22:20:12 +0000 (22:20 +0000)]
Remove -use-divmod-libcall. Let targets opt in when they are available.

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

13 years agoAdd debug output for rematerializable instructions.
Jakob Stoklund Olesen [Wed, 20 Apr 2011 22:14:20 +0000 (22:14 +0000)]
Add debug output for rematerializable instructions.

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

13 years agoPermit remat when a virtual register has multiple defs.
Jakob Stoklund Olesen [Wed, 20 Apr 2011 22:14:17 +0000 (22:14 +0000)]
Permit remat when a virtual register has multiple defs.

TII::isTriviallyReMaterializable() shouldn't depend on any properties of the
register being defined by the instruction. Rematerialization is going to create
a new virtual register anyway.

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

13 years agoFix another case of <rdar://problem/9184212> that only occurs with code
Cameron Zwarich [Wed, 20 Apr 2011 21:48:38 +0000 (21:48 +0000)]
Fix another case of <rdar://problem/9184212> that only occurs with code
generated by llvm-gcc, since llvm-gcc uses 2 i64s for passing a 4 x float
vector on ARM rather than an i64 array like Clang.

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

13 years agoThe bitcast case here is actually handled uniformly earlier in the function, so
Cameron Zwarich [Wed, 20 Apr 2011 21:48:34 +0000 (21:48 +0000)]
The bitcast case here is actually handled uniformly earlier in the function, so
delete it.

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

13 years agoCleanup some code to better use an early return style in preparation for adding
Cameron Zwarich [Wed, 20 Apr 2011 21:48:16 +0000 (21:48 +0000)]
Cleanup some code to better use an early return style in preparation for adding
more cases.

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

13 years agoUn-XFAIL this test for ARM. <rdar://problem/7662569>
Stuart Hastings [Wed, 20 Apr 2011 21:47:45 +0000 (21:47 +0000)]
Un-XFAIL this test for ARM.  <rdar://problem/7662569>

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

13 years agoRevert r129846; it's breaking a buildbot. See
Eli Friedman [Wed, 20 Apr 2011 19:00:08 +0000 (19:00 +0000)]
Revert r129846; it's breaking a buildbot.  See
http://google1.osuosl.org:8011/builders/llvm-x86_64-linux-checks/builds/825/steps/test.llvm.stage2/logs/st.ll

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

13 years agoPrefer cheap registers for busy live ranges.
Jakob Stoklund Olesen [Wed, 20 Apr 2011 18:19:48 +0000 (18:19 +0000)]
Prefer cheap registers for busy live ranges.

On the x86-64 and thumb2 targets, some registers are more expensive to encode
than others in the same register class.

Add a CostPerUse field to the TableGen register description, and make it
available from TRI->getCostPerUse. This represents the cost of a REX prefix or a
32-bit instruction encoding required by choosing a high register.

Teach the greedy register allocator to prefer cheap registers for busy live
ranges (as indicated by spill weight).

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

13 years agoExcise unintended hunk in 129858. <rdar://problem/7662569>
Stuart Hastings [Wed, 20 Apr 2011 18:09:26 +0000 (18:09 +0000)]
Excise unintended hunk in 129858.  <rdar://problem/7662569>

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

13 years agoARM byval support. Will be enabled by another patch to the FE. <rdar://problem...
Stuart Hastings [Wed, 20 Apr 2011 16:47:52 +0000 (16:47 +0000)]
ARM byval support.  Will be enabled by another patch to the FE.  <rdar://problem/7662569>

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

13 years agosys/Host: Change getHostTriple() to return the full Darwin version on OS X.
Daniel Dunbar [Wed, 20 Apr 2011 15:44:33 +0000 (15:44 +0000)]
sys/Host: Change getHostTriple() to return the full Darwin version on OS X.

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

13 years agoPTX: Add intrinsics to list of built-in intrinsics, which allows them to be
Justin Holewinski [Wed, 20 Apr 2011 15:37:17 +0000 (15:37 +0000)]
PTX: Add intrinsics to list of built-in intrinsics, which allows them to be
     used by Clang.  To help Clang integration, the PTX target has been split
     into two targets: ptx32 and ptx64, depending on the desired pointer size.

- Add GCCBuiltin class to all intrinsics
- Split PTX target into ptx32 and ptx64

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

13 years agoBehave like gnu as when a relocation crosses sections.
Rafael Espindola [Wed, 20 Apr 2011 14:01:45 +0000 (14:01 +0000)]
Behave like gnu as when a relocation crosses sections.

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

13 years agoptx: add integer div and rem instruction
Che-Liang Chiou [Wed, 20 Apr 2011 09:28:55 +0000 (09:28 +0000)]
ptx: add integer div and rem instruction

Patched by Dan Bailey

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

13 years agoptx: add floating-point comparison to setp
Che-Liang Chiou [Wed, 20 Apr 2011 09:28:20 +0000 (09:28 +0000)]
ptx: add floating-point comparison to setp

Patched by Dan Bailey

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

13 years agoptx: fix parameter ordering
Che-Liang Chiou [Wed, 20 Apr 2011 09:27:19 +0000 (09:27 +0000)]
ptx: fix parameter ordering

Patched by Dan Bailey

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

13 years agoThis should always be signed chars, so use int8_t. This fixes a miscompile when
Nick Lewycky [Wed, 20 Apr 2011 03:19:42 +0000 (03:19 +0000)]
This should always be signed chars, so use int8_t. This fixes a miscompile when
llvm is built with unsigned chars where an immediate such as 0xff would be zero
extended to 64-bits, turning "cmp $0xff,%eax" into
"cmp $0xffffffffffffffff,%eax".

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

13 years agoRemove unused arguments.
Rafael Espindola [Wed, 20 Apr 2011 03:08:09 +0000 (03:08 +0000)]
Remove unused arguments.

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

13 years agoRewrite the expander for umulo/smulo to remember to sign extend the input
Eric Christopher [Wed, 20 Apr 2011 01:19:45 +0000 (01:19 +0000)]
Rewrite the expander for umulo/smulo to remember to sign extend the input
manually and pass all (now) 4 arguments to the mul libcall. Add a new
ExpandLibCall for just this (copied gratuitously from type legalization).

Fixes rdar://9292577

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

13 years agollc: Fix a refacto, .loc support didn't work before 10.6.
Daniel Dunbar [Wed, 20 Apr 2011 00:47:19 +0000 (00:47 +0000)]
llc: Fix a refacto, .loc support didn't work before 10.6.

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

13 years agoMade the MC disassembler check before accessing
Sean Callanan [Wed, 20 Apr 2011 00:43:34 +0000 (00:43 +0000)]
Made the MC disassembler check before accessing
MCInst operands for ARM.  This allows it to be
more tolerant of malformed MCInsts or incorrect
instruction metadata.

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

13 years agoADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OS
Daniel Dunbar [Wed, 20 Apr 2011 00:14:25 +0000 (00:14 +0000)]
ADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OS
triple component.

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

13 years agoFix typo in the comment.
Johnny Chen [Tue, 19 Apr 2011 23:58:52 +0000 (23:58 +0000)]
Fix typo in the comment.

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

13 years agoADT/Triple: Drop support for -osx style triples, we are going with -macosx
Daniel Dunbar [Tue, 19 Apr 2011 23:55:20 +0000 (23:55 +0000)]
ADT/Triple: Drop support for -osx style triples, we are going with -macosx
instead.

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

13 years agoADT/Triple: Add support for Triple::MacOSX per feedback from Chris, will remove
Daniel Dunbar [Tue, 19 Apr 2011 23:34:12 +0000 (23:34 +0000)]
ADT/Triple: Add support for Triple::MacOSX per feedback from Chris, will remove
Triple::OSX once Clang has moved.

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

13 years agoADT/Triple: Move a variety of clients to using isOSDarwin() and isOSWindows()
Daniel Dunbar [Tue, 19 Apr 2011 21:14:45 +0000 (21:14 +0000)]
ADT/Triple: Move a variety of clients to using isOSDarwin() and isOSWindows()
predicates.

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

13 years agoADT/Triple: Add isOSDarwin() and isOSWindows() helper functions.
Daniel Dunbar [Tue, 19 Apr 2011 21:12:05 +0000 (21:12 +0000)]
ADT/Triple: Add isOSDarwin() and isOSWindows() helper functions.

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

13 years agoADT/Triple: Fix Triple::getArchNameForAssembler to support OSX and iOS
Daniel Dunbar [Tue, 19 Apr 2011 21:07:03 +0000 (21:07 +0000)]
ADT/Triple: Fix Triple::getArchNameForAssembler to support OSX and iOS
enumeration values.

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

13 years agoTarget/X86: Eliminate uses of getDarwinVers().
Daniel Dunbar [Tue, 19 Apr 2011 21:04:12 +0000 (21:04 +0000)]
Target/X86: Eliminate uses of getDarwinVers().

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

13 years agoTarget/X86: Add getTargetTriple() accessor.
Daniel Dunbar [Tue, 19 Apr 2011 21:01:47 +0000 (21:01 +0000)]
Target/X86: Add getTargetTriple() accessor.

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

13 years agoTarget/PPC: Kill off DarwinVers, which is now dead.
Daniel Dunbar [Tue, 19 Apr 2011 20:59:24 +0000 (20:59 +0000)]
Target/PPC: Kill off DarwinVers, which is now dead.

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

13 years agoTarget/PPC: Eliminate a use of getDarwinVers().
Daniel Dunbar [Tue, 19 Apr 2011 20:57:03 +0000 (20:57 +0000)]
Target/PPC: Eliminate a use of getDarwinVers().

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

13 years agoTarget/PPC: Add a TargetTriple field.
Daniel Dunbar [Tue, 19 Apr 2011 20:54:28 +0000 (20:54 +0000)]
Target/PPC: Add a TargetTriple field.

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

13 years agoadd a helper method.
Chris Lattner [Tue, 19 Apr 2011 20:47:57 +0000 (20:47 +0000)]
add a helper method.

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

13 years agollc: Eliminate a use of getDarwinMajorNumber().
Daniel Dunbar [Tue, 19 Apr 2011 20:46:13 +0000 (20:46 +0000)]
llc: Eliminate a use of getDarwinMajorNumber().

 - As before, there is a minor semantic change here (evidenced by the test
   change) for Darwin triples that have no version component. I debated changing
   the default behavior of isOSVersionLT, but decided it made more sense for
   triples to be explicit.

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