oota-llvm.git
15 years agoUse DataTypes.h instead of stdint.h.
Owen Anderson [Thu, 21 May 2009 00:48:13 +0000 (00:48 +0000)]
Use DataTypes.h instead of stdint.h.

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

15 years agoTemporarily revert r72191. It was causing an assert during llvm-gcc
Bill Wendling [Thu, 21 May 2009 00:04:55 +0000 (00:04 +0000)]
Temporarily revert r72191. It was causing an assert during llvm-gcc
bootstrapping.

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

15 years agoMinor code cleanup. No functionality change.
Bill Wendling [Wed, 20 May 2009 23:31:45 +0000 (23:31 +0000)]
Minor code cleanup. No functionality change.

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

15 years agoMerge 'ConstructFunctionDbgScope' and 'ConstructAbstractDbgScope'.
Bill Wendling [Wed, 20 May 2009 23:28:48 +0000 (23:28 +0000)]
Merge 'ConstructFunctionDbgScope' and 'ConstructAbstractDbgScope'.

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

15 years agoRename 'New*' methods to 'Create*' to be consistent. 'NewString' isn't used.
Bill Wendling [Wed, 20 May 2009 23:24:48 +0000 (23:24 +0000)]
Rename 'New*' methods to 'Create*' to be consistent. 'NewString' isn't used.

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

15 years agoAdd comment for emit section.
Bill Wendling [Wed, 20 May 2009 23:22:40 +0000 (23:22 +0000)]
Add comment for emit section.

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

15 years agoMove 'Emit' methods down to their own place.
Bill Wendling [Wed, 20 May 2009 23:21:38 +0000 (23:21 +0000)]
Move 'Emit' methods down to their own place.

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

15 years agoRevert r72192. It was causing a build failure.
Bill Wendling [Wed, 20 May 2009 23:19:06 +0000 (23:19 +0000)]
Revert r72192. It was causing a build failure.

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

15 years agoDo some mechanical changes. Combine the 'construct abastract dbg thingy' in with
Bill Wendling [Wed, 20 May 2009 23:04:56 +0000 (23:04 +0000)]
Do some mechanical changes. Combine the 'construct abastract dbg thingy' in with
the 'constract function dbg thingy'. Rename some methods to make them consistent
with the rest of the methods. Move the 'Emit' methods to the end of the file.

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

15 years agoIntroduce DebugScope which gets embedded into the machine instructions' DebugLoc.
Argyrios Kyrtzidis [Wed, 20 May 2009 22:57:17 +0000 (22:57 +0000)]
Introduce DebugScope which gets embedded into the machine instructions' DebugLoc.
DebugScope refers to a debug region, function or block.

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

15 years agoAdd an accessor method to return the insertion point.
Dan Gohman [Wed, 20 May 2009 21:45:41 +0000 (21:45 +0000)]
Add an accessor method to return the insertion point.

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

15 years agoHave llvm_start_multithreaded return a bool indicating whether multithreaded
Owen Anderson [Wed, 20 May 2009 21:03:06 +0000 (21:03 +0000)]
Have llvm_start_multithreaded return a bool indicating whether multithreaded
initialization succeeded or not, rather than just asserting.

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

15 years agoTabs, be gone!
Owen Anderson [Wed, 20 May 2009 19:06:49 +0000 (19:06 +0000)]
Tabs, be gone!

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

15 years agoI just fail today.
Owen Anderson [Wed, 20 May 2009 19:01:50 +0000 (19:01 +0000)]
I just fail today.

Hopefully this fixes the last build errors on systems with GCC < 4.1.

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

15 years agoCopy-and-paste-o.
Owen Anderson [Wed, 20 May 2009 18:47:53 +0000 (18:47 +0000)]
Copy-and-paste-o.

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

