OSDN Git Service
Rafael Espindola [Tue, 26 Apr 2011 14:17:42 +0000 (14:17 +0000)]
Add test for PR9743.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130198
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 26 Apr 2011 07:30:10 +0000 (07:30 +0000)]
Another example of a static table that wasn't marked static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130193
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Apr 2011 06:14:13 +0000 (06:14 +0000)]
don't emit the symbol name twice for local bss and common
symbols. For example, don't emit:
.comm _i,4,2 ## @i
## @i
instead emit:
.comm _i,4,2 ## @i
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130192
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 26 Apr 2011 05:48:41 +0000 (05:48 +0000)]
Add cmakefiles to build profile_rt.so!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130191
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 26 Apr 2011 04:57:37 +0000 (04:57 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130190
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 26 Apr 2011 03:58:56 +0000 (03:58 +0000)]
Print all the moves at a given label instead of just the first one.
Remove previous DwarfCFI hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130187
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 26 Apr 2011 03:54:16 +0000 (03:54 +0000)]
Rename everything to follow LLVM style ... I think.
Add support for switch and indirectbr edges. This works by densely numbering
all blocks which have such terminators, and then separately numbering the
possible successors. The predecessors write down a number, the successor knows
its own number (as a ConstantInt) and sends that and the pointer to the number
the predecessor wrote down to the runtime, who looks up the counter in a
per-function table.
Coverage data should now be functional, but I haven't tested it on anything
other than my 2-file synthetic test program for coverage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130186
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 26 Apr 2011 02:17:58 +0000 (02:17 +0000)]
No relocation produces a SLEB or ULEB, make sure they are handled in MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130181
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 26 Apr 2011 01:21:15 +0000 (01:21 +0000)]
Enhance MemDep: When alias analysis returns a partial alias result,
return it as a clobber. This allows GVN to do smart things.
Enhance GVN to be smart about the case when a small load is clobbered
by a larger overlapping load. In this case, forward the value. This
allows us to compile stuff like this:
int test(void *P) {
int tmp = *(unsigned int*)P;
return tmp+*((unsigned char*)P+1);
}
into:
_test: ## @test
movl (%rdi), %ecx
movzbl %ch, %eax
addl %ecx, %eax
ret
which has one load. We already handled the case where the smaller
load was from a must-aliased base pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130180
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 26 Apr 2011 00:12:46 +0000 (00:12 +0000)]
Let dwarf writer allocate extra space in the debug location expression. This space, if requested, will be used for complex addresses of the Blocks' variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130178
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 25 Apr 2011 23:05:21 +0000 (23:05 +0000)]
Rename a local variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130171
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 25 Apr 2011 23:02:17 +0000 (23:02 +0000)]
Rename a method to match what it really does.
s/addVariableAddress/addFrameVariableAddress/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130170
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 25 Apr 2011 22:52:55 +0000 (22:52 +0000)]
Do not drop a variable's complex address if it is not based on frame base.
Observed this while reading code, so I do not have a test case handy here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130167
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 25 Apr 2011 22:48:29 +0000 (22:48 +0000)]
Fix an iterator invalidation bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130166
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 25 Apr 2011 22:39:46 +0000 (22:39 +0000)]
Make this test disable fast isel as it's not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130165
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Apr 2011 22:14:33 +0000 (22:14 +0000)]
mark a large static table static. Pointed out by Michael Ilseman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130160
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Apr 2011 21:02:12 +0000 (21:02 +0000)]
Improve adherence to general style, use "foo_t &x" instead of "foo_t& x"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130153
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Apr 2011 20:58:50 +0000 (20:58 +0000)]
allow adding a FoldingSetNodeID to a FastFoldingSetNode, resolving PR9499,
patch by Johannes Schaub!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130151
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 25 Apr 2011 18:44:26 +0000 (18:44 +0000)]
add a missed bitfield instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130137
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 25 Apr 2011 17:10:45 +0000 (17:10 +0000)]
Lower BlockAddress node when relocation-model is static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130131
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 25 Apr 2011 16:33:52 +0000 (16:33 +0000)]
A dbg.declare may not be in entry block, even if it is referring to an incoming argument. However, It is appropriate to emit DBG_VALUE referring to this incoming argument in entry block in MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130129
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 25 Apr 2011 10:12:01 +0000 (10:12 +0000)]
Make tests more useful.
lit needs a linter ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130126
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 25 Apr 2011 07:11:23 +0000 (07:11 +0000)]
Remove some hard coded CR-LFs. Some of these were the entire files, one of
these was just one line of a file. Explicitly set the eol-style property on the
files to try and ensure this fix stays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130125
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 25 Apr 2011 06:21:43 +0000 (06:21 +0000)]
Fix comment typo. Noticed by Liu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130120
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 24 Apr 2011 19:55:34 +0000 (19:55 +0000)]
Simplify the logic. Noticed by aKor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130116
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 24 Apr 2011 19:00:34 +0000 (19:00 +0000)]
Synchronize the conditions for producing a .cfi_startproc and a .cfi_endproc.
Fixes PR9787.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130115
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 24 Apr 2011 15:47:01 +0000 (15:47 +0000)]
Fix Target/ARM/Thumb1FrameLowering.h header guard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130097
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 24 Apr 2011 15:46:56 +0000 (15:46 +0000)]
Give MC/MCDisassembler/Disassembler.h a header guard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130096
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 24 Apr 2011 15:46:51 +0000 (15:46 +0000)]
Give SplitKit.h a header guard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130095
91177308-0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 24 Apr 2011 15:46:46 +0000 (15:46 +0000)]
Give ImmutableIntervalMap.h an include guard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130094
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Sun, 24 Apr 2011 14:30:00 +0000 (14:30 +0000)]
Fix an assert to check exactly what it says.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130093
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 24 Apr 2011 14:17:41 +0000 (14:17 +0000)]
Add a TODO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130092
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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