1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

2305 Commits

Author SHA1 Message Date
Chris Lattner
b786d147c9 Fix a bunch of bugs handling vector compare constant expressions, fixing
PR2317.

llvm-svn: 53544
2008-07-14 05:17:31 +00:00
Chris Lattner
accde0a86b Document and fix Constant::getVectorElements to return an empty vector
when presented with a constant expr.

If ConstantExpr::getV[IF]Cmp to work when ConstantFoldCompareInstruction
returns an undef or constant expr.  

llvm-svn: 53541
2008-07-14 05:10:41 +00:00
Dan Gohman
d1342570f2 Use find instead of lower_bound.
llvm-svn: 53474
2008-07-11 20:58:19 +00:00
Chris Lattner
7797bfa0fd SImplify ConstantVector::get a bit and make it turn a vector
of all undefs into a single undef value.

llvm-svn: 53384
2008-07-10 00:44:03 +00:00
Chris Lattner
563d2c9fac Fix a case where vector comparison constant folding would cause an
infinite recursion.  part of PR2529

llvm-svn: 53383
2008-07-10 00:29:28 +00:00
Chris Lattner
6c12d086d9 add a helper method for code that wants to handle vector
constants by element without caring how they are formed.

llvm-svn: 53381
2008-07-10 00:28:11 +00:00
Chris Lattner
4fbada0bef elementwise comparison of vector constants was completely wrong. Fix
it for PR2529

llvm-svn: 53380
2008-07-10 00:08:17 +00:00
Evan Cheng
80f6966c7f - Replace use of std::map<std::string, ..> with StringMap. Replace use of std::map with DenseMap, std::set with SmallPtrSet. This results in minor speed up.
- Some code clean up.

llvm-svn: 53379
2008-07-10 00:04:23 +00:00
Dan Gohman
f152c7c967 Consistently put quotes around pass names in debugging output.
llvm-svn: 53268
2008-07-09 00:50:40 +00:00
Chris Lattner
6163b7a5ad improve comment
llvm-svn: 53243
2008-07-08 18:47:38 +00:00
Duncan Sands
65028bf60d Add some helpers for manipulating function
parameter attributes.

llvm-svn: 53228
2008-07-08 09:41:30 +00:00
Duncan Sands
b854603cb5 Add some convenience methods for manipulating
call attributes.

llvm-svn: 53223
2008-07-08 08:38:44 +00:00
Chris Lattner
d4bcc9011b Fix three bugs:
1) evaluate [v]fcmp true/false with undefs to true or false instead
   of undef.
2) fix vector comparisons with undef to return a vector result instead 
   of i1
3) fix vector comparisons with evaluatable results to return vector
   true/false instead of i1 true/false (PR2529)

llvm-svn: 53220
2008-07-08 05:46:34 +00:00
Dan Gohman
955fdc7a4c Add explicit keywords.
llvm-svn: 53179
2008-07-07 18:00:37 +00:00
Bill Wendling
2c9a84d788 Revert my previous check-in that split up MachineModuleInfo. It turns out to
slow the compiler down at -O0 some 30% or more. Ooops.

llvm-svn: 53120
2008-07-03 22:53:42 +00:00
Matthijs Kooijman
b7ade2592f Add newline at the end of Constants.cpp.
llvm-svn: 53092
2008-07-03 07:46:41 +00:00
Dan Gohman
b4de0f42af Use operator new instead of new char[].
llvm-svn: 53066
2008-07-03 00:53:09 +00:00
Devang Patel
a4a94290b8 Disable dom info verifier by default.
llvm-svn: 52983
2008-07-01 21:36:11 +00:00
Devang Patel
0fc2badc38 Fix typos in comments.
Thanks for the feedback!

llvm-svn: 52978
2008-07-01 19:50:56 +00:00
Devang Patel
1e1f4a0bdd Add dom info verifier.
llvm-svn: 52967
2008-07-01 17:44:24 +00:00
Devang Patel
5b8e75e2fe Move dominator info printer into tool/opt/GraphPrinters.cpp
llvm-svn: 52907
2008-06-30 17:32:58 +00:00
Evan Cheng
2005804de6 - Re-apply 52748 and friends with fix. GetConstantStringInfo() returns an empty string for ConstantAggregateZero case which surprises selectiondag.
- Correctly handle memcpy from constant string which is zero-initialized.

llvm-svn: 52891
2008-06-30 07:31:25 +00:00
Anton Korobeynikov
6f260767ec Revert (52748 and friends):
Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.

This unbreaks llvm-gcc bootstrap.

llvm-svn: 52884
2008-06-29 17:57:03 +00:00
Chris Lattner
8e2bd43f29 implement some fixme's by making "autorenaming" in the value symbol table not
thrash the heap with string stuff (e.g. utostr).

llvm-svn: 52838
2008-06-27 21:26:26 +00:00
Chris Lattner
5c75711282 simplify some code to avoid string thrashing.
llvm-svn: 52837
2008-06-27 21:25:24 +00:00
Chris Lattner
6b3b22747a Add a new version of Module::getFunction that takes a const char* instead
of a std::string.  This avoids copying the string to the heap in common
cases.  Patch by Pratik Solanki!