15 years agoMove atomic operations' definitions out of line. While this seems kind of silly,
Owen Anderson [Wed, 20 May 2009 18:26:15 +0000 (18:26 +0000)]
Move atomic operations' definitions out of line.  While this seems kind of silly,
all kinds of problems caused by including windows.h and/or config.h in an LLVM header.

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

15 years agoMinor formatting fixes.
Bob Wilson [Wed, 20 May 2009 16:30:25 +0000 (16:30 +0000)]
Minor formatting fixes.

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

15 years agoWhen comparing DominanceFrontier's, advance iterators
Duncan Sands [Wed, 20 May 2009 15:12:01 +0000 (15:12 +0000)]
When comparing DominanceFrontier's, advance iterators
before erasing nodes, not after.  Otherwise dom frontier
checking reads from freed memory.

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

15 years agoCompile fix for MSVC.
Owen Anderson [Wed, 20 May 2009 09:34:13 +0000 (09:34 +0000)]
Compile fix for MSVC.

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

15 years agoFix for PR4235: to build a floating-point value from integer parts,
Eli Friedman [Wed, 20 May 2009 06:02:09 +0000 (06:02 +0000)]
Fix for PR4235: to build a floating-point value from integer parts,
build an integer and cast that to a float.  This fixes a crash
caused by trying to split an f32 into two f16's.

This changes the behavior in test/CodeGen/XCore/fneg.ll because that
testcase now triggers a DAGCombine which converts the fneg into an integer
operation.  If someone is interested, it's probably possible to tweak
the test to generate an actual fneg.

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

15 years agoFix test on non-darwin hosts.
Evan Cheng [Wed, 20 May 2009 05:45:36 +0000 (05:45 +0000)]
Fix test on non-darwin hosts.

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

15 years agoTry again. Allow call to immediate address for ELF or when in static relocation mode.
Evan Cheng [Wed, 20 May 2009 04:53:57 +0000 (04:53 +0000)]
Try again. Allow call to immediate address for ELF or when in static relocation mode.

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

15 years agoCannot use immediate as call absolute target in PIC mode.
Evan Cheng [Wed, 20 May 2009 01:11:00 +0000 (01:11 +0000)]
Cannot use immediate as call absolute target in PIC mode.

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

15 years agoTeach SCEV::isLoopInvariant and SCEV::hasComputableLoopEvolution
Dan Gohman [Wed, 20 May 2009 01:01:24 +0000 (01:01 +0000)]
Teach SCEV::isLoopInvariant and SCEV::hasComputableLoopEvolution
about the convention from LoopInfo that a null Loop* means the entire
function body.

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

15 years agoAdd llvm_start_multithreaded(), which starts up the LLVM internals in thread-safe...
Owen Anderson [Wed, 20 May 2009 00:39:20 +0000 (00:39 +0000)]
Add llvm_start_multithreaded(), which starts up the LLVM internals in thread-safe mode.  Provide double-check locking
initialization of ManagedStatic's when running in thread-safe mode.

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

15 years agoSuppress the IV reversal transformation in the case that the RHS
Dan Gohman [Wed, 20 May 2009 00:34:08 +0000 (00:34 +0000)]
Suppress the IV reversal transformation in the case that the RHS
of the comparison is defined inside the loop. This fixes a
use-before-def problem, because the transformation puts a use
of the RHS outside the loop.

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

15 years agoWe need to include config.h here so that the #defines are set properly.
Owen Anderson [Wed, 20 May 2009 00:31:29 +0000 (00:31 +0000)]
We need to include config.h here so that the #defines are set properly.

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

15 years agoForgot this file in my last commit.
Owen Anderson [Tue, 19 May 2009 22:25:55 +0000 (22:25 +0000)]
Forgot this file in my last commit.

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

15 years agoSplit the ENABLE_THREADS #define in two. Now ENABLE_THREADS indicates the ability...
Owen Anderson [Tue, 19 May 2009 22:18:56 +0000 (22:18 +0000)]
Split the ENABLE_THREADS #define in two.  Now ENABLE_THREADS indicates the ability to run multiple threads at once in the JIT, and requires only
mutex support.  LLVM_MULTITHREADED indicates (or will indicate) the ability to run LLVM itself across multiple threads, and requires atomics support.

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

