Commit Graph

9317 Commits

Author SHA1 Message Date
Reid Kleckner
95eb3ad353 Parameterize the BumpPtrAllocator over a slab allocator. It defaults to using
malloc, so there should be no functional changes to other code.

These changes are necessary since I have plans to use this allocator in the JIT
memory manager, and it needs a special allocator.

I also added some tests which helped me pinpoint some bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76825 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 00:30:41 +00:00
Chris Lattner
819c4f365f remove SectionFlags::Small: it is only used on Xcore, and we'll find
a better solution for it in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76818 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 23:27:22 +00:00
David Greene
340482dcc0 Constify the key in Mi2IndexMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76801 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 21:56:14 +00:00
Daniel Dunbar
b834a7b73c Define npos in a way that should make MSVC happier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76785 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 21:08:31 +00:00
David Greene
67e59834fc Put comment printing under asm-verbose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76780 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 20:33:26 +00:00
David Greene
29ff37f39c Make some changes suggested by Bill and Evan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76775 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 20:08:25 +00:00
Devang Patel
c4999d71e1 Add replaceAllUsesWith() to FE replace debug info constructs while building complex types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 18:23:44 +00:00
Devang Patel
e54abc90fe Introduce MetadataBase, a base class for MDString and MDNode.
Derive MDString directly from MetadataBase. 
Introduce new bitcode block to hold metadata.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76759 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 17:43:22 +00:00
Daniel Dunbar
dbe77cfa0b Support writing a StringRef to a raw_ostream directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76754 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 17:13:20 +00:00
Torok Edwin
fd5545b789 Remove a comment that was copy+pasted from the wrong place,
there is no MachineFunction here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76734 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 10:49:23 +00:00
Eli Friedman
1126038436 Attempt to fix BuildBot breakage with MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76722 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 05:06:41 +00:00
Eric Christopher
be9408ec86 Remove intrinsic support for __builtin_ia32_vec_set_v16qi and
__builtin_ia32_vec_set_v4si as these should be lowered in the
front-end to inserts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 01:11:48 +00:00
Chris Lattner
f1581564b6 inline the two MergeableConstSection implementations into their
only caller.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76710 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:47:11 +00:00
Chris Lattner
298414ec18 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76705 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:28:43 +00:00
Evan Cheng
fc6ad402fb 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:25:27 +00:00
Owen Anderson
e922c02019 Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:24:57 +00:00
Chris Lattner
7cf12c7efd 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:05:44 +00:00
Chris Lattner
97d2cae44b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 23:47:11 +00:00
Eric Christopher
248f80d488 Add intrinsic for __builtin_ia32_vec_set_v4si which turns out to be
pinsrd in sse4.1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 23:43:14 +00:00
Chris Lattner
354c0165e7 no really, I can spell!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 23:36:01 +00:00
Chris Lattner
cb45963643 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 23:34:23 +00:00
Dan Gohman
295643b805 Permit the IntPtrTy argument to isEliminableCastPair to be null,
to help support use when TargetData is not available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76675 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 23:19:40 +00:00
Bruno Cardoso Lopes
82a70ccb24 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76672 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 23:13:26 +00:00
Dan Gohman
0f4b285a5b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76671 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 23:03:19 +00:00
Chris Lattner
939a8907ed make some stuff private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76661 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 22:30:39 +00:00
Chris Lattner
bdf7a3ade1 improve comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76660 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 22:30:25 +00:00
Daniel Dunbar
85f49835c2 Add missing include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 21:33:58 +00:00
Chris Lattner
7886ae9e3c inline a trivial method into its only call site and fix indentation of cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76654 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 21:29:08 +00:00
Chris Lattner
42b6418cc0 Remove some overridden functions in XCoreTargetAsmInfo that are
implemented exactly the same way as its ELFTargetAsmInfo subclass 
has them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76653 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 21:26:32 +00:00
Chris Lattner
3380d5c4aa revert r76602, 76603, and r76615, pending design discussions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 21:12:58 +00:00
Owen Anderson
822ccd9974 Privatize the ConstantArray table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76639 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 20:55:28 +00:00
Owen Anderson
16e298f980 Privatize the first of the value maps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76634 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 20:13:12 +00:00
Eli Friedman
b3e7171926 Remove shift amount flavor. It isn't actually complete enough to
be useful, and it's currently unused.  (Some issues: it isn't actually 
rich enough to capture the semantics on many architectures, and
semantics can vary depending on the type being shifted.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 20:12:16 +00:00
David Greene
a358c1db5c Prefix IR dumps with LiveInterval indices when possible. This turns
this:

	%ESI<def> = MOV32rr %EDI<kill>
	ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
	%reg1027<def> = MOVZX64rr32 %ESI
	%reg1027<def> = ADD64ri8 %reg1027, 15, %EFLAGS<imp-def,dead>
	%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
	%RDI<def> = MOV64rr %RSP
	%RDI<def> = SUB64rr %RDI, %reg1027<kill>, %EFLAGS<imp-def,dead>
	%RSP<def> = MOV64rr %RDI

