oota-llvm.git
15 years agoHopefully fix the build for people with ocaml.
Duncan Sands [Fri, 22 May 2009 09:22:17 +0000 (09:22 +0000)]
Hopefully fix the build for people with ocaml.

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

15 years agoAlways verify dominfo if expensive checking is enabled.
Duncan Sands [Fri, 22 May 2009 08:52:53 +0000 (08:52 +0000)]
Always verify dominfo if expensive checking is enabled.

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

15 years agoFix a thinko in the code that adapted SCEVMulExpr operands for
Dan Gohman [Fri, 22 May 2009 07:14:20 +0000 (07:14 +0000)]
Fix a thinko in the code that adapted SCEVMulExpr operands for
use in expanding SCEVAddExprs with GEPs. The operands of a
SCEVMulExpr need to be multiplied together, not added.

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

15 years agoRevert this. There's no way to verifiy indirect calls, and an optimizer can turn
Torok Edwin [Fri, 22 May 2009 07:12:05 +0000 (07:12 +0000)]
Revert this. There's no way to verifiy indirect calls, and an optimizer can turn
indirect call into direct call, thus the verifier would reject something it
previously accepted.

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

15 years agoVerify that calling conventions match function prototype.
Torok Edwin [Fri, 22 May 2009 06:41:43 +0000 (06:41 +0000)]
Verify that calling conventions match function prototype.
This only rejects mismatches between target specific calling convention
and C/LLVM specific calling convention.
There are too many fastcc/C, coldcc/cc42 mismatches in the testsuite, these are
not reject by the verifier.

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

15 years agoFix loop-index-split to correctly preserve dominance frontiers. Part of
Eli Friedman [Fri, 22 May 2009 03:22:46 +0000 (03:22 +0000)]
Fix loop-index-split to correctly preserve dominance frontiers.  Part of
PR4238.

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

15 years agoAdd llvm::triple constructor from arch, vendor, os strings, and recognize
Daniel Dunbar [Fri, 22 May 2009 02:24:11 +0000 (02:24 +0000)]
Add llvm::triple constructor from arch, vendor, os strings, and recognize
DragonFly OS type.

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

15 years agoUpdate an assertion string to new-style type names.
Dan Gohman [Fri, 22 May 2009 00:40:35 +0000 (00:40 +0000)]
Update an assertion string to new-style type names.

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

15 years ago80 column violation.
Evan Cheng [Thu, 21 May 2009 23:47:47 +0000 (23:47 +0000)]
80 column violation.

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

15 years agoTableGen for fast isel seems to assume an 'imm'
Dale Johannesen [Thu, 21 May 2009 22:25:49 +0000 (22:25 +0000)]
TableGen for fast isel seems to assume an 'imm'
operand is the last in a pattern.  There is no
reason this should be true (although apparently
it always is right now).

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

15 years agoFix broken logic in DominatorTreeBase::Split. Part of PR4238.
Eli Friedman [Thu, 21 May 2009 21:47:54 +0000 (21:47 +0000)]
Fix broken logic in DominatorTreeBase::Split.  Part of PR4238.

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

15 years agoFix indentation.
Eli Friedman [Thu, 21 May 2009 21:08:47 +0000 (21:08 +0000)]
Fix indentation.

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

15 years agoFix some incorrect logic in DominanceFrontier::splitBlock. Part of
Eli Friedman [Thu, 21 May 2009 20:40:30 +0000 (20:40 +0000)]
Fix some incorrect logic in DominanceFrontier::splitBlock.  Part of
PR4238.

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

15 years agoAdd some missing steps to the sacred testing ritual scriptures.
Stuart Hastings [Thu, 21 May 2009 20:23:59 +0000 (20:23 +0000)]
Add some missing steps to the sacred testing ritual scriptures.

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

15 years agoTighten up the asserts in SmallVector::operator[]().
Jay Foad [Thu, 21 May 2009 19:48:58 +0000 (19:48 +0000)]
Tighten up the asserts in SmallVector::operator[]().
If this causes any new assertion failures that I didn't catch in
testing, the fix is usually to change "&v[0]" to "v.data()" for some
SmallVector v.

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

15 years agoAdd a getAlignOf helper for getting the ABI alignment of a
Duncan Sands [Thu, 21 May 2009 15:52:21 +0000 (15:52 +0000)]
Add a getAlignOf helper for getting the ABI alignment of a
type as a target independent constant expression.  I confess
that I didn't check that this method works as intended (though
I did test the equivalent hand-written IR a little).  But what
could possibly go wrong!

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

15 years agoUse v.data() instead of &v[0] when SmallVector v might be empty.
Jay Foad [Thu, 21 May 2009 09:52:38 +0000 (09:52 +0000)]
Use v.data() instead of &v[0] when SmallVector v might be empty.

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

15 years agoImplement new SmallVector::data() methods.
Jay Foad [Thu, 21 May 2009 09:00:37 +0000 (09:00 +0000)]
Implement new SmallVector::data() methods.

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

15 years agoTeach ValueTracking a new way to analyze PHI nodes, and and teach
Dan Gohman [Thu, 21 May 2009 02:28:33 +0000 (02:28 +0000)]
Teach ValueTracking a new way to analyze PHI nodes, and and teach
Instcombine to be more aggressive about using SimplifyDemandedBits
on shift nodes. This allows a shift to be simplified to zero in the
included test case.

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

15 years agoAdd Atomic.cpp to the CMake build system.
Owen Anderson [Thu, 21 May 2009 00:48:56 +0000 (00:48 +0000)]
Add Atomic.cpp to the CMake build system.

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

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