1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

49226 Commits

Author SHA1 Message Date
Chris Lattner
fda0ca90c1 make SectionKind be a first-class pod struct instead of just
an enum.

llvm-svn: 77096
2009-07-25 23:21:55 +00:00
Reid Kleckner
b159a2bad6 Added a test and fixed a bug in BumpPtrAllocator relating to large alignment
values.  Hopefully this fixes PR4622.

llvm-svn: 77088
2009-07-25 21:26:02 +00:00
Chris Lattner
15b3d2039f 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.

llvm-svn: 77085
2009-07-25 18:57:34 +00:00
Chris Lattner
edbf2e64cb document some invariants.
llvm-svn: 77084
2009-07-25 18:11:58 +00:00
Chris Lattner
cf7cc0ed7d add the most expedient hack to fix PR4619, along with a testcase.
Thanks to Rafael for the great example.

llvm-svn: 77083
2009-07-25 17:57:37 +00:00
Dan Gohman
4a193ce478 Fix a few comments to say "backedge-taken count" instead of
"trip count".

llvm-svn: 77081
2009-07-25 16:18:38 +00:00
Dan Gohman
0781059503 SCEV objects are no longer reference-counted.
llvm-svn: 77080
2009-07-25 16:18:07 +00:00
Dan Gohman
cb1390f7ed Update comments to new-style syntax.
llvm-svn: 77079
2009-07-25 16:03:55 +00:00
Dan Gohman
c126330ef1 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.

llvm-svn: 77078
2009-07-25 16:03:30 +00:00
Dan Gohman
8d8a8adebf Remove spurious semicolons.
llvm-svn: 77077
2009-07-25 16:00:54 +00:00
Andreas Bolka
72c14efff0 Convert DOUT to DEBUG.
llvm-svn: 77065
2009-07-25 12:19:58 +00:00
Daniel Dunbar
d699ffc2ac 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.

llvm-svn: 77060
2009-07-25 10:09:50 +00:00
Sanjiv Gupta
b09f01d842 Mark attributes of return insn correctly. It was being assumed safe to delete in isSafeToDelete (a thing checked-in 76281).
llvm-svn: 77056
2009-07-25 07:48:53 +00:00
Chris Lattner
06449afe92 remove this test. It is currently failing because we now emit the string
on darwin with ".cstring" instead of ".section  __TEXT,__cstring".  They
are the same and the former is better.  Remove this because this is no longer
magic pixie dust in the frontend.

llvm-svn: 77055
2009-07-25 07:31:51 +00:00
Chris Lattner
021a977857 eventually we should describe string options in the data structures section
llvm-svn: 77054
2009-07-25 07:22:20 +00:00
Chris Lattner
5092df83f7 minor tweaks.
llvm-svn: 77053
2009-07-25 07:16:59 +00:00
Daniel Dunbar
284fe09fe4 Add new helpers for registering targets.
- Less boilerplate == good.

llvm-svn: 77052
2009-07-25 06:49:55 +00:00
Daniel Dunbar
9f50ab3c49 Finish migrating VMCore to StringRef/Twine based APIs.
llvm-svn: 77051
2009-07-25 06:02:13 +00:00
Daniel Dunbar
794f5b8325 Ok, "most clients should be unaffected" was a lie. Add notes on upgrading.
llvm-svn: 77050
2009-07-25 05:26:53 +00:00
Daniel Dunbar
251177c96e 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 &'.

