1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

41874 Commits

Author SHA1 Message Date
Eric Christopher
0c94293fb3 Movement and cleanup.
llvm-svn: 115225
2010-09-30 22:34:19 +00:00
Nick Lewycky
f469b071a2 Pacify a noisy compiler, and sink this variable declaration closer to its uses.
llvm-svn: 115206
2010-09-30 21:04:13 +00:00
Owen Anderson
5adba2c2ff We do want to allow LoadPRE to perform LICM-like transformations: we already consider PHI nodes to be negligible for
code size (making this transform code size neutral), and it allows us to hoist values out of loops, which is always
a good thing.

llvm-svn: 115205
2010-09-30 20:53:04 +00:00
Jakob Stoklund Olesen
603950c4af Try again to disable critical edge splitting in CodeGenPrepare.
The bug that broke i386 linux has been fixed in r115191.

llvm-svn: 115204
2010-09-30 20:51:52 +00:00
Eric Christopher
2d33066699 Start of generalized call support for ARM fast isel.
llvm-svn: 115203
2010-09-30 20:49:44 +00:00
Talin
ee60bd194c Allow llvm.gcroot to work with non-pointer allocas.
llvm-svn: 115198
2010-09-30 20:23:47 +00:00
Rafael Espindola
5aae0d6863 Factor some logic into ShouldRelocOnSymbol. This simplifies the code and
fixes some cases where we were producing relocations with at symbol that
should use a section instead.

llvm-svn: 115194
2010-09-30 20:18:35 +00:00
Jim Grosbach
2bf1c488de Nuke a few more unused asm strings
llvm-svn: 115193
2010-09-30 19:53:58 +00:00
Jakob Stoklund Olesen
8f4d623f9a When isel is emitting instructions for an x86 target without CMOV, the CFG is
edited during emission.

If the basic block ends in a switch that gets lowered to a jump table, any
phis at the default edge were getting updated wrong. The jump table data
structure keeps a pointer to the header blocks that wasn't getting updated
after the MBB is split.

This bug was exposed on 32-bit Linux when disabling critical edge splitting in
codegen prepare.

The fix is to uipdate stale MBB pointers whenever a block is split during
emission.

llvm-svn: 115191
2010-09-30 19:44:31 +00:00
Jim Grosbach
8bf43f57d4 Move getPointerSize() to the base class since it's not dependent on MachO
vs. ELF

llvm-svn: 115180
2010-09-30 17:45:51 +00:00
Jim Grosbach
5d93ed90e5 Remove extraneous ';'
llvm-svn: 115176
2010-09-30 17:19:17 +00:00
Chris Lattner
df2f5c0a40 preemptively add the rest of the non-n fpstack instructions.
llvm-svn: 115168
2010-09-30 17:11:29 +00:00
Jim Grosbach
52b5709c99 The asm strings are never used at all, so just nuke 'em entirely.
llvm-svn: 115160
2010-09-30 16:56:53 +00:00
Kevin Enderby
767a9365f0 This is the last major patch to implement support for the .loc directive
and output the dwarf line number tables.  This contains the code to emit and
encode the dwarf line tables from the previously gathered information in the
MCLineSection objects.  This contains all the details to encode the line and
address deltas into the dwarf line table.

To do this an MCDwarfLineAddrFragment has been added.

Also this moves the interface code out of Mach-O streamer into
MCDwarf so it should be useable by other object file formats.

There is now one call to be made from an MCObjectStreamer
EmitInstruction() method:
   MCLineEntry::Make(this, getCurrentSection());
to create a line entry after each instruction is assembled.

And one call call to be made from an MCObjectStreamer Finish() method:
   MCDwarfFileTable::Emit(this, DwarfLineSection);
when getContext().hasDwarfFiles() is true and is passed a object file specific
MCSection where to emit the dwarf file and the line tables.

This appears to now be correct for 32-bit targets, at least x86.  But the
relocation entries for 64-bit Darwin needs some further work which is next
up to work on.  So for now the 64-bit Mach-O target does not output the
dwarf file and line tables.

llvm-svn: 115157
2010-09-30 16:52:03 +00:00
Chris Lattner
8e7a4b7b57 implement support for finit, PR8258
llvm-svn: 115156
2010-09-30 16:42:53 +00:00
Kevin Enderby
0620ec51f6 Changes EvaluateAsAbsolute() to return the "current value" of the expression
if we are given a Layout object, even in cases when the value is not fixed.
This will be needed by the final patch for the dwarf .loc support to size a
new MCDwarf fragment needed to build and emit dwarf line number tables.