15 years agoFix pr4227: Handle large immediate values in inline assembly.
Bob Wilson [Tue, 19 May 2009 21:27:57 +0000 (21:27 +0000)]
Fix pr4227: Handle large immediate values in inline assembly.

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

15 years agoRemove an irrelevant comment.
Dan Gohman [Tue, 19 May 2009 20:38:47 +0000 (20:38 +0000)]
Remove an irrelevant comment.

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

15 years agoAdd some more comments to the top of this file.
Dan Gohman [Tue, 19 May 2009 20:37:36 +0000 (20:37 +0000)]
Add some more comments to the top of this file.

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

15 years agoTrim unneeded #includes.
Dan Gohman [Tue, 19 May 2009 20:35:26 +0000 (20:35 +0000)]
Trim unneeded #includes.

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

15 years agoMake SCEVCallbackVH a private nested class inside ScalarEvolution, as
Dan Gohman [Tue, 19 May 2009 19:22:47 +0000 (19:22 +0000)]
Make SCEVCallbackVH a private nested class inside ScalarEvolution, as
it's an implementation detail.

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

15 years agoCreate ConstantExpr GEPs the correct way. This fixes
Dan Gohman [Tue, 19 May 2009 19:18:01 +0000 (19:18 +0000)]
Create ConstantExpr GEPs the correct way. This fixes
MultiSource/Benchmarks/Prolangs-C/football and a variety of other
failures.

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

15 years agoFollow up on new support for memory operands in ARM inline assembly.
Bob Wilson [Tue, 19 May 2009 18:33:02 +0000 (18:33 +0000)]
Follow up on new support for memory operands in ARM inline assembly.
This fixes pr4233.

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

15 years agoForward decls.
Bill Wendling [Tue, 19 May 2009 17:52:31 +0000 (17:52 +0000)]
Forward decls.

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

15 years agoRemove 'class' specifier.
Bill Wendling [Tue, 19 May 2009 17:51:26 +0000 (17:51 +0000)]
Remove 'class' specifier.

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

15 years agoFix to compile on VS2008.
Bill Wendling [Tue, 19 May 2009 17:50:18 +0000 (17:50 +0000)]
Fix to compile on VS2008.

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

15 years agoFix pr4058 and pr4059. Do not split i64 or double arguments between r3 and
Bob Wilson [Tue, 19 May 2009 10:02:36 +0000 (10:02 +0000)]
Fix pr4058 and pr4059.  Do not split i64 or double arguments between r3 and
the stack.  Patch by Sandeep Patel.

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

15 years agoFix pr4091: Add support for "m" constraint in ARM inline assembly.
Bob Wilson [Tue, 19 May 2009 05:53:42 +0000 (05:53 +0000)]
Fix pr4091: Add support for "m" constraint in ARM inline assembly.

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

15 years agoRemove the #ifndef NDEBUG from the FastISel debugging options. This
Dan Gohman [Tue, 19 May 2009 02:19:57 +0000 (02:19 +0000)]
Remove the #ifndef NDEBUG from the FastISel debugging options. This
fixes dejagnu tests that use these options.

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

15 years agoTeach SCEVExpander to expand arithmetic involving pointers into GEP
Dan Gohman [Tue, 19 May 2009 02:15:55 +0000 (02:15 +0000)]
Teach SCEVExpander to expand arithmetic involving pointers into GEP
instructions. It attempts to create high-level multi-operand GEPs,
though in cases where this isn't possible it falls back to casting
the pointer to i8* and emitting a GEP with that. Using GEP instructions
instead of ptrtoint+arithmetic+inttoptr helps pointer analyses that
don't use ScalarEvolution, such as BasicAliasAnalysis.

