Chris Lattner
7ef1cac576
move debug info stuff out of line, allowing two #includes
...
to go away from IRBuilder.h
llvm-svn: 92230
2009-12-28 21:45:40 +00:00
Chris Lattner
17079fc0fa
split code that doesn't need to be templated out of IRBuilder into a new
...
non-templated IRBuilderBase class. Move that large CreateGlobalString
out of line, eliminating the need to #include GlobalVariable.h in IRBuilder.h
llvm-svn: 92227
2009-12-28 21:28:46 +00:00
Chris Lattner
7093946ab1
rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind
...
doesn't exist already, eliminate registerMDKind. Tidy up a bunch
of random stuff.
llvm-svn: 92225
2009-12-28 20:45:51 +00:00
Chris Lattner
c9558df1f0
rename getHandlerNames to getMDKindNames, simplify its interface
...
and simplify all the clients that use it.
llvm-svn: 92224
2009-12-28 20:10:43 +00:00
Chris Lattner
9a258777a5
tidy up and delete a dead smallvector.
...
llvm-svn: 92223
2009-12-28 19:49:00 +00:00
Chris Lattner
95c445d280
avoid a completely unneeded linear walk.
...
llvm-svn: 92221
2009-12-28 09:32:10 +00:00
Chris Lattner
c6d17e29df
Eliminate two bits of ugliness in MDNode::replaceElement:
...
eliminate the temporary smallvector, and only do FindNodeOrInsertPos
twice if the first one succeeds and we delete a node.
llvm-svn: 92220
2009-12-28 09:24:53 +00:00
Chris Lattner
f543eff71c
rearrange some methods, no functionality change.
...
llvm-svn: 92219
2009-12-28 09:12:35 +00:00
Chris Lattner
d944cf76de
avoid temporary CallbackVH's.
...
llvm-svn: 92218
2009-12-28 09:10:16 +00:00
Chris Lattner
588096e51d
Rewrite the function-local validation logic for MDNodes (most of r91708).
...
Among other benefits, this doesn't leak the SmallPtrSet, has the verifier
code in the verifier pass, actually does the verification at the end,
and is considerably simpler.
llvm-svn: 92217
2009-12-28 09:07:21 +00:00
Chris Lattner
66a4c3d084
rename MDNode instance variables to something meaningful.
...
llvm-svn: 92216
2009-12-28 08:48:12 +00:00
Chris Lattner
5a409bd17a
snip one more #include from Metadata.h
...
llvm-svn: 92214
2009-12-28 08:30:43 +00:00
Chris Lattner
1300f45ba9
prune some #includes
...
llvm-svn: 92212
2009-12-28 08:24:16 +00:00
Chris Lattner
53bb5e4ae0
change the strange MetadataContext::getMDs function to expose less
...
irrelevant internal implementation details to clients.
llvm-svn: 92210
2009-12-28 08:14:54 +00:00
Chris Lattner
1bc810bb89
change NamedMDNode to use a pimpl for its operand list instead
...
of making it a declared part of the value.
llvm-svn: 92209
2009-12-28 08:07:14 +00:00
Chris Lattner
74a6ad6f29
move ElementVH out of the MDNode class into the MDNode.cpp file. Among
...
other things, this avoids vtable and rtti data for it being splatted in
every translation unit that uses it.
llvm-svn: 92207
2009-12-28 07:41:54 +00:00
Bill Wendling
6ce6d268a6
Avoid assigning to Changed when it won't be used after the return.
...
llvm-svn: 92160
2009-12-25 13:50:18 +00:00
John McCall
086bb4ef82
Qualify a bunch of explicit template instantiations to satisfy clang++.
...
llvm-svn: 91736
2009-12-19 00:55:12 +00:00
John McCall
791e5c9dd5
Put TypesEqual and TypeHasCycleThroughItself in namespace llvm so ADL from
...
the templates in TypesContext.h can find them. Caught by clang++.
llvm-svn: 91735
2009-12-19 00:51:42 +00:00
Eli Friedman
3a7cdaca33
Fix gcc warning.
...
llvm-svn: 91715
2009-12-18 21:07:18 +00:00
Rafael Espindola
2c5792a6bd
Catch more cases of a pointer being marked garbage twice. This helps when
...
debugging some leaks (PR5770 in particular).
llvm-svn: 91713
2009-12-18 20:35:38 +00:00
Victor Hernandez
0471abd58b
Formalize MDNode's function-localness:
...
- an MDNode is designated as function-local when created, and continues to be even if its operands are modified not to refer to function-local IR
- function-localness is designated via lowest bit in SubclassData
- getLocalFunction() descends MDNode tree to see if it is consistently function-local
Add verification of MDNodes to checks that MDNodes are consistently function-local.
Update AsmWriter to use isFunctionLocal().
llvm-svn: 91708
2009-12-18 20:09:14 +00:00
Dan Gohman
4e3b29e309
Add utility routines for NSW multiply.
...
llvm-svn: 91664
2009-12-18 03:10:26 +00:00
Dan Gohman
4ab4420d7a
Add utility routines for creating integer negation operators with NSW set.
...
Integer negation only overflows with INT_MIN, but that's an important case.
llvm-svn: 91662
2009-12-18 02:58:50 +00:00
Jeffrey Yasskin
28f244863e
This fixes a memory leak in OpaqueType found by Google's internal heapchecker.
...
llvm-svn: 91611
2009-12-17 19:55:06 +00:00
Eli Friedman
e67cae33e1
Aggressively flip compare constant expressions where appropriate; constant
...
folding in particular expects null to be on the RHS.
llvm-svn: 91587
2009-12-17 06:07:04 +00:00
Victor Hernandez
2003b90807
Use different name for argument and field
...
llvm-svn: 91524
2009-12-16 08:10:57 +00:00
Victor Hernandez
dd7418ae3f
MDNodes that refer to an instruction are local to a function; in that case, explicitly keep track of the function they are local to
...
llvm-svn: 91497
2009-12-16 02:52:09 +00:00
Chris Lattner
45d040bd85
Remove isPod() from DenseMapInfo, splitting it out to its own
...
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.
llvm-svn: 91421
2009-12-15 07:26:43 +00:00
Dan Gohman
1cfbfc86cf
Move several function bodies which are rarely inlined out of line.
...
llvm-svn: 91319
2009-12-14 19:43:09 +00:00
Duncan Sands
5d96f3fcb6
Add utility method for determining whether a function argument
...
has the 'nest' attribute.
llvm-svn: 91109
2009-12-11 08:36:17 +00:00
Benjamin Kramer
dfcc285902
Remove useless calls to c_str().
...
llvm-svn: 90855
2009-12-08 13:07:38 +00:00
Chris Lattner
ff09559a8f
whitespace cleanup
...
llvm-svn: 90834
2009-12-08 05:31:46 +00:00
Anton Korobeynikov
27a0ecfa39
Add MSP430 interrupt calling conv. No functionality change yet.
...
llvm-svn: 90738
2009-12-07 02:27:35 +00:00
Victor Hernandez
4d633542f2
Avoid creating a metadata slot for all metadata that contains an instruction
...
llvm-svn: 90581
2009-12-04 20:07:10 +00:00
Victor Hernandez
a6bd3f5f5e
Fix crasher when N->getElement(n) is NULL
...
llvm-svn: 90572
2009-12-04 18:29:23 +00:00
Andreas Neustifter
4665141ebd
Added debug output for inherited passes that are invalidated.
...
llvm-svn: 90553
2009-12-04 06:58:24 +00:00
Victor Hernandez
b7176a13a4
Teach AsmWriter to write inline (not via a global metadata slot) metadata that contains an instruction
...
llvm-svn: 90512
2009-12-04 01:35:02 +00:00
Chris Lattner
a48f44d9ee
improve portability to avoid conflicting with std::next in c++'0x.
...
Patch by Howard Hinnant!
llvm-svn: 90365
2009-12-03 00:50:42 +00:00
Nick Lewycky
6e0525141f
Oops! Fix bug introduced in my recent cleanup change. Thanks to Tobias Grosser
...
for pointing this out.
llvm-svn: 90015
2009-11-27 19:57:53 +00:00
Nick Lewycky
a75fe185ba
Fix typo spotted by Gabor Greif.
...
llvm-svn: 89976
2009-11-26 23:19:05 +00:00
Nick Lewycky
898e8f756a
Clean up file, no functionality change.
...
llvm-svn: 89974
2009-11-26 22:54:26 +00:00
Dan Gohman
05ebc8f71f
Move FunctionPassManagerImpl's dumpArguments and dumpPasses calls
...
out of its run function and into its doInitialization method, so
that it does the dump once instead of once per function.
llvm-svn: 89660
2009-11-23 16:24:18 +00:00
Duncan Sands
9d786d701d
I forgot to update the prototype for LLVMBuildIntCast when correcting
...
the body to not pass the name for the isSigned parameter. However it
seems that changing prototypes is a big-no-no, so here I revert the
previous change and pass "true" for isSigned, meaning this always does
a signed cast, which was the previous behaviour assuming the name was
not NULL! Some other C function needs to be introduced for the general
case of signed or unsigned casts. This hopefully unbreaks the ocaml
binding.
llvm-svn: 89648
2009-11-23 10:49:03 +00:00
Nick Lewycky
890a1d120f
Start catching LLVMContext misuse in the verifier.
...
llvm-svn: 89646
2009-11-23 04:52:00 +00:00
Jeffrey Yasskin
7c57c41d5f
In GlobalVariable::setInitializer, assert that the initializer has the
...
right type.
llvm-svn: 89014
2009-11-17 00:43:13 +00:00
Duncan Sands
9649e6085d
BuildIntCast takes an additional parameter, isSigned.
...
llvm-svn: 88910
2009-11-16 13:15:28 +00:00
Evan Cheng
00e87d19f5
Special case FixedStackPseudoSourceValueVal as well. Do we really need to differentiate PseudoSourceValueVal from FixedStackPseudoSourceValueVal at this level?
...
llvm-svn: 88902
2009-11-16 07:10:36 +00:00
Eric Christopher
96b26acd0f
Remove extraneous commit.
...
llvm-svn: 88716
2009-11-13 23:08:47 +00:00
Eric Christopher
0cabd30b22
Print out something, even if it's non-parseable later when we've
...
got ghost linkage. It's better than aborting.
llvm-svn: 88715
2009-11-13 23:00:14 +00:00