Dan Gohman
1b84908f92
Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.
...
llvm-svn: 81172
2009-09-07 23:54:19 +00:00
Duncan Sands
0f5bbb585c
Public and private corrections, warned about by icc ( #304 ).
...
Patch by Erick Tryzelaar.
llvm-svn: 81107
2009-09-06 08:55:57 +00:00
Daniel Dunbar
10ea8bb8e0
Revert "Include optional subclass flags, such as inbounds, nsw, etc., ...", this
...
breaks MiniSAT on x86_64.
llvm-svn: 81098
2009-09-06 00:11:24 +00:00
Dan Gohman
0c2477c26b
Include optional subclass flags, such as inbounds, nsw, etc., in the
...
Constant uniquing tables. This allows distinct ConstantExpr objects
with the same operation and different flags.
Even though a ConstantExpr "a + b" is either always overflowing or
never overflowing (due to being a ConstantExpr), it's still necessary
to be able to represent it both with and without overflow flags at
the same time within the IR, because the safety of the flag may
depend on the context of the use. If the constant really does overflow,
it wouldn't ever be safe to use with the flag set, however the use
may be in code that is never actually executed.
This also makes it possible to merge all the flags tests into a single test.
llvm-svn: 80998
2009-09-04 12:08:11 +00:00
Gabor Greif
2d60e1ec0c
back out my recent commit (r80858), it seems to break self-hosting buildbot's stage 2 configure
...
llvm-svn: 80871
2009-09-03 02:02:59 +00:00
Devang Patel
116b4a0cb3
Add new value for given index in MDValuePtrs.
...
llvm-svn: 80867
2009-09-03 01:38:02 +00:00
Gabor Greif
14dfba6d66
re-commit r66920 (which has been backed out in r66953) I may have more luck this time. I'll back out if needed...
...
llvm-svn: 80858
2009-09-03 00:18:58 +00:00
Sandeep Patel
68c5f477fa
Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
...
llvm-svn: 80773
2009-09-02 08:44:58 +00:00
Devang Patel
80ae34974b
Reapply 79977.
...
Use MDNodes to encode debug info in llvm IR.
llvm-svn: 80406
2009-08-28 23:24:31 +00:00
Devang Patel
f08e35d9dc
Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.
...
llvm-svn: 80073
2009-08-26 05:01:18 +00:00
Dan Gohman
ad1f0a1101
Eliminate the unused Context argument on one of the ICmpInst and FCmpInst
...
constructors.
llvm-svn: 80049
2009-08-25 23:17:54 +00:00
Dan Gohman
61a8796ddb
Make LLVM command-line tools overwrite their output files without -f.
...
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".
Add a -f option to llvm-extract and llvm-link, for consistency.
Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.
Update Makefiles and documentation accordingly.
llvm-svn: 79990
2009-08-25 15:34:52 +00:00
Devang Patel
02aac922b4
Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
...
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)
llvm-svn: 79977
2009-08-25 05:24:07 +00:00
Chris Lattner
471ba48cb9
remove some uses of llvm/Support/Streams.h
...
llvm-svn: 79842
2009-08-23 08:43:55 +00:00
Chris Lattner
6973395cc7
eliminate the std::ostream forms of the bitcode writing APIs.
...
llvm-svn: 79840
2009-08-23 07:49:08 +00:00
Dan Gohman
16f5415f5b
Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrap
...
and hasNoSignedWrap, for consistency with the nuw and nsw properties.
llvm-svn: 79539
2009-08-20 17:11:38 +00:00
Daniel Dunbar
8b0b11582d
Switch to SmallString::str from SmallString::c_str, and remove
...
SmallString::c_str.
llvm-svn: 79456
2009-08-19 20:07:03 +00:00
Owen Anderson
a42ac6953b
Actually privatize a IntegerTypes, and fix a few bugs exposed by this.
...
llvm-svn: 78955
2009-08-13 23:27:32 +00:00
Owen Anderson
55f1c09e31
Push LLVMContexts through the IntegerType APIs.
...
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Benjamin Kramer
78c3bcb582
Make LLVMContext and LLVMContextImpl classes instead of structs.
...
llvm-svn: 78690
2009-08-11 17:45:13 +00:00
Erick Tryzelaar
70ede4843c
Change llvm-c's ordering of contexts to make it consistent.
...
llvm-svn: 78656
2009-08-11 07:46:16 +00:00
Owen Anderson
03cb69fbd1
Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
...
llvm-svn: 78258
2009-08-05 23:16:16 +00:00
Chris Lattner
694285ca6d
revert r78048, it isn't worth using assertingvh here.
...
llvm-svn: 78119
2009-08-04 23:07:12 +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
Devang Patel
05eb617da5
Use separate ValueList for metadata.
...
This fixes PR4666.
llvm-svn: 78056
2009-08-04 06:00:18 +00:00
Devang Patel
8cca7b4abe
Revert recent bitcode writer patches.
...
llvm-svn: 78053
2009-08-04 05:01:35 +00:00
Chris Lattner
59c08e76ca
switch ValueMap to using AssertingVH. This is an old patch I had laying
...
around in a tree I forgot about.
llvm-svn: 78048
2009-08-04 04:31:02 +00:00
Devang Patel
4314b1dc01
Remove dead code.
...
llvm-svn: 78035
2009-08-04 02:54:15 +00:00
Devang Patel
b299790411
Fix MDString Abbrev setup.
...
llvm-svn: 78034
2009-08-04 02:36:39 +00:00
Devang Patel
8abe6bc291
Constants and Metadata share ValueList. This means they must be emitted interleaved (using appropriate BLOCK_IDs) otherwise ValuePtrs index gets out of sync.
...
llvm-svn: 78033
2009-08-04 02:26:56 +00:00
Owen Anderson
0087fe6e5c
Move the metadata constructors back to 2.5 syntax.
...
llvm-svn: 77733
2009-07-31 21:35:40 +00:00
Owen Anderson
5a1acd9912
Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
...
metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Benjamin Kramer
7e7617edf8
Work around a dangling pointer dereference when enumerating NamedMDNodes.
...
llvm-svn: 77675
2009-07-31 14:22:13 +00:00
Devang Patel
16e5124a82
Do not use abbrev while writing NamedMDNode name.
...
llvm-svn: 77637
2009-07-30 23:06:35 +00:00
Devang Patel
d14bacfb7a
Enumerate NamedMDNode elements first.
...
llvm-svn: 77636
2009-07-30 23:03:43 +00:00
Owen Anderson
b292b8ce70
Move more code back to 2.5 APIs.
...
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Devang Patel
27c87fff7f
Read and write NamedMDNode.
...
llvm-svn: 77517
2009-07-29 22:34:41 +00:00
Owen Anderson
4056ca9568
Move types back to the 2.5 API.
...
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Owen Anderson
487375e9a2
Move ConstantExpr to 2.5 API.
...
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
Devang Patel
727a582c59
Refactor. Fix indentation.
...
llvm-svn: 77482
2009-07-29 18:15:02 +00:00
Devang Patel
a4f43fb5dd
Rename MDNode.h header. It defines MDnode and other metadata classes.
...
New name is Metadata.h.
llvm-svn: 77370
2009-07-28 21:49:47 +00:00
Owen Anderson
4aa3295a65
Return ConstantVector to 2.5 API.
...
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Owen Anderson
c2c7932c64
Change ConstantArray to 2.5 API.
...
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Owen Anderson
45308b578b
Move ConstantStruct back to 2.5 API.
...
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Dan Gohman
1639c3905e
Add a new keyword 'inbounds' for use with getelementptr. See the
...
LangRef.html changes for details.
llvm-svn: 77259
2009-07-27 21:53:46 +00:00
Owen Anderson
69c464dec4
Move ConstantFP construction back to the 2.5-ish API.
...
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Daniel Dunbar
d786b51ea4
Remove Value::setName(const char*, unsigned).
...
llvm-svn: 77100
2009-07-26 00:34:27 +00:00
Daniel Dunbar
d43b86d4a4
Finish migrating VMCore to StringRef/Twine based APIs.
...
llvm-svn: 77051
2009-07-25 06:02:13 +00:00
Eric Christopher
c974225976
Move ExtractElementInst to ::Create instead of new. Update all uses.
...
llvm-svn: 77044
2009-07-25 02:28:41 +00:00
Owen Anderson
edb4a70325
Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
...
llvm-svn: 77011
2009-07-24 23:12:02 +00:00