Also, make the AddrModeMatcher more aggressive in handling GEPs.
Previously it assumed that operand 0 of a GEP would require a register
in almost all cases. It now does extra checking and can do more
matching if operand 0 of the GEP is foldable. This fixes a problem
that was exposed by SCEVExpander using GEPs.

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

15 years agoTest commit.
Cristian Cadar [Tue, 19 May 2009 01:56:08 +0000 (01:56 +0000)]
Test commit.

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

15 years agoAdd some comments noting how IndVarSimplify facilitates
Dan Gohman [Tue, 19 May 2009 01:52:46 +0000 (01:52 +0000)]
Add some comments noting how IndVarSimplify facilitates
LoopInfo functionality.

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

15 years agoMake using an unsupported CAS size a hard error on Windows.
Owen Anderson [Tue, 19 May 2009 01:08:36 +0000 (01:08 +0000)]
Make using an unsupported CAS size a hard error on Windows.

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

15 years agoFix up the Windows portion of Atomic.h. This is untested, but it is my best understa...
Owen Anderson [Tue, 19 May 2009 01:07:40 +0000 (01:07 +0000)]
Fix up the Windows portion of Atomic.h.  This is untested, but it is my best understanding of what should work.
I'd be much obliged if someone on MSVC++ could try this out and let me know if it works.

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

15 years agoTemplate CompareAndSwap function.
Owen Anderson [Tue, 19 May 2009 01:02:27 +0000 (01:02 +0000)]
Template CompareAndSwap function.

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

15 years agoSpacing fix.
Dale Johannesen [Tue, 19 May 2009 00:46:42 +0000 (00:46 +0000)]
Spacing fix.

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

15 years agoFix cmake builds.
Mike Stump [Tue, 19 May 2009 00:18:14 +0000 (00:18 +0000)]
Fix cmake builds.

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

15 years agoNow that we have atomics support properly detected by configure,
Owen Anderson [Tue, 19 May 2009 00:08:29 +0000 (00:08 +0000)]
Now that we have atomics support properly detected by configure,
use it to implement Atomic.h.

This expunges the code previously imported from libatomic_ops.

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

15 years agoTest for the presence of GCC atomic builtins at configure time. If not found,
Owen Anderson [Mon, 18 May 2009 23:58:51 +0000 (23:58 +0000)]
Test for the presence of GCC atomic builtins at configure time.  If not found,
disable building LLVM in thread-safe mode and print a nice warning.

Regenerate configure for these changes.

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

15 years agoAdd -submit-aux option to NewNightlyTest.pl
Daniel Dunbar [Mon, 18 May 2009 23:24:26 +0000 (23:24 +0000)]
Add -submit-aux option to NewNightlyTest.pl
 - If given, the argument will be run using system with the path to the sent
   data. Useful for testing nightlytest server replacements.

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

15 years agoDon't set the "location" information for inlined functions' variables.
Bill Wendling [Mon, 18 May 2009 23:08:55 +0000 (23:08 +0000)]
Don't set the "location" information for inlined functions' variables.

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

15 years agoSmall code cleanup.
Bill Wendling [Mon, 18 May 2009 22:33:01 +0000 (22:33 +0000)]
Small code cleanup.

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

15 years agoUpdate a comment to reflect changes in the surrounding code.
Dan Gohman [Mon, 18 May 2009 22:15:25 +0000 (22:15 +0000)]
Update a comment to reflect changes in the surrounding code.

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

15 years agoAdd short descriptions of 'implicit' and 'parallel'.
Evan Cheng [Mon, 18 May 2009 22:14:45 +0000 (22:14 +0000)]
Add short descriptions of 'implicit' and 'parallel'.

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

15 years agoRecordVariable is called each time a DECLARE node is encountered. For an inlined
Bill Wendling [Mon, 18 May 2009 22:02:36 +0000 (22:02 +0000)]
RecordVariable is called each time a DECLARE node is encountered. For an inlined
function, this could be many, many times. We don't want to re-add variables to
that DIE for each time. We just want to add them once. Check to make sure that
we haven't added them already.

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

