1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

60720 Commits

Author SHA1 Message Date
Daniel Dunbar
43dad4fc73 MC: Tweak section layout to not relying on accumulating address value.
llvm-svn: 103648
2010-05-12 21:35:22 +00:00
Daniel Dunbar
78bb7f4dc9 ADT: Add ilist_node::get{Prev,Next}Node, which return the adjacent node or null.
- This provides a convenient alternative to using something llvm::prior or
   manual iterator access, for example::

    if (T *Prev = foo->getPrevNode())
      ...

   instead of::

     iterator it(foo);
     if (it != begin()) {
       --it;
       ... 
     }

 - Chris, please review.

llvm-svn: 103647
2010-05-12 21:35:19 +00:00
Evan Cheng
fe02735100 Remove a dead fixme.
llvm-svn: 103642
2010-05-12 20:20:22 +00:00
Jakob Stoklund Olesen
7d1323d9a5 Make sure to add kill flags to the last use of a virtreg when it is redefined.
The X86 floating point stack pass and others depend on good kill flags.

llvm-svn: 103635
2010-05-12 18:46:03 +00:00
Devang Patel
2c350fe8a7 Test case for r103633.
llvm-svn: 103634
2010-05-12 18:31:04 +00:00
Daniel Dunbar
7b72c3c7a0 MC: Simplify LayoutSection to just take the index of the section to layout.
llvm-svn: 103627
2010-05-12 17:56:47 +00:00
Daniel Dunbar
8c1208781d lit: Fix OneCommandPerFileTest format when tests are specified directly.
llvm-svn: 103626
2010-05-12 17:56:44 +00:00
Daniel Dunbar
cab93afa90 lit: Add support for 'lit ... @foo', which reads a list of tests to run from
foo.

llvm-svn: 103625
2010-05-12 17:56:42 +00:00
Daniel Dunbar
adca38558e MC: Track section layout order explicitly, and use to simplify.
llvm-svn: 103616
2010-05-12 15:42:59 +00:00
Nathan Jeffords
b578f7106d stylistic change to MCSectionCOFF::PrintSwitchToSection COMDAT handling
Made a stylistic changed to the code/comments related to the unsupported COMDAT selection  type IMAGE_COMDAT_SELECT_LARGEST based on from Anton Korobeynikov.

llvm-svn: 103590
2010-05-12 07:36:03 +00:00
Duncan Sands
bd83ac415f Remove unused variable. Tweak a comment while there.
llvm-svn: 103586
2010-05-12 07:11:33 +00:00
Rafael Espindola
3efc86abab Add support for movi32 of global values to the new (MC) asm printer.
llvm-svn: 103576
2010-05-12 05:16:34 +00:00
Dale Johannesen
9d4b3277ba Testcase for llvm 103572 (7898991).
llvm-svn: 103574
2010-05-12 05:04:20 +00:00
Nathan Jeffords
9952bcf9f6 updated support for the COFF .linkonce
Now, the .linkonce directive is emitted as part of MCSectionCOFF::PrintSwitchToSection instead of AsmPrinter::EmitLinkage since it is an attribute of the section the symbol was placed into not the symbol itself.

llvm-svn: 103568
2010-05-12 04:26:09 +00:00
Evan Cheng
4f2b4dd74b vst instructions are modeled as this:
v1024 = REG_SEQUENCE ...
v1025 = EXTRACT_SUBREG v1024, 5
v1026 = EXTRACR_SUBREG v1024, 6
      = VSTxx <addr>, v1025, v1026

The REG_SEQUENCE ensures the sources that feed into the VST instruction
are getting the right register allocation so they form a large super-
register. The extract_subreg will be coalesced away all would just work:
v1024 = REG_SEQUENCE ...
      = VSTxx <addr>, v1024:5, v1024:6

The problem is if the coalescer isn't run, the extract_subreg instructions
would stick around and there is no assurance v1025 and v1026 will get the
right registers.

