Chris Lattner
3f8e5dd898
strength reduce this call away.
...
llvm-svn: 92253
2009-12-29 07:49:13 +00:00
Chris Lattner
68017800cd
remove some unneeded Metadata interfaces.
...
llvm-svn: 92252
2009-12-29 07:44:16 +00:00
Chris Lattner
426b709a81
fix whitespace in test to match llvm asmprinter change.
...
llvm-svn: 92251
2009-12-29 07:42:23 +00:00
Chris Lattner
3b32672733
fix .cpp file to not wrap the entire file in namespace blocks.
...
llvm-svn: 92250
2009-12-29 07:28:33 +00:00
Chris Lattner
031560c2c7
tidy up debug info comments, use ->isVoidTy() where reasonable.
...
llvm-svn: 92249
2009-12-29 07:25:48 +00:00
Chandler Carruth
607f38e05f
Correctly refer to element CVR qualifications when determining if a type is
...
more or less cv-qualified than another during implicit conversion and overload
resolution ([basic.type.qualifier] p5). Factors the logic out of template
deduction and into the ASTContext so it can be shared.
This fixes several aspects of PR5542, but not all of them.
llvm-svn: 92248
2009-12-29 07:16:59 +00:00
Chris Lattner
5d3b077111
sink twine.h down out of Value.h. It is annoying that you need
...
to #include Twine.h just to give a twine a default value.
llvm-svn: 92247
2009-12-29 07:12:03 +00:00
Anders Carlsson
88ea2455f8
Get rid of FixedWidthIntType, as suggested by Chris and Eli.
...
llvm-svn: 92246
2009-12-29 07:07:36 +00:00
Chandler Carruth
c25c6ee3db
Handle using declarations in overloaded and template functions during ADL and
...
address resolution. This fixes PR5751.
Also, while we're here, remove logic from ADL which mistakenly included the
definition namespaces of overloaded and/or templated functions whose name or
address is used as an argument.
llvm-svn: 92245
2009-12-29 06:17:27 +00:00
Sanjiv Gupta
015215ca86
Extern declaration for unordered.f32 libcall was not being emitted. Fixed that.
...
llvm-svn: 92242
2009-12-29 03:24:34 +00:00
Chris Lattner
241264ee32
When doing v1->RAUW(v2), don't do anything to metadata. We don't know
...
why one was replaced with the other. Even in the specific case of
debug information, it doesn't make sense to transfer the location over,
this will just result in jumbled loc info.
llvm-svn: 92241
2009-12-29 02:53:52 +00:00
Chris Lattner
d8eb2cf571
sink the Instruction::HasMetadata bit into SubclassData.
...
llvm-svn: 92240
2009-12-29 02:46:09 +00:00
Chris Lattner
b9c8651b8c
add a layer of accessors around the Value::SubClassData member, and use
...
a convention (shadowing the setter with private forwarding function) to
prevent subclasses from accidentally using it.
This exposed some bogosity in ConstantExprs, which was propaging the
opcode of the constant expr into the NUW/NSW/Exact field in the
getWithOperands/getWithOperandReplaced methods.
llvm-svn: 92239
2009-12-29 02:14:09 +00:00
Chris Lattner
9f021fd05d
adjust for llvm api changes.
...
llvm-svn: 92236
2009-12-28 23:41:39 +00:00
Chris Lattner
2f2aa2b067
This is a major cleanup of the instruction metadata interfaces that
...
I asked Devang to do back on Sep 27. Instead of going through the
MetadataContext class with methods like getMD() and getMDs(), just
ask the instruction directly for its metadata with getMetadata()
and getAllMetadata().
This includes a variety of other fixes and improvements: previously
all Value*'s were bloated because the HasMetadata bit was thrown into
value, adding a 9th bit to a byte. Now this is properly sunk down to
the Instruction class (the only place where it makes sense) and it
will be folded away somewhere soon.
This also fixes some confusion in getMDs and its clients about
whether the returned list is indexed by the MDID or densely packed.
This is now returned sorted and densely packed and the comments make
this clear.
This introduces a number of fixme's which I'll follow up on.
llvm-svn: 92235
2009-12-28 23:41:32 +00:00
Chris Lattner
06ea5ffcff
rearrange some code.
...
llvm-svn: 92234
2009-12-28 21:56:07 +00:00
Chris Lattner
a16bdb9f96
add IRBuilder.cpp to cmake
...
llvm-svn: 92233
2009-12-28 21:52:41 +00:00
Chris Lattner
a7057044c9
remove #include that comes in from ConstantFolder.h
...
llvm-svn: 92232
2009-12-28 21:52:06 +00:00
Chris Lattner
49f9f76030
remove #include of Function.h from IRBuilder
...
llvm-svn: 92231
2009-12-28 21:50:56 +00:00
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
5e124bf913
this form of SetDebugLocation is about to go away, add some #includes that
...
are about to not come in implicitly.
llvm-svn: 92228
2009-12-28 21:44:41 +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
940fc89dc5
rename ivar to be more descriptive.
...
llvm-svn: 92226
2009-12-28 21:12:29 +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
Benjamin Kramer
8adc1e2263
Add missing include (for inline PATypeHolder::get).
...
llvm-svn: 92222
2009-12-28 12:27:56 +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
f91d3c34ff
prune #includes more.
...
llvm-svn: 92213
2009-12-28 08:26:43 +00:00
Chris Lattner
1300f45ba9
prune some #includes
...
llvm-svn: 92212
2009-12-28 08:24:16 +00:00
Chris Lattner
f8d22fc77d
Metadata.h doesn't need to include ValueHandle.h anymore.
...
llvm-svn: 92211
2009-12-28 08:20:46 +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
f1ef03ad4d
eliminate the elem_* iterator stuff from NamedMDNode.
...
llvm-svn: 92208
2009-12-28 07:57:01 +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
Chris Lattner
f81add3fdf
move these out of their own timer groups into the 'uncategorized' groups.
...
llvm-svn: 92206
2009-12-28 07:41:18 +00:00
Zhongxing Xu
6de8201a63
Adjust indentation.
...
llvm-svn: 92205
2009-12-28 06:52:51 +00:00
Zhongxing Xu
947420d6ad
Fix 80-col violation.
...
llvm-svn: 92204
2009-12-28 06:49:22 +00:00
Chris Lattner
9e0005f445
use best-fit instead of first-fit when reusing a MacroArgs object,
...
this speeds up Eonly on the testcase in PR5888 from 30.5s to 0.85s
llvm-svn: 92203
2009-12-28 06:36:46 +00:00
Chris Lattner
394f589e73
The PreExpArgTokens array is indexed with an argument #,
...
not a token number. Fix the reserve logic to get the right
amount of space.
llvm-svn: 92202
2009-12-28 06:17:16 +00:00
Sanjiv Gupta
1ecffe13b2
Fixed llc crash for zext (i1 -> i8) loads.
...
llvm-svn: 92201
2009-12-28 04:53:24 +00:00
Sam Weinig
b999f68ed9
Fix for PR5871. Make __PRETTY_FUNCTION__ work for member functions defined in a class local to a function.
...
llvm-svn: 92200
2009-12-28 03:19:38 +00:00
Sanjiv Gupta
0b00a1b54e
Allow targets to specify the return type of libcalls that are generated for floating point comparisons, rather than hard-coding them as i32.
...
llvm-svn: 92199
2009-12-28 02:40:33 +00:00
Bill Wendling
5dda76ef11
Mark variable used by 'assert' as 'unused'.
...
llvm-svn: 92198
2009-12-28 02:07:00 +00:00