oota-llvm.git
17 years agoFix GLIBCXX_DEBUG error owing to dereference of end iterator. There's
David Greene [Tue, 31 Jul 2007 20:01:27 +0000 (20:01 +0000)]
Fix GLIBCXX_DEBUG error owing to dereference of end iterator.  There's
no guarantee that an instruction returned by getDependency exists in
the maps.

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

17 years agoFix a misoptimization in aha.
Owen Anderson [Tue, 31 Jul 2007 17:43:14 +0000 (17:43 +0000)]
Fix a misoptimization in aha.

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

17 years agoUse SCEVExpander::InsertCastOfTo instead of calling new IntToPtrInst
Dan Gohman [Tue, 31 Jul 2007 17:22:27 +0000 (17:22 +0000)]
Use SCEVExpander::InsertCastOfTo instead of calling new IntToPtrInst
directly, because the insert point used by the SCEVExpander may vary
from what LSR originally computes.

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

17 years agoAdd note.
Devang Patel [Tue, 31 Jul 2007 16:52:25 +0000 (16:52 +0000)]
Add note.

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

17 years agonew testcase
Chris Lattner [Tue, 31 Jul 2007 16:18:25 +0000 (16:18 +0000)]
new testcase

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

17 years agoRevert overly aggressive interpretation of noalias
Christopher Lamb [Tue, 31 Jul 2007 16:18:07 +0000 (16:18 +0000)]
Revert overly aggressive interpretation of noalias

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

17 years agoRegenerate.
Reid Spencer [Tue, 31 Jul 2007 14:41:17 +0000 (14:41 +0000)]
Regenerate.

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

17 years agofp2uint -> fptoui
Reid Spencer [Tue, 31 Jul 2007 14:40:14 +0000 (14:40 +0000)]
fp2uint -> fptoui

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

17 years agoAfter a discussion with Anton, it turns out that the InReg attribute is not
Reid Spencer [Tue, 31 Jul 2007 14:39:10 +0000 (14:39 +0000)]
After a discussion with Anton, it turns out that the InReg attribute is not
permitted on function results. So, revert the last patch to make it illegal.

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

17 years agoBunch of tests to check loop passes.
Devang Patel [Tue, 31 Jul 2007 08:04:17 +0000 (08:04 +0000)]
Bunch of tests to check loop passes.

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