As a short term workaround, teach the NEON pre-allocation pass to transfer
the sub-register indices over. An alternative would be do it 2addr pass
when reg_sequence's are eliminated. But that *seems* wrong and require
updating liveness information.

Another alternative is to do this in the scheduler when the instructions are
created. But that would mean somehow the scheduler this has to be done for
correctness reason. That's yucky as well. So for now, we are leaving this
in the target specific pass.

llvm-svn: 103540
2010-05-12 01:42:50 +00:00
Evan Cheng
5b48257a73 Teach local regalloc about virtual registers with sub-indices.
llvm-svn: 103539
2010-05-12 01:29:36 +00:00
Evan Cheng
29c800f0f0 Code clean up.
llvm-svn: 103538
2010-05-12 01:27:49 +00:00
Daniel Dunbar
469dddef0e MC/X86: Extend suffix matching hack to match 'q' suffix.
llvm-svn: 103535
2010-05-12 00:54:20 +00:00
Nathan Jeffords
2c2c69c075 Added a trivial function to modify the flags field of MCSymbolData class. The function takes the value and a mask, and clears the mask bits before applying the value.
llvm-svn: 103534
2010-05-12 00:52:54 +00:00
Daniel Dunbar
e5a79692cf MC/Mach-O/x86_64: Add a new hook for checking whether a particular section can
be diced into atoms, and adjust getAtom() to take this into account.
 - This fixes relocations to symbols in fixed size literal sections, for
   example.

llvm-svn: 103532
2010-05-12 00:38:17 +00:00
Jakob Stoklund Olesen
6976c543cd Enable a bunch more -regalloc=fast tests
llvm-svn: 103531
2010-05-12 00:11:24 +00:00
Jakob Stoklund Olesen
b3ca444697 Avoid scoping issues, fix buildbots
llvm-svn: 103530
2010-05-12 00:11:19 +00:00
Dan Gohman
03e407ed83 Add initial kill flag support to FastISel.
llvm-svn: 103529
2010-05-11 23:54:07 +00:00
Daniel Dunbar
5d81e1a0bf Make Clang happy.
llvm-svn: 103528
2010-05-11 23:53:13 +00:00
Daniel Dunbar
a033860d55 MC/Mach-O/x86_64: Fix PCrel adjustment for x86_64, which was using the fixup
offset instead of the fixup address as intended.

llvm-svn: 103527
2010-05-11 23:53:11 +00:00
Daniel Dunbar
7d7b6cf3b7 MC/Mach-O: As Kevin pointed out, 'Address' is really an offset -- rename to clarify.
llvm-svn: 103526
2010-05-11 23:53:07 +00:00
Daniel Dunbar
e43676c164 MC/Mach-O: Fix a crash on invalid.
llvm-svn: 103525
2010-05-11 23:53:05 +00:00
Jeffrey Yasskin
6768d483a0 Fix PR6951 by fixing Module leaks in bugpoint.
llvm-svn: 103523
2010-05-11 23:25:16 +00:00
Jakob Stoklund Olesen
e6eee8913f Store the Dirty bit in the LiveReg structure instead of a bit vector.
llvm-svn: 103522
2010-05-11 23:24:47 +00:00
Jakob Stoklund Olesen
063844f706 Keep track of the last place a live virtreg was used.
This allows us to add accurate kill markers, something the scavenger likes.
Add some more tests from ARM that needed this.

llvm-svn: 103521
2010-05-11 23:24:45 +00:00
Dan Gohman
2ace137eb9 Don't set kill flags on uses of CopyFromReg nodes. InstrEmitter doesn't
create separate virtual registers for CopyFromReg values, so uses of
them don't necessarily kill the value.

