1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

110 Commits

Author SHA1 Message Date
Daniel Dunbar
251177c96e Initial update to VMCore to use Twines for string arguments.
- The only meat here is in Value.{h,cpp} the rest is essential 'const
   std::string &' -> 'const Twine &'.

llvm-svn: 77048
2009-07-25 04:41:11 +00:00
Eric Christopher
df9c86fc26 Move ExtractElementInst to ::Create instead of new. Update all uses.
llvm-svn: 77044
2009-07-25 02:28:41 +00:00
Owen Anderson
cc287b28c9 Get rid of the Pass+Context magic.
llvm-svn: 76702
2009-07-22 00:24:57 +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
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
Owen Anderson
49226b1075 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
llvm-svn: 75200
2009-07-09 23:48:35 +00:00
Dan Gohman
5f6f8101d5 Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.

For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.

This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt

llvm-svn: 72897
2009-06-04 22:49:04 +00:00
Dan Gohman
e1f9be27bc Tidy up several unbeseeming casts from pointer to intptr_t.
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Matthijs Kooijman
1fd76cd396 Update comments and documentation to reflect that GCSE and ValueNumbering are
deprecated by the GVN and GVNPRE passes.

llvm-svn: 51983
2008-06-05 07:55:49 +00:00
Gabor Greif
d61f20217a API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)
llvm-svn: 51200
2008-05-16 19:29:10 +00:00
Gabor Greif
48ffb6c7dc Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
llvm-svn: 51143
2008-05-15 10:04:30 +00:00
Dan Gohman
bab18cae46 Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.

llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Gabor Greif
6c6b8a57f3 API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.

llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Anton Korobeynikov
fd6b669c80 Make Transforms to be 4.3 warnings-clean
llvm-svn: 47371
2008-02-20 11:26:25 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Dan Gohman
ed361aa114 explicit keywords.
llvm-svn: 42262
2007-09-24 15:48:49 +00:00
Chris Lattner
cc315726f7 Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo
Add a new DenseMapInfo::isEqual method to allow clients to redefine
the equality predicate used when probing the hash table.

llvm-svn: 42042
2007-09-17 18:34:04 +00:00
David Greene
8cda5af2e7 Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.

llvm-svn: 41697
2007-09-04 15:46:09 +00:00
Owen Anderson
414247c075 Fix 80 col. violations.
llvm-svn: 40751
2007-08-02 18:20:52 +00:00
Owen Anderson
89afa507b1 Fix a bug where we were marking GEP expressions with the wrong opcode.
llvm-svn: 40085
2007-07-20 08:19:20 +00:00
Owen Anderson
3b1129af78 Make val_replace fail early, which reduces the time to optimize 403.gcc to 14.8s.
llvm-svn: 40064
2007-07-19 19:57:13 +00:00
Owen Anderson
57d33add2c Use SmallVector and DenseMap in even more places.
With this, the time to optimize 403.gcc is down to 15.1s.

llvm-svn: 40042
2007-07-19 06:37:56 +00:00
Owen Anderson
7a4b965739 Change ValueTable to use a DenseMap for mapping expressions to value numbers.
This results in a slight speedup for 403.gcc.

llvm-svn: 40040
2007-07-19 06:13:15 +00:00
Owen Anderson
c32df0bc73 Move some sets and maps to SmallPtrSet and DenseMap respectively. This
reduces the time to optimize 403.gcc from 17.6s to 16.4s.

llvm-svn: 40036
2007-07-19 03:32:44 +00:00
Owen Anderson
7d38ac8a37 Make the pass registration static.
llvm-svn: 38508
2007-07-10 20:20:19 +00:00
Owen Anderson
4ce919d799 Move some key maps from std::map to DenseMap. This improves the time to optimize Anton's testcase from 17.5s
to 15.7s.

llvm-svn: 38480
2007-07-10 00:27:22 +00:00
Owen Anderson
65f9dd6973 Use a cheaper test, delaying calling find_leader() until we know that it's necessary. This improves
the time to optimize Anton's testcase from 21.1s to 17.6s.

llvm-svn: 38479
2007-07-10 00:09:25 +00:00
Owen Anderson
2106613ce6 Add an assertion if find_leader fails.
llvm-svn: 38477
2007-07-09 23:57:18 +00:00
Owen Anderson
8d4339f8db Take advantage of the new fast SmallPtrSet assignment operator when propagating AVAIL_OUT sets.
This reduces the time to optimize Anton's testcase from 31.2s to 21.s!