llvm-svn: 115155
2010-09-30 16:42:21 +00:00
Chris Lattner
fecf3a7717 add support for fstcw, PR8259
llvm-svn: 115154
2010-09-30 16:39:29 +00:00
Kevin Enderby
dd3306fcb5 Adds getPointerSize() to the AsmBackend which will be needed by the final patch
for the dwarf .loc support to emit dwarf line number tables.

llvm-svn: 115153
2010-09-30 16:38:07 +00:00
Benjamin Kramer
3f7e313552 Grow BumpPtrAllocator's slab size dynamically if we allocated many slabs. This
reduces the amount of malloc calls and may reduce memory overhead.

Some numbers:
ASTContext stats, clang -cc1 -disable-free -fsyntax-only Cocoa_h.m
without dynamic growth                          |  with dynamic growth
Number of memory regions: 3158                  |  Number of memory regions: 432
Bytes used: 12333185                            |  Bytes used: 12333185
Bytes allocated: 12935168                       |  Bytes allocated: 12800000
Bytes wasted: 601983 (includes alignment, etc)  |  Bytes wasted: 466815 (includes alignment, etc)

ASTContext stats, clang -cc1 -disable-free -fsyntax-only on clang's ASTReader.cpp
without dynamic growth                          |  with dynamic growth
Number of memory regions: 10987                 |  Number of memory regions: 551
Bytes used: 42910356                            |  Bytes used: 42910356
Bytes allocated: 45002752                       |  Bytes allocated: 44711936
Bytes wasted: 2092396 (includes alignment, etc) |  Bytes wasted: 1801580 (includes alignment, etc)

llvm-svn: 115151
2010-09-30 16:18:28 +00:00
Jim Grosbach
37fbea8ac9 80 column fix
llvm-svn: 115149
2010-09-30 15:25:22 +00:00
Jason W Kim
b181166ffc Fix two tiny issues (ARM does not need COFF) and comment sanity.
llvm-svn: 115147
2010-09-30 14:58:19 +00:00
Benjamin Kramer
d1710d7fb3 Tighten up prototype verification of strchr and strrchr to avoid a crash in the very unlikely case that someone passes an integer > i64 to strchr.
llvm-svn: 115144
2010-09-30 11:21:59 +00:00
Chandler Carruth
85a55025d8 Silence a GCC warning about not handling all flags in this switch, we
specifically assert on unexpected flags.

llvm-svn: 115143
2010-09-30 10:59:51 +00:00
Jan Wen Voung
7df9bf0092 Move logic of determining ELF entsize from the .s printer to initialization
time. That way, the EntrySize field is initialized for other code paths, 
namely, the .ll -> .o code path.

llvm-svn: 115141
2010-09-30 05:59:22 +00:00
Jim Grosbach
4ad95fa930 trailing whitespace
llvm-svn: 115136
2010-09-30 03:21:00 +00:00
Jim Grosbach
5b0ae02149 Remove misplaced ';'. Make buildbots happy, hopefully.
llvm-svn: 115135
2010-09-30 03:20:34 +00:00
Rafael Espindola
480ee577ad Correctly produce R_X86_64_32 or R_X86_64_32S.
With this patch in

movq    $foo, foo(%rip)
foo:
.long   foo

We produce a R_X86_64_32S for the first relocation and R_X86_64_32 for the
second one.

llvm-svn: 115134
2010-09-30 03:11:42 +00:00
Jason W Kim
7822e6aab5 Tiny patch for proof-of-concept cleanup of ARMAsmPrinter::EmitStartOfAsmFile()
Small test for sanity check of resulting ARM .s file.
Tested against -r115129.

llvm-svn: 115133
2010-09-30 02:45:56 +00:00
Jan Wen Voung
0d25ddb1de Have ELFAsmParser.cpp use the already parsed "Size" (entry size) when
constructing a section. Test for a few cases also included.

llvm-svn: 115132
2010-09-30 02:41:46 +00:00
Rafael Espindola
3e2630deca Make it possible for the MCObjectWriter to decide if a given fixup is fully
resolved or not. Different object files have different restrictions and
different native assemblers have different idiosyncrasies we want to emulate
for now.

