oota-llvm.git
18 years agoAdded regression that breaks gcc4 build
Andrew Lenharth [Wed, 17 May 2006 19:23:31 +0000 (19:23 +0000)]
Added regression that breaks gcc4 build

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

18 years agoShould pass by reference.
Evan Cheng [Wed, 17 May 2006 19:07:40 +0000 (19:07 +0000)]
Should pass by reference.

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

18 years agoAnother entry
Evan Cheng [Wed, 17 May 2006 19:05:31 +0000 (19:05 +0000)]
Another entry

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

18 years agoAdd a note about a note
Chris Lattner [Wed, 17 May 2006 19:02:25 +0000 (19:02 +0000)]
Add a note about a note

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

18 years agoMake PPC call lowering more aggressive, making the isel matching code simple
Chris Lattner [Wed, 17 May 2006 19:00:46 +0000 (19:00 +0000)]
Make PPC call lowering more aggressive, making the isel matching code simple
enough to be autogenerated.

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

18 years agoAnother typo. Pointed out by Nate Begeman.
Evan Cheng [Wed, 17 May 2006 18:22:14 +0000 (18:22 +0000)]
Another typo. Pointed out by Nate Begeman.

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

18 years agoFixed a LowerCallTo and LowerArguments bug. They were introducing illegal
Evan Cheng [Wed, 17 May 2006 18:16:39 +0000 (18:16 +0000)]
Fixed a LowerCallTo and LowerArguments bug. They were introducing illegal
VBIT_VECTOR nodes. There were some confusion about the semantics of
getPackedTypeBreakdown(). e.g. for <4 x f32> it returns 1 and v4f32, not 4,
and f32.

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

18 years agoFix an obvious bug in getPackedTypeBreakdown. Return 1 if type is legal.
Evan Cheng [Wed, 17 May 2006 18:10:06 +0000 (18:10 +0000)]
Fix an obvious bug in getPackedTypeBreakdown. Return 1 if type is legal.

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

18 years agoFix a mis-leading comment.
Evan Cheng [Wed, 17 May 2006 18:08:20 +0000 (18:08 +0000)]
Fix a mis-leading comment.

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

18 years agoAdd a CloneModule call that exposes the mapping of values from the old module
Chris Lattner [Wed, 17 May 2006 18:05:35 +0000 (18:05 +0000)]
Add a CloneModule call that exposes the mapping of values from the old module
to the new module.  Patch provided by Nick Lewycky!

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

18 years agoWhen we legalize target nodes, do not use getNode to create a new node,
Chris Lattner [Wed, 17 May 2006 18:00:08 +0000 (18:00 +0000)]
When we legalize target nodes, do not use getNode to create a new node,
use UpdateNodeOperands to just update the operands!  This is important because
getNode will allocate a new node if the node returns a flag and this breaks
assumptions in the legalizer that you can legalize some things multiple times
and get exactly the same results.

This latent bug was exposed by my ppc patch last night, and this fixes
gsm/toast.

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

18 years agoAdd an assertion, avoid some unneeded work for each call. No functionality
Chris Lattner [Wed, 17 May 2006 17:55:45 +0000 (17:55 +0000)]
Add an assertion, avoid some unneeded work for each call.  No functionality
change.

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

18 years agoSwitch PPC over to a call-selection model where the lowering code creates
Chris Lattner [Wed, 17 May 2006 06:01:33 +0000 (06:01 +0000)]
Switch PPC over to a call-selection model where the lowering code creates
the copyto/fromregs instead of making the PPCISD::CALL selection code create
them.  This vastly simplifies the selection code, and moves the ABI handling
parts into one place.

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

18 years agoadd an external symbol testcase
Chris Lattner [Wed, 17 May 2006 04:20:13 +0000 (04:20 +0000)]
add an external symbol testcase

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

18 years agonew test for various forms of calls
Chris Lattner [Wed, 17 May 2006 03:57:31 +0000 (03:57 +0000)]
new test for various forms of calls

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

18 years agotest for support to pass/return vectors to calls.
Chris Lattner [Wed, 17 May 2006 00:18:23 +0000 (00:18 +0000)]
test for support to pass/return vectors to calls.

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

18 years ago3 changes, 2 of which are cleanup one of which changes codegen:
Chris Lattner [Wed, 17 May 2006 00:15:40 +0000 (00:15 +0000)]
3 changes, 2 of which are cleanup one of which changes codegen:

