1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-27 05:53:07 +01:00
Commit Graph

29737 Commits

Author SHA1 Message Date
Bill Wendling
289ab30051 Moved the MachOWriter and ELFWriter out of the Target/* files. Placed the
definition of it into the CodeGen library. This is so that a backend doesn't
necessarily add in these writers if it doesn't use them (like in the lli
program).

llvm-svn: 34034
2007-02-08 01:39:44 +00:00
Bill Wendling
1620ef9a95 Added new method to add a "simple" code emitter. That is, to only add
the code emitter and not set variables.

llvm-svn: 34033
2007-02-08 01:38:33 +00:00
Bill Wendling
ccf772cc6b Split the addPassesToEmitFile method up into two. This is so that we can
do some common stuff, then on our own add an object file writer (by calling
a concrete function), and then do some finishing stuff, if need be.

llvm-svn: 34032
2007-02-08 01:36:53 +00:00
Bill Wendling
55a2facbf9 Add function to create a file writer.
llvm-svn: 34031
2007-02-08 01:35:27 +00:00
Bill Wendling
d5788e1f87 Added new method to finish up the addition of passes to emit files. This
allows us to split that method into two so that we can optionally call a
concrete function to add a writer. Removed moribund addObjectWriter()
method.

llvm-svn: 34030
2007-02-08 01:34:45 +00:00
Bill Wendling
abb65b1d4d Dead files. Functionality has been taken over by the Add*Writer functions.
llvm-svn: 34029
2007-02-08 01:32:51 +00:00
Bill Wendling
9fb358c70f Declarations for functions that create different file writers.
llvm-svn: 34028
2007-02-08 01:31:38 +00:00
Bill Wendling
48653bfaa4 Moved from include/llvm/CodeGen to lib/CodeGen.
llvm-svn: 34027
2007-02-08 01:30:50 +00:00
Reid Spencer
6e19d7114f For PR1188:
Compute BitMask correctly.

Patch by Leo (wenwenti@hotmail.com).

llvm-svn: 34026
2007-02-08 00:29:31 +00:00
Reid Spencer
808eee2513 Regenerate for recent changes.
llvm-svn: 34025
2007-02-08 00:21:40 +00:00
Reid Spencer
ff9598b8f0 For PR1187:
When a naming conflict arises, allow internal linkage functions to be
renamed without warning or error.

llvm-svn: 34024
2007-02-08 00:21:06 +00:00
Reid Spencer
14c07da285 For PR1187:
Allow @ before identifer names. Recognize the i1, i8, i16, i32, i64 keywords
as type names corresponding to bool, ubyte, ushort, uint, and ulong
respectively. While these aren't LLVM 1.9 constructs, permitting the syntax
allows post-1.9 assembly files to be upgraded.

llvm-svn: 34023
2007-02-08 00:19:40 +00:00
Chris Lattner
3cac8eac4e move archive-specific stuff out of bcreader into archive library.
llvm-svn: 34022
2007-02-07 23:53:17 +00:00
Chris Lattner
1c17d65878 move an llvmc-specific function out of the bcreader into llvmc.
llvm-svn: 34021
2007-02-07 23:48:32 +00:00
Chris Lattner
c5f3b3b01b move AnalyzeBytecodeFile out of ReaderWrappers.cpp into Analyzer.cpp. Now
lli doesn't link in Analyzer.cpp.

llvm-svn: 34020
2007-02-07 23:46:55 +00:00
Reid Spencer
dfdeabe65b For PR1187:
Add a test to ensure that i1, i8, i16, i32 and i64 are recognized by the
lexer and vars using them will be renamed appropriately.

llvm-svn: 34019
2007-02-07 23:45:51 +00:00
Reid Spencer
0fb1efdece For PR1187:
Add a test case to test rename of internal linkage functions with the same
name, without an error or warning.

llvm-svn: 34018
2007-02-07 23:41:10 +00:00
Chris Lattner
cc1239500e new testcase for nested functions
llvm-svn: 34017
2007-02-07 23:28:08 +00:00
Andrew Lenharth
9e5f0274d8 This really only affects pointers in high memory, and only llvm 1.9, but make a regression for it anyway
llvm-svn: 34014
2007-02-07 22:23:47 +00:00
Evan Cheng
dc15bc54a4 isLowRegister() expects input is a physical register.
llvm-svn: 34013
2007-02-07 21:44:33 +00:00
Chris Lattner
43d0b955a3 push bytecode decompressor out through APIs. Now the bytecode reader
api's look like this:

ModuleProvider *getBytecodeModuleProvider(
  const std::string &Filename,  ///< Name of file to be read
  BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer,
  std::string* ErrMsg = 0,      ///< Optional error message holder
  BytecodeHandler* H = 0        ///< Optional handler for reader events
);

This is ugly, but allows a client to say:

  getBytecodeModuleProvider("foo", 0);

If they do this, there is no dependency on the compression libraries, saving
codesize.

llvm-svn: 34012
2007-02-07 21:41:02 +00:00
Evan Cheng
03ffd4a6d5 Rename.
llvm-svn: 34011
2007-02-07 21:24:09 +00:00
Evan Cheng
2bbe03a4df If sp offset will be materialized in a register. Clear the offset field of str / ldr.
llvm-svn: 34010
2007-02-07 21:19:58 +00:00
Evan Cheng
fe7242e9bb Get rid of references to iostream.
llvm-svn: 34009
2007-02-07 21:18:32 +00:00
Jim Laskey
c27aed3dc0 Automatically generating intrinsic declarations from Dan Gohman. Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.

llvm-svn: 34008
2007-02-07 20:38:26 +00:00
Chris Lattner
ad6f4d102f Move compressor out of the core Reader.cpp file.
llvm-svn: 34007
2007-02-07 19:49:01 +00:00
Devang Patel
a667307d74 Do not drop transferred last uses on the floor.
Use handleLastUserOverflow().

llvm-svn: 34006
2007-02-07 19:37:53 +00:00
Chris Lattner
12663c4a66 Fix Transforms/DeadArgElim/2007-02-07-FuncRename.ll, fallout from PR411.
This happened because deadargelim now causes VMCore to auto-rename every
function that it hacks arguments out of.  Because it hacks arguments out of
functions in a non-deterministic order, this caused the resultant numbering
to be nondet.  The fix is to just be careful to not rename functions!

llvm-svn: 34005
2007-02-07 19:31:33 +00:00
Chris Lattner
1c153a1e17 Testcase for a bug responsible for GCC bootstrap failure, fallout from PR411.
llvm-svn: 34004
2007-02-07 19:28:52 +00:00
Reid Spencer
9eb0b8c719 Make the cleaning of BUILT_SOURCES be a "clean-all" target item, not a
"clean" target item. This gets around having the built sources disappear
when only one build mode wants to be cleaned. With the "clean-all" target,
all build modes are cleaned so it also makes sense to clean out the built
sources at that point.

llvm-svn: 34003
2007-02-07 19:13:19 +00:00
Lauro Ramos Venancio
30734ef2e7 Fix build error.
include/llvm/ADT/APInt.h:326: error: ‘assert’ was not declared in this scope

llvm-svn: 34002
2007-02-07 16:59:17 +00:00
Evan Cheng
5f5823c641 New test case.
llvm-svn: 34001
2007-02-07 09:24:03 +00:00
Evan Cheng
808cf2b6a1 New entry.
llvm-svn: 34000
2007-02-07 09:22:15 +00:00
Evan Cheng
d5921e8a32 In thumb mode, R3 is reserved, but it can be live in to the function. If
that is the case, whenever we use it as a scratch register, save it to R12
first and then restore it after the use.
This is a temporary and truly horrible workaround!

llvm-svn: 33999
2007-02-07 09:17:36 +00:00
Evan Cheng
8f5c613d03 Update
llvm-svn: 33998
2007-02-07 08:37:57 +00:00
Evan Cheng
efeb81a8c4 - If fp (r7) is used to reference stack objects, use [r, r] address mode.
- If there is a dynamic alloca, in the epilogue, restore the value of sp
  using r7 - offset.
- Other bug fixes.

llvm-svn: 33997
2007-02-07 08:37:31 +00:00
Chris Lattner
76db8d5593 remove dead ivars.
llvm-svn: 33996
2007-02-07 07:33:02 +00:00
Chris Lattner
c363dcf19e remove dead ivars, thanks to Reid for noticing this!
llvm-svn: 33995
2007-02-07 07:19:19 +00:00
Chris Lattner
36c2f9ea6d remove the handleVBR32/handleVBR64 callbacks. They are very fine-grained.
llvm-svn: 33994
2007-02-07 06:53:02 +00:00
Chris Lattner
940f9c8549 constants can't be in the symtab anymore
llvm-svn: 33993
2007-02-07 06:28:48 +00:00
Chris Lattner
3cbaee07ce update comment.
llvm-svn: 33992
2007-02-07 06:25:36 +00:00
Chris Lattner
6202b0e796 remove some obsolete SymbolTable methods. These docs need to be updated
now that PR411 landed

llvm-svn: 33991
2007-02-07 06:24:17 +00:00
Chris Lattner
22fc4be632 shrink vmcore by moving symbol table stripping support out of VMCore into
the one IPO pass that uses it.

llvm-svn: 33990
2007-02-07 06:22:45 +00:00
Zhou Sheng
9495a1a5c7 As Chris suggested, fixed some problems. (This is the first part)
llvm-svn: 33989
2007-02-07 06:14:53 +00:00
Chris Lattner
a1455127ae eliminate ValueSymbolTable::rename, it has no advantage over using remove+insert.
Make insert/remove assert if used incorrectly instead of returning a bool.

llvm-svn: 33988
2007-02-07 06:13:49 +00:00
Chris Lattner
a78272e94d Make SymbolTable::insert, SymbolTable::remove and SymbolTable::rename private.
llvm-svn: 33987
2007-02-07 06:06:24 +00:00
Zhou Sheng
7881ec420f As Chris suggested, fixed some problems. (This is the first part.)
llvm-svn: 33986
2007-02-07 05:58:38 +00:00
Chris Lattner
c46811575d speed up conflict handling.
llvm-svn: 33985
2007-02-07 05:52:51 +00:00
Nate Begeman
fe7a46c1e1 Fix a fixme by correctly calculating preferred alignments for functions,
based on the alignment of the symbol and the target data's preferred align
for that type.

Also, rename some arguments for consistency.

llvm-svn: 33984
2007-02-07 05:47:16 +00:00
Chris Lattner
bdde131dac Eliminate the O(n) version of TypeSymbolTable::remove, it is dead. When
inserting a type into the type symbol table, only compute unique name if not
in symtab already.

llvm-svn: 33983
2007-02-07 05:35:58 +00:00