llvm-svn: 52834
2008-06-27 21:09:10 +00:00
Devang Patel
d5faa747e9 Add dominator info printer pass.
llvm-svn: 52829
2008-06-27 16:43:21 +00:00
Bill Wendling
2ab62b9a92 Refactor the DebugInfoDesc stuff out of the MachineModuleInfo file. Clean up
some uses of std::vector, where it's return std::vector by value. Yuck!

llvm-svn: 52800
2008-06-27 00:09:40 +00:00
Eric Christopher
4f05c48718 Move GetConstantStringInfo to lib/Analysis. Remove
string output routine from Constant. Update all
callers. Change debug intrinsic api slightly to
accomodate move of routine, these now return values
instead of strings.

llvm-svn: 52748
2008-06-26 00:31:12 +00:00
Mon P Wang
7d89d61387 Added MemOperands to Atomic operations since Atomics touches memory.
Added abstract class MemSDNode for any Node that have an associated MemOperand
Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and
atomic.lss => atomic.load.sub

llvm-svn: 52706
2008-06-25 08:15:39 +00:00
Owen Anderson
968d4e2444 Use push_back rather than operator[], which is incorrect in this cases. Unfortunately, this slow the testcase down a little bit,
but only marginally.

llvm-svn: 52700
2008-06-25 01:05:05 +00:00
Owen Anderson
673cae8561 In ConstantArray::getAsString(), we know the size of the resultant string in advance so we can pre-allocate it and just fill in
the entries.  This improves the time for the AsmPrinter on InstructionCombining.cpp from 0.4248s to 0.3370s.

llvm-svn: 52690
2008-06-24 21:58:29 +00:00
Dan Gohman
fcb2dc2dd6 Use const_cast instead of a C-style cast.
llvm-svn: 52684
2008-06-24 17:47:37 +00:00
Dan Gohman
b52f318a0c Remove two convenience constructors because they're now private, and the
private implementation doesn't really need the convenience.

llvm-svn: 52629
2008-06-23 16:48:17 +00:00
Dan Gohman
12a793b025 Use std::copy instead of a loop.
llvm-svn: 52628
2008-06-23 16:45:24 +00:00
Dan Gohman
d9e2c8b72a More changes from Chris' review: simplify getIndices and avoid
copying its return value.

llvm-svn: 52627
2008-06-23 16:39:44 +00:00
Dan Gohman
e0744f181b Use Function's arg_size() and size() methods.
llvm-svn: 52605
2008-06-21 22:06:54 +00:00
Chris Lattner
96b3955e9b fix some warnings when assertions are disabled.
llvm-svn: 52587
2008-06-21 19:47:03 +00:00
Dan Gohman
bcddb92f4e Simplify this code. Thanks Chris!
llvm-svn: 52514
2008-06-20 00:47:44 +00:00
Dan Gohman
c190d65454 Auto-upgrade code for multiple-value return statements. This code
isn't actually called yet.

llvm-svn: 52435
2008-06-17 23:38:43 +00:00
Dan Gohman
d9d529d7ed In InsertValueInst's copy ctor, actually copy the operands.
llvm-svn: 52434
2008-06-17 23:25:49 +00:00
Dan Gohman
24d9c8400f Implement the ExtractValueInst::getIndexedType that accepts one
index value.

llvm-svn: 52432
2008-06-17 21:07:55 +00:00
Owen Anderson
79605db969 Add an insertBefore method for attaching previously unattached instructions,
such as those created by clone(), to a basic block.

llvm-svn: 52424
2008-06-17 18:29:27 +00:00
Chris Lattner
dd707dc82d switch TypeHasCycleThroughItself from using an std::set to using a SmallPtrSet,
this speeds up the linking testcase in PR1860 by 44% (.379 -> 0.263)

llvm-svn: 52365
2008-06-16 21:20:58 +00:00
Chris Lattner
09554fd076 fix pr2460
llvm-svn: 52294
2008-06-16 04:02:40 +00:00
Evan Cheng
5897328890 Do not speculatively execute an instruction by hoisting it to its predecessor BB if any of its operands are defined but not used in BB. The transformation will prevent the operand from being sunk into the use block.
llvm-svn: 52244
2008-06-12 21:15:59 +00:00
Dan Gohman
68f8fbdac4 Re-apply 52002, allowing the verifier to accept non-MRV struct return
types on functions, with adjustments so that it accepts both
new-style aggregate returns and old-style MRV returns, including those
with only a single member.

llvm-svn: 52157
2008-06-09 21:26:13 +00:00
Gabor Greif
7c2e365dbc get rid of ExtractValueInst::init's Value argument, it is already passed to the UnaryInstruction ctor
llvm-svn: 52064
2008-06-06 21:06:32 +00:00
Gabor Greif
8ac103e71d make ExtractValueInst derived from UnaryInstruction
llvm-svn: 52061
2008-06-06 20:28:12 +00:00
Devang Patel
1db00c242e Print debug message only if there are dead passes.
llvm-svn: 52052
2008-06-06 17:50:36 +00:00