15 years agoAdd OpSize to 16-bit ADC and SBB.
Dale Johannesen [Mon, 18 May 2009 21:41:59 +0000 (21:41 +0000)]
Add OpSize to 16-bit ADC and SBB.

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

15 years agoAdd missing file.
Argyrios Kyrtzidis [Mon, 18 May 2009 21:08:45 +0000 (21:08 +0000)]
Add missing file.

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

15 years agoAllow the JIT ExecutionEngine to report details about the generated machine code.
Argyrios Kyrtzidis [Mon, 18 May 2009 21:06:40 +0000 (21:06 +0000)]
Allow the JIT ExecutionEngine to report details about the generated machine code.
Introduce a new class (MachineCodeInfo) that the JIT can fill in with details. Right now, just the address and the size of the machine code are reported.

Patch by Evan Phoenix!

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

15 years agoFix CodePlacementOpt::OptimizeIntraLoopEdges so that its return value
Bob Wilson [Mon, 18 May 2009 21:02:18 +0000 (21:02 +0000)]
Fix CodePlacementOpt::OptimizeIntraLoopEdges so that its return value
correctly indicates whether it changed the code.

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

15 years agoFix pr4202: Disable CodePlacementOpt for ARM. The ARMConstantIslandPass has
Bob Wilson [Mon, 18 May 2009 20:55:32 +0000 (20:55 +0000)]
Fix pr4202: Disable CodePlacementOpt for ARM.  The ARMConstantIslandPass has
to run last because it needs to know the exact size and position of every
basic block.  Currently CodePlacementOpt is set up to run last.  It might be
worthwhile to investigate reordering these passes, but for now, let's just
make it work.

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

15 years agoNew Spiller interface and trivial implementation.
Lang Hames [Mon, 18 May 2009 19:03:16 +0000 (19:03 +0000)]
New Spiller interface and trivial implementation.

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

15 years agoRevert r72025. It is possible for clients to convert between signed types
Dan Gohman [Mon, 18 May 2009 18:55:39 +0000 (18:55 +0000)]
Revert r72025. It is possible for clients to convert between signed types
and pointer types safely if they only do so when the sizes are the same.
llvm-gcc is such a client.

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

15 years agoRemove getType() overrides for ExtractValueInst and InsertValueInst.
Eric Christopher [Mon, 18 May 2009 18:46:57 +0000 (18:46 +0000)]
Remove getType() overrides for ExtractValueInst and InsertValueInst.

Patch by John McCall.

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

15 years agoRevert last commit. It was wrong.
Bill Wendling [Mon, 18 May 2009 18:21:03 +0000 (18:21 +0000)]
Revert last commit. It was wrong.

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

15 years agoAdd assertions to CastInst::getCastOpcode to catch attempted conversions
Dan Gohman [Mon, 18 May 2009 18:18:57 +0000 (18:18 +0000)]
Add assertions to CastInst::getCastOpcode to catch attempted conversions
between integers and pointers when the source type is marked signed,
since inttoptr and ptrtoint always use zero-extension when the destination
is larger than the source.

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

15 years agoDon't call RegionInlinedFnEnd if our optimization level isn't -O0.
Bill Wendling [Mon, 18 May 2009 18:17:22 +0000 (18:17 +0000)]
Don't call RegionInlinedFnEnd if our optimization level isn't -O0.

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

15 years agoCommands beginning with '--' are converted to '-f' by gcc. Blech!
Bill Wendling [Mon, 18 May 2009 18:09:36 +0000 (18:09 +0000)]
Commands beginning with '--' are converted to '-f' by gcc. Blech!

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

15 years agoFill in the missing patterns for ADC and SBB.
Dale Johannesen [Mon, 18 May 2009 17:44:15 +0000 (17:44 +0000)]
Fill in the missing patterns for ADC and SBB.
Some comment cleanup.

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