1. Rearrange code a bit so that the special case doesn't require indenting lots
   of code.
2. Add comments describing PPC calling convention.
3. Only round up to 56-bytes of stack space for an outgoing call if the callee
   is varargs.  This saves a bit of stack space.

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

18 years agoimplement passing/returning vector regs to calls, at least non-varargs calls.
Chris Lattner [Tue, 16 May 2006 23:54:25 +0000 (23:54 +0000)]
implement passing/returning vector regs to calls, at least non-varargs calls.

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

18 years agoAdd support for calls that pass and return legal vectors.
Chris Lattner [Tue, 16 May 2006 23:39:44 +0000 (23:39 +0000)]
Add support for calls that pass and return legal vectors.

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

18 years agoInstead of implementing LowerCallTo directly, let the default impl produce an
Chris Lattner [Tue, 16 May 2006 22:56:08 +0000 (22:56 +0000)]
Instead of implementing LowerCallTo directly, let the default impl produce an
ISD::CALL node, then custom lower that.  This means that we only have to handle
LEGAL call operands/results, not every possible type.  This allows us to
simplify the call code, shrinking it by about 1/3.

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

18 years agoAdd a new ISD::CALL node, make the default impl of TargetLowering::LowerCallTo
Chris Lattner [Tue, 16 May 2006 22:53:20 +0000 (22:53 +0000)]
Add a new ISD::CALL node, make the default impl of TargetLowering::LowerCallTo
produce it.

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

18 years agoAdd a new CALL node.
Chris Lattner [Tue, 16 May 2006 22:52:27 +0000 (22:52 +0000)]
Add a new CALL node.

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

18 years agoThere is now a default impl of this method
Chris Lattner [Tue, 16 May 2006 22:52:11 +0000 (22:52 +0000)]
There is now a default impl of this method

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

18 years agoSimplify the argument counting logic by only incrementing the index.
Chris Lattner [Tue, 16 May 2006 18:58:15 +0000 (18:58 +0000)]
Simplify the argument counting logic by only incrementing the index.

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

18 years agoSimplify the dead argument handling code.
Chris Lattner [Tue, 16 May 2006 18:54:32 +0000 (18:54 +0000)]
Simplify the dead argument handling code.

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

18 years agoVector args passed in registers don't reserve stack space.
Chris Lattner [Tue, 16 May 2006 18:51:52 +0000 (18:51 +0000)]
Vector args passed in registers don't reserve stack space.

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

18 years agoAnother testcase that shouldn't need vrsave twiddling
Chris Lattner [Tue, 16 May 2006 18:23:55 +0000 (18:23 +0000)]
Another testcase that shouldn't need vrsave twiddling

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

18 years agoSwitch the PPC backend over to using FORMAL_ARGUMENTS for formal argument
Chris Lattner [Tue, 16 May 2006 18:18:50 +0000 (18:18 +0000)]
Switch the PPC backend over to using FORMAL_ARGUMENTS for formal argument
handling.  This makes the lower argument code significantly simpler (we
only need to handle legal argument types).

Incidentally, this also implements support for vector argument registers,
so long as they are not on the stack.

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

18 years agothis should be 128 I think
Andrew Lenharth [Tue, 16 May 2006 17:45:23 +0000 (17:45 +0000)]
this should be 128 I think

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

18 years agoMove this code to a common place
Andrew Lenharth [Tue, 16 May 2006 17:42:15 +0000 (17:42 +0000)]
Move this code to a common place

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

18 years agoRemove this xfail-d test, which doesn't make any sense
Chris Lattner [Tue, 16 May 2006 17:22:42 +0000 (17:22 +0000)]
Remove this xfail-d test, which doesn't make any sense

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

18 years agoImplement the custom lowering hook right, returning values for all of the
Chris Lattner [Tue, 16 May 2006 17:14:26 +0000 (17:14 +0000)]
Implement the custom lowering hook right, returning values for all of the
arguments at once.

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

18 years agoFix a bug I introduced yesterday, which broke functions with *no* arguments.
Chris Lattner [Tue, 16 May 2006 17:08:35 +0000 (17:08 +0000)]
Fix a bug I introduced yesterday, which broke functions with *no* arguments.

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

18 years agoMake sure to default ${prefix} to /usr/local if the user didn't specify it.
Reid Spencer [Tue, 16 May 2006 08:53:32 +0000 (08:53 +0000)]
Make sure to default ${prefix} to /usr/local if the user didn't specify it.
This assists with getting around configure's late binding values so that
our LLVM variables don't end up with a "NONE" prefix.

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