llvm-svn: 103519
2010-05-11 21:59:14 +00:00
Evan Cheng
e46afad99b Avoid breaking vstd when reg_sequence is not used.
llvm-svn: 103513
2010-05-11 21:07:36 +00:00
Jakob Stoklund Olesen
99d5d74fb0 One more -regalloc=fast test
llvm-svn: 103509
2010-05-11 20:51:07 +00:00
Jakob Stoklund Olesen
bea7fa3416 Silence warning
llvm-svn: 103508
2010-05-11 20:51:04 +00:00
Bill Wendling
4769f124cd Simplify this logic of creating a default Features object.
llvm-svn: 103507
2010-05-11 20:46:04 +00:00
Jakob Stoklund Olesen
e27902ac68 Simplify the tracking of used physregs to a bulk bitor followed by a transitive
closure after allocating all blocks.

Add a few more test cases for -regalloc=fast.

llvm-svn: 103500
2010-05-11 20:30:28 +00:00
Dan Gohman
1ebf23a692 Revert r103493, materializing functions in the regular PassManager.
It works in simple cases, but it isn't a general solution.

llvm-svn: 103499
2010-05-11 20:30:00 +00:00
Duncan Sands
7d5e4152c3 I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename it
to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is
the opposite, for future use by dragonegg.

llvm-svn: 103495
2010-05-11 20:16:09 +00:00
Dan Gohman
4c44e690d7 Teach the regular pass manager how to materialize functions as needed.
llvm-svn: 103493
2010-05-11 19:58:43 +00:00
Dan Gohman
5f389dacab Remove the "WantsWholeFile" concept, as it's no longer needed. CBE
and the others use the regular addPassesToEmitFile hook now, and
llc no longer needs a bunch of redundant code to handle the
whole-file case.

llvm-svn: 103492
2010-05-11 19:57:55 +00:00
Dan Gohman
ca2df906ae Trim #includes and forward declarations.
llvm-svn: 103489
2010-05-11 19:11:43 +00:00
Jakob Stoklund Olesen
442e38c4de Mostly rewrite RegAllocFast.
Sorry for the big change. The path leading up to this patch had some TableGen
changes that I didn't want to commit before I knew they were useful. They
weren't, and this version does not need them.

The fast register allocator now does no liveness calculations. Instead it relies
on kill flags provided by isel. (Currently those kill flags are also ignored due
to isel bugs). The allocation algorithm is supposed to work with any subset of
valid kill flags. More kill flags simply means fewer spills inserted.

Registers are allocated from a working set that contains no aliases. That means
most allocations can be done directly without expensive alias checks. When the
working set runs out of registers we do the full alias check to find new free
registers.

llvm-svn: 103488
2010-05-11 18:54:45 +00:00
Dan Gohman
259488cf67 Fix a comment.
llvm-svn: 103483
2010-05-11 18:03:41 +00:00
Dan Gohman
fb6f4da0e0 Implement a bunch more TargetSelectionDAGInfo infrastructure.
Move EmitTargetCodeForMemcpy, EmitTargetCodeForMemset, and
EmitTargetCodeForMemmove out of TargetLowering and into
SelectionDAGInfo to exercise this.

llvm-svn: 103481
2010-05-11 17:31:57 +00:00
Daniel Dunbar
7670f69e42 MC/Mach-O x86_64: Switch to using fragment atom symbol.
- This eliminates getAtomForAddress() (which was a linear search) and
   simplifies getAtom().
 - This also fixes some correctness problems where local labels at the same
   address as non-local labels could be assigned to the wrong atom.

llvm-svn: 103480
2010-05-11 17:22:50 +00:00
Daniel Dunbar
2b45036b3b Test commit.
llvm-svn: 103479
2010-05-11 17:22:45 +00:00
Tanya Lattner
0b1b95f2c1 Test commit.
llvm-svn: 103478
2010-05-11 16:47:42 +00:00
Tanya Lattner
2cc9bc56c9 Test commit.
llvm-svn: 103477
2010-05-11 16:46:45 +00:00
Dan Gohman
eaacb8cb1f Remove the TargetLowering::getSubtarget() virtual function, which
was unused. TargetMachine::getSubtarget() is used instead.

llvm-svn: 103474
2010-05-11 16:21:03 +00:00
Kalle Raiskila
e302300b51 Make SPU backend not assert on jump tables.
llvm-svn: 103466
2010-05-11 11:00:02 +00:00