into this:

4	%reg1024<def> = MOV32rr %EDI<kill>
12	ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
20	%reg1025<def> = MOVZX64rr32 %reg1024
28	%reg1026<def> = MOV64rr %reg1025<kill>
36	%reg1026<def> = ADD64ri8 %reg1026, 15, %EFLAGS<imp-def,dead>
44	%reg1027<def> = MOV64rr %reg1026<kill>
52	%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
60	%reg1028<def> = MOV64rr %RSP
68	%reg1029<def> = MOV64rr %reg1028<kill>
76	%reg1029<def> = SUB64rr %reg1029, %reg1027<kill>, %EFLAGS<imp-def,dead>
84	%RSP<def> = MOV64rr %reg1029

This helps greatly when debugging register allocation and coalescing
problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76615 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:56:32 +00:00
Chris Lattner
40bbebde9d make AsmPrinter::doFinalization iterate over the global variables
and call PrintGlobalVariable, allowing elimination and simplification
of various targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76604 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:38:57 +00:00
David Greene
4b938958bc Add PrefixPrinter arguments to the dump routines for MachineFunction and
MachineBasicBlock.  We'll use these shortly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76603 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:27:05 +00:00
David Greene
20574a913e Add a small utility class to configure IR printers. This will allow
printers to do neat and wonderful things when printing debug
information.  The ideas is to allow passes to configer printers to emit
pass-specific information when dumping IR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:21:46 +00:00
Owen Anderson
b3056faa55 Rename getConstantInt{True|False} to get{True|False} at Chris' behest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:03:38 +00:00
Torok Edwin
d06c59821a Add freed memory poisoning in !NDEBUG mode for DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76597 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:01:37 +00:00
Chris Lattner
90f8b7073d Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
LLVM IR concept.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76590 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:30:51 +00:00
Daniel Dunbar
7cb6860185 Move StringRef comparison operators out of class.
Also, tweak the return type of size().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76588 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 17:25:46 +00:00
Daniel Dunbar
f5fdf73238 Add StringRef::{substr, startswith}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 09:18:49 +00:00
Daniel Dunbar
4cf95d75c6 Add StringRef class, with fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 07:28:51 +00:00
Owen Anderson
f53c371983 Move a bit more state over to the LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 02:47:59 +00:00
David Greene
76081c4ef7 Re-apply 75490, 75806 and 76177 with fixes and tests. Efficiency comes
next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76486 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 22:02:59 +00:00
Dan Gohman
1224c38698 Assembly and Bitcode support for unsigned/signed overflow flags and
exact sdiv flags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76475 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:19:07 +00:00
Dan Gohman
344df5ecdf Clarify that OverflowingBinaryOperator is not used for SDiv, even though
SDiv is a binary operation that can overflow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76464 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:32:43 +00:00
Kevin Enderby
5026ae4514 Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API as
the parsing of the .dump and .load should be done in the assembly parser and
not have any need for an MCStreamer API.  Changed the code for now so these
just produce an error saying these specific directives are not yet implemented
since they are likely no longer used and may never need to be implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:25:37 +00:00
Daniel Dunbar
dbd692a66e Add MCAsmLexer interface.
- This provides the AsmLexer interface to the target specific assembly parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:01:54 +00:00
Eli Friedman
2f70f1a1d8 Remove FIXME that was already fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76457 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 19:45:16 +00:00
Bill Wendling
5c0ba804c0 Rename Mangler linkage enums to something less gross.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 19:41:27 +00:00
Daniel Dunbar
a3af370dc1 Add MCAsmParser interface.
- This provides the AsmParser interface to the target specific assembly
   parsers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76453 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 18:55:04 +00:00
