Nick Lewycky
7ea68536b5
Don't crash on multiple return value with no obvious inserted value.
...
Fixes PR4314.
llvm-svn: 73007
2009-06-06 23:13:08 +00:00
Nick Lewycky
206876e2da
Use Operands.data() instead of &Operands[0] where Operands is a potentially
...
empty SmallVector.
llvm-svn: 72512
2009-05-28 04:08:10 +00:00
Duncan Sands
1f15ca7c7a
Factorize out a concept - no functionality change.
...
llvm-svn: 67454
2009-03-21 21:27:31 +00:00
Duncan Sands
a09e0afe74
Don't load values out of global constants with weak
...
linkage: the value may be replaced with something
different at link time. (Frontends that want to
allow values to be loaded out of weak constants can
give their constants weak_odr linkage).
llvm-svn: 67407
2009-03-20 21:53:29 +00:00
Rafael Espindola
6de96a1b5d
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Chris Lattner
8fb9480ed2
Fix PR3325, a miscompilation of invokes by IPSCCP. Patch by Jay Foad!
...
llvm-svn: 62244
2009-01-14 21:01:16 +00:00
Devang Patel
45f1ae028e
Fix unused variable warnings.
...
llvm-svn: 59778
2008-11-21 01:52:59 +00:00
Nick Lewycky
d73806a9cc
Replace explicit loop with utility function.
...
llvm-svn: 58593
2008-11-03 03:49:14 +00:00
Dan Gohman
a79db30d28
Tidy up several unbeseeming casts from pointer to intptr_t.
...
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Chris Lattner
add44f3fb7
improve encapsulation of the BBExecutable set.
...
llvm-svn: 55271
2008-08-23 23:39:31 +00:00
Chris Lattner
65938fc69a
Switch an assortment of maps, sets and vectors to more efficient versions,
...
patch contributed by m-s!
llvm-svn: 55270
2008-08-23 23:36:38 +00:00
Bill Wendling
861bec78f8
Temporarily revert r54792. It's causing an ICE during bootstrapping.
...
llvm-svn: 54804
2008-08-14 23:05:24 +00:00
Devang Patel
52dc07b01a
Use DenseMap. Patch by Pratik Solanki.
...
llvm-svn: 54792
2008-08-14 21:31:10 +00:00
Dan Gohman
8ded5d5884
Fix SCCP's handling of struct value loads and stores. SCCP doesn't
...
track individual leaf values in such cases, so it needs to treat
struct values as normal values in this case.
llvm-svn: 54760
2008-08-13 21:22:48 +00:00
Dan Gohman
fa1211f69b
Enable first-class aggregates support.
...
Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.
The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.
llvm-svn: 53941
2008-07-23 00:34:11 +00:00
Dan Gohman
a5dd67f002
Tidy up some commments and use the getAggregateOperand and
...
getInsertedValueOperand accessors. Thanks Matthijs!
llvm-svn: 52543
2008-06-20 16:41:17 +00:00
Dan Gohman
b5210efb31
Fix the conditions under which SCCP should examine insertvalue
...
instructions. Thanks to Matthijs Kooijman for pointing this out!
llvm-svn: 52542
2008-06-20 16:39:44 +00:00
Dan Gohman
041f9d03ff
Teach SCCP about insertvalue and extractvalue, and about
...
propagating constants across aggregate return values when
insertvalue and extractvalue are used.
llvm-svn: 52520
2008-06-20 01:15:44 +00:00
Chris Lattner
5c207c83c6
Fix PR2358 by resolving calls with undef arguments to overdefined.
...
llvm-svn: 51535
2008-05-24 03:59:33 +00:00
Dale Johannesen
fecb88249f
Allow for switch with no cases. Was causing fault
...
in gcc.dg/pr27531-1.c.
llvm-svn: 51464
2008-05-23 01:01:31 +00:00
Dan Gohman
d78c400b5b
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
Chris Lattner
47fed61526
Fix various DOUTs to not call the extremely expensive Value::getName()
...
method. DOUT statements are disabled when assertions are off, but the
side effects of getName() are still evaluated. Just call getNameSTart,
which is close enough and doesn't cause heap traffic.
llvm-svn: 50958
2008-05-11 01:55:59 +00:00
Chris Lattner
82146fa267
Simplify code by using SwitchInst::findCaseValue instead of reimplementing it.
...
llvm-svn: 50957
2008-05-10 23:56:54 +00:00
Nick Lewycky
4d43d3c72c
Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
...
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.
llvm-svn: 50265
2008-04-25 16:53:59 +00:00
Chris Lattner
97951ac580
code restructuring, not functionality change.
...
llvm-svn: 50203
2008-04-24 00:21:50 +00:00
Chris Lattner
12f1e007f7
Don't replace multiple result of calls with undef,
...
sccp tracks getresult values, not call values in this
case.
llvm-svn: 50202
2008-04-24 00:19:54 +00:00
Chris Lattner
769203cb03
code cleanup, no functionality change.
...
llvm-svn: 50201
2008-04-24 00:16:28 +00:00
Chris Lattner
5a58a4dc6d
Rewrite multiple return value handling in SCCP. Before, the -sccp pass
...
would turn every getresult instruction into undef. This helps with
rdar://5778210
llvm-svn: 50140
2008-04-23 05:38:20 +00:00
Devang Patel
a7dfbc0366
Be conservative if getresult operand is neither call nor invoke.
...
llvm-svn: 49430
2008-04-09 15:58:24 +00:00
Gabor Greif
e9ecc68d8f
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
Dan Gohman
9988569af8
Don't include <map> in Pass.h, which doesn't need it. This requires
...
adding <map> to many files that actually do need it.
llvm-svn: 48667
2008-03-21 23:51:57 +00:00
Devang Patel
e418de3023
Add TODO reminder.
...
llvm-svn: 48227
2008-03-11 17:32:05 +00:00
Devang Patel
a7a2075ab8
Initial multiple return values support.
...
llvm-svn: 48210
2008-03-11 05:46:42 +00:00
Nick Lewycky
83750d9caf
SCCP also needs to be taught to follow unwind_to
...
llvm-svn: 48109
2008-03-09 09:44:38 +00:00
Nick Lewycky
35e92c7bea
Not all users of a BB are Instructions any more.
...
llvm-svn: 48047
2008-03-08 07:48:41 +00:00
Anton Korobeynikov
1bfd121321
Make Transforms to be 4.3 warnings-clean
...
llvm-svn: 47371
2008-02-20 11:26:25 +00:00
Chris Lattner
1b706dd680
Fix PR1938 by forcing the code that uses an undefined value to branch one
...
way or the other. Rewriting the code itself prevents subsequent analysis
passes from making contradictory conclusions about the code that could
cause an infeasible path to be made feasible.
llvm-svn: 46427
2008-01-28 00:32:30 +00:00
Chris Lattner
f3ebc3f3d2
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Christopher Lamb
b053b80b79
Disable null pointer folding transforms for non-generic address spaces. This should probably be a target-specific predicate based on address space. That way for targets where this isn't applicable the predicate can be optimized away.
...
llvm-svn: 45403
2007-12-29 07:56:53 +00:00
Dan Gohman
c731c97fac
Use empty() member functions when that's what's being tested for instead
...
of comparing begin() and end().
llvm-svn: 42585
2007-10-03 19:26:29 +00:00
Duncan Sands
2be91fcdd8
Place SCCPSolver also in the anonymous namespace. This
...
pacifies g++-4.2.
llvm-svn: 40089
2007-07-20 08:56:21 +00:00
Devang Patel
2c30a37a5c
Fix PR1431
...
Test case at Transformations/SCCP/2007-05-16-InvokeCrash.ll
llvm-svn: 37185
2007-05-17 22:10:15 +00:00
Nick Lewycky
e7da2d6ac3
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
8c78a0bff0
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
e95c6ad802
Use 'static const char' instead of 'static const int'.
...
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
09f162ca6a
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Chris Lattner
28d921d04f
fix long lines
...
llvm-svn: 36031
2007-04-14 23:32:02 +00:00
Chris Lattner
c33fd469ef
minor cleanups
...
llvm-svn: 34904
2007-03-04 04:50:21 +00:00
Reid Spencer
d84d35ba70
For PR1195:
...
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293
2007-02-15 02:26:10 +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