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

7280 Commits

Author SHA1 Message Date
Anton Korobeynikov
2572855027 Let RegisterInfo decide whether it can emit cross-class copy or not
llvm-svn: 75955
2009-07-16 13:55:26 +00:00
Anton Korobeynikov
64ff9c023a Scan for presence of calls and determine max callframe size early. To allow ProcessFunctionBeforeCalleeSaveScan() use this information
llvm-svn: 75942
2009-07-16 13:50:40 +00:00
Anton Korobeynikov
7fbfe92a28 Propagate return result extension type
llvm-svn: 75925
2009-07-16 13:35:48 +00:00
Evan Cheng
7a6b20df7f Let callers decide the sub-register index on the def operand of rematerialized instructions.
Avoid remat'ing instructions whose def have sub-register indices for now. It's just really really hard to get all the cases right.

llvm-svn: 75900
2009-07-16 09:20:10 +00:00
Bruno Cardoso Lopes
c69e9d53bb Fix coding style issues pointed by Bill.
llvm-svn: 75898
2009-07-16 06:26:41 +00:00
Devang Patel
58a041b634 Skip special LLVM prefix '1' while emitting linknage name.
This prefix is used by LLVM to inform the asm printer to not emit usual global symbol prefix before the symbol name.

llvm-svn: 75875
2009-07-16 01:01:22 +00:00
Daniel Dunbar
19efed84cc We don't need to use llvm_report_error, this interface can deal with errors
(although we don't get a very good error message).

llvm-svn: 75864
2009-07-15 23:54:01 +00:00
Owen Anderson
4483fbda5e Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst.
llvm-svn: 75863
2009-07-15 23:53:25 +00:00
Daniel Dunbar
5f443ecde8 Add missing includes.
llvm-svn: 75862
2009-07-15 23:48:37 +00:00
Jakob Stoklund Olesen
eeff2524ce Verify that there is no kill flag on tied operands on two-address instructions.
This extra check is not trigged when runnning "make check" on top-of-tree.

Change error message to better match llvm_unreachable() grammar.

Don't call llvm_unreachable() when writing error messages to a file, but keep going.

llvm-svn: 75860
2009-07-15 23:37:26 +00:00
Daniel Dunbar
4771afe104 Lift addAssemblyEmitter into LLVMTargetMachine.
- No functionality change.

llvm-svn: 75859
2009-07-15 23:34:19 +00:00
Daniel Dunbar
d85e8b6334 Lift DumpAsm / -print-emitted-asm functionality into LLVMTargetMachine.
- No intended functionality change.

llvm-svn: 75848
2009-07-15 22:33:19 +00:00
Jakob Stoklund Olesen
d6f85bc49b Fix bug in RegScavenger::scavengeRegister().
Reserved registers are not candidates for scavenging, and they were removed
from the candidate list like this:

CreateRegClassMask(RC, Candidates);
Candidates ^= ReservedRegs;

However, when there are reserved registers outside RC, this causes invalid
bits to be set in Candidates.

llvm-svn: 75847
2009-07-15 22:32:11 +00:00
Owen Anderson
13080d27c5 Move a few more convenience factory functions from Constant to LLVMContext.
llvm-svn: 75840
2009-07-15 21:51:10 +00:00
Evan Cheng
83b99bb014 ShortenDeadCopySrcLiveRange needs to be more conservative in multi-kill situations.
llvm-svn: 75838
2009-07-15 21:39:50 +00:00
Ted Kremenek
1ebb7e72fa Lexically order files in CMakeLists.txt files.
llvm-svn: 75831
2009-07-15 21:08:16 +00:00
Bruno Cardoso Lopes
7bdb20f6a2 use std::vector instead of std::list for both Section and Symbol lists because
we care more about random access than insertion/deletion of elements.

llvm-svn: 75828
2009-07-15 20:49:10 +00:00
Chris Lattner
ac3968ea1d remove printSuffixedName.
llvm-svn: 75742
2009-07-15 04:42:49 +00:00
Owen Anderson
8c85061ee6 Move EVER MORE stuff over to LLVMContext.
llvm-svn: 75703
2009-07-14 23:09:55 +00:00
David Greene
9c8a1b9b90 Have asm printers use formatted_raw_ostream directly to avoid a
dynamic_cast<>.

llvm-svn: 75670
2009-07-14 20:18:05 +00:00
Chris Lattner
6ec578688d Reapply my previous asmprinter changes now with more testing and two
additional bug fixes:

1. The bug that everyone hit was a problem in the asmprinter where it
   would remove $stub but keep the L prefix on a name when emitting the
   indirect symbol.  This is easy to fix by keeping the name of the stub
   and the name of the symbol in a StringMap instead of just keeping a
   StringSet and trying to reconstruct it late.

2. There was a problem printing the personality function.  The current
   logic to print out the personality function from the DWARF information
   is a bit of a cesspool right now that duplicates a bunch of other 
   logic in the asm printer.  The short version of it is that it depends
   on emitting both the L and _ prefix for symbols (at least on darwin)
   and until I can untangle it, it is best to switch the mangler back to
   emitting both prefixes.

llvm-svn: 75646
2009-07-14 18:17:16 +00:00
Torok Edwin
f955a6ef49 llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").

llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Daniel Dunbar
dbbc49bb29 Revert r7561{9,8,7,6}, which depend on r75610.
--- Reverse-merging r75619 into '.':
U    lib/Target/DarwinTargetAsmInfo.cpp
U    lib/CodeGen/AsmPrinter/AsmPrinter.cpp
--- Reverse-merging r75618 into '.':
U    lib/CodeGen/ELFWriter.cpp
U    lib/CodeGen/MachOCodeEmitter.cpp
U    lib/CodeGen/MachOWriter.cpp
--- Reverse-merging r75617 into '.':
U    lib/Target/CBackend/CBackend.cpp
--- Reverse-merging r75616 into '.':
U    tools/bugpoint/Miscompilation.cpp
U    tools/lto/LTOCodeGenerator.cpp
U    tools/lto/LTOModule.cpp

llvm-svn: 75638
2009-07-14 16:25:11 +00:00
Torok Edwin
a73f9bdc2c eliminate extra space.
llvm-svn: 75630
2009-07-14 12:22:58 +00:00
Chris Lattner
b6fc9c6c54 rename getValueName -> getMangledName. These two files have very
dubious looking things that I need to investigate in more detail.

llvm-svn: 75619
2009-07-14 06:21:12 +00:00
Chris Lattner
21182d9727 Rename getValueName -> getMangledName
llvm-svn: 75618
2009-07-14 06:20:20 +00:00
Chris Lattner
2a6bb9bc51 Change the internal interface to makeNameProper to take a bool that
indicates whether the label is private or not, instead of taking
prefix stuff.  One effect of this is that symbols will be generated
with *just* the private prefix, instead of both the private prefix
*and* the user-label-prefix, but this doesn't matter as long as it
is consistent.  For example we'll now get "Lfoo" instead of "L_foo".
These are just assembler temporary labels anyway, so they never even
make it into the .o file.

llvm-svn: 75607
2009-07-14 04:50:12 +00:00
Devang Patel
4992f3bed3 Do not use Mangler to remove '1' from linkage name.
llvm-svn: 75574
2009-07-14 00:55:28 +00:00
Evan Cheng
9554d9840f Fix pr4544. When remating, make sure the destination register fits the instruction definition. It may be mismatched due to sub-register coalescing.
No test case yet because the code doesn't trigger until 75408 is re-applied.

llvm-svn: 75572
2009-07-14 00:51:06 +00:00
Evan Cheng
7c051b0c6f Revert an accidental commit.
llvm-svn: 75553
2009-07-13 23:44:01 +00:00
Devang Patel
8af4ed78a9 Use assertion.
llvm-svn: 75540
2009-07-13 22:46:19 +00:00
Bruno Cardoso Lopes
046ddf7ca0 Cleanup the global emission and refactor some code
llvm-svn: 75537
2009-07-13 22:40:39 +00:00
Dan Gohman
9a7df22e10 Move isLCSSAForm, isLoopInvariant, getCanonicalInductionVariable,
and related functions out of LoopBase and into Loop, since they
are specific to BasicBlock-based loops. This also allows the code
to be moved out-of-line.

llvm-svn: 75523
2009-07-13 22:02:44 +00:00
Dan Gohman
f6caa6f1e3 Make Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,
using the Curiously Recurring Template Pattern with LoopBase.

This will help further refactoring, and future functionality for
Loop. Also, Headers can now foward-declare Loop, instead of pulling
in LoopInfo.h or doing tricks.

llvm-svn: 75519
2009-07-13 21:51:15 +00:00
Devang Patel
af27c5b2bd Use AsmPrinter's Mangler to remove leading '1' from linkage names.
llvm-svn: 75515
2009-07-13 21:48:26 +00:00
Owen Anderson
7b2ee7dc21 As Chris pointed out, this doesn't actually need an LLVMContext to operate.
llvm-svn: 75508
2009-07-13 21:27:19 +00:00
Devang Patel
f1387bc427 revert rev. 75503 for now.
llvm-svn: 75507
2009-07-13 21:26:33 +00:00
Devang Patel
ca075d2f7a Use Mangler to remove leading '1' from linkage names.
llvm-svn: 75503
2009-07-13 21:19:56 +00:00
David Greene
814f6a648f Add infrastructure to allow post instruction printing action triggers.
We'll eventually use this to print comments in asm files and do other
fun things.

This adds interfaces to the AsmPrinter and changes TableGen to invoke
the postInstructionAction when appropriate.  It also add parameters to
TargetAsmInfo to control comment layout.

llvm-svn: 75490
2009-07-13 20:25:48 +00:00
Daniel Dunbar
060ce73124 Match declaration to definition (missed a few).
llvm-svn: 75456
2009-07-13 06:04:06 +00:00
Daniel Dunbar
cf2cfb50d3 Match declaration to definition.
llvm-svn: 75454
2009-07-13 06:00:13 +00:00
Lang Hames
c1b01a178f Removed some junk code that snuck in to an earlier commit.
llvm-svn: 75450
2009-07-13 05:01:19 +00:00
Owen Anderson
393d8b0a0c Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.

llvm-svn: 75445
2009-07-13 04:09:18 +00:00
Daniel Dunbar
c6592df02d Match declaration to definition.
llvm-svn: 75440
2009-07-12 23:50:34 +00:00
Chris Lattner
d3eba0efb8 remove llvm.part.set.* and llvm.part.select.*. They have never been
implemented in codegen, have no frontend to generate them, and are 
better implemented with pattern matching (like the ppc backend does
to generate rlwimi/rlwinm etc).

PR4543

llvm-svn: 75430
2009-07-12 21:08:53 +00:00
Torok Edwin
67153904ec Fix assert(0) conversion, as suggested by Chris.
llvm-svn: 75423
2009-07-12 20:07:01 +00:00
Jakob Stoklund Olesen
8511b1d5ad Implement support for promotion of AND/OR/XOR on integer types.
The blackfin processor has a legal i16 type, but only logic operations on i32.

llvm-svn: 75419
2009-07-12 18:10:18 +00:00
Jakob Stoklund Olesen
2792392244 Fix types in PromoteNode handling of CTPOP and friends.
llvm-svn: 75418
2009-07-12 17:43:20 +00:00
Torok Edwin
ae8a3ff177 assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.

llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Torok Edwin
9b41a5faf2 Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
and abort()/exit() -> llvm_report_error().

llvm-svn: 75363
2009-07-11 13:10:19 +00:00