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

30187 Commits

Author SHA1 Message Date
Evan Cheng
ae91b0616b Eliminate a redudant check Eli pointed out.
llvm-svn: 76762
2009-07-22 18:08:05 +00:00
Sanjiv Gupta
2168098478 Fixed build warning. No functionality change.
llvm-svn: 76761
2009-07-22 17:58:47 +00:00
Devang Patel
5794cb80ad Introduce MetadataBase, a base class for MDString and MDNode.
Derive MDString directly from MetadataBase. 
Introduce new bitcode block to hold metadata.

llvm-svn: 76759
2009-07-22 17:43:22 +00:00
Chris Lattner
573e2cde50 doxygenify
llvm-svn: 76750
2009-07-22 16:53:56 +00:00
Duncan Sands
16fd5fb3e8 Add newline at end of file.
llvm-svn: 76736
2009-07-22 13:20:41 +00:00
Richard Osborne
7f495fd2bd Thread local globals don't require special handling by the linker and so can
be placed in the standard data / bss sections.

llvm-svn: 76735
2009-07-22 11:01:00 +00:00
Duncan Sands
2a4535353f Revert commit 76707, it was breaking the llvm-gcc build
on linux platforms.  The binutils assembler does not
recognize the "s" flag, see for example
http://sourceware.org/binutils/docs/as/Section.html 

llvm-svn: 76733
2009-07-22 10:35:05 +00:00
Eli Friedman
ca2e01b721 Don't give a massive inlining cost bonus to available_externally
functions with a single use; eliminating the single use may eliminate 
the function from the current module, but usually doesn't eliminate 
it from the final program.

llvm-svn: 76730
2009-07-22 08:12:59 +00:00
Evan Cheng
34576850e1 Don't forget D16 - D31 are clobbered by calls and sjlj eh.
llvm-svn: 76729
2009-07-22 06:46:53 +00:00
Evan Cheng
4fdb43a89d Add R12 to the list of registers clobbered by 16-bit Thumb calls as a pre-caution. r12 could be live once we have mixed 32-bit and 16-bit instructions.
llvm-svn: 76728
2009-07-22 06:37:28 +00:00
Evan Cheng
2e2a1cbab7 Fix a obvious copy-n-paste bug.
llvm-svn: 76727
2009-07-22 06:12:40 +00:00
Evan Cheng
005330f8a0 Get rid one of the getRegisterNumbering. Also add D16 - D31.
llvm-svn: 76725
2009-07-22 05:55:18 +00:00
Eli Friedman
2b4857cdff Add support for MMX VSETCC.
llvm-svn: 76713
2009-07-22 01:06:52 +00:00
Sean Callanan
1e9eb16a45 Added the unconditional JMP with an 8-bit relocation for the
assembler / disassembler.

llvm-svn: 76712
2009-07-22 01:05:20 +00:00
Evan Cheng
f0af946ac8 Add an entry.
llvm-svn: 76711
2009-07-22 00:58:27 +00:00
Chris Lattner
2ef030ec2e inline the two MergeableConstSection implementations into their
only caller.

llvm-svn: 76710
2009-07-22 00:47:11 +00:00
Chris Lattner
ced616dd50 set the ELF "small" flag on objects that end up in .rodata.cst4 consistently,
updating a mips testcase to expect it.

llvm-svn: 76707
2009-07-22 00:41:56 +00:00
Chris Lattner
d966e55a42 don't set the small flag yet.
llvm-svn: 76706
2009-07-22 00:30:39 +00:00
Chris Lattner
e2bd5bc939 remove the SelectSectionForMachineConst hook, replacing it with
a new getSectionForMergableConstant hook.  This removes one dependence
of TAI on Type, and provides the hook with enough info to make the 
right decision based on whether the global has relocations etc.

llvm-svn: 76705
2009-07-22 00:28:43 +00:00
Evan Cheng
82499c09ff Let each target determines whether a machine instruction is dead. If true, that allows late codeine passes to delete it.
This is considered a workaround. The problem is some targets are not modeling side effects correctly. PPC is apparently one of those. This patch allows ppc llvm-gcc to bootstrap on Darwin. Once we find out which instruction definitions are wrong, we can remove the PPCInstrInfo workaround.

llvm-svn: 76703
2009-07-22 00:25:27 +00:00
Owen Anderson
cc287b28c9 Get rid of the Pass+Context magic.
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Chris Lattner
48dffde0d7 reimplement Constant::ContainsRelocations as
Constant::getRelocationInfo(), which has a much simpler
to use API.  It still should not be part of libvmcore, but
is better than it was.  Also teach it to be smart about 
hidden visibility.

llvm-svn: 76700
2009-07-22 00:05:44 +00:00
Evan Cheng
b639684766 Fixing cp island pass. Step 1: Determine whether the constant pool offset can be
negative on an individual bases rather than basing on whether it's in thumb
mode.

llvm-svn: 76698
2009-07-21 23:56:01 +00:00
Evan Cheng
149b0d4cf1 Fix comment.
llvm-svn: 76693
2009-07-21 23:54:22 +00:00
Chris Lattner
4d3b78e0f5 simplify code now that it is inlined.
llvm-svn: 76689
2009-07-21 23:49:55 +00:00
Lang Hames
0e61f87ea3 Exposed PHIElimination pass within CodeGen.
llvm-svn: 76688
2009-07-21 23:47:33 +00:00
Chris Lattner
b9332126cc Now that RelocBehaviour() is never overloaded, it doesn't need to be
virtual.  Just inline it into its two current call sites in preparation
for simplifying the code.