18 years agoX86 integer register classes naming changes. Make them consistent with FP, vector...
Evan Cheng [Tue, 16 May 2006 07:21:53 +0000 (07:21 +0000)]
X86 integer register classes naming changes. Make them consistent with FP, vector classes.

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

18 years agoAllow patterns to refer to physical registers that belong to multiple
Evan Cheng [Tue, 16 May 2006 07:05:30 +0000 (07:05 +0000)]
Allow patterns to refer to physical registers that belong to multiple
register classes.

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

18 years agoMake sure that $(CXX.Flags) is passed to the linker so that the same options
Reid Spencer [Tue, 16 May 2006 06:51:02 +0000 (06:51 +0000)]
Make sure that $(CXX.Flags) is passed to the linker so that the same options
with which source is compiled are used when linking. This matters when a
project is using the LLVM makefiles and overrides CXXFLAGS to specify new
flags to use.

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

18 years agoMake this print the right start pointer
Chris Lattner [Tue, 16 May 2006 06:45:50 +0000 (06:45 +0000)]
Make this print the right start pointer

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

18 years agoAdd a chain to FORMAL_ARGUMENTS. This is a minimal port of the X86 backend,
Chris Lattner [Tue, 16 May 2006 06:45:34 +0000 (06:45 +0000)]
Add a chain to FORMAL_ARGUMENTS.  This is a minimal port of the X86 backend,
it doesn't currently use/maintain the chain properly.  Also, make the
X86ISelLowering.cpp file 80-col clean.

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

18 years agoAdd a chain to FORMAL_ARGUMENTS.
Chris Lattner [Tue, 16 May 2006 06:43:59 +0000 (06:43 +0000)]
Add a chain to FORMAL_ARGUMENTS.

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

18 years agoReplace "../whatever.td" with "whatever.td", so that out-of-tree backends
Vladimir Prus [Tue, 16 May 2006 06:39:36 +0000 (06:39 +0000)]
Replace "../whatever.td" with "whatever.td", so that out-of-tree backends
can just add lib/Target to TableGen includes.

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

18 years agoFor PR778:
Reid Spencer [Tue, 16 May 2006 06:27:31 +0000 (06:27 +0000)]
For PR778:
Improve doxygenification of this header file.

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

18 years agoWhen linking, make sure the project libraries are linked before the LLVM
Reid Spencer [Tue, 16 May 2006 06:25:14 +0000 (06:25 +0000)]
When linking, make sure the project libraries are linked before the LLVM
libraries. This ensures that the project's libraries (which most likely
depend on LLVM libraries) come first on the command line and can thus be
resolved by the LLVM libraries that appear later.

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

18 years agoMove function-live-in-handling code from the sdisel code to the scheduler.
Chris Lattner [Tue, 16 May 2006 06:10:58 +0000 (06:10 +0000)]
Move function-live-in-handling code from the sdisel code to the scheduler.
This code should be emitted after legalize, so it can't be in sdisel.

Note that the EmitFunctionEntryCode hook should be updated to operate on the
DAG.  The X86 backend is the only one currently using this hook.

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

18 years agoPrint the vreg that livein physregs are live in
Chris Lattner [Tue, 16 May 2006 05:55:30 +0000 (05:55 +0000)]
Print the vreg that livein physregs are live in

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

18 years agoLegalize FORMAL_ARGUMENTS nodes correctly, we don't want to legalize them once
Chris Lattner [Tue, 16 May 2006 05:49:56 +0000 (05:49 +0000)]
Legalize FORMAL_ARGUMENTS nodes correctly, we don't want to legalize them once
for each argument.

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

18 years agoAdd my homepage, as a test that commit access works
Vladimir Prus [Tue, 16 May 2006 05:36:15 +0000 (05:36 +0000)]
Add my homepage, as a test that commit access works

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

18 years agoFit in 80 cols
Chris Lattner [Tue, 16 May 2006 04:20:24 +0000 (04:20 +0000)]
Fit in 80 cols

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

18 years agoadd an abort after every assert(0)
Rafael Espindola [Mon, 15 May 2006 22:34:39 +0000 (22:34 +0000)]
add an abort after every assert(0)

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

