Commit Graph

29911 Commits

Author SHA1 Message Date
Chris Lattner
12f0c7b9cf new testcase for nested functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34017 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 23:28:08 +00:00
Andrew Lenharth
7914f46db1 This really only affects pointers in high memory, and only llvm 1.9, but make a regression for it anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34014 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 22:23:47 +00:00
Evan Cheng
bd8251a9a6 isLowRegister() expects input is a physical register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34013 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:44:33 +00:00
Chris Lattner
f2e292ce58 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34012 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:41:02 +00:00
Evan Cheng
403e4a4725 Rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34011 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:24:09 +00:00
Evan Cheng
5ebd10e5ac If sp offset will be materialized in a register. Clear the offset field of str / ldr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34010 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:19:58 +00:00
Evan Cheng
8fdbe560a0 Get rid of references to iostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34009 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:18:32 +00:00
Jim Laskey
95af592a63 Automatically generating intrinsic declarations from Dan Gohman. Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 20:38:26 +00:00
Chris Lattner
0d3382ac92 Move compressor out of the core Reader.cpp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34007 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 19:49:01 +00:00
Devang Patel
f5e28d9dfe Do not drop transferred last uses on the floor.
Use handleLastUserOverflow().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34006 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 19:37:53 +00:00
Chris Lattner
3cfc1d22b2 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34005 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 19:31:33 +00:00
Chris Lattner
566dd149ae Testcase for a bug responsible for GCC bootstrap failure, fallout from PR411.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34004 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 19:28:52 +00:00
Reid Spencer
9bb399cf08 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34003 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 19:13:19 +00:00
Lauro Ramos Venancio
58a0d64fae Fix build error.
include/llvm/ADT/APInt.h:326: error: ‘assert’ was not declared in this scope


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34002 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 16:59:17 +00:00
Evan Cheng
02f178fb88 New test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34001 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 09:24:03 +00:00
Evan Cheng
2ef02a220e New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34000 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 09:22:15 +00:00
Evan Cheng
8bed6c968f 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33999 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 09:17:36 +00:00
Evan Cheng
1f253d6e97 Update
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33998 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 08:37:57 +00:00
Evan Cheng
7142f8755a - 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33997 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 08:37:31 +00:00
Chris Lattner
e14639ac3d remove dead ivars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33996 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 07:33:02 +00:00
Chris Lattner
4f9ff5a85c remove dead ivars, thanks to Reid for noticing this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33995 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 07:19:19 +00:00
Chris Lattner
7b6040b417 remove the handleVBR32/handleVBR64 callbacks. They are very fine-grained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:53:02 +00:00
Chris Lattner
92f5b6a784 constants can't be in the symtab anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33993 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:28:48 +00:00
Chris Lattner
b4d8d62345 update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33992 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:25:36 +00:00
Chris Lattner
e6a7a8585e remove some obsolete SymbolTable methods. These docs need to be updated
now that PR411 landed


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33991 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:24:17 +00:00
Chris Lattner
7f1444bc0a shrink vmcore by moving symbol table stripping support out of VMCore into
the one IPO pass that uses it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33990 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:22:45 +00:00
Zhou Sheng
a3832fd46a As Chris suggested, fixed some problems. (This is the first part)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33989 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:14:53 +00:00
Chris Lattner
56920a0ecc eliminate ValueSymbolTable::rename, it has no advantage over using remove+insert.
Make insert/remove assert if used incorrectly instead of returning a bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33988 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:13:49 +00:00
Chris Lattner
1e348549d9 Make SymbolTable::insert, SymbolTable::remove and SymbolTable::rename private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33987 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 06:06:24 +00:00
Zhou Sheng
f29a09d627 As Chris suggested, fixed some problems. (This is the first part.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:58:38 +00:00
Chris Lattner
421d3daa05 speed up conflict handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33985 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:52:51 +00:00
Nate Begeman
c2b2d6a7c9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33984 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:47:16 +00:00
Chris Lattner
58f84d4b2d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33983 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:35:58 +00:00
Chris Lattner
67408dab1b TypeSymbolTable::rename is dead, remove it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33982 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:29:34 +00:00
Chris Lattner
f5111552c2 Eliminate a bunch of work from ValueSymbolTable::insert for the common case
where a symbol name doesn't conflict.  This speeds up bc reading 16% on 176.gcc!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33981 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:22:49 +00:00
Chris Lattner
670ccfe6a4 parse constantexpr arguments into a smallvector: 1.5% speedup reading 176.gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33980 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:15:28 +00:00
Chris Lattner
1b1c95c9bf eliminate std::vector's from the bchandler interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33979 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:09:50 +00:00
Chris Lattner
63cf59ed3f Eliminate std::vectors from the bcanalyzer interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33978 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:08:39 +00:00
Chris Lattner
4d544cd646 add an option for timing bc file reading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33977 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 04:39:35 +00:00
Reid Spencer
91140e9633 Remove a spurious ;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33976 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 03:29:29 +00:00
Evan Cheng
a01faf4a7a eliminateFrameIndex() is even more complicated if frame ptr is used instead of SP when there are dynamic alloca's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33975 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 02:44:23 +00:00
Chris Lattner
dfb22c3521 redesign the primary datastructure used by mem2reg to eliminate an
std::map of std::vector's (ouch!).  This speeds up mem2reg by 10% on 176.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33974 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 01:15:04 +00:00
Chris Lattner
e237cf934f do not let the table fill up with tombstones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33973 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 01:11:25 +00:00
Chris Lattner
04a3115e61 Fix a really subtle bug where the entire hash table could fill with
tombstones, causing subsequent insertions to infinitely loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33972 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 00:55:59 +00:00
Evan Cheng
8e59ea998f Spill / restore should avoid modifying the condition register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33971 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 00:06:56 +00:00
Chris Lattner
c67da0cf13 Two fixes:
1. Memset takes an i32 for the value to set, not i8.  This was causing GCC to
   ICE all over the place (PR1183).
2. memcpy/memmove were not properly zext/trunc'ing the size in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33970 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 19:06:38 +00:00
Reid Spencer
9b4422629a Document the LINK_COMPONENTS and NO_INSTALL variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33969 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 19:00:40 +00:00
Reid Spencer
a2a31bf3b2 Implement the NO_INSTALL feature. Setting this variable to any value in
a directory's Makefile will prevent the build products from that directory
from being installed. This is useful for tools and libraries that are
only useful as part of the build process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33968 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:53:14 +00:00
Reid Spencer
c9c1787907 Set the new NO_INSTALL flag for build-only tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33967 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:51:28 +00:00
Jim Laskey
95d97b90e8 Error check and eliminate unnecessary value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33966 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 18:30:58 +00:00