Commit Graph

113 Commits

Author SHA1 Message Date
Dan Gohman
0084ace949 Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26 00:13:22 +00:00
Dan Gohman
1c8a23c440 Eliminate the unused Context argument on one of the ICmpInst and FCmpInst
constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80049 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 23:17:54 +00:00
Chris Lattner
bbbfa99d3d remove a few DOUTs here and there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79832 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 06:35:02 +00:00
Daniel Dunbar
6e0d1cb309 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 &'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77048 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 04:41:11 +00:00
Eric Christopher
a3500da559 Move ExtractElementInst to ::Create instead of new. Update all uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 02:28:41 +00:00
Owen Anderson
e922c02019 Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:24:57 +00:00
Torok Edwin
c23197a26f 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").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 16:55:14 +00:00
Torok Edwin
c25e7581b9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 20:10:48 +00:00
Owen Anderson
333c400965 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:48:35 +00:00
Dan Gohman
ae3a0be92e 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 22:49:04 +00:00
Dan Gohman
ae73dc1448 Tidy up several unbeseeming casts from pointer to intptr_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-04 17:05:41 +00:00
Matthijs Kooijman
845f524c25 Update comments and documentation to reflect that GCSE and ValueNumbering are
deprecated by the GVN and GVNPRE passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51983 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-05 07:55:49 +00:00
Gabor Greif
7cbd8a3e92 API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51200 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-16 19:29:10 +00:00
Gabor Greif
b1dbcd886a Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-15 10:04:30 +00:00
Dan Gohman
844731a7f1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-13 00:00:25 +00:00
Gabor Greif
051a950000 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 20:25:17 +00:00
Anton Korobeynikov
07e6e56f57 Make Transforms to be 4.3 warnings-clean
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47371 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20 11:26:25 +00:00
Chris Lattner
4ee451de36 Remove attribution from file headers, per discussion on llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:36:04 +00:00
Dan Gohman
746767b097 explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42262 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 15:48:49 +00:00
Chris Lattner
76c1b97e40 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42042 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 18:34:04 +00:00
David Greene
b8f74793b9 Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41697 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 15:46:09 +00:00
Owen Anderson
9fed589912 Fix 80 col. violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40751 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 18:20:52 +00:00
Owen Anderson
c9399be5e5 Fix a bug where we were marking GEP expressions with the wrong opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40085 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-20 08:19:20 +00:00
Owen Anderson
b83e56f6b6 Make val_replace fail early, which reduces the time to optimize 403.gcc to 14.8s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40064 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 19:57:13 +00:00
Owen Anderson
19bc4a8acd Use SmallVector and DenseMap in even more places.
With this, the time to optimize 403.gcc is down to 15.1s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40042 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 06:37:56 +00:00
Owen Anderson
fb66541e63 Change ValueTable to use a DenseMap for mapping expressions to value numbers.
This results in a slight speedup for 403.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40040 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 06:13:15 +00:00
Owen Anderson
b97819852a Move some sets and maps to SmallPtrSet and DenseMap respectively. This
reduces the time to optimize 403.gcc from 17.6s to 16.4s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40036 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-19 03:32:44 +00:00
Owen Anderson
16a72bb47d Make the pass registration static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 20:20:19 +00:00
Owen Anderson
81c2a6ecbb Move some key maps from std::map to DenseMap. This improves the time to optimize Anton's testcase from 17.5s
to 15.7s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38480 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 00:27:22 +00:00
Owen Anderson
a05a81b10a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38479 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-10 00:09:25 +00:00
Owen Anderson
5fd507d431 Add an assertion if find_leader fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 23:57:18 +00:00
Owen Anderson
dfa2435784 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38475 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 22:29:50 +00:00
Owen Anderson
ab3fd054ea Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38459 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 16:43:55 +00:00
Owen Anderson
b9eeb1acbc Improve a hotspot that was making build_sets() slower by calling lookup() too
often.  This improves Anton's testcase from 36s to 32s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38441 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 07:56:55 +00:00
Owen Anderson
0616dffd64 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38439 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-09 06:50:06 +00:00
Owen Anderson
36a07daabd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37967 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-07 20:13:57 +00:00
Owen Anderson
ec5614b522 Be more aggressive in the heuristic. This mostly exposes more opportunities
for the GVN part of GVNPRE to apply.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37951 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 20:29:43 +00:00
Owen Anderson
2c194e6bd1 Achieve what the incorrect test was trying to do by simply requiring that all
critical edges be split before we begin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37949 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 18:12:36 +00:00
Owen Anderson
6a6152ca2d Remove an incorrect check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37948 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-06 16:52:47 +00:00
Owen Anderson
2a5c9d8aac Fix a bunch of issues found in a testcase from 400.perlbench.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37929 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-05 23:11:26 +00:00
Owen Anderson
ec3ed5f8e4 Fix another bug, this time in PREing select instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 22:33:23 +00:00
Owen Anderson
df30b63663 Fix a typo that was killing GVNPRE of select instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37871 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 18:26:18 +00:00
Owen Anderson
9eee94c5f7 Fix an error in phi translation of GEPs that was causing failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37868 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 04:51:16 +00:00
Owen Anderson
5653322e72 Add support for performing GVNPRE on GEP instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37862 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-03 23:51:19 +00:00
Owen Anderson
eb21686ea9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37860 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-03 22:50:56 +00:00
Owen Anderson
3d6fac3993 Make the unary operator case a bit faster, since casts are the only kind of unary operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37857 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-03 19:01:42 +00:00
Owen Anderson
216394f9b3 Add support for performing GVNPRE on cast instructions, and add a testcase for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37856 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-03 18:37:08 +00:00
Owen Anderson
ca6c31cc41 Add support for value numbering (but not actually optimizing) cast instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37789 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-29 00:51:03 +00:00
Owen Anderson
40dc00eb82 Add a type field to expressions in preparation for performing GVNPRE on casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37788 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-29 00:40:05 +00:00
Owen Anderson
890e1a0401 Add support for performing GVNPRE on select instructions. This fixes test/Transforms/GVNPRE/select.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37783 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-28 23:51:21 +00:00