Commit Graph

9317 Commits

Author SHA1 Message Date
Jeffrey Yasskin
f595d6dd9a Add a missing ilist_node.h #include to SparseBitVector, and add a very short
test for it. The test is by no means complete, but it tests the problem I was
fixing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 00:33:57 +00:00
Sean Callanan
4711326d60 MemoryObject - Abstract base class for contiguous addressable memory.
Necessary for cases in which the memory is in another process, in a
  file, or on a remote machine.

The primary use for this is the llvm-mc disassemblers, so that they
can be targeted at arbitrary objects, not just in-process memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77023 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 00:30:51 +00:00
Andreas Bolka
0baa25d539 Forward-declare raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 23:19:28 +00:00
Owen Anderson
eed707b1e6 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 23:12:02 +00:00
Chris Lattner
fbd3d4a5c3 fix some predicates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76999 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 20:27:11 +00:00
Chris Lattner
0d4960c3ca change SectionKindForGlobal from being a public (and
previously virtual) function to being a static function
in the .cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76997 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 20:14:10 +00:00
Chris Lattner
b303504a56 make SectionKindForGlobal target independent, and therefore non-virtual.
It's classifications now include elf-specific discriminators.  Targets
that don't have these features (like darwin and pecoff) simply treat
data.rel like data, etc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76993 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 19:15:47 +00:00
Chris Lattner
f20f250b6f we already know the sectionkind when invoking SelectSectionForGlobal,
pass it in instead of recomputing it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 18:42:53 +00:00
Chris Lattner
7420ab2191 make SectionForGlobal non-virtual, add a hook for pic16 to do its "address=" hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76989 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 18:34:27 +00:00
Jakob Stoklund Olesen
78d12644b9 Add support for promoting SETCC operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76987 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 18:22:59 +00:00
Dan Gohman
02a436c48e Convert several more passes to use getAnalysisIfAvailable<TargetData>()
instead of getAnalysis<TargetData>().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76982 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 18:13:53 +00:00
Dan Gohman
6b118a2122 Add specific classes for Add, Sub, and Mul, for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76981 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 18:12:25 +00:00
Chris Lattner
2dcafe4b8f move ELF-specific code into ELFTargetAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76976 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 17:02:17 +00:00
Chris Lattner
8adc547a91 make SectionFlagsForGlobal a private static function instead of a public
virtual one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76973 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 16:46:50 +00:00
Daniel Dunbar
1cd1d98232 Move more to raw_ostream, provide support for writing MachineBasicBlock,
LiveInterval, etc to raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 10:36:58 +00:00
Daniel Dunbar
3f0e83067d Move to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76963 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 09:53:24 +00:00
Daniel Dunbar
82a29b6a02 Allow llvm_report_error to accept a Twine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76961 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 07:58:10 +00:00
Eli Friedman
23ed52752b Remove unused member functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 07:43:59 +00:00
Daniel Dunbar
050578fb4a Fix constructor types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76958 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 07:12:20 +00:00
Daniel Dunbar
2538f7ab2e Add Twine ADT.
- Not currently used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76956 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 07:04:27 +00:00
Chris Lattner
78717cb63d Implement getSectionPrefixForUniqueGlobal to return null, indicating that
darwin does it's own unique and special and wonderful thing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76952 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 05:02:38 +00:00
Chris Lattner
55acc6807f Replace UniqueSectionForGlobal with getSectionPrefixForUniqueGlobal.
The later doesn't depend on any crazy LLVM IR stuff, and this
pulls the concatenation of prefix with GV name (the root problem behind
PR4584) out one level.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 04:49:34 +00:00
Chris Lattner
837f332372 document SectionFlags::Named better and make it more easily greppable by
eliminating isNamed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76946 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 04:26:19 +00:00
Chris Lattner
c440cc7f2c use section flags more correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76944 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 04:08:17 +00:00
Chris Lattner
083a1e0597 make Constant::getRelocationInfo return an enum, as suggested by Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76938 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 03:27:21 +00:00
Chris Lattner
ad733cd851 remove more bits of small section support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76937 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 03:16:53 +00:00
Chris Lattner
013e6b6309 Remove SectionKind::Small*. This was only used on mips, and is apparently
a sad mistake that is regretted. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76935 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 03:11:51 +00:00
Dan Gohman
d3ff304557 Give SCEVAddRecExpr no-signed-overflow and no-unsigned-overflow flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76928 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 01:01:06 +00:00
Dan Gohman
2f1b15386f Give the SCEV class a SubclassData field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:59:53 +00:00
Dan Gohman
a271d36d7c Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:55:33 +00:00
Owen Anderson
5bd68393ed Privatize the ConstantVector tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:36:24 +00:00
Dan Gohman
d2cb3d2c32 Remove the IA-64 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:30:09 +00:00
Owen Anderson
006c77df8c Privatize the ConstantStruct table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 23:25:33 +00:00
David Greene
ed0e2adc70 Write space padding as one string to speed up comment printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 23:21:10 +00:00
Reid Kleckner
10b4fc552f Re-committing r76828 with the JIT memory manager changes now that the build
bots like the BumpPtrAllocator changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76902 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 21:46:56 +00:00
Duncan Sands
17e4aa7d0a Fix PR4614: the Intel C compiler defines _GNUC__
but does not provide __builtin_bswap32/64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76896 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 19:08:27 +00:00
Daniel Dunbar
bc8d813f71 Switch ValueSymbolTable to StringRef based API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:52:12 +00:00
Daniel Dunbar
e6c42dd6d3 Add llvm::Value::getNameRef, for help in API migration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76893 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:50:53 +00:00
Reid Kleckner
8f51a62b41 Re-committing changes from r76825 to BumpPtrAllocator with a fix and tests for
an off-by-one error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76891 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:34:13 +00:00
Daniel Dunbar
6316fbcb04 Convert StringMap to using StringRef for its APIs.
- Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:17:34 +00:00
Andrew Lenharth
787b0db33c emit simple node was using different labels for fields than the rest of the graph writter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76879 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 15:24:38 +00:00
Andreas Bolka
b4c28e97f4 Cache dependence computation using FoldingSet.
This introduces an LDA-internal DependencePair class. The intention is,
that this is a place where dependence testers can store various results
such as SCEVs describing conflicting iterations, breaking conditions,
distance/direction vectors, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76877 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 14:32:46 +00:00
Chris Lattner
f0395160f9 enhance DepthFirstIterator to support more robust operations in the face
of code mutating the graph while it is being traversed.  Patch by 
Olaf Krzikalla!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 06:30:28 +00:00
Chris Lattner
903cb3908e remove a really old and dead header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76855 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 04:59:02 +00:00
Devang Patel
2f9c3b002d MDString
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76841 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 02:00:51 +00:00
Andreas Bolka
3b59dd886a Minor cosmetics: indentation, formatting, naming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76839 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:57:06 +00:00
Reid Kleckner
4bf370698a Reverting r76825 and r76828, since they caused clang runtime errors and some build failure involving memset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:40:54 +00:00
Devang Patel
6b0c2173a3 Hide constructors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:19:53 +00:00
Devang Patel
104cf9e02b Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:07:34 +00:00
Reid Kleckner
81ce3ed08c Make the JIT code emitter properly retry and ask for more memory when it runs
out of memory, and also make the default memory manager allocate more memory
when it runs out.

Also, switch function stubs and global data over to using the BumpPtrAllocator.

This makes it so the JIT no longer mmaps (or the equivalent on Windows) 16 MB
of memory, and instead allocates in 512K slabs.  I suspect this size could go
lower, especially on embedded platforms, now that more slabs can be allocated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76828 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 00:49:59 +00:00
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