1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
Commit Graph

56905 Commits

Author SHA1 Message Date
Chris Lattner
eabd2085d7 From PR6228:
"Attached patch removes the extra NUL bytes from the output and changes
test/Archive/MacOSX.toc from a binary to a text file (removes
svn:mime-type=application/octet-stream and adds svn:eol-style=native).  I can't
figure out how to get SVN to include the new contents of the file in the patch
so I'm attaching it separately."

Patch by James Abbatiello!

llvm-svn: 95292
2010-02-04 06:19:43 +00:00
Eric Christopher
9b3e42f09e Rework constant expr and array handling for objectsize instcombining.
Fix bugs where we would compute out of bounds as in bounds, and where
we couldn't know that the linker could override the size of an array.

Add a few new testcases, change existing testcase to use a private
global array instead of extern.

llvm-svn: 95283
2010-02-04 02:55:34 +00:00
Evan Cheng
3c93245a64 It's too risky to eliminate sext / zext of call results for tail call optimization even if the caller / callee attributes completely match. The callee may have been bitcast'ed (or otherwise lied about what it's doing).
llvm-svn: 95282
2010-02-04 02:45:02 +00:00
Dan Gohman
be6cf8cfb0 Change the argument to getIntegerSCEV to be an int64_t, rather
than int. This will make it more convenient for LSR, which does
a lot of things with int64_t offsets.

llvm-svn: 95281
2010-02-04 02:43:51 +00:00
Evan Cheng
c603f314de Indirect tail call has to go through a call preserved register since it's after callee register pops. X86 isel lowering is using EAX / R11 and it was somehow adding that to function live out. That prevented the real function return register from being added to the function live out list and bad things happen.
This fixes 483.xalancbmk (with tail call opt).

llvm-svn: 95280
2010-02-04 02:40:39 +00:00
Sean Callanan
7662f4139b Filled in a few new APIs for the enhanced
disassembly library that provide access to
instruction information, and fixed ambiguous
wording in the comments for the header.

llvm-svn: 95274
2010-02-04 01:43:08 +00:00
Dan Gohman
05d47a0cf5 Use a tab instead of space after .type, for consistency.
llvm-svn: 95272
2010-02-04 01:42:13 +00:00
Dale Johannesen
b9cb5e72fd Rewrite FP constant handling in DEBUG_VALUE yet
again, so it more or less handles long double.
Restore \n removed in latest MC frenzy.

llvm-svn: 95271
2010-02-04 01:33:43 +00:00
Victor Hernandez
28f795182c Fix (and test) function-local metadata that occurs before the instruction that it refers to; fix is to not enumerate operands of function-local metadata until after all instructions have been enumerated
llvm-svn: 95269
2010-02-04 01:13:08 +00:00
Eric Christopher
fe6ab1518e If we're dealing with a zero-length array, don't lower to any
particular size, we just don't know what the length is yet.

llvm-svn: 95266
2010-02-03 23:56:07 +00:00
Dale Johannesen
c413673047 This test passes now on ppc darwin; if it doesn't pass
on some other ppc say something on the list.

llvm-svn: 95265
2010-02-03 22:33:17 +00:00
Dale Johannesen
0a85fd105b This test passes now on ppc darwin, so reenable it.
llvm-svn: 95264
2010-02-03 22:29:02 +00:00
Dale Johannesen
ddc82307fa Debugging is now reenabled on PPC darwin, so reenable
these tests (they pass).

llvm-svn: 95263
2010-02-03 22:24:49 +00:00
Chris Lattner
26cf12e3c9 enhance new encoder to support prefixes + RawFrm
instructions with no operands.  It can now handle

define void @test2() nounwind { ret void }

llvm-svn: 95261
2010-02-03 21:57:59 +00:00
Chris Lattner
5078a382e4 set up some infrastructure, some minor cleanups.
llvm-svn: 95260
2010-02-03 21:43:43 +00:00
Evan Cheng
5c8b1b9164 Speculatively disable x86 automatic tail call optimization while we track down a self-hosting issue.
llvm-svn: 95259
2010-02-03 21:40:40 +00:00
Evan Cheng
ccbbdfa8c4 Make test less fragile
llvm-svn: 95258
2010-02-03 21:39:04 +00:00
Chris Lattner
dc1807366c stub out a new X86 encoder, which can be tried with
-enable-new-x86-encoder until its stable.

llvm-svn: 95256
2010-02-03 21:24:49 +00:00
Chris Lattner
258fb66f6e rename createX86MCCodeEmitter to more accurately reflect what it creates.
llvm-svn: 95254
2010-02-03 21:14:33 +00:00
Kevin Enderby
57859abd72 Added support for X86 instruction prefixes so llvm-mc can assemble them. The
Lock prefix, Repeat string operation prefixes and the Segment override prefixes.
Also added versions of the move string and store string instructions without the
repeat prefixes to X86InstrInfo.td. And finally marked the rep versions of
move/store string records in X86InstrInfo.td as isCodeGenOnly = 1 so tblgen is
happy building the disassembler files.

llvm-svn: 95252
2010-02-03 21:04:42 +00:00
Devang Patel
32eb7508e4 Emit appropriate expression to find virtual base offset.
llvm-svn: 95242
2010-02-03 20:08:48 +00:00
Devang Patel
83d905f82b Provide interface to identifiy artificial methods.
llvm-svn: 95240
2010-02-03 19:57:19 +00:00
Jeffrey Yasskin
92abe5abcc r94686 changed all ModuleProvider parameters to Modules, which made the
1-argument ExecutionEngine::create(Module*) ambiguous with the signature that
used to be ExecutionEngine::create(ModuleProvider*, defaulted_params).  Fixed
by removing the 1-argument create().  Fixes PR6221.

llvm-svn: 95236
2010-02-03 19:18:04 +00:00
Jeffrey Yasskin
25be4b094c Make docs less specific about their versions, at Chris's suggestion.
llvm-svn: 95231
2010-02-03 18:49:55 +00:00
Daniel Dunbar
37b3f25e19 Add llvm_supports_darwin_and_target to DejaGNU as well, I'd almost forgotten it
ever existed. :)