18 years agoFor PR777:
Reid Spencer [Mon, 15 May 2006 22:12:42 +0000 (22:12 +0000)]
For PR777:
Add an additional catch block to ensure that this function can't throw any
exceptions, even one's we're not expecting.

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

18 years agoUpgrade in preparation for doxygen 1.4.4. The config file format changed,
Reid Spencer [Mon, 15 May 2006 21:36:13 +0000 (21:36 +0000)]
Upgrade in preparation for doxygen 1.4.4. The config file format changed,
there are new/different css styles to support, and the footer was woefully
out of date.

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

18 years agoImprove comment, patch provided by Vladimir Prus!
Chris Lattner [Mon, 15 May 2006 18:35:02 +0000 (18:35 +0000)]
Improve comment, patch provided by Vladimir Prus!

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

18 years agoUpdate dox, patch by Vladimir Prus!
Chris Lattner [Mon, 15 May 2006 17:26:46 +0000 (17:26 +0000)]
Update dox, patch by Vladimir Prus!

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

18 years agoImprove comments, patch provided by Vladimir Prus!
Chris Lattner [Mon, 15 May 2006 17:25:05 +0000 (17:25 +0000)]
Improve comments, patch provided by Vladimir Prus!

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

18 years agoDoxygenify the comments, bringing the file level comments down to be attached
Reid Spencer [Mon, 15 May 2006 16:12:01 +0000 (16:12 +0000)]
Doxygenify the comments, bringing the file level comments down to be attached
with the class that it documents. Patch suggested by Vladimir Prus.

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

18 years agoRemove some dead code, identified by coverity.
Chris Lattner [Mon, 15 May 2006 05:48:32 +0000 (05:48 +0000)]
Remove some dead code, identified by coverity.

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

18 years agoAdd myself to the credits.
Owen Anderson [Mon, 15 May 2006 05:13:07 +0000 (05:13 +0000)]
Add myself to the credits.

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

18 years agoadded a skeleton of the ARM backend
Rafael Espindola [Sun, 14 May 2006 22:18:28 +0000 (22:18 +0000)]
added a skeleton of the ARM backend

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

18 years agoadded myself to CREDITS.TXT
Rafael Espindola [Sun, 14 May 2006 20:29:25 +0000 (20:29 +0000)]
added myself to CREDITS.TXT

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

18 years agoFree memory allocated by copy_env.
Chris Lattner [Sun, 14 May 2006 19:17:28 +0000 (19:17 +0000)]
Free memory allocated by copy_env.

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

18 years agoprint a nice error if bugpoint gets an error reading inputs. Bug identified
Chris Lattner [Sun, 14 May 2006 19:15:56 +0000 (19:15 +0000)]
print a nice error if bugpoint gets an error reading inputs.  Bug identified
by coverity.

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

18 years agoFix a bug found by inspection.
Chris Lattner [Sun, 14 May 2006 19:11:40 +0000 (19:11 +0000)]
Fix a bug found by inspection.

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

18 years agoimprove comment.
Chris Lattner [Sun, 14 May 2006 19:10:22 +0000 (19:10 +0000)]
improve comment.

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

18 years agoCatch a potentially thrown exception.
Chris Lattner [Sun, 14 May 2006 19:08:39 +0000 (19:08 +0000)]
Catch a potentially thrown exception.

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