15 years agotermios.h contains the winsize structure we need to determine the
Douglas Gregor [Mon, 18 May 2009 17:21:34 +0000 (17:21 +0000)]
termios.h contains the winsize structure we need to determine the
width of a terminal. Don't try to get the width of a terminal if we
don't have this header.

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

15 years agoRename UseTy to AccessTy, for consistency with getAccessType, and to
Dan Gohman [Mon, 18 May 2009 16:45:28 +0000 (16:45 +0000)]
Rename UseTy to AccessTy, for consistency with getAccessType, and to
avoid ambiguity with the word "use" in IVStrideUse.

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

15 years agoSilence Release-Asserts warnings.
Daniel Dunbar [Mon, 18 May 2009 16:43:04 +0000 (16:43 +0000)]
Silence Release-Asserts warnings.

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

15 years agoTeach ScalarEvolution to recognize x^-1 in the case where non-demanded
Dan Gohman [Mon, 18 May 2009 16:29:04 +0000 (16:29 +0000)]
Teach ScalarEvolution to recognize x^-1 in the case where non-demanded
bits have been stripped out by instcombine.

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

15 years agoDelete a redundant 'else'.
Dan Gohman [Mon, 18 May 2009 16:17:44 +0000 (16:17 +0000)]
Delete a redundant 'else'.

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

15 years agoFix ScalarEvolution::isLoopGuardedByCond to accept a null Loop*, for
Dan Gohman [Mon, 18 May 2009 16:03:58 +0000 (16:03 +0000)]
Fix ScalarEvolution::isLoopGuardedByCond to accept a null Loop*, for
consistency with other routines that use a null Loop* to mean code
not contained by any loop.

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

15 years agoMinor code cleanups. Do more of the work before the if statements
Dan Gohman [Mon, 18 May 2009 15:58:39 +0000 (15:58 +0000)]
Minor code cleanups. Do more of the work before the if statements
instead of within their controlling expressions.

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

15 years agoAdd assertion checks to the SCEV operator creation methods to catch
Dan Gohman [Mon, 18 May 2009 15:44:58 +0000 (15:44 +0000)]
Add assertion checks to the SCEV operator creation methods to catch
type mismatches.

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

15 years agoMake ScalarEvolution::isLoopGuardedByCond work even when the edge
Dan Gohman [Mon, 18 May 2009 15:36:09 +0000 (15:36 +0000)]
Make ScalarEvolution::isLoopGuardedByCond work even when the edge
entering a loop is a non-split critical edge.

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

15 years agoAdd an isOne() utility function to ScalarEvolution, similar to isZero()
Dan Gohman [Mon, 18 May 2009 15:22:39 +0000 (15:22 +0000)]
Add an isOne() utility function to ScalarEvolution, similar to isZero()
and similar to ConstantInt's isOne().

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

15 years agoAdd nounwind to a few tests.
Dan Gohman [Mon, 18 May 2009 15:16:49 +0000 (15:16 +0000)]
Add nounwind to a few tests.

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

15 years agoTweak MemoryBuffer::getSTDIN so that it returns after the first EOF.
Eli Friedman [Mon, 18 May 2009 08:44:04 +0000 (08:44 +0000)]
Tweak MemoryBuffer::getSTDIN so that it returns after the first EOF.
It doesn't matter for piped input, but it's annoying when typing at the
console.

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

15 years agoFix a compile warning.
Daniel Dunbar [Mon, 18 May 2009 03:44:24 +0000 (03:44 +0000)]
Fix a compile warning.

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

15 years agoPrevented reg0 from being added to MBB live-in set, which was causing issues
Lang Hames [Sun, 17 May 2009 23:50:36 +0000 (23:50 +0000)]
Prevented reg0 from being added to MBB live-in set, which was causing issues
for PostRAScheduler.

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