Bill Wendling
39a499b6c4 Put new enum at end of list to avoid changing ABI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76447 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 18:22:52 +00:00
Chris Lattner
1902fd9605 remove TargetAsmInfo::ExpandInlineAsm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:59:32 +00:00
Chris Lattner
b810565152 Copy ExpandInlineAsm to TargetLowering from TargetAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76441 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:51:36 +00:00
Dan Gohman
7a965b03a8 Drop UDivOperator and introduce SDivOperator. Thanks to Chris
for noticing this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:51:10 +00:00
Chris Lattner
ff3d3adddb add some fixme's and cleanups. TargetAsmInfo shouldn't depend on VMCore eventually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76439 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:47:48 +00:00
Dan Gohman
f241174421 Revert the addition of hasNoPointerOverflow to GEPOperator.
Getelementptrs that are defined to wrap are virtually useless to
optimization, and getelementptrs that are undefined on any kind
of overflow are too restrictive -- it's difficult to ensure that
all intermediate addresses are within bounds. I'm going to take
a different approach.

Remove a few optimizations that depended on this flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76437 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:43:30 +00:00
Chris Lattner
8f4e22ff9a remove dead forward decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76433 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:23:00 +00:00
Chris Lattner
83757c7fb5 rename TargetAsmInfo::getASDirective -> getDataASDirective
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76431 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:12:46 +00:00
Daniel Dunbar
d3eb106dfa Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76427 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 16:50:16 +00:00
David Greene
3c9509f82a Hide the DOUT static variable behind a function interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76425 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 16:16:06 +00:00
Bruno Cardoso Lopes
0a38dc5fda For PC relative relocations where symbols are defined in the same section they
are referenced, ignore the relocation entry and patch the relocatable field with
the computed symbol offset directly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76414 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 08:52:02 +00:00
Chris Lattner
401e10c4fb implement a new magic global "llvm.compiler.used" which is like llvm.used, but
doesn't cause ".no_dead_strip" to be emitted on darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 06:14:25 +00:00
Bill Wendling
3d10a5a757 Add plumbing for the `linker_private' linkage type. This type is meant for
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.

This is plumbing, so we don't have a use of it yet. More to come, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 01:03:30 +00:00
Daniel Dunbar
aafa94260d Remove redundant qualifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76357 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 01:42:34 +00:00
Bruno Cardoso Lopes
e2b0ecd8be Use R_X86_64_32S to handle Jump Table Index relocation entries. Hide TAI usage inside getSection* functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 23:24:01 +00:00
Daniel Dunbar
edcb540496 Add some missing includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 23:22:46 +00:00
Mikhail Glushenkov
9dc87305db Add a Program::GetPid() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76341 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 21:43:40 +00:00
Mikhail Glushenkov
3140619c63 Remove duplication in Program::Execute{And,No}Wait.
Implemented by moving the code out of static functions into methods of Program
class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76340 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 21:43:12 +00:00
Bruno Cardoso Lopes
617dd7baa6 Use a better name for the label relocations while emitting them for Jump Tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76334 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 20:52:11 +00:00
Bruno Cardoso Lopes
171375f73a Add support to properly reference private symbols on relocation entries.
Use proper relocation type to build relocations for JumpTables (rodata
sections).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76326 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 19:30:09 +00:00
Nick Lewycky
3a4a884c16 Replace intersectWith with maximalIntersectWith. The latter guarantees that
all values belonging to the intersection will belong to the resulting range.
The former was inconsistent about that point (either way is fine, just pick
one.) This is part of PR4545.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76289 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 06:34:42 +00:00
Evan Cheng
5248468473 Enable cross register class coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 02:10:10 +00:00
Evan Cheng
3837b64f41 Revert 76177 for now. It's messing up ARM asm printing. Also this significant debate about its efficiency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 01:43:53 +00:00
Reid Kleckner
4b1511b027 Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
Also a test commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 00:42:18 +00:00
Dan Gohman
016de81177 Convert more code to use Operator instead of explicitly handling both
ConstantExpr and Instruction. This involves duplicating some code
between GetElementPtrInst and GEPOperator, but it's not a lot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76265 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 23:55:56 +00:00
Daniel Dunbar
cbdf0e2455 Add llvm::InitializeAllTargetInfos and llvm::InitializeAllAsmParsers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76253 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 22:35:35 +00:00
Chris Lattner
16fe990e56 remove AsmPrinter::findGlobalValue, just use Value::stripPointerCasts instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 22:00:23 +00:00
Dan Gohman
5c2cb324d8 Add a GEPOperator class, and move the hasNoPointerOverflow
accessors into it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76245 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 21:33:58 +00:00
Dan Gohman
fc8deb971d Commit this change, to accompany r76232.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76238 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 21:03:54 +00:00
Dan Gohman
ca178908c8 Add a new Operator class, for handling Instructions and ConstantExprs
in a convenient manner, factoring out some common code from
InstructionCombining and ValueTracking. Move the contents of
BinaryOperators.h into Operator.h and use Operator to generalize them
to support ConstantExprs as well as Instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76232 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:47:02 +00:00
Chris Lattner
e2cf37b88c Untangle a snarl that I discovered when updating the mangler,
starting in getCurrentFunctionEHName.  Among other problems,
we would try to privative a "foo.eh" label, but end up emitting
the label as _Lfoo.eh instead of L_foo.eh on darwin.  This is really
bad, and the linker has always tolerated these labels existing.
For now, just emit them as _foo.eh.

This patch also fixes problems with ".eh" labels on unnamed
functions and eliminates two strangely defined TargetAsmInfo
hooks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76231 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:46:40 +00:00
Daniel Dunbar
092a9dda2d Sketch support for target specific assembly parser.
- Not fully enabled yet, need a configure regeneration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76230 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:42:00 +00:00
Mikhail Glushenkov
234f6893a2 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 20:38:17 +00:00
Xerxes Ranby
6215c6227e Implement cmake LLVM_MULTITHREADED gcc atomic builtin checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76221 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 19:22:41 +00:00
Dan Gohman
b4cfd15d99 Define a no-pointer-overflow flag for GetElementPtr instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76218 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 19:01:15 +00:00
Dan Gohman
31cc426d9a Add new classes for working with optional optimization data
for binary operators Add, Sub, Mul, and UDiv.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76217 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:59:51 +00:00
Anton Korobeynikov
46a47f539d Fix copy & paste errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76216 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:57:16 +00:00
Dan Gohman
47128fe296 Add a method to clear optional optimization information from a Value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76215 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:56:23 +00:00
Anton Korobeynikov
0cb896a8f8 Add missed attributes to C bindings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76214 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:55:30 +00:00
Anton Korobeynikov
c5ec8a78ea Add support for naked functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 18:07:26 +00:00
Dan Gohman
9491c16e14 Add a SubclassOptionalData field to Value. See the doxygen comment for
details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 17:16:59 +00:00
Dan Gohman
a62b5eded6 Fix an apparent typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 16:12:36 +00:00
David Greene
5024246167 Make DOUT an lvalue in release mode so that developers may use DOUT in
their code in release mode.  This helps to debug release-mode problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 15:55:53 +00:00
David Greene
ab9238e876 Add logic to align instruction operands to columns for pretty-printing.
No target uses this currently.  This patch only adds the mechanism so
that local installations can choose to enable this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76177 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 14:24:46 +00:00
Eli Friedman
8b7d706c80 Documentation clarifications for isSafeToSpeculativelyExecute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76168 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 08:38:29 +00:00
Eli Friedman
0b79a7727d Replace isTrapping with a new, similar method called
isSafeToSpeculativelyExecute. The new method is a bit closer to what 
the callers actually care about in that it rejects more things callers 
don't want.  It also adds more precise handling for integer 
division, and unifies code for analyzing the legality of a speculative 
load.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 04:28:42 +00:00
Owen Anderson
ce032b483c Privatize the MDNode uniquing table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 23:44:30 +00:00
Owen Anderson
aad3fb7362 Privatize the MDString uniquing table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 22:11:26 +00:00
Daniel Dunbar
34ccf037fe Add raw_null_ostream and llvm::nulls(), a raw_ostream that discards output.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 21:17:53 +00:00
Jeffrey Yasskin
32360a7e21 Add line numbers to OProfile. To do this, I added a processDebugLoc()
call to the MachineCodeEmitter interface and made copying the start
line of a function not conditional on whether we're emitting Dwarf
debug information. I'll propagate the processDebugLoc() calls to the
non-X86 targets in a followup patch.

In the long run, it'll probably be better to gather this information
through the DwarfWriter, but the DwarfWriter currently depends on the
AsmPrinter and TargetAsmInfo, and fixing that would be out of the way
for this patch.

There's a bug in OProfile 0.9.4 that makes it ignore line numbers for
addresses above 4G, and a patch fixing it at
http://thread.gmane.org/gmane.linux.oprofile/7634

Sample output:

$ sudo opcontrol --reset; sudo opcontrol --start-daemon; sudo opcontrol --start; `pwd`/Debug/bin/lli fib.bc; sudo opcontrol --stop
Signalling daemon... done
Profiler running.
fib(40) == 165580141
Stopping profiling.

$ opreport -g -d -l `pwd`/Debug/bin/lli|head -60
Overflow stats not available
CPU: Core 2, speed 1998 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
vma      samples  %        linenr info                 image name               symbol name
00007f67a30370b0 25489    61.2554  fib.c:24                    10946.jo                 fib_left
  00007f67a30370b0 1634      6.4106  fib.c:24
  00007f67a30370b1 83        0.3256  fib.c:24
  00007f67a30370b9 1997      7.8348  fib.c:24
  00007f67a30370c6 2080      8.1604  fib.c:27
  00007f67a30370c8 988       3.8762  fib.c:27
  00007f67a30370cd 1315      5.1591  fib.c:27
  00007f67a30370cf 251       0.9847  fib.c:27
  00007f67a30370d3 1191      4.6726  fib.c:27
  00007f67a30370d6 975       3.8252  fib.c:27
  00007f67a30370db 1010      3.9625  fib.c:27
  00007f67a30370dd 242       0.9494  fib.c:27
  00007f67a30370e1 2782     10.9145  fib.c:28
  00007f67a30370e5 3768     14.7828  fib.c:28
  00007f67a30370eb 615       2.4128  (no location information)
  00007f67a30370f3 6558     25.7287  (no location information)
00007f67a3037100 15603    37.4973  fib.c:29                    10946.jo                 fib_right
  00007f67a3037100 1646     10.5493  fib.c:29
  00007f67a3037101 45        0.2884  fib.c:29
  00007f67a3037109 2372     15.2022  fib.c:29
  00007f67a3037116 2234     14.3178  fib.c:32
  00007f67a3037118 612       3.9223  fib.c:32
  00007f67a303711d 622       3.9864  fib.c:32
  00007f67a303711f 385       2.4675  fib.c:32
  00007f67a3037123 404       2.5892  fib.c:32
  00007f67a3037126 634       4.0633  fib.c:32
  00007f67a303712b 870       5.5759  fib.c:32
  00007f67a303712d 62        0.3974  fib.c:32
  00007f67a3037131 1848     11.8439  fib.c:33
  00007f67a3037135 2840     18.2016  fib.c:33
  00007f67a303713a 1         0.0064  fib.c:33
  00007f67a303713b 1023      6.5564  (no location information)
  00007f67a3037143 5         0.0320  (no location information)
000000000080c1e4 15        0.0360  MachineOperand.h:150        lli                      llvm::MachineOperand::isReg() const
  000000000080c1e4 6        40.0000  MachineOperand.h:150
  000000000080c1ec 2        13.3333  MachineOperand.h:150
...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 21:07:26 +00:00
Owen Anderson
914e50c841 Privatize the ConstantFP table. I'm on a roll!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 19:05:41 +00:00
Owen Anderson
001dbfebcb Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
our current context-passing stuff, which is also fixed here


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 18:04:31 +00:00
Kevin Enderby
f96db468fc Removed the SubsectionsViaSymbols MCStreamer API and replaced it with a generic
EmitAssemblerFlag API which takes a value from the added AssemblerFlag
enumerated constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 17:56:39 +00:00
Dan Gohman
9377386493 Add an isLoopSimplifyForm() predicate, following the example of
isLCSSAForm(), to test whether a loop is in the form guaranteed
by the LoopSimplify pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76077 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 16:16:23 +00:00
Dan Gohman
6d53f55291 Use setStream infomatted_raw_ostream's constructor, to reduce code
duplication. Also, make setStream honor the old DeleteStream flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76075 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:37:26 +00:00
Dan Gohman
3724b48258 Remove inapplicable comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76074 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:33:48 +00:00
Dan Gohman
2a993f2cc4 Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:33:04 +00:00
Dan Gohman
688ed8583e Tidy up #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76072 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:32:28 +00:00
Dan Gohman
ad60f660c6 Use size_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76069 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:24:40 +00:00
Evan Cheng
378445303b Let callers decide the sub-register index on the def operand of rematerialized instructions.
Avoid remat'ing instructions whose def have sub-register indices for now. It's just really really hard to get all the cases right.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75900 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 09:20:10 +00:00
Chris Lattner
90bb3f3706 add a knob to turn off PrettyStackTrace globally. Patch by Zoltan
Varga!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75897 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 06:17:45 +00:00
Chris Lattner
8e25e2d801 implement .include in the lexer/parser instead of passing it into the streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75896 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 06:14:39 +00:00
Daniel Dunbar
ff9834ab9d Kill off last uses of TargetMachineRegistry class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75892 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 02:41:19 +00:00
Daniel Dunbar
c981da0192 Fix gcc 4.0 build failure, can't rely on access inside nested friended class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75891 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 02:38:28 +00:00
Daniel Dunbar
1d92921691 Switch llc and createJIT to use simpler command line parsing for -march.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75890 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 02:23:53 +00:00
Daniel Dunbar
603bea3274 Add registered target list to --version output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75889 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 02:06:09 +00:00
Dan Gohman
0e0979ecda formatted_raw_ostream both is-a raw_ostream and has-a raw_ostream. This
means that two separate raw_ostreams are doing buffering before data is
sent to the underlying stream. Besides the inefficiency of redundant
buffering, the second level of buffering doesn't recieve flush()
requests.

Fix this by having formatted_raw_ostream set the underlying raw_ostream
to be unbuffered. This eliminates inefficiency due to redundant buffering,
and it makes the flush() disconnect harmless.

This fixes PR4559.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75883 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 01:32:46 +00:00
Daniel Dunbar
4ce78ee3be Add explicit comment that clients can call target initialization functions
multiple times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75880 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 01:13:00 +00:00
Owen Anderson
50dead06ff Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75863 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 23:53:25 +00:00
Daniel Dunbar
5d77cad60b Lift addAssemblyEmitter into LLVMTargetMachine.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75859 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 23:34:19 +00:00
Dan Gohman
e87b2abe91 Change raw_ostream so that it doesn't call llvm_report_error
immediately on every output error. Instead, add a flag to
raw_ostream, and set the flag whenever an error is detected.

The flag can be queried and cleared from the public API. This
gives applications more flexibility to handling errors in
application-specific ways.

If the flag is not cleared when the raw_ostream is destructed,
llvm_report_error is called from the destructor. This ensures
that errors are not implicitly silenced, and provides
convenient default behavior for tools like llc and opt.
Clients wishing to avoid llvm_report_error calls from
raw_ostream should check for errors and clear the error flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 23:25:33 +00:00
Owen Anderson
fea4ec6dff Add an LLVMContext to Type, hardwired to the global context until Type uniquing is moved on the contexts themselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75853 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 22:50:23 +00:00
Bob Wilson
bb2ead6e5f Clean up some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75851 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 22:43:51 +00:00
Daniel Dunbar
cfe9a605ee Lift DumpAsm / -print-emitted-asm functionality into LLVMTargetMachine.
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75848 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 22:33:19 +00:00
Chris Lattner
0df5c8e3f1 Update the C bindings to keep the LLVMTypeKind up to date between the C/C++
stuff.  Patch by Zoltan Varga!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75842 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 22:00:31 +00:00
Daniel Dunbar
23702eacab Remove mismatched and unnecessary declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75841 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 21:52:40 +00:00
Owen Anderson
a90b3dc2f1 Move a few more convenience factory functions from Constant to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75840 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 21:51:10 +00:00
Owen Anderson
23c8046a84 Move the ConstantStruct factory methods over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75830 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 21:00:46 +00:00
Daniel Dunbar
51b198af83 Reapply TargetRegistry refactoring commits.
--- Reverse-merging r75799 into '.':
 U   test/Analysis/PointerTracking
U    include/llvm/Target/TargetMachineRegistry.h
U    include/llvm/Target/TargetMachine.h
U    include/llvm/Target/TargetRegistry.h
U    include/llvm/Target/TargetSelect.h
U    tools/lto/LTOCodeGenerator.cpp
U    tools/lto/LTOModule.cpp
U    tools/llc/llc.cpp
U    lib/Target/PowerPC/PPCTargetMachine.h
U    lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
U    lib/Target/PowerPC/PPCTargetMachine.cpp
U    lib/Target/PowerPC/PPC.h
U    lib/Target/ARM/ARMTargetMachine.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/ARM/ARMTargetMachine.h
U    lib/Target/ARM/ARM.h
U    lib/Target/XCore/XCoreTargetMachine.cpp
U    lib/Target/XCore/XCoreTargetMachine.h
U    lib/Target/PIC16/PIC16TargetMachine.cpp
U    lib/Target/PIC16/PIC16TargetMachine.h
U    lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
U    lib/Target/Alpha/AlphaTargetMachine.cpp
U    lib/Target/Alpha/AlphaTargetMachine.h
U    lib/Target/X86/X86TargetMachine.h
U    lib/Target/X86/X86.h
U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h
U    lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h
U    lib/Target/X86/X86TargetMachine.cpp
U    lib/Target/MSP430/MSP430TargetMachine.cpp
U    lib/Target/MSP430/MSP430TargetMachine.h
U    lib/Target/CppBackend/CPPTargetMachine.h
U    lib/Target/CppBackend/CPPBackend.cpp
U    lib/Target/CBackend/CTargetMachine.h
U    lib/Target/CBackend/CBackend.cpp
U    lib/Target/TargetMachine.cpp
U    lib/Target/IA64/IA64TargetMachine.cpp
U    lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
U    lib/Target/IA64/IA64TargetMachine.h
U    lib/Target/IA64/IA64.h
U    lib/Target/MSIL/MSILWriter.cpp
U    lib/Target/CellSPU/SPUTargetMachine.h
U    lib/Target/CellSPU/SPU.h
U    lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
U    lib/Target/CellSPU/SPUTargetMachine.cpp
U    lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
U    lib/Target/Mips/MipsTargetMachine.cpp
U    lib/Target/Mips/MipsTargetMachine.h
U    lib/Target/Mips/Mips.h
U    lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
U    lib/Target/Sparc/SparcTargetMachine.cpp
U    lib/Target/Sparc/SparcTargetMachine.h
U    lib/ExecutionEngine/JIT/TargetSelect.cpp
U    lib/Support/TargetRegistry.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75820 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 20:24:03 +00:00
David Greene
fe7b16fe65 Get rid of postInstructionAction and call EmitComments directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75806 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 18:24:03 +00:00
Dan Gohman
206613b289 Fix a typo in a comment that Duncan noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75804 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:38:23 +00:00
Dan Gohman
1f5c5b989c Fix a thinko in a comment that Duncan spotted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75803 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:34:43 +00:00
Dan Gohman
a1bdcedc38 Add a Force option to raw_fd_ostream to specify whether opening
an existing file is considered an error. Convert several tools
to use raw_fd_ostream instead of std::ostream, and to use this
new option instead of doing a manual check.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75801 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:29:42 +00:00
Stuart Hastings
2286f8dc4c Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to repair broken LLVM-GCC build.
Will revert 75770 in the llvm-gcc trunk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75799 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:27:11 +00:00
Dan Gohman
d890de10af Add a raw_ostream version of CheckBitcodeOutputToConsole.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75796 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:04:50 +00:00
Dan Gohman
c232a7e8fe Add a comment noting that raw_os_ostream does not check for errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75794 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 16:45:52 +00:00
Dan Gohman
6ca5f9360c Add a raw_ostream operator<< to sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75790 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 16:33:33 +00:00
Kevin Enderby
6e68cd96b2 Added llvm-mc support for parsing the .dump and .load directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 15:30:11 +00:00
Duncan Sands
a4b0486684 Remove the v3i32 and v3f32 value types: they are not
native for any supported targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75785 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 15:28:52 +00:00
Duncan Sands
8cb6626df1 Remove StringConstantPrefix now that the only user
(llvm-gcc) has gone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75781 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 12:39:48 +00:00
Daniel Dunbar
6c05796294 Kill off old (TargetMachine level, not Target level) match quality functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75780 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 12:26:05 +00:00
Daniel Dunbar
03f4bc5d6c Provide TargetMachine implementations with reference to Target they were created
from.
 - This commit is almost entirely propogating the reference through the
   TargetMachine subclasses' constructor calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75778 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 12:11:05 +00:00
Daniel Dunbar
6501145ec6 Kill off unused TargetMachineRegistry methods and ivars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 11:48:36 +00:00
Daniel Dunbar
54785e6df0 Migrate llc and the JIT to using the TargetRegistry for lookups.
- They still use the TargetMachineRegistry to populate the contents of the
   -march option (via the listener interface). We can't just populate it in the
   option parser because we can't expect the TargetRegistry to be populated yet
   (we no longer rely on static constructors).

 - There are a couple ways to finish killing off TargetMachineRegistry, but I
   haven't figured out the cleanest one yet...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75773 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 11:36:15 +00:00
Daniel Dunbar
4d1be777f8 Include the Target& in the TargetMachineRegisterEntry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75772 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 11:23:49 +00:00
Daniel Dunbar
3fb7eee9c2 Allow multiple registrations of the same target.
- This doesn't necessarily seem like a good idea, but the JIT unittest
   currently relies on it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75769 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 10:32:44 +00:00
Daniel Dunbar
aca81c49d9 Initialize the target info via the InitializeNativeTarget() hook.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 10:29:55 +00:00
Daniel Dunbar
e0bda7df1a Reimplement TargetMachineRegistry in terms of TargetRegistry.
- This is a temporary hack to aid in incremental refactoring, for now we
   allocate a new TargetMachineRegistryEntry on every getClosest... call.

 - No intended functionality change, other than the leaked memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75766 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 09:53:37 +00:00