17 years agoRedo and generalize previously removed opt for pinsrw: (vextract (v4i32 bc (v4f32...
Evan Cheng [Tue, 31 Jul 2007 08:04:03 +0000 (08:04 +0000)]
Redo and generalize previously removed opt for pinsrw: (vextract (v4i32 bc (v4f32 s2v (f32 load ))), 0) -> (i32 load )

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

17 years agoLoop unswitch preserves dom info.
Devang Patel [Tue, 31 Jul 2007 08:03:26 +0000 (08:03 +0000)]
Loop unswitch preserves dom info.
Use simple analysis interface to preserve analysis info maintained by other loop passes.

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

17 years agoImplement Simple Analysis interfaces - cloneBasicBlockAnalysis and deleteAnalysisValue.
Devang Patel [Tue, 31 Jul 2007 08:01:41 +0000 (08:01 +0000)]
Implement Simple Analysis interfaces - cloneBasicBlockAnalysis and deleteAnalysisValue.

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

17 years agoIntroduce Simple Analysis interface for loop passes.
Devang Patel [Tue, 31 Jul 2007 08:00:57 +0000 (08:00 +0000)]
Introduce Simple Analysis interface for loop passes.
Right now, this interface provides hooks for only to operations, 1) clone basic block 2) delete value.

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

17 years agoTeach BasicAA about noalias function parameters. Passes all of DejaGNU and test-suite.
Christopher Lamb [Tue, 31 Jul 2007 07:04:51 +0000 (07:04 +0000)]
Teach BasicAA about noalias function parameters. Passes all of DejaGNU and test-suite.

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

17 years agoUn-XFAIL these tests after r40622 fixed them.
Christopher Lamb [Tue, 31 Jul 2007 07:03:24 +0000 (07:03 +0000)]
Un-XFAIL these tests after r40622 fixed them.

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

17 years agoRegenerate.
Reid Spencer [Tue, 31 Jul 2007 06:37:43 +0000 (06:37 +0000)]
Regenerate.

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

17 years agoAllow the INREG parameter attribute to be added to functions. This permits the
Reid Spencer [Tue, 31 Jul 2007 06:37:27 +0000 (06:37 +0000)]
Allow the INREG parameter attribute to be added to functions. This permits the
function result to be passed in a register. This implements the GCC regparm
function attribute for llvm by translation to the InReg parameter attribute
and fixes test/CFrontend/2002-07-30-SubregSetAssertion.c

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

17 years agoThe InReg parameter attribute is valid on function results. The llvm-gcc-4.0
Reid Spencer [Tue, 31 Jul 2007 06:33:37 +0000 (06:33 +0000)]
The InReg parameter attribute is valid on function results. The llvm-gcc-4.0
front end converts regparm attribute on the gcc function into InReg attribute
on the llvm function. This fixes test/CFrontend/2002-07-30-SubrefSetAssertion.c

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

17 years agoThis isn't safe when there are uses of load's chain result.
Evan Cheng [Tue, 31 Jul 2007 06:21:44 +0000 (06:21 +0000)]
This isn't safe when there are uses of load's chain result.

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

17 years agoFix PR1581, patch by Timo Savola
Chris Lattner [Tue, 31 Jul 2007 06:00:51 +0000 (06:00 +0000)]
Fix PR1581, patch by Timo Savola

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

17 years agoRegenerate (again).
Reid Spencer [Tue, 31 Jul 2007 03:55:56 +0000 (03:55 +0000)]
Regenerate (again).

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

17 years agoDon't include newlines in the whitespace before newline (WSNL) rule.
Reid Spencer [Tue, 31 Jul 2007 03:55:43 +0000 (03:55 +0000)]
Don't include newlines in the whitespace before newline (WSNL) rule.
Fix the comment for WSNL to describe its actual function.

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

17 years agoRegenerate.
Reid Spencer [Tue, 31 Jul 2007 03:50:36 +0000 (03:50 +0000)]
Regenerate.

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

17 years agoFor PR1553:
Reid Spencer [Tue, 31 Jul 2007 02:57:37 +0000 (02:57 +0000)]
For PR1553:
Make the AsmParser auto-upgrade the old zext and sext
keywords for parameter attributes and handle the
end-of-line ambiguity.

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

17 years agoIf loop can be unswitched again, then do it yourself.
Devang Patel [Mon, 30 Jul 2007 23:07:10 +0000 (23:07 +0000)]
If loop can be unswitched again, then do it yourself.

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

17 years agoAdd a comment: don't expect from external function resolver in interpreter
Anton Korobeynikov [Mon, 30 Jul 2007 23:03:25 +0000 (23:03 +0000)]
Add a comment: don't expect from external function resolver in interpreter
things, it wasn't designed to handle.

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

17 years agoAvoid potential iterator invalidation problems.
Owen Anderson [Mon, 30 Jul 2007 21:26:39 +0000 (21:26 +0000)]
Avoid potential iterator invalidation problems.

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

17 years agoRemove dead code.
Devang Patel [Mon, 30 Jul 2007 21:10:44 +0000 (21:10 +0000)]
Remove dead code.

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

17 years ago- Allow custom lowering for CTPOP, CTTZ, CTLZ.
Scott Michel [Mon, 30 Jul 2007 21:00:31 +0000 (21:00 +0000)]
- Allow custom lowering for CTPOP, CTTZ, CTLZ.
- Fixed an existing unexpanded tab.

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

17 years agoLCSSA preserves dom info.
Devang Patel [Mon, 30 Jul 2007 20:23:45 +0000 (20:23 +0000)]
LCSSA preserves dom info.

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

17 years agoLoop Rotation pass preserves dominator tree and frontier.
Devang Patel [Mon, 30 Jul 2007 20:22:53 +0000 (20:22 +0000)]
Loop Rotation pass preserves dominator tree and frontier.

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

17 years agoLICM preserves scalar evolution and dom frontier.
Devang Patel [Mon, 30 Jul 2007 20:19:59 +0000 (20:19 +0000)]
LICM preserves scalar evolution and dom frontier.

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

17 years agoRegenerate for __dso_handle, per Anton's request.
Reid Spencer [Mon, 30 Jul 2007 20:13:24 +0000 (20:13 +0000)]
Regenerate for __dso_handle, per Anton's request.

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

17 years agoAdd detection of __dso_handle presence during configure. Use this information in the
Anton Korobeynikov [Mon, 30 Jul 2007 20:02:02 +0000 (20:02 +0000)]
Add detection of __dso_handle presence during configure. Use this information in the
JITer (short path is added for darwin). This is needed to properly JIT llvm-gcc-4.2-built
binaries, since cxa_atexit is enabled by default on much more targets.

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

17 years agoFix a typo/thinko.
Reid Spencer [Mon, 30 Jul 2007 19:53:57 +0000 (19:53 +0000)]
Fix a typo/thinko.

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

17 years agoFix a bug in getCopyFromParts turned up in the testcase for PR1132.
Dan Gohman [Mon, 30 Jul 2007 19:09:17 +0000 (19:09 +0000)]
Fix a bug in getCopyFromParts turned up in the testcase for PR1132.

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

17 years agoUse more caching when computing non-local dependence. This makes bzip2 not
Owen Anderson [Mon, 30 Jul 2007 17:29:24 +0000 (17:29 +0000)]
Use more caching when computing non-local dependence.  This makes bzip2 not
use up the entire 32-bit address space.

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

17 years agoFix a bug caused by indiscriminantly asking for the dominators of a predecessor.
Owen Anderson [Mon, 30 Jul 2007 16:57:08 +0000 (16:57 +0000)]
Fix a bug caused by indiscriminantly asking for the dominators of a predecessor.

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

17 years agoUse tabs more consistently in assembler pseudo-ops.
Dan Gohman [Mon, 30 Jul 2007 15:08:02 +0000 (15:08 +0000)]
Use tabs more consistently in assembler pseudo-ops.

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

17 years agoPrint a space between the comment character and the basic block name,
Dan Gohman [Mon, 30 Jul 2007 15:06:25 +0000 (15:06 +0000)]
Print a space between the comment character and the basic block name,
for prettiness.

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

17 years agoFix the comments for the 'fast' parameter in addPassesToEmitFile.
Dan Gohman [Mon, 30 Jul 2007 15:04:59 +0000 (15:04 +0000)]
Fix the comments for the 'fast' parameter in addPassesToEmitFile.

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

17 years agoRemove a FIXME comment that wasn't removed when the code it accompanied
Dan Gohman [Mon, 30 Jul 2007 15:01:09 +0000 (15:01 +0000)]
Remove a FIXME comment that wasn't removed when the code it accompanied
was removed.

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

17 years agoFix the comment for getClosestTargetForJIT to reflect the fact that
Dan Gohman [Mon, 30 Jul 2007 14:58:59 +0000 (14:58 +0000)]
Fix the comment for getClosestTargetForJIT to reflect the fact that
it does not have a Module parameter.

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

17 years agoMore explicit keywords.
Dan Gohman [Mon, 30 Jul 2007 14:51:59 +0000 (14:51 +0000)]
More explicit keywords.

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

17 years agoFix pastos in comments for doFinalization functions.
Dan Gohman [Mon, 30 Jul 2007 14:51:13 +0000 (14:51 +0000)]
Fix pastos in comments for doFinalization functions.

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

17 years agoNew test case.
Evan Cheng [Mon, 30 Jul 2007 07:52:03 +0000 (07:52 +0000)]
New test case.

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

17 years agoVector fneg must be expanded into fsub -0.0, X.
Evan Cheng [Mon, 30 Jul 2007 07:51:22 +0000 (07:51 +0000)]
Vector fneg must be expanded into fsub -0.0, X.

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

17 years agoAdd tests for generating noalias parameter attribute from __restrict qualified functi...
Christopher Lamb [Sun, 29 Jul 2007 23:29:16 +0000 (23:29 +0000)]
Add tests for generating noalias parameter attribute from __restrict qualified function parameters. C++ tests are currently XFAILing see PR1582.

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

17 years agoBe explicit about which level of optimization is being asked for. The -O option
Reid Spencer [Sun, 29 Jul 2007 18:23:22 +0000 (18:23 +0000)]
Be explicit about which level of optimization is being asked for. The -O option
is equivalent to -O1.

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

17 years agoChange the x86 backend to use extract_subreg for truncation operations. Passes DejaGn...
Christopher Lamb [Sun, 29 Jul 2007 01:24:57 +0000 (01:24 +0000)]
Change the x86 backend to use extract_subreg for truncation operations. Passes DejaGnu, SingleSource and MultiSource.

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

17 years agoAdd register info needed to use subreg sets on X86.
Christopher Lamb [Sat, 28 Jul 2007 19:03:30 +0000 (19:03 +0000)]
Add register info needed to use subreg sets on X86.

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

17 years agoMake this explictly signed. Fixes PR1571.
Nick Lewycky [Sat, 28 Jul 2007 16:43:10 +0000 (16:43 +0000)]
Make this explictly signed. Fixes PR1571.

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

17 years agoAdd facility to dump pass manager structure
Devang Patel [Fri, 27 Jul 2007 20:06:09 +0000 (20:06 +0000)]
Add facility to dump pass manager structure
to make it easier to understand failure.

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

17 years agoTrampoline codegen support for X86-32.
Duncan Sands [Fri, 27 Jul 2007 20:02:49 +0000 (20:02 +0000)]
Trampoline codegen support for X86-32.

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

17 years agoForget to add 'nest' to the list of parameter
Duncan Sands [Fri, 27 Jul 2007 19:57:41 +0000 (19:57 +0000)]
Forget to add 'nest' to the list of parameter
attributes.

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

17 years agoFix edge cases in handling basic block split.
Devang Patel [Fri, 27 Jul 2007 19:13:43 +0000 (19:13 +0000)]
Fix edge cases in handling basic block split.

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

17 years agoUse SmallPtrSet.
Devang Patel [Fri, 27 Jul 2007 18:34:27 +0000 (18:34 +0000)]
Use SmallPtrSet.

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

17 years agoVStudio compiler errors and placing Function*->ExFunc map under ManagedStatic control.
Chuck Rose III [Fri, 27 Jul 2007 18:26:35 +0000 (18:26 +0000)]
VStudio compiler errors and placing Function*->ExFunc map under ManagedStatic control.

This commit fixes two things.  One is a pair of VStudio compiler errors stemming from variables
which defined within the for loop statement and also within the body of the for loop.  I fixed these
by renaming one of the two variables.  Additionally, I've made the Function*->ExFunc map in
ExternalFunctions.cpp a ManagedStatic object, so that cleanup will be done on llvm_shutdown.  In repeated
uses of the interpreter, where the same Function* address may get used for completely differnet functions,
this was causing a crash.

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

17 years agoUpdates to the VStudio project files:
Chuck Rose III [Fri, 27 Jul 2007 18:20:11 +0000 (18:20 +0000)]
Updates to the VStudio project files:

1. Switch from VStudio 2k3 to VStudio 2k5

2. All pdb files now will be placed as $(OutputDir)/$(ProjectName).pdb.  This puts them alongside the
binaries with the same base name as the binary.  If you need to copy the results of your llvm build
into another project's tree, this will simplify that process.

3. Recent files added to the tree were added to the proejects within the VStudio project

4. Project build dependency order fixed so that the build can take place in one pass.  A generated
file was not being built at the correct time, causing a build error in about half the projects until
the build was run a second time.

Note you will need flex and bison installed an in your path in order to build properly.

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

17 years agoAllow SmallPtrSet to hold pointers to const data.
Owen Anderson [Fri, 27 Jul 2007 18:07:02 +0000 (18:07 +0000)]
Allow SmallPtrSet to hold pointers to const data.

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

17 years agoRe-apply 40504, but with a fix for the segfault it caused in oggenc:
Dan Gohman [Fri, 27 Jul 2007 17:16:43 +0000 (17:16 +0000)]
Re-apply 40504, but with a fix for the segfault it caused in oggenc:
Make the alignedload and alignedstore patterns always require 16-byte
alignment. This way when they are used in the "Fs" instructions, in which
a vector instruction is used for a scalar purpose, they can still require
the full vector alignment. And add a regression test for this.

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

17 years agoIt seems logical that InReg should be incompatible
Duncan Sands [Fri, 27 Jul 2007 16:45:18 +0000 (16:45 +0000)]
It seems logical that InReg should be incompatible
with StructReturn and ByVal, so make it so.

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

17 years agoAs the number of parameter attributes increases,
Duncan Sands [Fri, 27 Jul 2007 15:09:54 +0000 (15:09 +0000)]
As the number of parameter attributes increases,
Verifier::visitFunction is suffering a combinatorial
explosion due to the number of mutually incompatible
attributes.  This patch tidies the whole thing up
using attribute masks.  While there I fixed some
small bugs: (1) the ByVal attribute tests cast a
type to a pointer type, which can fail.  Yes, the
fact it is of a pointer type is checked before,
but a failing check does not cause the program
to exit, it continues on outputting further errors;
(2) Nothing was checking that an sret attribute is
on the first parameter; (3) nothing was checking that
a function for which isStructReturn() is true has a
parameter with the sret attribute and vice-versa (I
don't think it is possible for this to go wrong, but
it seems right to check it).

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

17 years agoSupport for trampolines, except for X86 codegen which is
Duncan Sands [Fri, 27 Jul 2007 12:58:54 +0000 (12:58 +0000)]
Support for trampolines, except for X86 codegen which is
still under discussion.

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

17 years agoMove subreg lowering pass to be right after regalloc, per feedback.
Christopher Lamb [Fri, 27 Jul 2007 07:36:14 +0000 (07:36 +0000)]
Move subreg lowering pass to be right after regalloc, per feedback.

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

17 years agoReverting 40504 for now. It's breaking oggenc.
Evan Cheng [Fri, 27 Jul 2007 01:37:47 +0000 (01:37 +0000)]
Reverting 40504 for now. It's breaking oggenc.

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

17 years agoFix thinko. Update return status appropriately.
Devang Patel [Thu, 26 Jul 2007 20:21:42 +0000 (20:21 +0000)]
Fix thinko. Update return status appropriately.

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

17 years agoFix a bug introduced in my last commit.
Owen Anderson [Thu, 26 Jul 2007 18:57:04 +0000 (18:57 +0000)]
Fix a bug introduced in my last commit.

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

17 years agoFix a couple more bugs in the phi construction by pulling in code that does
Owen Anderson [Thu, 26 Jul 2007 18:26:51 +0000 (18:26 +0000)]
Fix a couple more bugs in the phi construction by pulling in code that does
almost the same things from LCSSA.

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

17 years agoTest case for PR1573.
Evan Cheng [Thu, 26 Jul 2007 17:45:57 +0000 (17:45 +0000)]
Test case for PR1573.

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

17 years agoMake sure epilogue esp adjustment is placed before any terminator and pop instructions.
Evan Cheng [Thu, 26 Jul 2007 17:45:41 +0000 (17:45 +0000)]
Make sure epilogue esp adjustment is placed before any terminator and pop instructions.

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

17 years agoDon't pollute the meaning of isUnpredicatedTerminator.
Evan Cheng [Thu, 26 Jul 2007 17:32:14 +0000 (17:32 +0000)]
Don't pollute the meaning of isUnpredicatedTerminator.

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

17 years agoFix test.
Evan Cheng [Thu, 26 Jul 2007 17:07:03 +0000 (17:07 +0000)]
Fix test.

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

17 years agoMinor bug.
Evan Cheng [Thu, 26 Jul 2007 17:02:45 +0000 (17:02 +0000)]
Minor bug.

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

17 years agoFix the alias analysis query in DAGCombiner to not add in two
Dan Gohman [Thu, 26 Jul 2007 16:14:06 +0000 (16:14 +0000)]
Fix the alias analysis query in DAGCombiner to not add in two
offsets. The SrcValueOffset values are the real offsets from the
SrcValue base pointers.

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

17 years agoMove the GET_SIDE_EFFECT_INFO logic from isInstructionTriviallyDead
Dan Gohman [Thu, 26 Jul 2007 16:06:08 +0000 (16:06 +0000)]
Move the GET_SIDE_EFFECT_INFO logic from isInstructionTriviallyDead
to Instruction::mayWriteToMemory, fixing a FIXME, and helping
various places that call mayWriteToMemory directly.

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

17 years agoRemove a bogus return statement, what appears to have been a pasto
Dan Gohman [Thu, 26 Jul 2007 15:29:35 +0000 (15:29 +0000)]
Remove a bogus return statement, what appears to have been a pasto
from Relation::contradicts in Relation::incorporate.

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

17 years agoDummyInst's member functions don't need to be virtual.
Dan Gohman [Thu, 26 Jul 2007 15:25:08 +0000 (15:25 +0000)]
DummyInst's member functions don't need to be virtual.

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

17 years agoIn the .loc directive, print the fields as "debug" fields, so they
Dan Gohman [Thu, 26 Jul 2007 15:24:15 +0000 (15:24 +0000)]
In the .loc directive, print the fields as "debug" fields, so they
don't get decorated as if for immediate fields for instructions.

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

17 years agoFix a whitespace difference between CMPSSrr and CMPSDrr.
Dan Gohman [Thu, 26 Jul 2007 15:11:50 +0000 (15:11 +0000)]
Fix a whitespace difference between CMPSSrr and CMPSDrr.

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

17 years agoFix a pasto in a comment.
Dan Gohman [Thu, 26 Jul 2007 15:11:00 +0000 (15:11 +0000)]
Fix a pasto in a comment.

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

17 years agoAdd a MachineFunction pass, which runs post register allocation, that turns subreg...
Christopher Lamb [Thu, 26 Jul 2007 08:18:32 +0000 (08:18 +0000)]
Add a MachineFunction pass, which runs post register allocation, that turns subreg insert/extract instruction into register copies. This ensures correct code gen if the coalescer isn't able to remove all subreg instructions.

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

17 years agoTeach DAG scheduling how to properly emit subreg insert/extract machine instructions...
Christopher Lamb [Thu, 26 Jul 2007 08:12:07 +0000 (08:12 +0000)]
Teach DAG scheduling how to properly emit subreg insert/extract machine instructions. PR1350

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

17 years agoHave register info provide the inverse mapping of register->superregisters. PR1350
Christopher Lamb [Thu, 26 Jul 2007 08:01:58 +0000 (08:01 +0000)]
Have register info provide the inverse mapping of register->superregisters. PR1350

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

17 years agoAdd target independent MachineInstr's to represent subreg insert/extract in MBB's...
Christopher Lamb [Thu, 26 Jul 2007 07:48:21 +0000 (07:48 +0000)]
Add target independent MachineInstr's to represent subreg insert/extract in MBB's. PR1350

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

17 years agoSame goes for constantpool, etc.
Evan Cheng [Thu, 26 Jul 2007 07:35:15 +0000 (07:35 +0000)]
Same goes for constantpool, etc.

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

17 years agoAdd selection DAG nodes for subreg insert/extract. PR1350
Christopher Lamb [Thu, 26 Jul 2007 07:34:40 +0000 (07:34 +0000)]
Add selection DAG nodes for subreg insert/extract. PR1350

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

17 years agoFix 80 col violation.
Christopher Lamb [Thu, 26 Jul 2007 07:03:08 +0000 (07:03 +0000)]
Fix 80 col violation.

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

17 years agoRemove subreg index from MachineInstr's and also keep vregs as unsigned when adding...
Christopher Lamb [Thu, 26 Jul 2007 07:00:46 +0000 (07:00 +0000)]
Remove subreg index from MachineInstr's and also keep vregs as unsigned when adding operands.

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

17 years agoTeach TableGen about the new vector types.
Christopher Lamb [Thu, 26 Jul 2007 06:41:18 +0000 (06:41 +0000)]
Teach TableGen about the new vector types.

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

17 years agoFix infinite recursion for when extract_vector_elt is legal. Unfortunately no public...
Christopher Lamb [Thu, 26 Jul 2007 03:33:13 +0000 (03:33 +0000)]
Fix infinite recursion for when extract_vector_elt is legal. Unfortunately no public targets use this code-path, so no test.

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

17 years agoFix comments for new types.
Christopher Lamb [Thu, 26 Jul 2007 01:48:57 +0000 (01:48 +0000)]
Fix comments for new types.

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

17 years agoAdd support for 3 element 32-bit vector ValueTypes.
Christopher Lamb [Thu, 26 Jul 2007 01:46:52 +0000 (01:46 +0000)]
Add support for 3 element 32-bit vector ValueTypes.

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

17 years agoRemove X86ISD::LOAD_PACK and X86ISD::LOAD_UA and associated code from the
Dan Gohman [Thu, 26 Jul 2007 00:31:09 +0000 (00:31 +0000)]
Remove X86ISD::LOAD_PACK and X86ISD::LOAD_UA and associated code from the
x86 target, replacing them with the new alignment attributes on memory
references.

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

17 years agoFix what is _hopefully_ the last corner case for loops.
Owen Anderson [Wed, 25 Jul 2007 23:54:42 +0000 (23:54 +0000)]
Fix what is _hopefully_ the last corner case for loops.

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

17 years agoMac OS X x86-64 lower 4G address is not available.
Evan Cheng [Wed, 25 Jul 2007 23:41:36 +0000 (23:41 +0000)]
Mac OS X x86-64 lower 4G address is not available.

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

17 years agoMac OS X should use 0x90 to fill in gaps to satisfy function alignment requirements.
Evan Cheng [Wed, 25 Jul 2007 23:36:05 +0000 (23:36 +0000)]
Mac OS X should use 0x90 to fill in gaps to satisfy function alignment requirements.

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

17 years agoEmitAlignment() also emits optional fill value.
Evan Cheng [Wed, 25 Jul 2007 23:35:07 +0000 (23:35 +0000)]
EmitAlignment() also emits optional fill value.

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

17 years agoFunctions with LinkOnce and weak linkage still need to be aligned. Doh.
Evan Cheng [Wed, 25 Jul 2007 22:28:16 +0000 (22:28 +0000)]
Functions with LinkOnce and weak linkage still need to be aligned. Doh.

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