1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
Commit Graph

1147 Commits

Author SHA1 Message Date
Chris Lattner
84a9d11b28 Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!

llvm-svn: 25144
2006-01-08 08:22:18 +00:00
Chris Lattner
8d84170fb5 Patch #7 from Saem:
"added the asserts and casts, fixed the comments and started the break
down of the larger methods.  A few more patches and the breakdown
should be complete."

llvm-svn: 25142
2006-01-07 23:16:58 +00:00
Chris Lattner
ee327e57d2 Implement a few symbolic constant folding things. X ? Y : Y is Y.
Fold:
seteq ({ short }* cast (int 1 to { short }*), { short }* null)
setlt ({ short }* cast (int 1 to { short }*), { short }* cast (int 2 to { short }*))

to false/true.  These last two commonly occur in the output of compilers that
tag integers, like cozmic's scheme compiler.

Tested by Regression/Assembler/ConstantExprFold.llx

llvm-svn: 25112
2006-01-05 07:49:30 +00:00
Chris Lattner
253796d43f fix some formatting problems
llvm-svn: 25110
2006-01-05 07:19:51 +00:00
Chris Lattner
064e45054a Patch #6's in Saem's refactor-the-passmanager patch series. From him:
This sanitises the world, blows away the specialisations and adds
traits per passmanager type -- seemed most natural.

llvm-svn: 25085
2006-01-04 07:47:13 +00:00
Chris Lattner
586eae6b9a Saem's patch #5 of the passmanager refactoring
llvm-svn: 25078
2006-01-04 05:02:04 +00:00
Chris Lattner
76bf19b0d5 patch #4 in Saem's passmanager refactoring.
llvm-svn: 25077
2006-01-04 04:36:11 +00:00
Chris Lattner
cbb7c27b51 implement constant folding of ==/!= on constant packed, simplify some code.
llvm-svn: 25074
2006-01-04 02:20:54 +00:00
Chris Lattner
00a5bdbb95 implement constant folding for the element-wise binary operations
llvm-svn: 25073
2006-01-04 02:15:02 +00:00
Chris Lattner
fffcbfffa6 don't crash when trying to constant fold packed expressions.
llvm-svn: 25072
2006-01-04 02:03:29 +00:00
Chris Lattner
291f009018 Fix an assertion to allow constant folding of packed values
llvm-svn: 25071
2006-01-04 01:01:04 +00:00
Chris Lattner
9be3d76ec9 silence some warnings
llvm-svn: 25066
2006-01-03 17:52:18 +00:00
Chris Lattner
4a422e2218 Finally commit Saem's 'patch #3' to refactor the pass manager
llvm-svn: 25063
2006-01-03 07:05:17 +00:00
Chris Lattner
a04fb40243 Patch #1 of Saem Ghani's Pass Manager refactoring. From the man:
"All this should do is create what will eventually be the specialised
passmanagers.  Currently, the templates are inheriting them, once the
template specialisations' methods have been absorbed, patches
submitted method by method.  I'll nuke the specialisations and have
the new objects inherit directly from passmanagert, and sanitise the
world of all references to templates.
"

llvm-svn: 25053
2005-12-30 20:00:46 +00:00
Duraid Madina
07a3df77d0 more HP-UX cleanliness
llvm-svn: 25015
2005-12-26 08:35:06 +00:00
Reid Spencer
63a1f99627 Revert previous patch. Additional tests fail.
llvm-svn: 24968
2005-12-22 21:46:37 +00:00
Reid Spencer
56825ced86 Fix PR409:
Implement the suggested check to ensure that out-of-range float constants
don't get accepted by LLVM accidentally. Adjust the supporting test cases
as well.

llvm-svn: 24963
2005-12-22 21:07:29 +00:00
Chris Lattner
d51de8d76f Get logical operations to like packed types, allow BinOp::getNot to create
the right vector of -1's as its operand.

llvm-svn: 24906
2005-12-21 18:22:19 +00:00
Chris Lattner
8e01c48256 Add a flag to Module::getGlobalVariable to allow it to return vars with
internal linkage.

Patch provided by Evan Jones, thanks!

llvm-svn: 24604
2005-12-05 05:30:21 +00:00
Chris Lattner
48ddf6d833 This requires proper dominance
llvm-svn: 24408
2005-11-18 07:27:53 +00:00
Chris Lattner
d69b86453a * Fix DerivedType::dropAllTypeUses to not change the number of types in a
type when it gets refined.  This allows us to hash on this crucial value.
* Fix several issues in TypeMap::RefineAbstractType that prevent it from
  handling hash values that change correctly.
* Define hashTypeStructure to not always return 0.  :)

This last part (which depends on the first two) speeds up gccld time on eon
from 3.78s to 2.75s with a release build (a 28% speedup!).  This resolves
PR474.

llvm-svn: 24372
2005-11-16 06:09:47 +00:00
Chris Lattner
f7a530046f Fix handling of multiple unnamed globals with the same type
llvm-svn: 24362
2005-11-15 01:32:03 +00:00
Chris Lattner
5cafdc4edc Add some dummy method impls
llvm-svn: 24345
2005-11-13 03:26:33 +00:00
Chris Lattner
4584142363 Move some methods around. Refactor the parts of TypeMap that do not depend
on its template arguments into a base class so that the code isn't duplicated
5 times.

llvm-svn: 24343
2005-11-13 03:14:09 +00:00
Chris Lattner
150cfb2968 Split the type refinement case completely out of the type-becomes-concrete
case, simplifying the code.

