Commit Graph

9347 Commits

Author SHA1 Message Date
Daniel Dunbar
8c2f1d7e44 Oops, forgot XCore. Sorry XCore!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77125 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 04:52:45 +00:00
Daniel Dunbar
6337f15b5a Update for API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77124 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 04:23:03 +00:00
Chris Lattner
38b77f8c93 fix isReadOnly predicate to not include data that has to be
writable because of teh dynamic linker.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 04:18:10 +00:00
Chris Lattner
f276990625 remove a dead enum case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77121 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 04:09:02 +00:00
Daniel Dunbar
a14d225ef4 Update Triple to use StringRef/Twine based APIs.
- This is now shorter, simpler, safer, and more efficient, what a deal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 03:31:47 +00:00
Daniel Dunbar
d61918fc68 Add StringRef::{slice, split}, two convenient string operations which are simple
and efficient on a StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 03:18:15 +00:00
Chris Lattner
abb477f663 put normal data into .data instead of .data.rel on elf systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 03:06:11 +00:00
Daniel Dunbar
fa27ff296d Kill Target specific ModuleMatchQuality stuff.
- This was overkill and inconsistently implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 02:22:58 +00:00
Daniel Dunbar
a5881e3060 Add TargetRegistry::lookupTarget.
- This is a simplified mechanism which just looks up a target based on the
   target triple, with a few additional flags.

 - Remove getClosestStaticTargetForModule, the moral equivalent is now:
     lookupTarget(Mod->getTargetTriple, true, false, ...);

 - This no longer does the fuzzy matching with target data (based on endianness
   and pointer width) that getClosestStaticTargetForModule was doing, but this
   was deemed unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 02:12:58 +00:00
Chris Lattner
30c4a3b9a8 finish simplifying DarwinTargetAsmInfo::SelectSectionForGlobal
for now.  Make the section switching directives more consistent
by not including \n and including \t for them all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 01:24:18 +00:00
Daniel Dunbar
c993250dd2 Some clients rely on getName{Start,End} not returning 0, even if the length is
0.
 - I could have swore the prev change went through a make check cycle...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77106 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 01:04:10 +00:00
Daniel Dunbar
499027fb48 Rewrite getName{Start,End,Len} in terms of getName(), instead of vice-versa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77105 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:51:56 +00:00
Chris Lattner
d601239833 simplify some predicates, add isMergableString()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:50:43 +00:00
Daniel Dunbar
3f53fa9a51 Remove Value::setName(const char*, unsigned).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:34:27 +00:00
Daniel Dunbar
d1319ef308 Remove Value::setName(const char*).
- Split into a separate patch because there is a slight functionality change,
   it is no longer valid to call setName(0), which was equivalent to
   setName(""). I'm hoping no one depends on this...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:17:14 +00:00
Daniel Dunbar
03d7651c36 Remove Value::{isName, getNameRef}.
Also, change MDString to use a StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77098 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 23:55:21 +00:00
Chris Lattner
460d51e0c0 make SectionKind be a first-class pod struct instead of just
an enum.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77096 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 23:21:55 +00:00
Chris Lattner
b4fc419d83 this is (unfortunately) several changes mixed together:
1. Spell SectionFlags::Writeable as "Writable".
2. Add predicates for deriving SectionFlags from SectionKinds.
3. Sink ELF-specific getSectionPrefixForUniqueGlobal impl into
   ELFTargetAsmInfo.
4. Fix SectionFlagsForGlobal to know that BSS/ThreadBSS has the
   BSS bit set (the real fix for PR4619).
5. Fix isSuitableForBSS to not put globals with explicit sections
   set in BSS (which was the reason #4 wasn't fixed earlier).
6. Remove my previous hack for PR4619.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77085 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 18:57:34 +00:00
Chris Lattner
4f05591e61 document some invariants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77084 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 18:11:58 +00:00
Dan Gohman
7e77f79591 Fix a few comments to say "backedge-taken count" instead of
"trip count".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77081 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 16:18:38 +00:00
Dan Gohman
72efa18f1d Update comments to new-style syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 16:03:55 +00:00
Dan Gohman
996b9d6aa9 Remove spurious semicolons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77077 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 16:00:54 +00:00
Daniel Dunbar
d6fd377f33 Simplify JIT target selection.
- Instead of requiring targets to define a JIT quality match function, we just
   have them specify if they support a JIT.

 - Target selection for the JIT just gets the host triple and looks for the best
   target which matches the triple and has a JIT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77060 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 10:09:50 +00:00
Daniel Dunbar
0c795d6187 Add new helpers for registering targets.
- Less boilerplate == good.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77052 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 06:49:55 +00:00
Daniel Dunbar
92ccf70ad4 Finish migrating VMCore to StringRef/Twine based APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77051 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 06:02:13 +00:00
Daniel Dunbar
6e0d1cb309 Initial update to VMCore to use Twines for string arguments.
- The only meat here is in Value.{h,cpp} the rest is essential 'const
   std::string &' -> 'const Twine &'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77048 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 04:41:11 +00:00
Eric Christopher
a3500da559 Move ExtractElementInst to ::Create instead of new. Update all uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 02:28:41 +00:00
Dan Gohman
6c1980b335 Convert a few more uses of llvm/Support/Streams.h to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77033 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 01:13:51 +00:00
Dan Gohman
fef8bb24de Instead of eagerly creating new SCEVs to replace all SCEVs that are
affected after a PHI node has been analyzed, just remove affected
SCEVs from the Scalars map, so that they'll be (lazily) recreated as
needed. This avoids creating SCEV objects that aren't actually needed.

Also, rewrite the associated def-use walking code to be non-recursive
and to continue traversing past Instructions that don't have an
entry in the Scalars map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77032 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 01:13:03 +00:00
Dan Gohman
fc2a3ed0c9 Make AliasAnalysis and related classes use
getAnalysisIfAvailable<TargetData>().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77028 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 00:48:42 +00:00
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