Chris Lattner
12002936aa
ModuleContainsAllFunctionConstants is always true
...
llvm-svn: 34120
2007-02-10 04:36:10 +00:00
Chris Lattner
c7627ca239
only one client of getOrCreateSlot can pass a void typed value. Check type
...
there.
llvm-svn: 34119
2007-02-10 04:31:52 +00:00
Chris Lattner
3a28413d38
inline hasNullValue, rename some variables, simplify some code.
...
llvm-svn: 34118
2007-02-10 04:29:03 +00:00
Chris Lattner
0d549b217b
merge insertValue into its single caller, eliminate some redundant checks.
...
llvm-svn: 34117
2007-02-10 04:25:02 +00:00
Chris Lattner
90a8f472da
merge doInsertValue into insertValue
...
llvm-svn: 34116
2007-02-10 04:22:30 +00:00
Chris Lattner
dcb209ac9c
insertvalue's second operand is always false
...
llvm-svn: 34115
2007-02-10 04:19:31 +00:00
Chris Lattner
ee030194f9
remove dead 'dontIgnore' flag for insertType
...
llvm-svn: 34114
2007-02-10 04:17:41 +00:00
Chris Lattner
35e18b0d05
rename getSlot -> getSlotType and getOrCreateSlot ->getOrCreateTypeSlot
...
for types.
llvm-svn: 34113
2007-02-10 04:15:40 +00:00
Evan Cheng
276b44b0f9
Add function live-ins to entry block live-in set.
...
llvm-svn: 34112
2007-02-10 02:43:39 +00:00
Evan Cheng
bcf1d7faef
Add live-ins to MachineBasicBlock.
...
llvm-svn: 34111
2007-02-10 02:38:19 +00:00
Evan Cheng
de6083463d
Rename some variables to avoid confusion with SelectionDAGISel::BB.
...
llvm-svn: 34110
2007-02-10 01:08:18 +00:00
Evan Cheng
540f5e0d41
These vectors are frequently large. Use std::vector instead.
...
llvm-svn: 34109
2007-02-09 23:59:14 +00:00
Chris Lattner
d2e8e55ae0
Fix clients like this:
...
delete ParseBytecodeFile(InputFilename, 0, &ErrorMessage);
llvm_shutdown();
delete ParseBytecodeFile(InputFilename, 0, &ErrorMessage);
The primitive type objects failed to ressurect themselves after shutdown, leading
to crashes in clients that used them after llvm_shutdown().
This solution isn't wonderful, because we clearly have static ctors. However,
the code it replaces was just as bad, so it's not a regression.
llvm-svn: 34106
2007-02-09 22:24:04 +00:00
Evan Cheng
8b7700f146
Add reference counting to constantpool entries. Delete the unused ones.
...
llvm-svn: 34105
2007-02-09 20:54:44 +00:00
Reid Spencer
5808739fac
Use int32_t and uint32_t to hopefully help weak compilers (cygwin) not
...
generate errors about being unable to resolve overloaded type.
llvm-svn: 34103
2007-02-09 18:03:35 +00:00
Chris Lattner
c9088b4c8e
add a note
...
llvm-svn: 34101
2007-02-09 17:38:01 +00:00
Reid Spencer
ca444882bd
Make SlotCalculator::getPlane an inline function. It is used inside loops.
...
llvm-svn: 34091
2007-02-09 15:25:50 +00:00
Chris Lattner
02be9919ab
remove unneeded #includes
...
llvm-svn: 34086
2007-02-09 07:54:13 +00:00
Chris Lattner
b3905c70c4
remove dead code, the outputConstants function is now only called at module scope.
...
llvm-svn: 34085
2007-02-09 07:53:20 +00:00
Chris Lattner
fc30d1bb69
1. constants can never occur in the symbol table.
...
2. All function-level constants are now incorporated into the module-level
constant pool, since the compaction table was removed. Eliminate extra
work to check for them.
This speeds up the bcwriter from 24.4s to 13.1s on 447.dealII and .73 -> .56s
on kc++ in a release build.
llvm-svn: 34084
2007-02-09 07:51:47 +00:00
Zhou Sheng
e93db8fba2
Eliminates friend function declaration inside APInt, instead, adds public
...
methods as those global function's internal implementation.
llvm-svn: 34083
2007-02-09 07:48:24 +00:00
Nate Begeman
ba52b94fa2
Remove fixed item
...
llvm-svn: 34081
2007-02-09 04:19:54 +00:00
Evan Cheng
f76bb63555
This is done.
...
llvm-svn: 34072
2007-02-08 23:53:38 +00:00
Evan Cheng
93049457ee
Make use of TLI.SimplifySetCC() in LegalizeSetCCOperands().
...
llvm-svn: 34066
2007-02-08 22:16:19 +00:00
Evan Cheng
92658d5648
Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.
...
llvm-svn: 34065
2007-02-08 22:13:59 +00:00
Chris Lattner
751a42010b
Rename CStringMap -> StringMap, since it now supports nul characters in the
...
strings.
llvm-svn: 34064
2007-02-08 19:20:57 +00:00
Chris Lattner
259ba20bd8
Allow cstringmap to contain strings with nul characters in them.
...
llvm-svn: 34062
2007-02-08 19:08:37 +00:00
Andrew Lenharth
9a4a1515ee
return addresses, those I already have
...
llvm-svn: 34056
2007-02-08 17:37:41 +00:00
Zhou Sheng
11eea86410
Switched this file on accidently.
...
llvm-svn: 34054
2007-02-08 16:45:48 +00:00
Zhou Sheng
fbf61eaba7
As Chris and Reid suggested, remove "isSigned" field from APInt, instead,
...
add some signed/unsigned arithmetic operation functions into APInt.h to
handle the signed/unsigned issue. These functions will be defined inside a
namespace "APIntOps" which is inside llvm namespace.
llvm-svn: 34053
2007-02-08 14:35:19 +00:00
Bill Wendling
e796b6de45
Fixed comments.
...
llvm-svn: 34040
2007-02-08 06:05:08 +00:00
Evan Cheng
6ad6fdb70b
Fixed a long standing spiller bug that's exposed by Thumb:
...
The code sequence before the spiller is something like:
= tMOVrr
%reg1117 = tMOVrr
%reg1078 = tLSLri %reg1117, 2
The it starts spilling:
%r0 = tRestore <fi#5>, 0
%r1 = tRestore <fi#7>, 0
%r1 = tMOVrr %r1<kill>
tSpill %r1, <fi#5>, 0
%reg1078 = tLSLri %reg1117, 2
It restores the value while processing the first tMOVrr. At this point, the
spiller remembers fi#5 is available in %r0. Next it processes the second move.
It restores the source before the move and spills the result afterwards. The
move becomes a noop and is deleted. However, a spill has been inserted and that
should invalidate reuse of %r0 for fi#5 and add reuse of %r1 for fi#5.
Therefore, %reg1117 (which is also assigned fi#5) should get %r1, not %r0.
llvm-svn: 34039
2007-02-08 06:04:54 +00:00
Bill Wendling
2aa9a42f24
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
59889ae93f
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
523048ecde
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
3c4d37a531
Add function to create a file writer.
...
llvm-svn: 34031
2007-02-08 01:35:27 +00:00
Bill Wendling
4e8ad36338
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
860ce1b82e
Moved from include/llvm/CodeGen to lib/CodeGen.
...
llvm-svn: 34027
2007-02-08 01:30:50 +00:00
Reid Spencer
0690d442ab
For PR1188:
...
Compute BitMask correctly.
Patch by Leo (wenwenti@hotmail.com ).
llvm-svn: 34026
2007-02-08 00:29:31 +00:00
Chris Lattner
ddfead20e8
move archive-specific stuff out of bcreader into archive library.
...
llvm-svn: 34022
2007-02-07 23:53:17 +00:00
Chris Lattner
d220dc1426
move an llvmc-specific function out of the bcreader into llvmc.
...
llvm-svn: 34021
2007-02-07 23:48:32 +00:00
Chris Lattner
daba41cfb9
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
Evan Cheng
2ff4c973b1
isLowRegister() expects input is a physical register.
...
llvm-svn: 34013
2007-02-07 21:44:33 +00:00
Chris Lattner
a0e49f2ead
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
cca9b1d768
Rename.
...
llvm-svn: 34011
2007-02-07 21:24:09 +00:00
Evan Cheng
ec4c67f0a7
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
62aef236de
Get rid of references to iostream.
...
llvm-svn: 34009
2007-02-07 21:18:32 +00:00
Jim Laskey
2682ea616f
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
41f5c64ae1
Move compressor out of the core Reader.cpp file.
...
llvm-svn: 34007
2007-02-07 19:49:01 +00:00
Devang Patel
4d06ace0ef
Do not drop transferred last uses on the floor.
...
Use handleLastUserOverflow().
llvm-svn: 34006
2007-02-07 19:37:53 +00:00
Chris Lattner
bf6286ba04
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
Evan Cheng
b216ea1aa6
New entry.
...
llvm-svn: 34000
2007-02-07 09:22:15 +00:00
Evan Cheng
78c5a9422d
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
2ff0d3a2ab
Update
...
llvm-svn: 33998
2007-02-07 08:37:57 +00:00
Evan Cheng
b5519b5361
- 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
88350ff02f
remove dead ivars, thanks to Reid for noticing this!
...
llvm-svn: 33995
2007-02-07 07:19:19 +00:00
Chris Lattner
bbe7d71039
remove the handleVBR32/handleVBR64 callbacks. They are very fine-grained.
...
llvm-svn: 33994
2007-02-07 06:53:02 +00:00
Chris Lattner
86fc08145b
constants can't be in the symtab anymore
...
llvm-svn: 33993
2007-02-07 06:28:48 +00:00
Chris Lattner
d17dbe9dcd
update comment.
...
llvm-svn: 33992
2007-02-07 06:25:36 +00:00
Chris Lattner
88051b0fad
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
3e8022d61d
As Chris suggested, fixed some problems. (This is the first part)
...
llvm-svn: 33989
2007-02-07 06:14:53 +00:00
Chris Lattner
f5df4859cd
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
71a60ba41c
speed up conflict handling.
...
llvm-svn: 33985
2007-02-07 05:52:51 +00:00
Nate Begeman
3cc886add8
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
c8d5207b85
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
Chris Lattner
afd6f2f463
TypeSymbolTable::rename is dead, remove it
...
llvm-svn: 33982
2007-02-07 05:29:34 +00:00
Chris Lattner
770dadf308
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!
llvm-svn: 33981
2007-02-07 05:22:49 +00:00
Chris Lattner
6236b473ef
parse constantexpr arguments into a smallvector: 1.5% speedup reading 176.gcc
...
llvm-svn: 33980
2007-02-07 05:15:28 +00:00
Chris Lattner
5e72c74d5e
Eliminate std::vectors from the bcanalyzer interface.
...
llvm-svn: 33978
2007-02-07 05:08:39 +00:00
Evan Cheng
12cf8ddaea
eliminateFrameIndex() is even more complicated if frame ptr is used instead of SP when there are dynamic alloca's.
...
llvm-svn: 33975
2007-02-07 02:44:23 +00:00
Chris Lattner
430c9217f0
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.
llvm-svn: 33974
2007-02-07 01:15:04 +00:00
Chris Lattner
e346767f06
do not let the table fill up with tombstones.
...
llvm-svn: 33973
2007-02-07 01:11:25 +00:00
Evan Cheng
ec13f826a2
Spill / restore should avoid modifying the condition register.
...
llvm-svn: 33971
2007-02-07 00:06:56 +00:00
Chris Lattner
dc0a9a7b4a
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.
llvm-svn: 33970
2007-02-06 19:06:38 +00:00
Jim Laskey
5aed30d5cf
Support var arg intrinsics.
...
llvm-svn: 33962
2007-02-06 18:02:54 +00:00
Evan Cheng
a974031ebd
Select add FI, c correctly.
...
llvm-svn: 33960
2007-02-06 09:11:20 +00:00
Evan Cheng
ea3308aef0
foldMemoryOperand() cannot fold tMOVrr sp into load / store in thumb mode. tLDRspi / tSTRspi cannot target / store high registers.
...
llvm-svn: 33958
2007-02-06 06:13:29 +00:00
Chris Lattner
1b4b054cba
Fix PR1181 and CodeGen/CBackend/2007-02-05-memset.ll
...
llvm-svn: 33957
2007-02-06 06:07:51 +00:00
Zhou Sheng
94b623aad4
As Reid suggested, fixed some problems.
...
llvm-svn: 33955
2007-02-06 06:04:53 +00:00
Chris Lattner
28cbd1d624
Disable this for now.
...
llvm-svn: 33953
2007-02-06 05:38:37 +00:00
Zhou Sheng
dac63788ab
Add a class APInt to represent arbitrary precision constant integral values.
...
It is a functional replacement for common case integer type like "unsigned",
"uint64_t", but also allows non-byte-width integer type and large integer
value types such as 3-bits, 15-bits, or more than 64-bits of precision. For
more details, see pr1043.
llvm-svn: 33951
2007-02-06 03:00:16 +00:00
Chris Lattner
e62c89a9f5
Fix Transforms/ConstProp/2007-02-05-BitCast.ll
...
llvm-svn: 33948
2007-02-06 02:22:56 +00:00
Chris Lattner
89e66e0c26
Oops, swap this. This fixes a regression I introduced in the ARM backend.
...
llvm-svn: 33946
2007-02-06 01:56:31 +00:00
Evan Cheng
2fc792f86b
eliminateFrameIndex() bug when frame pointer is used as base register.
...
llvm-svn: 33945
2007-02-06 00:23:31 +00:00
Evan Cheng
650d0672f7
- Store val, [sp, c] must be selected to tSTRsp.
...
- If c does not fit in the offset field, materialize sp + c into a register
using tADDhirr.
llvm-svn: 33944
2007-02-06 00:22:06 +00:00
Reid Spencer
92b50800f6
Although targets are not required to support integers > 64bits, TargetData
...
must in order for backends that do want to support large integer types to be
able to function. Consequently, don't assert if the bitwidth > 64 bits
when computing the size and alignment. Instead, compute the size by rounding
up to the next even number of bytes for the size. Compute the alignment
as the same as the LongABIAlignment. These provide reasonable defaults
that the target can override.
llvm-svn: 33943
2007-02-05 23:51:43 +00:00
Reid Spencer
d7a00d7414
A value of 64 or fewer bits is valid if the ConstantInt has more then 64 bits.
...
llvm-svn: 33942
2007-02-05 23:47:56 +00:00
Reid Spencer
f75727ab14
Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduce
...
LLVM's footprint and speed up linking.
llvm-svn: 33941
2007-02-05 23:42:17 +00:00
Chris Lattner
c85e79f3e0
With the last change, we no longer need both directions of mapping from
...
BBNumbers. Instead of using a bi-directional mapping, just use a single
densemap. This speeds up mem2reg on 176.gcc by 8%, from 1.3489 to
1.2485s.
llvm-svn: 33940
2007-02-05 23:37:20 +00:00
Reid Spencer
557ab15e71
Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
...
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.
llvm-svn: 33939
2007-02-05 23:32:05 +00:00
Chris Lattner
52da61fb5c
Simplify use of DFBlocks, this makes no noticable performance difference,
...
but paves the way to eliminate BBNumbers.
llvm-svn: 33938
2007-02-05 23:31:26 +00:00
Reid Spencer
193abd95c9
This file should have been removed when -raise was removed. It isn't
...
used any more.
llvm-svn: 33937
2007-02-05 23:27:02 +00:00
Chris Lattner
bf67b1229b
Switch InsertedPHINodes back to SmallPtrSet now that the SmallPtrSet::erase
...
bug is fixed.
llvm-svn: 33932
2007-02-05 23:11:37 +00:00
Chris Lattner
92c5d1185f
Fix a bug in smallptrset::erase: in the small case, return true if the
...
element was in the set.
llvm-svn: 33931
2007-02-05 23:10:31 +00:00
Chris Lattner
606dde0093
switch a SmallPtrSet back to an std::set for now, this caused problems.
...
llvm-svn: 33930
2007-02-05 22:28:52 +00:00
Chris Lattner
1ed84bbd2d
switch an std::set over to a SmallPtrSet, speeding up mem2reg 6% on 176.gcc.
...
llvm-svn: 33929
2007-02-05 22:15:21 +00:00
Chris Lattner
70fbb9de4c
switch an std::set over to SmallPtrSet, speeding up mem2reg 3.4% on 176.gcc.
...
llvm-svn: 33928
2007-02-05 22:13:11 +00:00
Chris Lattner
8fbc888d91
eliminate some malloc traffic, this speeds up mem2reg by 3.4%.
...
llvm-svn: 33927
2007-02-05 21:58:48 +00:00
Reid Spencer
ca3bf1ad85
Add missing and needed #include.
...
llvm-svn: 33926
2007-02-05 21:47:39 +00:00
Reid Spencer
35a0718d82
Make the class VISIBILITY_HIDDEN.
...
Reduce lexical size of the anonymous namespace.
llvm-svn: 33925
2007-02-05 21:45:12 +00:00
Chris Lattner
a9428c4f9d
Fix PR1178
...
llvm-svn: 33924
2007-02-05 21:23:52 +00:00
Reid Spencer
1241d6d5ab
For PR411:
...
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)
llvm-svn: 33922
2007-02-05 21:19:13 +00:00
Reid Spencer
3aaaa0b2bd
For PR411:
...
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.
llvm-svn: 33918
2007-02-05 20:47:22 +00:00
Reid Spencer
e84cf92141
For PR411:
...
This pass is no longer needed.
llvm-svn: 33917
2007-02-05 20:41:05 +00:00
Reid Spencer
ba09a3e5f0
Create a pass to strip dead function declarations (prototypes). This is
...
for use by llvm-extract and bugpoint.
llvm-svn: 33916
2007-02-05 20:24:25 +00:00
Devang Patel
3f806969ed
Fix PR1158
...
Do not insert Analysis pass, if it is already available.
llvm-svn: 33915
2007-02-05 19:34:17 +00:00
Reid Spencer
ac6bfc5221
Regenerate.
...
llvm-svn: 33912
2007-02-05 17:04:00 +00:00
Reid Spencer
9894d6cba5
! removal was a little over zealous. Put the ! back in asserts.
...
llvm-svn: 33911
2007-02-05 17:01:20 +00:00
Reid Spencer
a7bb3e9673
Regenerate.
...
llvm-svn: 33909
2007-02-05 10:18:06 +00:00
Reid Spencer
de1d05f0f1
There is nothing exclamatory about an error message. No other compiler
...
or assembler uses ! at the end of every message. We shouldn't either.
llvm-svn: 33907
2007-02-05 10:16:10 +00:00
Chris Lattner
83ac5ae9f3
Fix miscompilations of consumer-typeset, telecomm-gsm, and 176.gcc.
...
llvm-svn: 33902
2007-02-05 05:57:49 +00:00
Reid Spencer
a1d35926b7
For PR1177:
...
Revert last patch which caused iteration invalidation.
llvm-svn: 33901
2007-02-05 05:23:32 +00:00
Chris Lattner
0a28e90f2c
fix a miscompilation of 176.gcc
...
llvm-svn: 33900
2007-02-05 04:09:35 +00:00
Owen Anderson
f6fa108993
Use DenseMap for pointer->pointer maps.
...
llvm-svn: 33897
2007-02-05 02:39:47 +00:00
Chris Lattner
3e009e8b8f
rewrite shift/shift folding, now that types are not signed.
...
llvm-svn: 33892
2007-02-05 00:57:54 +00:00
Nick Lewycky
15245953a5
Fix indenting, remove tabs.
...
Learn from sext and zext. The destination value falls within the range of the
source type.
Generalize properties regarding constant ints.
Get smarter about marking blocks as unreachable. If 1 >= 2 in order for this
block to execute, then it isn't reachable.
llvm-svn: 33889
2007-02-04 23:43:05 +00:00
Anton Korobeynikov
465c0253c3
Fixing silly "not-implemented" bug in AsmPrinter. This fixes PR1169.
...
llvm-svn: 33888
2007-02-04 23:27:42 +00:00
Chris Lattner
fe8c530d79
Fix a miscompilation in the addr mode code trying to implement X | C and
...
X + C to promote LEA formation. We would incorrectly apply it in some cases
(test) and miss it in others.
This fixes CodeGen/X86/2007-02-04-OrAddrMode.ll
llvm-svn: 33884
2007-02-04 20:18:17 +00:00
Chris Lattner
19083a4671
switch the VRBaseMap in the scheduler from an std::map to a DenseMap. This
...
speeds up the isel pass from 2.5570s to 2.4722s on kc++ (3.4%).
llvm-svn: 33879
2007-02-04 08:47:20 +00:00
Chris Lattner
9af2c86bc8
Introduce new UnarySDNode/BinarySDNode/TernarySDNode nodes, which coallocate
...
their operands with the node itself. This reduces malloc traffic for operand
lists. This reduces isel time on kc++ from 2.6164 to 2.5570s, about 2.3%.
llvm-svn: 33878
2007-02-04 08:35:21 +00:00
Chris Lattner
22639f3d90
eliminate the SDNode::setValueTypes method.
...
llvm-svn: 33876
2007-02-04 07:37:24 +00:00
Chris Lattner
f17b4222e2
eliminate a bunch of duplicate ctors and helper functions.
...
llvm-svn: 33875
2007-02-04 07:28:00 +00:00
Reid Spencer
d3ba7d9b42
Fix some comments and other minor sundry things.
...
llvm-svn: 33873
2007-02-04 04:43:17 +00:00
Reid Spencer
2dc3653531
Ensure that visibility and section are properly propagated.
...
llvm-svn: 33872
2007-02-04 04:30:33 +00:00
Reid Spencer
90246aa71e
Back out last revision which was committed by accident.
...
llvm-svn: 33871
2007-02-04 04:29:21 +00:00
Reid Spencer
2ea1bb2b8a
Make sure that section and visibility are properly propagated.
...
llvm-svn: 33870
2007-02-04 04:28:18 +00:00
Chris Lattner
edfc7e5fa2
move MorphNode to out of line and merge setNodeOperands into it. There is
...
no behavior or performance change here.
llvm-svn: 33869
2007-02-04 02:49:29 +00:00
Chris Lattner
3bf17b6fa5
simplify MorphNodeTo to take a VTList operand.
...
llvm-svn: 33868
2007-02-04 02:41:42 +00:00
Chris Lattner
486edfbc6f
eliminate some extraneous methods in SDNode
...
llvm-svn: 33867
2007-02-04 02:32:44 +00:00
Chris Lattner
20754cc579
Give each selectiondag node class a home for it's vtable and rtti info
...
llvm-svn: 33866
2007-02-04 02:23:32 +00:00
Chris Lattner
010ee96261
Encode small integers more densely in foldingset, avoiding overflowing the SmallVector as often.
...
llvm-svn: 33864
2007-02-04 01:48:10 +00:00
Chris Lattner
289aa4495c
Switch VAlueMap from std::map to DenseMap.
...
llvm-svn: 33863
2007-02-04 01:35:11 +00:00
Chris Lattner
79084305ee
Switch NodeMap from std::map to DenseMap, this speeds up isel by 2.3%
...
llvm-svn: 33862
2007-02-04 01:31:47 +00:00
Chris Lattner
94c44c96d3
swtich vector-> smallvector, speeding up selectiondag stuff 1%
...
llvm-svn: 33861
2007-02-04 01:20:02 +00:00
Chris Lattner
4b0ddb22e9
Switch promoted/expanded ops over to using a DenseMap. Vector related maps
...
aren't worth it.
llvm-svn: 33860
2007-02-04 01:17:38 +00:00
Chris Lattner
ed39c86176
switch LegalizedNodes from std::map to a DenseMap. This speeds up isel
...
time as a whole on kc++ by 11%.
llvm-svn: 33857
2007-02-04 00:50:02 +00:00
Reid Spencer
3f4e6e84dc
For PR1163:
...
Make the Module's dependent library use a std::vector instead of SetVector
adjust #includes in .cpp files because SetVector.h is no longer included.
llvm-svn: 33855
2007-02-04 00:40:42 +00:00
Chris Lattner
ebeb48d4bc
Eliminate some malloc traffic from LegalizeAllNodesNotLeadingTo, speeding
...
up isel on kimwitu by 0.7%.
llvm-svn: 33853
2007-02-04 00:27:56 +00:00
Chris Lattner
cba058ce51
Eliminate some std::sets. This speeds up isel of kimwitu by about 0.9%
...
llvm-svn: 33852
2007-02-04 00:24:41 +00:00
Chris Lattner
feec7137ce
Switch SelectionDAG::ReplaceAllUsesOfValueWith to use a SmallSetVector for
...
the users set (most nodes have 1 or 2 users). This speeds up the isel pass
3.2% on kimwitu.
llvm-svn: 33849
2007-02-04 00:14:31 +00:00
Chris Lattner
6c344e56b1
remove some dead code
...
llvm-svn: 33845
2007-02-03 23:28:07 +00:00
Reid Spencer
8de97bba5a
For PR1072:
...
Removing -raise has neglible positive or negative side effects so we are
opting to remove it. See the PR for comparison details.
llvm-svn: 33844
2007-02-03 23:15:56 +00:00
Evan Cheng
456db39ea9
ARM callseq_end should have a input flag operand so it would be scheduled right after the call.
...
llvm-svn: 33832
2007-02-03 09:11:58 +00:00
Evan Cheng
4b6c8f7f5e
Fix comments.
...
llvm-svn: 33831
2007-02-03 08:53:01 +00:00
Bill Wendling
a883f55eca
Moved the GetTargetRelocation method from PPCMachOWriter to here. It uses
...
non-Mach-O-specific information.
llvm-svn: 33819
2007-02-03 02:41:58 +00:00
Bill Wendling
2c350921e2
Moved the GetTargetRelocation method to the PPCMachOWriterInfo object. The
...
PPCMachOWriter is now trivial.
llvm-svn: 33818
2007-02-03 02:40:57 +00:00
Bill Wendling
c85e32c730
Put destructor out-of-line.
...
llvm-svn: 33817
2007-02-03 02:40:10 +00:00
Bill Wendling
c27c70dc3d
Pass in non-Mach-O-specific parameters to the GetTargetRelocation method.
...
llvm-svn: 33816
2007-02-03 02:39:40 +00:00
Evan Cheng
36d559d369
- Branch max. displacement calculation bug.
...
- Add debugging info.
llvm-svn: 33811
2007-02-03 02:08:34 +00:00
Chris Lattner
0a30b1f00f
switch the sched unit map over to use a DenseMap instead of std::map. This
...
speeds up isel as a whole time by 2.6%.
llvm-svn: 33810
2007-02-03 01:34:13 +00:00
Chris Lattner
e83030b9c8
Switch ComputeTopDownOrdering over to using a densemap. This speeds up
...
isel as a whole by 3.3%.
llvm-svn: 33809
2007-02-03 01:12:36 +00:00
Evan Cheng
f309d13677
Pasto
...
llvm-svn: 33806
2007-02-03 00:43:46 +00:00
Chris Lattner
1bfc7ab6a7
Switch inliner over to use DenseMap instead of std::map for ValueMap. This
...
speeds up the inliner 16%.
llvm-svn: 33801
2007-02-03 00:08:31 +00:00
Lauro Ramos Venancio
b739f7d337
bugfix: SP isn't resetted when function has FP and there is no spills.
...
llvm-svn: 33800
2007-02-02 23:08:40 +00:00
Chris Lattner
fc8190dbb7
Switch this back to using an std::map. DenseMap entries are getting invalidated
...
llvm-svn: 33799
2007-02-02 22:36:16 +00:00
Chris Lattner
37d400a83d
Remove more malloc thrashing, this speeds up IPSCCP on kimwitu another 6.7%.
...
llvm-svn: 33796
2007-02-02 21:15:06 +00:00
Evan Cheng
f089c99f1d
Another thumb large stack offset codegen bug.
...
llvm-svn: 33795
2007-02-02 21:08:39 +00:00
Chris Lattner
3e667f3e61
Convert an std::set to SmallSet, this speeds up IPSCCP 17% on kimwitu.
...
llvm-svn: 33794
2007-02-02 20:57:39 +00:00
Chris Lattner
0e7ec675da
eliminate a malloc/free for (almost) every GEP processed. This speeds up
...
IPSCCP 3.3% on kimwitu.
llvm-svn: 33793
2007-02-02 20:51:48 +00:00
Chris Lattner
067d607e0e
switch hash_map's over to DenseMap in SCCP. This speeds up SCCP by 30% in
...
a release-assert build on kimwitu++.
llvm-svn: 33792
2007-02-02 20:38:30 +00:00
Evan Cheng
d9d94700a4
Use MBB.empty() instead of MBB.size() for speed.
...
llvm-svn: 33789
2007-02-02 19:09:19 +00:00
Evan Cheng
3ad22567b3
Watch out for empty BB.
...
llvm-svn: 33788
2007-02-02 18:49:02 +00:00
Reid Spencer
2f34b98cbf
Remove dead code and fix indentation per Chris' review comments.
...
llvm-svn: 33785
2007-02-02 14:41:37 +00:00
Reid Spencer
5dc84cdab7
Use short form of BinaryOperator create function.
...
llvm-svn: 33784
2007-02-02 14:09:34 +00:00
Reid Spencer
0d5f9237b6
Use short form of binary operator create functions.
...
llvm-svn: 33783
2007-02-02 14:08:20 +00:00
Reid Spencer
0cdd04fa90
Fix a comment that needed to change after SHIFT patch landed.
...
llvm-svn: 33781
2007-02-02 13:54:55 +00:00
Evan Cheng
fda6550545
Ugh. Only meant to do this in thumb mode.
...
llvm-svn: 33780
2007-02-02 08:58:48 +00:00
Chris Lattner
d5fea61d98
bugfix for reid's shift patch.
...
llvm-svn: 33779
2007-02-02 05:29:55 +00:00
Chris Lattner
2d5b4ac38f
add a note
...
llvm-svn: 33778
2007-02-02 04:36:46 +00:00
Reid Spencer
2341c22ec7
Changes to support making the shift instructions be true BinaryOperators.
...
This feature is needed in order to support shifts of more than 255 bits
on large integer types. This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
shl i32 %X, 1
instead of
shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.
llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Evan Cheng
48b094d9dd
Fix a bug in getARMCMP (which translate CondCode to ARM specific CC) when the RHS is a constant.
...
llvm-svn: 33775
2007-02-02 01:53:26 +00:00
Evan Cheng
9b9e4ae796
Thumb does not have clz.
...
llvm-svn: 33773
2007-02-01 23:34:03 +00:00
Devang Patel
b8a29bdde9
Dump function names when debug-pass=Executions is used.
...
llvm-svn: 33772
2007-02-01 22:38:33 +00:00
Chris Lattner
c904205d28
Fix Transforms/InstCombine/2007-02-01-LoadSinkAlloca.ll, a serious code
...
pessimization where instcombine can sink a load (good for code size) that
prevents an alloca from being promoted by mem2reg (bad for everything).
llvm-svn: 33771
2007-02-01 22:30:07 +00:00
Devang Patel
f7fea8adf3
Pretty print pass manager
...
llvm-svn: 33766
2007-02-01 22:09:37 +00:00
Devang Patel
e3858e6674
cvs commit
...
llvm-svn: 33765
2007-02-01 22:08:25 +00:00
Lauro Ramos Venancio
2c355da986
Define PrivateGlobalPrefix for ARM Linux. (Fix CodeGen/ARM/large_stack.ll)
...
llvm-svn: 33763
2007-02-01 21:43:53 +00:00
Evan Cheng
fd522996c8
Pasto. Lots of it.
...
llvm-svn: 33762
2007-02-01 20:44:52 +00:00
Reid Spencer
26c642de74
Ensure that ConvertOperandToType generates a result conversion by
...
initializing the Res variable to 0 and asserting it is not zero after the
result should have been created.
llvm-svn: 33761
2007-02-01 19:14:51 +00:00
Chris Lattner
ce494229a1
Fix bugs in the inliner having to do with single-entry phi nodes and valuemap
...
updating. These were exposed by Devang's recent passmgr changes (with
non-default passorderings) because now the inliner can be interleved with
the LCSSA pass.
llvm-svn: 33760
2007-02-01 18:48:38 +00:00
Lauro Ramos Venancio
903e01d407
Fix .thumb_func directive on linux.
...
llvm-svn: 33759
2007-02-01 18:25:34 +00:00
Jim Laskey
f970221c4d
Slip up
...
llvm-svn: 33758
2007-02-01 17:48:20 +00:00
Jim Laskey
894ceb1c6f
Emit labels as label_n and not as debug_n
...
llvm-svn: 33757
2007-02-01 17:46:10 +00:00
Andrew Lenharth
dd924e4e95
preserve sections of globals
...
llvm-svn: 33756
2007-02-01 17:12:54 +00:00
Jim Laskey
c3de9b4b14
Support for non-landing pad exception handling.
...
llvm-svn: 33755
2007-02-01 16:31:34 +00:00
Evan Cheng
f9a4c690de
- Off by one bugs in maximum displacement calculation / testing.
...
- In thumb mode, a new constpool island BB size should be 4 + 2 to
compensate for the potential padding due to alignment requirement.
llvm-svn: 33753
2007-02-01 10:16:15 +00:00
Anton Korobeynikov
1b4e6015b4
Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only
...
affected part is codegen of "memove" inside x86 backend. This fixes
PR1144
llvm-svn: 33752
2007-02-01 08:39:52 +00:00
Chris Lattner
4f5cdecde3
improve comments, add an assertion
...
llvm-svn: 33750
2007-02-01 05:33:21 +00:00
Chris Lattner
1003dc72b4
rename DenseMap to IndexedMap.
...
llvm-svn: 33749
2007-02-01 05:32:05 +00:00
Chris Lattner
f14c76cf5d
silence some warnings when assertions are disabled.
...
llvm-svn: 33747
2007-02-01 04:59:37 +00:00
Chris Lattner
104fc7f823
silence warning
...
llvm-svn: 33746
2007-02-01 04:57:00 +00:00
Chris Lattner
296a83cefb
Fit in 80 columns
...
llvm-svn: 33745
2007-02-01 04:55:59 +00:00
Evan Cheng
06736d0f88
.set pc relative displacement bug: label should be moved down one instruction
...
to just before the add r1, pc:
Before:
.set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
mov r1, #PCRELV0
add r1, pc
Now:
.set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
mov r1, #PCRELV0
LPCRELL0:
add r1, pc
llvm-svn: 33744
2007-02-01 03:04:49 +00:00
Evan Cheng
0df1536173
Add a note.
...
llvm-svn: 33743
2007-02-01 02:46:20 +00:00
Evan Cheng
e724492566
Also set alignment of stack-based structs to 4 in thumb mode.
...
llvm-svn: 33741
2007-02-01 02:18:36 +00:00
Evan Cheng
e7e966de5e
Special epilogue for vararg functions. We cannot do a pop to pc because
...
there follows a sp increment for the va register save region. Instead issue
a separate pop to another register, increment sp, and then return:
pop {r4, r5, r6, r7}
pop {r3}
add sp, #3 * 4
bx r3
llvm-svn: 33739
2007-02-01 01:49:46 +00:00
Devang Patel
9eb2caaeb6
Add PrintVersionMessage() that tools can use to print version number
...
without exiting program.
llvm-svn: 33737
2007-02-01 01:43:37 +00:00
Chris Lattner
e3eeb24a86
Emit a better assertion message for PR1133
...
llvm-svn: 33736
2007-02-01 01:21:12 +00:00
Evan Cheng
234e031e36
Pessmistically assume the .align 2 before the first constpool entry adds
...
two bytes padding.
llvm-svn: 33734
2007-02-01 01:09:47 +00:00
Evan Cheng
29f920877d
Possible JT improvements.
...
llvm-svn: 33733
2007-02-01 01:07:48 +00:00