llvm-svn: 95230
2010-02-03 18:43:46 +00:00
Jeffrey Yasskin
45ef2ed050 Mention the version in the documentation index and link to the 2.6 docs, which
is what most readers will actually be aiming for.

llvm-svn: 95229
2010-02-03 18:23:23 +00:00
Daniel Dunbar
d997cd69cd llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
output.

llvm-svn: 95227
2010-02-03 18:18:30 +00:00
Dan Gohman
8f03e98627 Add "Author Date Id Revision" svn:keyword properties to these files, as
is done with the other html files in doc, to hopefully keep strings like
"Last modified" current.

llvm-svn: 95225
2010-02-03 17:27:31 +00:00
Bob Wilson
8635e08b7f Adjust the heuristics used to decide when SROA is likely to be profitable.
The SRThreshold value makes perfect sense for checking if an entire aggregate
should be promoted to a scalar integer, but it is not so good for splitting
an aggregate into its separate elements.  A struct may contain a large embedded
array along with some scalar fields that would benefit from being split apart
by SROA.  Even if the total aggregate size is large, it may still be good to
perform SROA.  Thus, the most important piece of this patch is simply moving
the aggregate size comparison vs. SRThreshold so that it guards only the
aggregate promotion.

We have also been checking the number of elements to decide if an aggregate
should be split up.  The limit of "SRThreshold/4" seemed rather arbitrary,
and I don't think it's very useful to derive this limit from SRThreshold
anyway.  I've collected some data showing that the current default limit of
32 (since SRThreshold defaults to 128) is a reasonable cutoff for struct
types.  One thing suggested by the data is that distinguishing between structs
and arrays might be useful.  There are (obviously) a lot more large arrays
than large structs (as measured by the number of elements and not the total
size -- a large array inside a struct still counts as a single element given
the way we do SROA right now).  Out of 8377 arrays where we successfully
performed SROA while compiling a large set of benchmarks, only 16 of them had
more than 8 elements.  And, for those 16 arrays, it's not at all clear that
SROA was actually beneficial.  So, to offset the compile time cost of
investigating more large structs for SROA, the patch lowers the limit on array
elements to 8.

This fixes Apple Radar 7563690.

