Jay Foad
ca3fc38839
Convert ConstantFoldGetElementPtr to use ArrayRef.
...
llvm-svn: 135483
2011-07-19 15:30:30 +00:00
Chris Lattner
229907cd11
land David Blaikie's patch to de-constify Type, with a few tweaks.
...
llvm-svn: 135375
2011-07-18 04:54:35 +00:00
Jay Foad
57aa636794
Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.
...
llvm-svn: 135040
2011-07-13 10:26:04 +00:00
Jay Foad
1d4a8fe156
Remove casts between Value** and Constant**, which won't work if a
...
static_cast from Constant* to Value* has to adjust the "this" pointer.
This is groundwork for PR889.
llvm-svn: 123435
2011-01-14 08:07:43 +00:00
Chris Lattner
f5edeebd8c
eliminate a bunch of pointless LLVMContext arguments.
...
llvm-svn: 95001
2010-02-01 20:48:08 +00:00
Nick Lewycky
e0332983fd
Value* were never meant to be const. Removing constness from the constant
...
folder removes a lot of const_casting and requires no changes to clang or
llvm-gcc.
llvm-svn: 82349
2009-09-20 01:35:59 +00:00
Dan Gohman
21c6216c87
Teach lib/VMCore/ConstantFold.cpp how to set the inbounds keyword and
...
how to fold notionally-out-of-bounds array getelementptr indices instead
of just doing these in lib/Analysis/ConstantFolding.cpp, because it can
be done in a fairly general way without TargetData, and because not all
constants are visited by lib/Analysis/ConstantFolding.cpp. This enables
more constant folding.
Also, set the "inbounds" flag when the getelementptr indices are
one-past-the-end.
llvm-svn: 81483
2009-09-11 00:04:14 +00:00
Benjamin Kramer
78c3bcb582
Make LLVMContext and LLVMContextImpl classes instead of structs.
...
llvm-svn: 78690
2009-08-11 17:45:13 +00:00
Owen Anderson
afd0c4cd56
Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
...
not hideous. Also, fix some MSVC compile errors.
llvm-svn: 78115
2009-08-04 22:41:48 +00:00
Owen Anderson
53a52215b5
Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
...
This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.
llvm-svn: 75445
2009-07-13 04:09:18 +00:00
Owen Anderson
2cda7d74bc
Forgot this file.
...
llvm-svn: 73802
2009-06-20 00:26:26 +00:00
Owen Anderson
b07dd959a4
Fix a serious bug that would cause deadlock during abstract type refinement. The constant creation
...
gets involved, and we end up trying to recursively acquire a writer lock. The fix for this is slightly horrible,
and involves passing a boolean "locked" parameter around in Constants.cpp, but it's better than having locked and
unlocked versions of most of the code.
llvm-svn: 73790
2009-06-19 23:16:19 +00:00
Duncan Sands
c1e48b582d
Fix comment typos.
...
llvm-svn: 54266
2008-08-01 12:23:49 +00:00
Dan Gohman
3db11c2bd9
Constant folding for insertvalue and extractvalue.
...
llvm-svn: 51889
2008-06-03 00:15:20 +00:00
Dan Gohman
12fce7751b
IR support for extractvalue and insertvalue instructions. Also, begin
...
moving toward making structs and arrays first-class types.
llvm-svn: 51157
2008-05-15 19:50:34 +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
Dan Gohman
d09f1c40a2
The #include <iterator> isn't needed in this header.
...
llvm-svn: 43232
2007-10-22 20:44:10 +00:00
David Greene
c656cbb8c2
Update GEP constructors to use an iterator interface to fix
...
GLIBCXX_DEBUG issues.
llvm-svn: 41697
2007-09-04 15:46:09 +00:00
Chris Lattner
33e93b84af
ConstantFolding.cpp/h -> ConstantFold.cpp/h to avoid confusion with
...
lib/Analysis/ConstantFolding.
llvm-svn: 34653
2007-02-27 03:05:06 +00:00