llvm-svn: 77048
2009-07-25 04:41:11 +00:00
Eric Christopher
b5f8390b6c Fix 80-col violations.
llvm-svn: 77045
2009-07-25 02:45:27 +00:00
Eric Christopher
df9c86fc26 Move ExtractElementInst to ::Create instead of new. Update all uses.
llvm-svn: 77044
2009-07-25 02:28:41 +00:00
Dan Gohman
f6e44e6e47 Update to new syntax.
llvm-svn: 77043
2009-07-25 02:23:48 +00:00
Daniel Dunbar
16ec56532a Rewrite examples to use DEBUG instead of DOUT.
llvm-svn: 77042
2009-07-25 01:55:32 +00:00
Evan Cheng
0f605005c5 80 col violation.
llvm-svn: 77041
2009-07-25 01:55:25 +00:00
Dan Gohman
9a7deba67e Convert a few more things to use raw_ostream.
llvm-svn: 77039
2009-07-25 01:43:01 +00:00
Evan Cheng
5468ef5230 Get rid of a couple of unnecessary getOpcode calls.
llvm-svn: 77035
2009-07-25 01:25:08 +00:00
Dan Gohman
13aabe2ba4 Teach ScalarEvolution to make use of no-overflow flags when
analyzing add recurrences.

llvm-svn: 77034
2009-07-25 01:22:26 +00:00
Dan Gohman
fdf1a11a27 Convert a few more uses of llvm/Support/Streams.h to raw_ostream.
llvm-svn: 77033
2009-07-25 01:13:51 +00:00
Dan Gohman
a823846bd1 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.

llvm-svn: 77032
2009-07-25 01:13:03 +00:00
Evan Cheng
12dd5c078f I've lost my mind. PR4572 has not been fixed.
llvm-svn: 77031
2009-07-25 01:11:46 +00:00
Dan Gohman
acc5d6eaae Make AliasAnalysis and related classes use
getAnalysisIfAvailable<TargetData>().

llvm-svn: 77028
2009-07-25 00:48:42 +00:00
Daniel Dunbar
cdefe7660f One more getName -> getNameStr
llvm-svn: 77027
2009-07-25 00:43:31 +00:00
Evan Cheng
e3a37c42fb Another TODO.
llvm-svn: 77026
2009-07-25 00:39:37 +00:00
Jeffrey Yasskin
da42799098 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.

llvm-svn: 77025
2009-07-25 00:33:57 +00:00
Evan Cheng
d615e606c4 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.

llvm-svn: 77024
2009-07-25 00:33:29 +00:00
Sean Callanan
555ef2f462 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.

llvm-svn: 77023
2009-07-25 00:30:51 +00:00
Evan Cheng
bddff8fbe0 Remove a duplicated test.
llvm-svn: 77020
2009-07-25 00:24:40 +00:00
Daniel Dunbar
8496064116 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.

llvm-svn: 77019
2009-07-25 00:23:56 +00:00
Evan Cheng
cb63bf2810 ARM code emitter can't handle Thumb2 instructions yet. So don't even try.
llvm-svn: 77018
2009-07-25 00:13:11 +00:00
Daniel Dunbar
2d76dc5a14 Tweak, raw_ostream is a ostream, not iostream replacement
llvm-svn: 77017
2009-07-24 23:54:34 +00:00
Daniel Dunbar
5bf752cc30 Fix build for GCC 4.0?
llvm-svn: 77016
2009-07-24 23:42:33 +00:00
Daniel Dunbar
8fe4f99da4 Fix compile with 4.4 (I hope?); PR4617.
llvm-svn: 77015
2009-07-24 23:23:46 +00:00
Andreas Bolka
4e68450b70 Forward-declare raw_ostream.
llvm-svn: 77014
2009-07-24 23:19:28 +00:00
Owen Anderson
cc33e89571 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
llvm-svn: 77011
2009-07-24 23:12:02 +00:00
Daniel Dunbar
06b94defcb CodingStandards: Emphasize use of raw_ostream more.
- Chris, please approve.

llvm-svn: 77010
2009-07-24 23:04:51 +00:00
Dan Gohman
b895f668cc AliasAnalysis wants sizes in address-units, not bits.
llvm-svn: 77009
2009-07-24 23:01:30 +00:00
Evan Cheng
5faed6335e Forgot this test earlier.
llvm-svn: 77007
2009-07-24 22:42:45 +00:00
Evan Cheng
b8b61017e8 Fix these tests.
llvm-svn: 77006
2009-07-24 22:42:22 +00:00
Eli Friedman
11e86150c4 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...

llvm-svn: 77005
2009-07-24 21:56:17 +00:00