llvm-svn: 76686
2009-07-21 23:47:11 +00:00
Chris Lattner
c1c5dab4c4 this doesn't break any of the 4 ia64 tests.
llvm-svn: 76683
2009-07-21 23:42:24 +00:00
Chris Lattner
5c144a5948 alpha doesn't need to redefine this: it only supports PIC codegen anyway.
llvm-svn: 76682
2009-07-21 23:41:35 +00:00
David Greene
ddaf106a0c Add some support for iterative coalescers to calculate a joined live
range's weight properly.  This is turned off right now in the sense that
you'll get an assert if you get into a situation that can only be caused
by an iterative coalescer.  All other code paths operate exactly as
before so there is no functional change with this patch.  The asserts
should be disabled if/when an iterative coalescer gets added to trunk.

llvm-svn: 76680
2009-07-21 23:36:14 +00:00
Chris Lattner
fb908d7671 no really, I can spell!
llvm-svn: 76679
2009-07-21 23:36:01 +00:00
Chris Lattner
11b49ed2ce add an API so target-independent codegen can determine if a constant
pool entry will require relocations against it.  I implemented this
conservatively for ARM, someone who is knowledgable about it should
see if this can be improved.

llvm-svn: 76678
2009-07-21 23:34:23 +00:00
Dan Gohman
b45091f0f9 Convert instcombine from using using getAnalysis<TargetData> to
getAnalysisIfAvailable<TargetData>.

llvm-svn: 76676
2009-07-21 23:21:54 +00:00
Dan Gohman
8577dd4cca Permit the IntPtrTy argument to isEliminableCastPair to be null,
to help support use when TargetData is not available.

llvm-svn: 76675
2009-07-21 23:19:40 +00:00
Bruno Cardoso Lopes
3483574772 Change ELFCodeEmitter logic to emit the constant pool and jump tables to
their appropriate sections before the code itself. They need to be emitted
before the function because on some targets (x86 but not x86_64) the later
may reference a JT or CP entry address

llvm-svn: 76672
2009-07-21 23:13:26 +00:00
Dan Gohman
190d29cb5c Replace the original ad-hoc code for determining whether (v pred w) implies
(x pred y) with more thorough code that does more complete canonicalization
before resorting to range checks. This helps it find more cases where
the canonicalized expressions match.

llvm-svn: 76671
2009-07-21 23:03:19 +00:00
Chris Lattner
fb3e6ae8b2 remove the last bits of SectionFlagsForGlobal. There is some flag here that
depends on XS1A, but I think the ReadOnlySection is already set up for this
and there is no testcase that this breaks.  If this is really needed, we can
add the appropriate parameterization to TargetAsmInfo in the future to support
this.

llvm-svn: 76667
2009-07-21 22:42:37 +00:00
Chris Lattner
bca235c1d3 don't mask out the small flag and then reapply it later.
llvm-svn: 76666
2009-07-21 22:39:28 +00:00
Chris Lattner
34ba5422cd if Xcore doesn't support TLS, it doesn't have to worry about thread local LLVM IR, it should be rejected by a front-end.
llvm-svn: 76665
2009-07-21 22:37:38 +00:00
Chris Lattner
aa793632ff remove the Xcore implementation of SelectSectionForGlobal. While you have
to twist your brain to see it, I believe it is the same as ELFTargetAsmInfo::SelectSectionForGlobal.

llvm-svn: 76664
2009-07-21 22:36:53 +00:00
Chris Lattner
8a24ab398f simplify based on the fact that darwin always uses L/l.
llvm-svn: 76662
2009-07-21 22:32:55 +00:00
Chris Lattner
b52c8153f3 make some stuff private.
llvm-svn: 76661
2009-07-21 22:30:39 +00:00
Chris Lattner
0a3a6f2ceb Remove the XCore custom implementation of MergeableConstSection, relying on
the generic ELF version instead.  This will result in its mergable constant
sections getting named ".rodata.cst4" instead of ".cp.const4", but the
linker looks at the section flags, not the name of the section AFAICT.

llvm-svn: 76659
2009-07-21 22:25:52 +00:00
Chris Lattner
8d061f011b inline a trivial method into its only call site and fix indentation of cases
llvm-svn: 76654
2009-07-21 21:29:08 +00:00
Chris Lattner
4815d4919c Remove some overridden functions in XCoreTargetAsmInfo that are
implemented exactly the same way as its ELFTargetAsmInfo subclass 
has them.

llvm-svn: 76653
2009-07-21 21:26:32 +00:00
Chris Lattner
135caf1a2b revert r76602, 76603, and r76615, pending design discussions.
llvm-svn: 76646
2009-07-21 21:12:58 +00:00
Chris Lattner
589a37a068 minor cleanups.
llvm-svn: 76645
2009-07-21 21:09:35 +00:00
Owen Anderson
a8637e9824 Privatize the ConstantArray table.
llvm-svn: 76639
2009-07-21 20:55:28 +00:00
Eli Friedman
a78b44069b Missed a piece of the commit to remove the shift flavor.
llvm-svn: 76635
2009-07-21 20:15:24 +00:00
Owen Anderson
bdcb99324a Privatize the first of the value maps.
llvm-svn: 76634
2009-07-21 20:13:12 +00:00