llvm-svn: 95224
2010-02-03 17:23:56 +00:00
Garrison Venn
8fa585cf8c Repository access test commit
llvm-svn: 95221
2010-02-03 12:00:02 +00:00
Zhongxing Xu
bbb98cd401 Remove redundant declaration.
llvm-svn: 95213
2010-02-03 09:05:21 +00:00
Zhongxing Xu
07020ea237 Add constructors.
llvm-svn: 95212
2010-02-03 09:04:11 +00:00
Chris Lattner
4b6b2b1363 reapply r95206, this time actually delete the code I'm replacing in the third stub case.
llvm-svn: 95209
2010-02-03 06:42:38 +00:00
Chris Lattner
427e5bf013 revert r95206, it is apparently causing bootstrap failure on i386-darwin9
llvm-svn: 95208
2010-02-03 06:41:18 +00:00
Chris Lattner
6fe16de58e print instruction encodings with the existing comment facilities,
so that llvm-mc -show-encoding prints like this:

	hlt                                                 ## encoding: [0xf4]

instead of like this:

	hlt
                     # encoding: [0xf4]

llvm-svn: 95207
2010-02-03 06:28:13 +00:00
Chris Lattner
39e5f7d84d make the x86 backend emit darwin stubs through mcstreamer
instead of textually.

llvm-svn: 95206
2010-02-03 06:21:16 +00:00
Chris Lattner
837d242070 make MachineModuleInfoMachO hold non-const MCSymbol*'s instead
of const ones.  non-const ones aren't very useful, because you can't
even, say, emit them.

llvm-svn: 95205
2010-02-03 06:18:30 +00:00
Chris Lattner
e8811c3222 change addPassesToEmitFile to return true on failure instead of its input,
add -filetype=null for performance testing and remove -filetype=dynlib,
which isn't planned to be implemented.

llvm-svn: 95202
2010-02-03 05:55:08 +00:00
Evan Cheng
e273e42195 Revert 94937 and move the noreturn check to codegen.
llvm-svn: 95198
2010-02-03 03:55:59 +00:00
Sean Callanan
0139e2193d Fixed the disassembler so it accepts multiple
instructions on a single line.  Also made it a
bit more forgiving when it reports errors.

llvm-svn: 95197
2010-02-03 03:46:41 +00:00
John McCall
8bcabdeffc Make APInt::countLeadingZerosSlowCase() treat the contents of padding bits
as undefined.  Fixes an assertion in APFloat::toString noticed by Dale.

llvm-svn: 95196
2010-02-03 03:42:44 +00:00
Evan Cheng
d9cf09b0d6 Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc.
llvm-svn: 95195
2010-02-03 03:28:02 +00:00
Jeffrey Yasskin
853eeb0db1 Reconfigure with autoconf-2.60, and fix autoconf.ac to work with that version.
llvm-svn: 95191
2010-02-03 02:11:49 +00:00
Chris Lattner
eb6d6da2e4 don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,
.o files don't like that.

llvm-svn: 95187
2010-02-03 01:49:49 +00:00
Chris Lattner
a64be6d665 privatize a bunch of methods and move \n printing into them.
llvm-svn: 95186
2010-02-03 01:46:05 +00:00
Chris Lattner
dda5d34934 rename printMachineInstruction -> EmitInstruction
llvm-svn: 95184
2010-02-03 01:41:03 +00:00
Dale Johannesen
1e9d147461 Reapply 95050 with a tweak to check the register class.
llvm-svn: 95183
2010-02-03 01:40:33 +00:00
Chris Lattner
0bb2e04b36 print instructions through the mcstreamer.
llvm-svn: 95181
2010-02-03 01:16:28 +00:00
Chris Lattner
bcba6c8a07 emit instructions through the streamer.
llvm-svn: 95180
2010-02-03 01:15:03 +00:00
Chris Lattner
1797ff9f5a Finally eliminate printMCInst and send instructions through
the streamer.  Demo:

$ cat t.ll 
define i32 @test() nounwind {
  ret i32 42
}
$ llc t.ll -o -
...
_test: 
	movl	$42, %eax
	ret
$ llc t.ll -o t.o -filetype=obj
$ otool -tv t.o 
t.o:
(__TEXT,__text) section
_test:
00000000	movl	$0x0000002a,%eax
00000005	ret

llvm-svn: 95179
2010-02-03 01:13:25 +00:00