llvm-svn: 38475
2007-07-09 22:29:50 +00:00
Owen Anderson
08020078f3 Fix a comment.
llvm-svn: 38459
2007-07-09 16:43:55 +00:00
Owen Anderson
25d57adc4a Improve a hotspot that was making build_sets() slower by calling lookup() too
often.  This improves Anton's testcase from 36s to 32s.

llvm-svn: 38441
2007-07-09 07:56:55 +00:00
Owen Anderson
f695fa9257 Start using a set representation that remembers the set of value numbers represented
in the set.  For the moment, this results in a slight performance decrease, but
it lays the groundwork for future improvements.

llvm-svn: 38439
2007-07-09 06:50:06 +00:00
Owen Anderson
30fc1decdc Fix an error where ANTIC_OUT was ending up with more than one expression of
the same value number.  This fixes an infinite loop on 444.namd.

llvm-svn: 37967
2007-07-07 20:13:57 +00:00
Owen Anderson
16d027ce3e Be more aggressive in the heuristic. This mostly exposes more opportunities
for the GVN part of GVNPRE to apply.

llvm-svn: 37951
2007-07-06 20:29:43 +00:00
Owen Anderson
d50fe47cf3 Achieve what the incorrect test was trying to do by simply requiring that all
critical edges be split before we begin.

llvm-svn: 37949
2007-07-06 18:12:36 +00:00
Owen Anderson
da85a8134e Remove an incorrect check.
llvm-svn: 37948
2007-07-06 16:52:47 +00:00
Owen Anderson
7cf3a2aa1f Fix a bunch of issues found in a testcase from 400.perlbench.
llvm-svn: 37929
2007-07-05 23:11:26 +00:00
Owen Anderson
2024c08f65 Fix another bug, this time in PREing select instructions.
llvm-svn: 37878
2007-07-04 22:33:23 +00:00
Owen Anderson
ac8fe6b8ca Fix a typo that was killing GVNPRE of select instructions.
llvm-svn: 37871
2007-07-04 18:26:18 +00:00
Owen Anderson
06dd016177 Fix an error in phi translation of GEPs that was causing failures.
llvm-svn: 37868
2007-07-04 04:51:16 +00:00
Owen Anderson
4a5c005585 Add support for performing GVNPRE on GEP instructions.
llvm-svn: 37862
2007-07-03 23:51:19 +00:00
Owen Anderson
6599e49230 Add functionality to value number GEP instructions. This also provides the infrastructure that will
be used for function calls.  NOTE: This does not yet do any transformation of GEPs or function calls.

llvm-svn: 37860
2007-07-03 22:50:56 +00:00
Owen Anderson
778ad67a26 Make the unary operator case a bit faster, since casts are the only kind of unary operation.
llvm-svn: 37857
2007-07-03 19:01:42 +00:00
Owen Anderson
ba084e17fd Add support for performing GVNPRE on cast instructions, and add a testcase for this.
llvm-svn: 37856
2007-07-03 18:37:08 +00:00
Owen Anderson
cff6ffe45c Add support for value numbering (but not actually optimizing) cast instructions.
llvm-svn: 37789
2007-06-29 00:51:03 +00:00
Owen Anderson
f134e54bb1 Add a type field to expressions in preparation for performing GVNPRE on casts.
llvm-svn: 37788
2007-06-29 00:40:05 +00:00
Owen Anderson
f1665858f3 Add support for performing GVNPRE on select instructions. This fixes test/Transforms/GVNPRE/select.ll.
llvm-svn: 37783
2007-06-28 23:51:21 +00:00
Owen Anderson
9372f36b3c Make many sets a much more reasonable size. This decreases the time to optimize
Anton's testcase from 35.5s to 34.7s.

llvm-svn: 37769
2007-06-28 00:34:34 +00:00
Owen Anderson
97dd99d761 Use cached information that has already been computed to make clean() simpler and faster. This is a small speedup on most cases.
llvm-svn: 37761
2007-06-27 17:38:29 +00:00
Owen Anderson
a7927caa56 Fold a lot of code into two cases: binary instructions and ternary instructions.
This saves many lines of code duplication.  No functionality change.

llvm-svn: 37759
2007-06-27 17:03:03 +00:00