Commit Graph

30413 Commits

Author SHA1 Message Date
Daniel Dunbar
ad6c1539cd Remove unused header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 02:23:52 +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
13b9251eb1 eliminate a pointless switch stmt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 01:44:55 +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
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
e3577da6d9 simplify DarwinTargetAsmInfo::SelectSectionForGlobal a bit
and make it more aggressive, we now put:

const int G2 __attribute__((weak)) = 42;

into the text (readonly) segment like gcc, previously we put
it into the data (readwrite) segment.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77104 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:51:36 +00:00
Daniel Dunbar
07f6903cbe Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:42:33 +00:00
Bob Wilson
8bb9e48752 Add support for ARM Neon VREV instructions.
Patch by Anton Korzh, with some modifications from me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:39:34 +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
Reid Kleckner
7d509134dc Added a test and fixed a bug in BumpPtrAllocator relating to large alignment
values.  Hopefully this fixes PR4622.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77088 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 21:26:02 +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
Chris Lattner
10cf6a6a4b add the most expedient hack to fix PR4619, along with a testcase.
Thanks to Rafael for the great example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 17:57:37 +00:00
Dan Gohman
bc3d77a0df SCEV objects are no longer reference-counted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77080 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 16:18:07 +00:00
Dan Gohman
19378d622e When attempting to sign-extend an addrec by interpreting
the step value as unsigned, the start value and the addrec
itself still need to be treated as signed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77078 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 16:03:30 +00:00
Andreas Bolka
8a8bd3d690 Convert DOUT to DEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 12:19:58 +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
Sanjiv Gupta
e0d12d5f7b Mark attributes of return insn correctly. It was being assumed safe to delete in isSafeToDelete (a thing checked-in 76281).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77056 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 07:48:53 +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
a66297af30 Fix 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 02:45:27 +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
Evan Cheng
c7423aff68 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 01:55:25 +00:00
Dan Gohman
fd87a544c0 Convert a few more things to use raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77039 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 01:43:01 +00:00
Evan Cheng
c6b54d5a33 Get rid of a couple of unnecessary getOpcode calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 01:25:08 +00:00
Dan Gohman
eb490a7aa3 Teach ScalarEvolution to make use of no-overflow flags when
analyzing add recurrences.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77034 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 01:22:26 +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
Evan Cheng
3c91f36a45 Another TODO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77026 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 00:39:37 +00:00
Evan Cheng
66ac53165e Change Thumb2 jumptable codegen to one that uses two level jumps:
Before:
      adr r12, #LJTI3_0_0
      ldr pc, [r12, +r0, lsl #2]
LJTI3_0_0:
      .long    LBB3_24
      .long    LBB3_30
      .long    LBB3_31
      .long    LBB3_32

After:
      adr r12, #LJTI3_0_0
      add pc, r12, +r0, lsl #2
LJTI3_0_0:
      b.w    LBB3_24
      b.w    LBB3_30
      b.w    LBB3_31
      b.w    LBB3_32

This has several advantages.
1. This will make it easier to optimize this to a TBB / TBH instruction +
   (smaller) table.
2. This eliminate the need for ugly asm printer hack to force the address
   into thumb addresses (bit 0 is one).
3. Same codegen for pic and non-pic.
4. This eliminate the need to align the table so constantpool island pass
   won't have to over-estimate the size.

Based on my calculation, the later is probably slightly faster as well since
ldr pc with shifter address is very slow. That is, it should be a win as long
as the HW implementation can do a reasonable job of branch predict the second
branch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77024 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 00:33:29 +00:00
Daniel Dunbar
ce63ffb52f More migration to raw_ostream, the water has dried up around the iostream hole.
- Some clients which used DOUT have moved to DEBUG. We are deprecating the
   "magic" DOUT behavior which avoided calling printing functions when the
   statement was disabled. In addition to being unnecessary magic, it had the
   downside of leaving code in -Asserts builds, and of hiding potentially
   unnecessary computations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77019 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 00:23:56 +00:00
Evan Cheng
90daf4d035 ARM code emitter can't handle Thumb2 instructions yet. So don't even try.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 00:13:11 +00:00
Daniel Dunbar
961f5852ca Fix build for GCC 4.0?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77016 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 23:42:33 +00:00
Daniel Dunbar
7cdf01d6c5 Fix compile with 4.4 (I hope?); PR4617.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77015 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 23:23:46 +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
Dan Gohman
67efc56b80 AliasAnalysis wants sizes in address-units, not bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77009 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 23:01:30 +00:00
Eli Friedman
4e9bac3769 Fix assert assembling zero-argument constant GEP.
There's still a strict-aliasing violation here, but I don't feel like 
dealing with that right now...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77005 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 21:56:17 +00:00
Evan Cheng
0b6afa8c71 Uh. It would be useful to actually print the operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77004 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 20:47:38 +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
Evan Cheng
40efc251cd Disable my constant island pass optimization (to make use soimm more effectively). It caused infinite looping on lencod.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76995 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 19:31:03 +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
Evan Cheng
49f846805e Add a workaround for Darwin assembler bug where it's not setting the thumb bit in Thumb2 jumptable entries. We now pass Olden.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76991 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 18:54:23 +00:00