Commit Graph

2942 Commits

Author SHA1 Message Date
Bob Wilson
dc297c1f66 Fix an assumption that there is a single return value when verifying
overloaded types for intrinsic parameters.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77466 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 16:25:56 +00:00
Devang Patel
f457d1316d Add NamedMDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77409 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 00:33:07 +00:00
Devang Patel
3755bec950 Remove unused method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 22:04:55 +00:00
Devang Patel
0a9f7b9c3e Rename MDNode.h header. It defines MDnode and other metadata classes.
New name is Metadata.h.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77370 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 21:49:47 +00:00
Owen Anderson
af7ec97587 Return ConstantVector to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 21:19:26 +00:00
Owen Anderson
1fd7096407 Change ConstantArray to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 18:32:17 +00:00
Owen Anderson
8fa3338ed2 Move ConstantStruct back to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 22:29:26 +00:00
Dan Gohman
f08583b532 Add a comment about the "getelementptr null" trick.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:59:50 +00:00
Dan Gohman
dd8004dc73 Add a new keyword 'inbounds' for use with getelementptr. See the
LangRef.html changes for details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:53:46 +00:00
Daniel Dunbar
b82eaa1823 Unbreak build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:47:07 +00:00
Owen Anderson
6f83c9c6ef Move ConstantFP construction back to the 2.5-ish API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 20:59:43 +00:00
Devang Patel
ad895a8dec Initialize mdnNext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:42:56 +00:00
Dan Gohman
59858cf792 Change the assembly syntax for nsw, nuw, and exact, putting them
after their associated opcodes rather than before. This makes them
a little easier to read.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:11:46 +00:00
Daniel Dunbar
4fa4990bdc Make sure getName().data() is always null terminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77149 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 09:22:02 +00:00
Daniel Dunbar
93b67e40de Eliminate some uses of DOUT, cerr, and getNameStart().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77145 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 07:49:05 +00:00
Daniel Dunbar
499027fb48 Rewrite getName{Start,End,Len} in terms of getName(), instead of vice-versa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77105 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:51:56 +00:00
Daniel Dunbar
07f6903cbe Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:42:33 +00:00
Daniel Dunbar
3f53fa9a51 Remove Value::setName(const char*, unsigned).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:34:27 +00:00
Daniel Dunbar
d1319ef308 Remove Value::setName(const char*).
- Split into a separate patch because there is a slight functionality change,
   it is no longer valid to call setName(0), which was equivalent to
   setName(""). I'm hoping no one depends on this...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:17:14 +00:00
Daniel Dunbar
03d7651c36 Remove Value::{isName, getNameRef}.
Also, change MDString to use a StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77098 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 23:55:21 +00:00
Daniel Dunbar
92ccf70ad4 Finish migrating VMCore to StringRef/Twine based APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77051 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 06:02:13 +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
Dan Gohman
fd87a544c0 Convert a few more things to use raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77039 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 01:43:01 +00:00
Owen Anderson
eed707b1e6 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 23:12:02 +00:00
Daniel Dunbar
b95c2fd270 Move more to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76964 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 10:05:20 +00:00
Chris Lattner
083a1e0597 make Constant::getRelocationInfo return an enum, as suggested by Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76938 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 03:27:21 +00:00
Owen Anderson
5bd68393ed Privatize the ConstantVector tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 00:36:24 +00:00
Owen Anderson
006c77df8c Privatize the ConstantStruct table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 23:25:33 +00:00
Daniel Dunbar
bc8d813f71 Switch ValueSymbolTable to StringRef based API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:52:12 +00:00
Daniel Dunbar
e6c42dd6d3 Add llvm::Value::getNameRef, for help in API migration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76893 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:50:53 +00:00
Daniel Dunbar
6316fbcb04 Convert StringMap to using StringRef for its APIs.
- Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:17:34 +00:00
Devang Patel
2f9c3b002d MDString
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76841 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 02:00:51 +00:00
Devang Patel
104cf9e02b Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into METADATA_BLOCK in bitcode file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76834 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 01:07:34 +00:00
Dan Gohman
08d012eba4 Rename the new unsigned and signed keywords to nuw and nsw,
which stand for no-unsigned-wrap and no-signed-wrap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76810 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 22:44:56 +00:00
Daniel Dunbar
3d5126fbad Switch some clients to Value::getName(), and other getName() user
simplification.
 - NFC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 21:33:09 +00:00
Devang Patel
66a9d6702f Do not print "metadata" twice while printing MDString.
This fixes unittest failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76764 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 18:10:23 +00:00
Devang Patel
e54abc90fe Introduce MetadataBase, a base class for MDString and MDNode.
Derive MDString directly from MetadataBase. 
Introduce new bitcode block to hold metadata.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76759 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 17:43:22 +00:00
Duncan Sands
a926697373 Add newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 13:20: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
Chris Lattner
7cf12c7efd reimplement Constant::ContainsRelocations as
Constant::getRelocationInfo(), which has a much simpler
to use API.  It still should not be part of libvmcore, but
is better than it was.  Also teach it to be smart about 
hidden visibility.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:05:44 +00:00
Dan Gohman
295643b805 Permit the IntPtrTy argument to isEliminableCastPair to be null,
to help support use when TargetData is not available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76675 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 23:19:40 +00:00
Owen Anderson
822ccd9974 Privatize the ConstantArray table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76639 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 20:55:28 +00:00
Owen Anderson
16e298f980 Privatize the first of the value maps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76634 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 20:13:12 +00:00
Owen Anderson
b3056faa55 Rename getConstantInt{True|False} to get{True|False} at Chris' behest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 18:03:38 +00:00
Owen Anderson
f53c371983 Move a bit more state over to the LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 02:47:59 +00:00
Dan Gohman
1224c38698 Assembly and Bitcode support for unsigned/signed overflow flags and
exact sdiv flags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76475 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 21:19:07 +00:00
Bill Wendling
4aebcb4f5f Change the casting of linkage types into a map. This makes this much more robust
as it no longer depends upon two different enums being kept in sync with each
other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76465 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 20:34:46 +00:00
Bill Wendling
5c0ba804c0 Rename Mangler linkage enums to something less gross.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 19:41:27 +00:00
Dan Gohman
f241174421 Revert the addition of hasNoPointerOverflow to GEPOperator.
Getelementptrs that are defined to wrap are virtually useless to
optimization, and getelementptrs that are undefined on any kind
of overflow are too restrictive -- it's difficult to ensure that
all intermediate addresses are within bounds. I'm going to take
a different approach.

Remove a few optimizations that depended on this flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76437 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:43:30 +00:00