llvm-svn: 24340
2005-11-13 01:58:06 +00:00
Chris Lattner
6e3f8ee849 Separate the type-became-concrete case from the type-is-resolved case, the
former of which takes much less work than the later.  This speeds up linking
eon from 3.749 to 3.637s with a release build (about 3%).

llvm-svn: 24338
2005-11-13 01:27:50 +00:00
Chris Lattner
cda6fc6409 Unswitch a loop, add more assertions, eliminate use of removeUserFromConcrete.
llvm-svn: 24324
2005-11-12 08:39:48 +00:00
Chris Lattner
2d82c5ba58 Tiny speedup, improve comments and code organization.
llvm-svn: 24323
2005-11-12 08:22:41 +00:00
Chris Lattner
5b42a5ea1a print section info
llvm-svn: 24313
2005-11-12 00:10:19 +00:00
Andrew Lenharth
dca2f13e76 continued readcyclecounter support
llvm-svn: 24300
2005-11-11 16:47:30 +00:00
Chris Lattner
77c3b97f5d Fix the optimized code handling of user asm strings
llvm-svn: 24296
2005-11-10 23:24:26 +00:00
Chris Lattner
32a3905ffc speedup the common case where nothing needs to be quoted
llvm-svn: 24294
2005-11-10 21:47:01 +00:00
Chris Lattner
8dfe3bb6be Allow per-character control over what target assemblers allow in symbol
names.  This also changes the default to allow all of "$_." in addition
to letters and numbers as symbol names.  If you don't want this, use
markCharUnacceptable to remove one of these or markCharAcceptable to add
to the set.  This corresponds with what GAS accepts by default.

Also, this includes some minor speedups

llvm-svn: 24293
2005-11-10 21:40:01 +00:00
Chris Lattner
2ba7f5a64d Add a new option for targets that accept quoted labels.
llvm-svn: 24283
2005-11-10 19:30:07 +00:00
Chris Lattner
6b9d854bad remove the M instance var
llvm-svn: 24281
2005-11-10 19:02:18 +00:00
Chris Lattner
6e7e5fab70 Make this more efficient of the common case where we are only mangling globals.
Do not mangle internal global names that do not collide with anything.

This gives us strings that now look like this:

__2E_str_1:                             ; '.str_1'
        .asciz  "foo"

instead of this:

l1__2E_str_1:                           ; '.str_1'
        .asciz  "foo"

llvm-svn: 24277
2005-11-10 18:48:58 +00:00
Chris Lattner
6a14d020a3 Force packed vectors to be a power of two in length.
llvm-svn: 24264
2005-11-10 01:40:59 +00:00
Chris Lattner
6991a6f23f print alignment info for globals and functions
llvm-svn: 24212
2005-11-06 06:48:53 +00:00
Chris Lattner
c6ef0112c0 verify that alignments are always a power of 2
llvm-svn: 24200
2005-11-05 21:57:54 +00:00
Chris Lattner
8eee9a6234 fix printing the alignment directive
llvm-svn: 24197
2005-11-05 21:20:34 +00:00
Nate Begeman
f299b9fb03 Add support alignment of allocation instructions.
Add support for specifying alignment and size of setjmp jmpbufs.

No targets currently do anything with this information, nor is it presrved
in the bytecode representation.  That's coming up next.

llvm-svn: 24196
2005-11-05 09:21:28 +00:00
Chris Lattner
fd80437e76 Fix an iterator invalidation problem in code used by the -strip pass
llvm-svn: 24124
2005-10-31 18:42:37 +00:00
Chris Lattner
99b65b821a Allow $
llvm-svn: 23721
2005-10-14 01:28:34 +00:00
Chris Lattner
5adabfc4fb add a hack to work around broken VC++ scoping rules. Thx to JeffC for pointing
this out to me

llvm-svn: 23655
2005-10-07 05:23:36 +00:00
Chris Lattner
b98aa6cc83 refactor a bit of code.
When moving constant entries in 'Map' if the entry is the representative
constant for the abstractypemap, make sure to update it as well.  This
fixes the bcreader failures from last night on several C++ apps.

llvm-svn: 23628
2005-10-04 21:35:50 +00:00
Chris Lattner
0fcb065305 Minor speedup to avoid array searches given a Use*. This speeds up bc reading
of the python test from 1:00 to 54s.

llvm-svn: 23627
2005-10-04 18:47:09 +00:00
Chris Lattner
e2a54ddd33 Change the signature of replaceUsesOfWithOnConstant. The bool was always
true dynamically.  Finally, pass the Use* that replaceAllUsesWith has into
the method for future use.

llvm-svn: 23626
2005-10-04 18:13:04 +00:00
Chris Lattner
8cce7373f7 For large constants (e.g. arrays and structs with many elements) just
creating the keys and doing comparisons to index into 'Map' takes a lot
of time.  For these large constants, keep an inverse map so that 'remove'
and move operations are much faster.

This speeds up a release build of the bc reader on Eric's nasty python
bytecode file from 1:39 to 1:00s.

llvm-svn: 23624
2005-10-04 17:48:46 +00:00
Chris Lattner
6627e8e4b5 minor cleanup/fastpath for the bcreader. This speeds up the bcreader
from 1:41 -> 1:39 on the large python .bc file in a release build.

llvm-svn: 23623
2005-10-04 16:52:46 +00:00
Chris Lattner
5d68585bb1 implement the struct version of the array speedup, speeding up the
testcase a bit more from 1:48 -> 1.40.

llvm-svn: 23619
2005-10-04 01:17:50 +00:00