18 years agoImprove documentation on throwing, it is not complete still though. :(
Chris Lattner [Sun, 14 May 2006 19:07:07 +0000 (19:07 +0000)]
Improve documentation on throwing, it is not complete still though. :(

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

18 years agoLoadLibraryPermanently can theoretically throw an exception. Do not propagate
Chris Lattner [Sun, 14 May 2006 19:01:55 +0000 (19:01 +0000)]
LoadLibraryPermanently can theoretically throw an exception.  Do not propagate
it out of 'ExecutionEngine::create'.  This fixes a problem reported by coverity.

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

18 years agoBug noticed, by inspection. Filename can be null.
Chris Lattner [Sun, 14 May 2006 19:00:53 +0000 (19:00 +0000)]
Bug noticed, by inspection.  Filename can be null.

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

18 years agoThis function is not documented as throwing an exception and callers don't
Chris Lattner [Sun, 14 May 2006 18:53:09 +0000 (18:53 +0000)]
This function is not documented as throwing an exception and callers don't
handle it.  Just silently fail.

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

18 years agoinverted logic, caught by coverity
Chris Lattner [Sun, 14 May 2006 18:46:52 +0000 (18:46 +0000)]
inverted logic, caught by coverity

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

18 years agoremove some dead code identified by coverity
Chris Lattner [Sun, 14 May 2006 18:45:44 +0000 (18:45 +0000)]
remove some dead code identified by coverity

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

18 years agoDelete memory allocated by CopyEnv
Chris Lattner [Sun, 14 May 2006 18:38:13 +0000 (18:38 +0000)]
Delete memory allocated by CopyEnv

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

18 years agoremove dead var
Chris Lattner [Sun, 14 May 2006 18:34:36 +0000 (18:34 +0000)]
remove dead var

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

18 years agoremove dead variables
Chris Lattner [Sun, 14 May 2006 18:33:57 +0000 (18:33 +0000)]
remove dead variables

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

18 years agoChange token to match asmprinter output
Chris Lattner [Sun, 14 May 2006 18:23:06 +0000 (18:23 +0000)]
Change token to match asmprinter output

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

18 years agoBacking out last check-in for now. It's causing an infinite loop gccas lencode.
Evan Cheng [Sun, 14 May 2006 06:46:03 +0000 (06:46 +0000)]
Backing out last check-in for now. It's causing an infinite loop gccas lencode.

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

18 years agoUpdate comment.
Chris Lattner [Sun, 14 May 2006 02:05:19 +0000 (02:05 +0000)]
Update comment.

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

18 years agoThis is a proper fix for the compiler warning. A termination condition is
Chris Lattner [Sun, 14 May 2006 02:01:22 +0000 (02:01 +0000)]
This is a proper fix for the compiler warning.  A termination condition is
not needed, as it can never be reached: an edge must exist.

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

18 years agoFix an infinite loop bug that Vladimir Prus identified.
Reid Spencer [Sat, 13 May 2006 18:11:32 +0000 (18:11 +0000)]
Fix an infinite loop bug that Vladimir Prus identified.

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

18 years agoAdd a #include <cassert> for situations where Casting.h is used standalone.
Reid Spencer [Sat, 13 May 2006 17:50:38 +0000 (17:50 +0000)]
Add a #include <cassert> for situations where Casting.h is used standalone.
Patch contributed by Vladimir Prus.

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

18 years agoFixing 2006-05-01-SchedCausingSpills.ll; some clean up
Evan Cheng [Sat, 13 May 2006 08:22:24 +0000 (08:22 +0000)]
Fixing 2006-05-01-SchedCausingSpills.ll; some clean up

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

18 years agoRevert an un-intended change
Evan Cheng [Sat, 13 May 2006 05:53:47 +0000 (05:53 +0000)]
Revert an un-intended change

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

18 years agoDon't try to reference uninitialized data. Make sure we can find "nm".
Reid Spencer [Sat, 13 May 2006 02:48:45 +0000 (02:48 +0000)]
Don't try to reference uninitialized data. Make sure we can find "nm".

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

18 years agoFor PR741:
Reid Spencer [Sat, 13 May 2006 02:22:01 +0000 (02:22 +0000)]
For PR741:
Update documentation to reflect current LLVM reality:
  + LLVMAlpha.o, LLVMIA64.o
  - Skeleton, execve, ProfilePaths
Also, regenerate the library dependency information.

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

18 years agoAdd/Sub/Mul are safe to promote here as well. Incrementing a single-bit
Chris Lattner [Sat, 13 May 2006 02:16:08 +0000 (02:16 +0000)]
Add/Sub/Mul are safe to promote here as well.  Incrementing a single-bit
bitfield now gives this code:

_plus:
        lwz r2, 0(r3)
        rlwimi r2, r2, 0, 1, 31
        xoris r2, r2, 32768
        stw r2, 0(r3)
        blr

instead of this:

_plus:
        lwz r2, 0(r3)
        srwi r4, r2, 31
        slwi r4, r4, 31
        addis r4, r4, -32768
        rlwimi r2, r4, 0, 0, 0
        stw r2, 0(r3)
        blr

this can obviously still be improved.

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

18 years agoMerge identical code.
Chris Lattner [Sat, 13 May 2006 02:11:14 +0000 (02:11 +0000)]
Merge identical code.

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

18 years agoImplement simple promotion for cast elimination in instcombine. This is
Chris Lattner [Sat, 13 May 2006 02:06:03 +0000 (02:06 +0000)]
Implement simple promotion for cast elimination in instcombine.  This is
currently very limited, but can be extended in the future.  For example,
we now compile:

uint %test30(uint %c1) {
        %c2 = cast uint %c1 to ubyte
        %c3 = xor ubyte %c2, 1
        %c4 = cast ubyte %c3 to uint
        ret uint %c4
}

to:

_xor:
        movzbl 4(%esp), %eax
        xorl $1, %eax
        ret

instead of:

_xor:
        movb $1, %al
        xorb 4(%esp), %al
        movzbl %al, %eax
        ret

More impressively, we now compile:

struct B { unsigned bit : 1; };
void xor(struct B *b) { b->bit = b->bit ^ 1; }

To (X86/PPC):

_xor:
        movl 4(%esp), %eax
        xorl $-2147483648, (%eax)
        ret
_xor:
        lwz r2, 0(r3)
        xoris r2, r2, 32768
        stw r2, 0(r3)
        blr

instead of (X86/PPC):

_xor:
        movl 4(%esp), %eax
        movl (%eax), %ecx
        movl %ecx, %edx
        shrl $31, %edx
        # TRUNCATE movb %dl, %dl
        xorb $1, %dl
        movzbl %dl, %edx
        andl $2147483647, %ecx
        shll $31, %edx
        orl %ecx, %edx
        movl %edx, (%eax)
        ret

_xor:
        lwz r2, 0(r3)
        srwi r4, r2, 31
        xori r4, r4, 1
        rlwimi r2, r4, 31, 0, 0
        stw r2, 0(r3)
        blr

This implements InstCombine/cast.ll:test30.

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

18 years agoNew testcase for instcombine
Chris Lattner [Sat, 13 May 2006 02:00:07 +0000 (02:00 +0000)]
New testcase for instcombine

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

18 years agoRemove some dead variables.
Chris Lattner [Fri, 12 May 2006 23:35:26 +0000 (23:35 +0000)]
Remove some dead variables.

Fix a nasty bug in the memcmp optimizer where we used the wrong variable!

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

18 years agoRemove dead stuff
Chris Lattner [Fri, 12 May 2006 23:32:01 +0000 (23:32 +0000)]
Remove dead stuff

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

18 years agoFix build breakage :(
Chris Lattner [Fri, 12 May 2006 23:26:11 +0000 (23:26 +0000)]
Fix build breakage :(

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

18 years agoMore coverity fixes
Chris Lattner [Fri, 12 May 2006 21:14:20 +0000 (21:14 +0000)]
More coverity fixes

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

18 years agoDead variable
Chris Lattner [Fri, 12 May 2006 21:12:22 +0000 (21:12 +0000)]
Dead variable

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

18 years agoRemove dead var, fix bad override.
Chris Lattner [Fri, 12 May 2006 21:09:57 +0000 (21:09 +0000)]
Remove dead var, fix bad override.

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

18 years agoDon't use old-style casts. This prevents compiler warnings when CommandLine.h
Reid Spencer [Fri, 12 May 2006 19:20:55 +0000 (19:20 +0000)]
Don't use old-style casts. This prevents compiler warnings when CommandLine.h
is used in projects that have stricter warning control than LLVM. This also
helps us find casts more easily if we ever need to.

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

18 years agoIf the register allocator cannot find a register to spill, try the aliases. If
Evan Cheng [Fri, 12 May 2006 19:07:46 +0000 (19:07 +0000)]
If the register allocator cannot find a register to spill, try the aliases. If
that still fails (because all the register spill weights are inf), just grab
one.

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

18 years agoRemove dead code
Evan Cheng [Fri, 12 May 2006 19:03:56 +0000 (19:03 +0000)]
Remove dead code

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

18 years agoFix accidentally committed patch.
Chris Lattner [Fri, 12 May 2006 18:20:39 +0000 (18:20 +0000)]
Fix accidentally committed patch.

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

18 years agoActually override the right method. :)
Chris Lattner [Fri, 12 May 2006 18:19:25 +0000 (18:19 +0000)]
Actually override the right method. :)

Bug identified by coverity.

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

18 years agoremove dead variable.
Chris Lattner [Fri, 12 May 2006 18:17:25 +0000 (18:17 +0000)]
remove dead variable.

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

18 years agoFix iterator invalidation bug, identified by Coverity.
Chris Lattner [Fri, 12 May 2006 18:13:11 +0000 (18:13 +0000)]
Fix iterator invalidation bug, identified by Coverity.

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