15 years agoRename MachineVerifier pass to avoid command line collision.
Jakob Stoklund Olesen [Sun, 17 May 2009 19:37:14 +0000 (19:37 +0000)]
Rename MachineVerifier pass to avoid command line collision.

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

15 years agoCheck that the gcc front-end is not doing inlining
Duncan Sands [Sun, 17 May 2009 19:37:02 +0000 (19:37 +0000)]
Check that the gcc front-end is not doing inlining
when not doing unit-at-a-time.

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

15 years agoMark rotl/rotr as expand. This generates pretty ugly code, but this is better than...
Anton Korobeynikov [Sun, 17 May 2009 10:16:28 +0000 (10:16 +0000)]
Mark rotl/rotr as expand. This generates pretty ugly code, but this is better than nothing.

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

15 years agoTypo
Anton Korobeynikov [Sun, 17 May 2009 10:15:22 +0000 (10:15 +0000)]
Typo

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

15 years agoFormatting. Some updating of data structures. More work needs to be done to update...
Bill Wendling [Sun, 17 May 2009 05:52:39 +0000 (05:52 +0000)]
Formatting. Some updating of data structures. More work needs to be done to update the examples.

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

15 years agoSignificantly improve Atomic.h by pulling in code from libatomic_ops by HP. This...
Owen Anderson [Sun, 17 May 2009 04:57:54 +0000 (04:57 +0000)]
Significantly improve Atomic.h by pulling in code from libatomic_ops by HP.  This is a little outdated, but reasonably complete.

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

15 years agoRemove the volatile marker from the cas_flag typedef, fixing some warnings.
Owen Anderson [Sat, 16 May 2009 21:08:25 +0000 (21:08 +0000)]
Remove the volatile marker from the cas_flag typedef, fixing some warnings.
 It's now the client's resposibility to add it in when needed

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

15 years agoFix a missing def-flag on a Mips epilogue load.
Jakob Stoklund Olesen [Sat, 16 May 2009 07:26:06 +0000 (07:26 +0000)]
Fix a missing def-flag on a Mips epilogue load.

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

15 years agoRemember to set def-flag on register loaded from stack slot in CellSPU.
Jakob Stoklund Olesen [Sat, 16 May 2009 07:25:44 +0000 (07:25 +0000)]
Remember to set def-flag on register loaded from stack slot in CellSPU.

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

15 years agoVerify that explicit definitions in the TargetInstrDesc are matched by
Jakob Stoklund Olesen [Sat, 16 May 2009 07:25:20 +0000 (07:25 +0000)]
Verify that explicit definitions in the TargetInstrDesc are matched by
explicit register define operands.

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

15 years agoAllow redefinition of reserved registers.
Jakob Stoklund Olesen [Sat, 16 May 2009 07:24:54 +0000 (07:24 +0000)]
Allow redefinition of reserved registers.

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

15 years agoBack out the thread-safe ManagedStatic for now. Too many people have too many proble...
Owen Anderson [Sat, 16 May 2009 07:20:52 +0000 (07:20 +0000)]
Back out the thread-safe ManagedStatic for now.  Too many people have too many problems with it for the moment.

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

15 years agoPut back a bit of expensive checking logic that
Duncan Sands [Sat, 16 May 2009 04:14:29 +0000 (04:14 +0000)]
Put back a bit of expensive checking logic that
was overenthusiastically deleted in r70234.

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

15 years agoMake sure the CXXFLAGS setting is picked up by
Duncan Sands [Sat, 16 May 2009 04:00:00 +0000 (04:00 +0000)]
Make sure the CXXFLAGS setting is picked up by
the common Makefile.  Not sure why this suddenly
started causing problems.

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

15 years agoPacify gcc-4.3, which suggests explicit braces here
Duncan Sands [Sat, 16 May 2009 03:28:54 +0000 (03:28 +0000)]
Pacify gcc-4.3, which suggests explicit braces here
to avoid an ambiguous else.

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