oota-llvm.git
14 years agothe only call to this function (from clang) has been removed, zap it.
Chris Lattner [Tue, 29 Dec 2009 07:50:09 +0000 (07:50 +0000)]
the only call to this function (from clang) has been removed, zap it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92254 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove some unneeded Metadata interfaces.
Chris Lattner [Tue, 29 Dec 2009 07:44:16 +0000 (07:44 +0000)]
remove some unneeded Metadata interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92252 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix .cpp file to not wrap the entire file in namespace blocks.
Chris Lattner [Tue, 29 Dec 2009 07:28:33 +0000 (07:28 +0000)]
fix .cpp file to not wrap the entire file in namespace blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92250 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy up debug info comments, use ->isVoidTy() where reasonable.
Chris Lattner [Tue, 29 Dec 2009 07:25:48 +0000 (07:25 +0000)]
tidy up debug info comments, use ->isVoidTy() where reasonable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92249 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosink twine.h down out of Value.h. It is annoying that you need
Chris Lattner [Tue, 29 Dec 2009 07:12:03 +0000 (07:12 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92247 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoExtern declaration for unordered.f32 libcall was not being emitted. Fixed that.
Sanjiv Gupta [Tue, 29 Dec 2009 03:24:34 +0000 (03:24 +0000)]
Extern declaration for unordered.f32 libcall was not being emitted. Fixed that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92242 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen doing v1->RAUW(v2), don't do anything to metadata. We don't know
Chris Lattner [Tue, 29 Dec 2009 02:53:52 +0000 (02:53 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92241 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosink the Instruction::HasMetadata bit into SubclassData.
Chris Lattner [Tue, 29 Dec 2009 02:46:09 +0000 (02:46 +0000)]
sink the Instruction::HasMetadata bit into SubclassData.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92240 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd a layer of accessors around the Value::SubClassData member, and use
Chris Lattner [Tue, 29 Dec 2009 02:14:09 +0000 (02:14 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92239 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoThis is a major cleanup of the instruction metadata interfaces that
Chris Lattner [Mon, 28 Dec 2009 23:41:32 +0000 (23:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92235 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorearrange some code.
Chris Lattner [Mon, 28 Dec 2009 21:56:07 +0000 (21:56 +0000)]
rearrange some code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92234 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd IRBuilder.cpp to cmake
Chris Lattner [Mon, 28 Dec 2009 21:52:41 +0000 (21:52 +0000)]
add IRBuilder.cpp to cmake

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92233 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove #include that comes in from ConstantFolder.h
Chris Lattner [Mon, 28 Dec 2009 21:52:06 +0000 (21:52 +0000)]
remove #include that comes in from ConstantFolder.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92232 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoremove #include of Function.h from IRBuilder
Chris Lattner [Mon, 28 Dec 2009 21:50:56 +0000 (21:50 +0000)]
remove #include of Function.h from IRBuilder

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92231 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove debug info stuff out of line, allowing two #includes
Chris Lattner [Mon, 28 Dec 2009 21:45:40 +0000 (21:45 +0000)]
move debug info stuff out of line, allowing two #includes
to go away from IRBuilder.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92230 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosplit code that doesn't need to be templated out of IRBuilder into a new
Chris Lattner [Mon, 28 Dec 2009 21:28:46 +0000 (21:28 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92227 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename ivar to be more descriptive.
Chris Lattner [Mon, 28 Dec 2009 21:12:29 +0000 (21:12 +0000)]
rename ivar to be more descriptive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92226 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename getMDKind -> getMDKindID, make it autoinsert if an MD Kind
Chris Lattner [Mon, 28 Dec 2009 20:45:51 +0000 (20:45 +0000)]
rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind
doesn't exist already, eliminate registerMDKind.  Tidy up a bunch
of random stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92225 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename getHandlerNames to getMDKindNames, simplify its interface
Chris Lattner [Mon, 28 Dec 2009 20:10:43 +0000 (20:10 +0000)]
rename getHandlerNames to getMDKindNames, simplify its interface
and simplify all the clients that use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92224 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotidy up and delete a dead smallvector.
Chris Lattner [Mon, 28 Dec 2009 19:49:00 +0000 (19:49 +0000)]
tidy up and delete a dead smallvector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92223 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd missing include (for inline PATypeHolder::get).
Benjamin Kramer [Mon, 28 Dec 2009 12:27:56 +0000 (12:27 +0000)]
Add missing include (for inline PATypeHolder::get).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92222 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoavoid a completely unneeded linear walk.
Chris Lattner [Mon, 28 Dec 2009 09:32:10 +0000 (09:32 +0000)]
avoid a completely unneeded linear walk.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92221 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEliminate two bits of ugliness in MDNode::replaceElement:
Chris Lattner [Mon, 28 Dec 2009 09:24:53 +0000 (09:24 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92220 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorearrange some methods, no functionality change.
Chris Lattner [Mon, 28 Dec 2009 09:12:35 +0000 (09:12 +0000)]
rearrange some methods, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92219 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoavoid temporary CallbackVH's.
Chris Lattner [Mon, 28 Dec 2009 09:10:16 +0000 (09:10 +0000)]
avoid temporary CallbackVH's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92218 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRewrite the function-local validation logic for MDNodes (most of r91708).
Chris Lattner [Mon, 28 Dec 2009 09:07:21 +0000 (09:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92217 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agorename MDNode instance variables to something meaningful.
Chris Lattner [Mon, 28 Dec 2009 08:48:12 +0000 (08:48 +0000)]
rename MDNode instance variables to something meaningful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92216 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosnip one more #include from Metadata.h
Chris Lattner [Mon, 28 Dec 2009 08:30:43 +0000 (08:30 +0000)]
snip one more #include from Metadata.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92214 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoprune #includes more.
Chris Lattner [Mon, 28 Dec 2009 08:26:43 +0000 (08:26 +0000)]
prune #includes more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92213 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoprune some #includes
Chris Lattner [Mon, 28 Dec 2009 08:24:16 +0000 (08:24 +0000)]
prune some #includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92212 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMetadata.h doesn't need to include ValueHandle.h anymore.
Chris Lattner [Mon, 28 Dec 2009 08:20:46 +0000 (08:20 +0000)]
Metadata.h doesn't need to include ValueHandle.h anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92211 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agochange the strange MetadataContext::getMDs function to expose less
Chris Lattner [Mon, 28 Dec 2009 08:14:54 +0000 (08:14 +0000)]
change the strange MetadataContext::getMDs function to expose less
irrelevant internal implementation details to clients.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92210 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agochange NamedMDNode to use a pimpl for its operand list instead
Chris Lattner [Mon, 28 Dec 2009 08:07:14 +0000 (08:07 +0000)]
change NamedMDNode to use a pimpl for its operand list instead
of making it a declared part of the value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92209 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoeliminate the elem_* iterator stuff from NamedMDNode.
Chris Lattner [Mon, 28 Dec 2009 07:57:01 +0000 (07:57 +0000)]
eliminate the elem_* iterator stuff from NamedMDNode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92208 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove ElementVH out of the MDNode class into the MDNode.cpp file. Among
Chris Lattner [Mon, 28 Dec 2009 07:41:54 +0000 (07:41 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92207 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove these out of their own timer groups into the 'uncategorized' groups.
Chris Lattner [Mon, 28 Dec 2009 07:41:18 +0000 (07:41 +0000)]
move these out of their own timer groups into the 'uncategorized' groups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92206 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFixed llc crash for zext (i1 -> i8) loads.
Sanjiv Gupta [Mon, 28 Dec 2009 04:53:24 +0000 (04:53 +0000)]
Fixed llc crash for zext (i1 -> i8) loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92201 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAllow targets to specify the return type of libcalls that are generated for floating...
Sanjiv Gupta [Mon, 28 Dec 2009 02:40:33 +0000 (02:40 +0000)]
Allow targets to specify the return type of libcalls that are generated for floating point comparisons, rather than hard-coding them as i32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92199 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMark variable used by 'assert' as 'unused'.
Bill Wendling [Mon, 28 Dec 2009 02:07:00 +0000 (02:07 +0000)]
Mark variable used by 'assert' as 'unused'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92198 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 02:05:36 +0000 (02:05 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92197 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 02:04:53 +0000 (02:04 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92196 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 02:01:06 +0000 (02:01 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92195 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 02:00:30 +0000 (02:00 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92194 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 01:57:39 +0000 (01:57 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92193 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead store.
Bill Wendling [Mon, 28 Dec 2009 01:54:15 +0000 (01:54 +0000)]
Remove dead store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92192 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead store and simplify code.
Bill Wendling [Mon, 28 Dec 2009 01:53:00 +0000 (01:53 +0000)]
Remove dead store and simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92191 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead store.
Bill Wendling [Mon, 28 Dec 2009 01:51:30 +0000 (01:51 +0000)]
Remove dead store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92190 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 01:48:56 +0000 (01:48 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92189 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 01:47:48 +0000 (01:47 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92188 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead store.
Bill Wendling [Mon, 28 Dec 2009 01:44:39 +0000 (01:44 +0000)]
Remove dead store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92187 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 01:42:12 +0000 (01:42 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92186 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 01:41:12 +0000 (01:41 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92185 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 01:36:02 +0000 (01:36 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92184 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMark some debug variables as 'unused' to quiet compiler and analyzer.
Bill Wendling [Mon, 28 Dec 2009 01:34:57 +0000 (01:34 +0000)]
Mark some debug variables as 'unused' to quiet compiler and analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92183 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead store. The initial value was never used, but always overridden.
Bill Wendling [Mon, 28 Dec 2009 01:31:11 +0000 (01:31 +0000)]
Remove dead store. The initial value was never used, but always overridden.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92182 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd an "ATTRIBUTE_UNUSED" macro (and use it). It's for variables which are
Bill Wendling [Mon, 28 Dec 2009 01:20:29 +0000 (01:20 +0000)]
Add an "ATTRIBUTE_UNUSED" macro (and use it). It's for variables which are
mainly used in debugging and/or assert situations. It should make the compiler
and the static analyzer stop nagging us about them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92181 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 01:02:21 +0000 (01:02 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92180 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 01:01:14 +0000 (01:01 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92179 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead variable.
Bill Wendling [Mon, 28 Dec 2009 01:00:12 +0000 (01:00 +0000)]
Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92178 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agolit: Add setuptools support.
Daniel Dunbar [Sat, 26 Dec 2009 22:58:39 +0000 (22:58 +0000)]
lit: Add setuptools support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92169 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agolit: Sink code into a 'lit' package.
Daniel Dunbar [Sat, 26 Dec 2009 22:58:23 +0000 (22:58 +0000)]
lit: Sink code into a 'lit' package.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92168 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPR5886: Make sure IMUL32m is marked as setting EFLAGS, so scheduling doesn't
Eli Friedman [Sat, 26 Dec 2009 20:08:30 +0000 (20:08 +0000)]
PR5886: Make sure IMUL32m is marked as setting EFLAGS, so scheduling doesn't
do illegal stuff around it.  No testcase because the issue is very fragile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92167 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid assigning to Changed when it won't be used after the return.
Bill Wendling [Fri, 25 Dec 2009 13:50:18 +0000 (13:50 +0000)]
Avoid assigning to Changed when it won't be used after the return.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92160 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead store.
Bill Wendling [Fri, 25 Dec 2009 13:45:50 +0000 (13:45 +0000)]
Remove dead store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92159 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead store from copy-pasto.
Bill Wendling [Fri, 25 Dec 2009 13:44:36 +0000 (13:44 +0000)]
Remove dead store from copy-pasto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92158 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead store.
Bill Wendling [Fri, 25 Dec 2009 13:39:58 +0000 (13:39 +0000)]
Remove dead store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92157 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dead store.
Bill Wendling [Fri, 25 Dec 2009 13:37:27 +0000 (13:37 +0000)]
Remove dead store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92156 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse the 'MadeChange' variable instead of returning 'false' all of the time.
Bill Wendling [Fri, 25 Dec 2009 13:35:40 +0000 (13:35 +0000)]
Use the 'MadeChange' variable instead of returning 'false' all of the time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92155 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoImplement support for converting to string at "natural precision", and fix some
John McCall [Thu, 24 Dec 2009 23:18:09 +0000 (23:18 +0000)]
Implement support for converting to string at "natural precision", and fix some
major bugs in long-precision conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92150 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the two definitions of operator<< into namespace llvm, so they
Douglas Gregor [Thu, 24 Dec 2009 21:15:37 +0000 (21:15 +0000)]
Move the two definitions of operator<< into namespace llvm, so they
will be found by argument-dependent lookup. As with the previous
commit, GCC is allowing ill-formed code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92146 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDefine the new operator<< for sets into namespace std, so that
Douglas Gregor [Thu, 24 Dec 2009 21:11:45 +0000 (21:11 +0000)]
Define the new operator<< for sets into namespace std, so that
argument-dependent lookup can find it. This is another case where an
LLVM bug (not making operator<< visible) was masked by a GCC bug
(looking in the global namespace when it shouldn't).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92144 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't emit trailing semicolon.
Daniel Dunbar [Thu, 24 Dec 2009 17:49:28 +0000 (17:49 +0000)]
Don't emit trailing semicolon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92133 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSubstantially optimize APFloat::toString() by doing a single large divide to
John McCall [Thu, 24 Dec 2009 12:16:56 +0000 (12:16 +0000)]
Substantially optimize APFloat::toString() by doing a single large divide to
cut the significand down to the desired precision *before* entering the
core divmod loop.  Makes the overall algorithm logarithmic in the exponent.

There's still a lot of room for improvement here, but this gets the
performance back down to acceptable-for-diagnostics levels, even for
long doubles.
negligible, even on long doubles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92130 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd accessors for the largest-magnitude, smallest-magnitude, and
John McCall [Thu, 24 Dec 2009 08:56:26 +0000 (08:56 +0000)]
Add accessors for the largest-magnitude, smallest-magnitude, and
smallest-normalized-magnitude values in a given FP semantics.
Provide an APFloat-to-string conversion which I am quite ready to admit could
be much more efficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92126 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSet Remainder before Quotient in case Quotient and LHS alias. The new
John McCall [Thu, 24 Dec 2009 08:52:06 +0000 (08:52 +0000)]
Set Remainder before Quotient in case Quotient and LHS alias.  The new
order should be immune to such problems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92124 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTestcase for llvm-gcc checkin 92108.
Dale Johannesen [Thu, 24 Dec 2009 01:10:43 +0000 (01:10 +0000)]
Testcase for llvm-gcc checkin 92108.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92110 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agohandle equality memcmp of 8 bytes on x86-64 with two unaligned loads and a
Chris Lattner [Thu, 24 Dec 2009 01:07:17 +0000 (01:07 +0000)]
handle equality memcmp of 8 bytes on x86-64 with two unaligned loads and a
compare.  On other targets we end up with a call to memcmp because we don't
want 16 individual byte loads.  We should be able to use movups as well, but
we're failing to select the generated icmp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92107 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange errs() to dbgs().
David Greene [Thu, 24 Dec 2009 00:39:02 +0000 (00:39 +0000)]
Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92099 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomove an optimization for memcmp out of simplifylibcalls and into
Chris Lattner [Thu, 24 Dec 2009 00:37:38 +0000 (00:37 +0000)]
move an optimization for memcmp out of simplifylibcalls and into
SDISel.  This optimization was causing simplifylibcalls to
introduce type-unsafe nastiness.  This is the first step, I'll be
expanding the memcmp optimizations shortly, covering things that
we really really wouldn't want simplifylibcalls to do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92098 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange errs() to dbgs().
David Greene [Thu, 24 Dec 2009 00:34:21 +0000 (00:34 +0000)]
Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92097 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange errs() to dbgs().
David Greene [Thu, 24 Dec 2009 00:31:35 +0000 (00:31 +0000)]
Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92096 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange errs() to dbgs().
David Greene [Thu, 24 Dec 2009 00:27:55 +0000 (00:27 +0000)]
Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92094 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange errs() to dbgs().
David Greene [Thu, 24 Dec 2009 00:14:25 +0000 (00:14 +0000)]
Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92093 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange errs() to dbgs().
David Greene [Thu, 24 Dec 2009 00:06:26 +0000 (00:06 +0000)]
Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92092 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange errs() to dbgs().
David Greene [Wed, 23 Dec 2009 23:47:53 +0000 (23:47 +0000)]
Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92091 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange errs() to dbgs().
David Greene [Wed, 23 Dec 2009 23:38:28 +0000 (23:38 +0000)]
Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92088 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange dbgs() back to errs() as Chris requested.
David Greene [Wed, 23 Dec 2009 23:29:28 +0000 (23:29 +0000)]
Change dbgs() back to errs() as Chris requested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92086 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange dbgs() back to errs() as Chris requested.
David Greene [Wed, 23 Dec 2009 23:27:15 +0000 (23:27 +0000)]
Change dbgs() back to errs() as Chris requested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92085 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoreorder to follow a normal fall-through style, no functionality change.
Chris Lattner [Wed, 23 Dec 2009 23:24:51 +0000 (23:24 +0000)]
reorder to follow a normal fall-through style, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92084 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClarify how dbgs() operates.
David Greene [Wed, 23 Dec 2009 23:23:15 +0000 (23:23 +0000)]
Clarify how dbgs() operates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92083 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a comment.
David Greene [Wed, 23 Dec 2009 23:19:43 +0000 (23:19 +0000)]
Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92082 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange dbgs() back to errs() for assert messages as Chris requested.
David Greene [Wed, 23 Dec 2009 23:14:41 +0000 (23:14 +0000)]
Change dbgs() back to errs() for assert messages as Chris requested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92081 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange dbgs() back to errs() for assert messages as Chris requested.
David Greene [Wed, 23 Dec 2009 23:09:39 +0000 (23:09 +0000)]
Change dbgs() back to errs() for assert messages as Chris requested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92080 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agosizeof(char) is always 1.
Chris Lattner [Wed, 23 Dec 2009 23:03:24 +0000 (23:03 +0000)]
sizeof(char) is always 1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92079 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange dbgs() back to errs() for assert messages as Chris requested.
David Greene [Wed, 23 Dec 2009 23:00:50 +0000 (23:00 +0000)]
Change dbgs() back to errs() for assert messages as Chris requested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92077 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange dbgs() back to errs() for assert messages as Chris requested.
David Greene [Wed, 23 Dec 2009 22:59:29 +0000 (22:59 +0000)]
Change dbgs() back to errs() for assert messages as Chris requested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92076 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove dump routine and the associated Debug.h from a header. Patch up
David Greene [Wed, 23 Dec 2009 22:58:38 +0000 (22:58 +0000)]
Remove dump routine and the associated Debug.h from a header.  Patch up
other files to compensate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92075 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange dbgs() back to errs() as Chris requested.
David Greene [Wed, 23 Dec 2009 22:49:57 +0000 (22:49 +0000)]
Change dbgs() back to errs() as Chris requested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92073 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConvert debug messages to use dbgs(). Generally this means
David Greene [Wed, 23 Dec 2009 22:35:10 +0000 (22:35 +0000)]
Convert debug messages to use dbgs().  Generally this means
s/errs/dbgs/g except for certain special cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92071 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoConvert debug messages to use dbgs(). Generally this means
David Greene [Wed, 23 Dec 2009 22:28:01 +0000 (22:28 +0000)]
Convert debug messages to use dbgs().  Generally this means
s/errs/dbgs/g except for certain special cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92068 91177308-0d34-0410-b5e6-96231b3b80d8