Bill Wendling
e2b889be65
Fix comment.
...
llvm-svn: 131173
2011-05-11 01:08:39 +00:00
Evan Cheng
05fc35e275
Add a late optimization to BranchFolding that hoist common instruction sequences
...
at the start of basic blocks to their common predecessor. It's actually quite
common (e.g. about 50 times in JM/lencod) and has shown to be a nice code size
benefit. e.g.
pushq %rax
testl %edi, %edi
jne LBB0_2
## BB#1:
xorb %al, %al
popq %rdx
ret
LBB0_2:
xorb %al, %al
callq _foo
popq %rdx
ret
=>
pushq %rax
xorb %al, %al
testl %edi, %edi
je LBB0_2
## BB#1:
callq _foo
LBB0_2:
popq %rdx
ret
rdar://9145558
llvm-svn: 131172
2011-05-11 01:03:01 +00:00
Eric Christopher
4a34e61e53
Optimize atomic lock or that doesn't use the result value.
...
Next up: xor and and.
Part of rdar://8470697
llvm-svn: 131171
2011-05-10 23:57:45 +00:00
Rafael Espindola
14e1b58405
Add triple.
...
llvm-svn: 131169
2011-05-10 23:14:29 +00:00
Rafael Espindola
dc9d9f8eeb
Fix cmake again.
...
llvm-svn: 131164
2011-05-10 22:42:41 +00:00
Nick Lewycky
1ec5c8a8bc
Remove empty file.
...
llvm-svn: 131162
2011-05-10 22:38:17 +00:00
Rafael Espindola
de32fa163f
Avoid a gcc warning.
...
llvm-svn: 131161
2011-05-10 22:28:35 +00:00
Rafael Espindola
b361d2b2bc
Fix cmake build.
...
llvm-svn: 131160
2011-05-10 22:19:33 +00:00
Nick Lewycky
e09457b02b
Revert r131155 for now. It makes VMCore depend on Analysis and Transforms
...
headers.
llvm-svn: 131159
2011-05-10 22:16:06 +00:00
Rafael Espindola
a678098f24
Initialize moveTypeModule.
...
llvm-svn: 131157
2011-05-10 21:54:59 +00:00
Eli Friedman
768de0a0f8
Disable my little CopyToReg argument hack with fast-isel. rdar://problem/9413587 .
...
llvm-svn: 131156
2011-05-10 21:50:58 +00:00
David Chisnall
c2fcb4df5e
Add support for plugins add passes to the default set of passes. The standard set of passes used by front ends can now be modified by LLVM plugins, without needing to modify any front ends.
...
Still to do:
- Allow replacing / removing passes (infrastructure there, just needs an infrastructure exposed)
- Defining sets of passes to be added or removed as a group
- Extending the support to allow user-defined groups of optimisations
- Allow plugins to be specified for loading automatically (e.g. from plugins.conf or some similar mechanism)
Reviewed by Nick Lewycky.
llvm-svn: 131155
2011-05-10 21:36:48 +00:00
Stuart Hastings
999fa3bf1f
Correctly walk through nested and adjacent CALLSEQ_START nodes. No
...
test case; I've only seen this on a release branch, and I can't get it
to reproduce on trunk. rdar://problem/7662569
llvm-svn: 131152
2011-05-10 21:20:03 +00:00
Rafael Espindola
19c1a56287
Produce a __debug_frame section on darwin ARM when appropriate.
...
llvm-svn: 131151
2011-05-10 21:04:45 +00:00
Rafael Espindola
99f6735532
On MachO, unlike ELF, there should be no relocation to produce the CIE pointer.
...
llvm-svn: 131149
2011-05-10 20:59:42 +00:00
Rafael Espindola
2fe0ee1ce2
Rename DwarfRequiresRelocationForStmtList to
...
DwarfRequiresRelocationForSectionOffset as this is not specific to StmtList.
llvm-svn: 131148
2011-05-10 20:35:05 +00:00
Rafael Espindola
d0d2354258
The EH symbols are only needed in eh_frame, not debug_frame.
...
llvm-svn: 131146
2011-05-10 19:51:53 +00:00
Rafael Espindola
fdc3e6fab6
Use .cfi_sections to put the unwind info in .debug_frame when possible. With
...
this clang will use .debug_frame in, for example,
clang -g -c -m32 test.c
This matches gcc's behaviour. It looks like .debug_frame is a bit bigger
than .eh_frame, but has the big advantage of not being allocated.
llvm-svn: 131140
2011-05-10 18:39:09 +00:00
Eric Christopher
e33464663f
Refactor lock versions of binary operators to be a little less
...
cut and paste.
llvm-svn: 131139
2011-05-10 18:36:16 +00:00
Jason W Kim
62f1ab79ec
First cut at getting debugging support for ARM/MC/ELF/.o
...
DWARF stuff also gets fixed up by ELFARMAsmBackend::ApplyFixup(),
but the offset is not guaranteed to be mod 4 == 0 as in text/data.
llvm-svn: 131137
2011-05-10 18:07:25 +00:00
Jakob Stoklund Olesen
4028ccdbe3
Downgrade a tablegen warning to an error.
...
Ambiguous sub-register index compositions are OK as long as the backend writer
knows what he is doing.
llvm-svn: 131134
2011-05-10 17:52:59 +00:00
Jakob Stoklund Olesen
50215afd8a
Fix PR9883. Make sure all caches are invalidated when a live range is repaired.
...
The previous invalidation missed the alias interference caches.
Also add a stats counter for the number of repaired ranges.
llvm-svn: 131133
2011-05-10 17:37:41 +00:00
Rafael Espindola
27390b4a0e
In a debug_frame the cfi offset is to the start of the debug_frame section!
...
llvm-svn: 131129
2011-05-10 15:20:23 +00:00
Justin Holewinski
3c0447259c
PTX: add test cases for cvt, fneg, and selp
...
Patch by Dan Bailey
llvm-svn: 131128
2011-05-10 14:53:13 +00:00
Rafael Espindola
ec53aa9485
Add CFIStartSections to the asm printer. Add an assert that at least
...
one of the sections is created.
llvm-svn: 131124
2011-05-10 13:39:48 +00:00
Justin Holewinski
72d74e4606
PTX: add PTX 2.3 setting in PTX sub-target.
...
Patch by Wei-Ren Chen
llvm-svn: 131123
2011-05-10 12:32:11 +00:00
Rafael Espindola
1ecb12fc57
Add support for producing .deubg_frame sections.
...
llvm-svn: 131121
2011-05-10 03:54:12 +00:00
Rafael Espindola
b6444c0401
Small cleanups.
...
llvm-svn: 131120
2011-05-10 03:26:21 +00:00
Rafael Espindola
b6089d6cac
Factor some code into a new EmitFrames method.
...
llvm-svn: 131119
2011-05-10 03:14:15 +00:00
Rafael Espindola
0e130d1d37
Remove unused argument.
...
llvm-svn: 131118
2011-05-10 03:01:39 +00:00
Rafael Espindola
74b101f3e3
Parsing and plumbing for .cfi_sections.
...
llvm-svn: 131117
2011-05-10 01:10:18 +00:00
Devang Patel
3fd06f760b
Preserve line number information.
...
llvm-svn: 131112
2011-05-10 00:03:11 +00:00
Devang Patel
589845d887
Do not ignore InlinedAt while walking up scope chain to find subprogram node.
...
llvm-svn: 131106
2011-05-09 22:14:49 +00:00
Jim Grosbach
112a2de78c
Tidy up. 80-column and whitespace.
...
llvm-svn: 131094
2011-05-09 20:05:25 +00:00
Eric Christopher
4480428474
Look through struct wrapped types for inline asm statments.
...
Patch by Evan Cheng.
llvm-svn: 131093
2011-05-09 20:04:43 +00:00
Dan Gohman
0daf687e1d
Change a few std::maps to DenseMaps.
...
llvm-svn: 131088
2011-05-09 18:44:09 +00:00
Eric Christopher
5dc19f916c
Fix td file comments for Mips.
...
Patch by Liu <proljc@gmail.com>!
llvm-svn: 131086
2011-05-09 18:16:46 +00:00
Mon P Wang
92ff16b7bb
Fixed MC encoding for index_align for VLD1/VST1 (single element from one lane) for size 32
...
llvm-svn: 131085
2011-05-09 17:47:27 +00:00
Duncan Sands
6be291a2cd
Indent properly, no functionality change.
...
llvm-svn: 131082
2011-05-09 08:03:33 +00:00
NAKAMURA Takumi
392445823d
Eliminate an unused line to fix a warning.
...
llvm-svn: 131078
2011-05-08 23:19:04 +00:00
Jakob Stoklund Olesen
89bd2ae517
Remove an assertion to fix PR9872.
...
It can happen that a live debug variable is the last use of a sub-register, and
the register allocator will pick a larger register class for the virtual
register. If the allocated register doesn't support the sub-register index,
just use %noreg for the debug variables instead of asserting.
In PR9872, a debug variable ends up in the sub_8bit_hi part of a GR32_ABCD
register. The register is split and one part is inflated to GR32 and assigned
%ESI because there are no more normal uses of sub_8bit_hi.
Since %ESI doesn't have that sub-register, substPhysReg asserted. Now it will
simply insert a %noreg instead, and the debug variable will be marked
unavailable in that range.
We don't currently have a way of saying: !"value" is in bits 8-15 of %ESI, I
don't know if DWARF even supports that.
llvm-svn: 131073
2011-05-08 19:21:08 +00:00
Benjamin Kramer
d724a590e5
X86: Add a bunch of peeps for add and sub of SETB.
...
"b + ((a < b) ? 1 : 0)" compiles into
cmpl %esi, %edi
adcl $0, %esi
instead of
cmpl %esi, %edi
sbbl %eax, %eax
andl $1, %eax
addl %esi, %eax
This saves a register, a false dependency on %eax
(Intel's CPUs still don't ignore it) and it's shorter.
llvm-svn: 131070
2011-05-08 18:36:07 +00:00
Rafael Espindola
ab39c63538
Don't force relaxation of AdvanceLoc instructions on OS X. gdb is happy with
...
the smaller encoding and this cuts 270336 bytes from a release version of
clang and 1246272 bytes from a debug build.
llvm-svn: 131067
2011-05-08 14:35:21 +00:00
Eli Friedman
aa2637343c
PR9869: Add explicit destructor declarations to Operator subclasses, to allow
...
compiling Operator.h with gcc 4.6 in C++0x mode.
llvm-svn: 131062
2011-05-08 01:59:22 +00:00
Jakob Stoklund Olesen
c132174169
Eliminate the ARM sub-register indexes that are not needed by the sources.
...
Tablegen will invent its own names for these indexes, and the register file is a
bit simpler.
llvm-svn: 131059
2011-05-07 21:22:42 +00:00
Jakob Stoklund Olesen
c8c4ded3c6
Teach TableGen to automatically generate missing SubRegIndex instances.
...
The RegisterInfo.td file should only specify the indexes that sources need to
refer to. The rest is inferred.
llvm-svn: 131058
2011-05-07 21:22:39 +00:00
Eli Friedman
6dec2aa9b4
Fix comments per Duncan's review.
...
llvm-svn: 131055
2011-05-07 19:23:14 +00:00
Duncan Sands
af32728a57
The comparision "max(x,y)==x" is equivalent to "x>=y". Since the max is
...
often expressed as "x >= y ? x : y", there is a good chance we can extract
the existing "x >= y" from it and use that as a replacement for "max(x,y)==x".
llvm-svn: 131049
2011-05-07 16:56:49 +00:00
Eric Christopher
1e3db02bda
Fix the non-MC encoding of pkhbt and pkhtb.
...
Patch by Stephen Hines.
llvm-svn: 131045
2011-05-07 04:37:27 +00:00
Jakob Stoklund Olesen
58799a35e5
Revert ExecutionEngine patches, they either failed to build or broke unit tests.
...
Please ensure the build is clean and tests are passing when recommitting.
llvm-svn: 131044
2011-05-07 03:12:54 +00:00