Move the existing MachO logic to the new place and implement an ELF one that
gets fixups to globals right.

llvm-svn: 115131
2010-09-30 02:22:20 +00:00
Jim Grosbach
ad67153eb3 Go ahead and jump!
Now that the MC lowering handles the expansion of the pseudos, kill the horrible
blobs of text.

llvm-svn: 115130
2010-09-30 02:18:06 +00:00
Jason W Kim
6d7784e5f5 I added a new file ARMAsmBackend which stubs out in similar ways to
the eqv X86 class.
For now, I split the ELFARMAsmBackend from the DarwinARMAsmBackend
(also mimicking X86)

Tested against -r115126

llvm-svn: 115129
2010-09-30 02:17:26 +00:00
Jim Grosbach
3a7ca3301b Now that the pseudos that needed this are all custom lowered, we can go back
to an empty PrintSpecial()

llvm-svn: 115128
2010-09-30 02:02:22 +00:00
Jim Grosbach
efad965653 Nuke it from orbit. It's the only way to be sure.
(Kill the dead non-MC asm printer for the ARM target.)

llvm-svn: 115127
2010-09-30 01:57:53 +00:00
Jan Wen Voung
4b4807d984 Test commit - Deleted some whitespace at the end of a line.
llvm-svn: 115122
2010-09-30 01:09:20 +00:00
Evan Cheng
fa5d40dbff ARM instruction itinerary fixes:
1. Cortex-a9 8-bit and 16-bit loads / stores AGU cycles are 1 cycle longer than 32-bit ones.
2. Cortex-a9 is out-of-order so model all read cycles as cycle 1.
3. Lots of other random fixes for A8 and A9.

llvm-svn: 115121
2010-09-30 01:08:25 +00:00
Benjamin Kramer
2a44a539e2 Add constant folding for strspn and strcspn to SimplifyLibCalls.
llvm-svn: 115116
2010-09-30 00:58:35 +00:00
Francois Pichet
0c653599a9 Revert r114320(move file = copy + delete on Win32). r115040 is a better solution for the Win32 ACCESS_DENIED lit error.
llvm-svn: 115114
2010-09-30 00:44:58 +00:00
Benjamin Kramer
476bfb7a10 Add strpbrk folding to SimplifyLibCalls.
llvm-svn: 115111
2010-09-29 23:52:12 +00:00
Nick Lewycky
711a5e60fa Silence compiler warning.
llvm-svn: 115107
2010-09-29 23:32:20 +00:00
Eric Christopher
ba01048ae2 Refactor arm fast isel libcall handling so that pieces can be used
for generic call handling.

llvm-svn: 115105
2010-09-29 23:11:09 +00:00
Devang Patel
41e2a94595 Let FE mark a variable as artificial variable.
llvm-svn: 115102
2010-09-29 23:07:21 +00:00
Eric Christopher
80d620fb38 Noticed by inspection when looking for other cmov bits.
llvm-svn: 115100
2010-09-29 23:00:29 +00:00
Evan Cheng
b44d480808 Model Cortex-a9 load to SUB, RSB, ADD, ADC, SBC, RSC, CMN, MVN, or CMP
pipeline forwarding path.

llvm-svn: 115098
2010-09-29 22:42:35 +00:00
Benjamin Kramer
cf690de5bb Silence msvc warnings.
llvm-svn: 115097
2010-09-29 22:38:50 +00:00
Benjamin Kramer
cec2603ec2 Simplify the loop in StrChrOptimizer. FileCheckize test.
llvm-svn: 115095
2010-09-29 22:29:12 +00:00
Eric Christopher
eb578cf724 Add a convenience variable so I'm not chasing all over looking for
a context.

llvm-svn: 115094
2010-09-29 22:24:45 +00:00
Benjamin Kramer
75a825ff6b Teach SimplifyLibCalls how to optimize strrchr.
llvm-svn: 115091
2010-09-29 21:50:51 +00:00
Devang Patel
f600d9f0ed Add support to let FE encode method access specifier.
llvm-svn: 115089
2010-09-29 21:44:16 +00:00
Devang Patel
bbd003ab48 Generalize DISubprogram element to encode various flags instead of just one boolean for isArtificial.
This is a backword compatible change.

llvm-svn: 115084
2010-09-29 21:04:46 +00:00