oota-llvm.git
15 years agoAtom and Core i7 do not have same model number after all.
Evan Cheng [Mon, 5 Jan 2009 08:45:01 +0000 (08:45 +0000)]
Atom and Core i7 do not have same model number after all.

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

15 years agoproduce the same diagnostics for vicmp constant exprs as vicmp instructions.
Chris Lattner [Mon, 5 Jan 2009 08:26:05 +0000 (08:26 +0000)]
produce the same diagnostics for vicmp constant exprs as vicmp instructions.

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

15 years agoFix PR3281:crash08.ll with this diagnostic:
Chris Lattner [Mon, 5 Jan 2009 08:24:46 +0000 (08:24 +0000)]
Fix PR3281:crash08.ll with this diagnostic:
llvm-as: crash08.ll:3:15: invalid operand type for instruction
  "qp" = sdiv fp128 0x1, %30
              ^

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

15 years agoreject PR3281:crash07.ll with:
Chris Lattner [Mon, 5 Jan 2009 08:18:44 +0000 (08:18 +0000)]
reject PR3281:crash07.ll with:

llvm-as: crash07.ll:2:32: va_arg requires operand with first class type
  %y = va_arg [52 x <{}>] %43, double (...) sspreq
                               ^

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

15 years agoalignment of 0 is not valid.
Chris Lattner [Mon, 5 Jan 2009 08:14:35 +0000 (08:14 +0000)]
alignment of 0 is not valid.

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

15 years agoreject undef/zero labels. This fixes PR3281:crash0[56].ll with these
Chris Lattner [Mon, 5 Jan 2009 08:13:38 +0000 (08:13 +0000)]
reject undef/zero labels.  This fixes PR3281:crash0[56].ll with these
diagnostics:
llvm-as: crash05.ll:1:14: invalid type for null constant
global label zeroinitializer addrspace (75), section "c"
             ^
llvm-as: crash06.ll:2:14: invalid type for null constant
  udiv label zeroinitializer, @0
             ^

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

15 years agoadd checking intentionally elided for vfcmp/vicmp since they should really
Chris Lattner [Mon, 5 Jan 2009 08:09:48 +0000 (08:09 +0000)]
add checking intentionally elided for vfcmp/vicmp since they should really
just be removed.  However, this fixes PR3281:crash04.ll, diagnosing it with:

lvm-as: crash04.ll:2:13: vfcmp requires vector floating point operands
  vfcmp uno double* undef, undef
            ^

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

15 years agodiagnose PR3281:crash02.ll with:
Chris Lattner [Mon, 5 Jan 2009 08:04:33 +0000 (08:04 +0000)]
diagnose PR3281:crash02.ll with:
llvm-as: crash02.ll:1:62: invalid function return type
declare { <{ <{}>, void ([1898 x { void ()* }], opaque, ...) (), fp128 * }>, opaque } @t ()
                                                             ^

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

15 years agoreject PR3281:crash01.ll with:
Chris Lattner [Mon, 5 Jan 2009 08:00:30 +0000 (08:00 +0000)]
reject PR3281:crash01.ll with:

llvm-as: crash01.ll:1:9: invalid function return type
declare opaque @t()
        ^

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

15 years agotighten up return type check
Chris Lattner [Mon, 5 Jan 2009 07:58:59 +0000 (07:58 +0000)]
tighten up return type check

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

15 years agofix PR3281:accepted0[02].ll: represent empty arrays distinctly, and
Chris Lattner [Mon, 5 Jan 2009 07:52:51 +0000 (07:52 +0000)]
fix PR3281:accepted0[02].ll: represent empty arrays distinctly, and
diagnose attempts to initialize non-empty arrays with them.  This
produces:
llvm-as: accepted02.ll:1:28: invalid empty array initializer
@"o" = global [5 x double] []
                           ^
llvm-as: accepted00.ll:1:32: invalid empty array initializer
@"za" = thread_local global {} []
                               ^
[

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

15 years agoPR3281:crash00.ll: produce this diagnostic instead of crashing:
Chris Lattner [Mon, 5 Jan 2009 07:46:05 +0000 (07:46 +0000)]
PR3281:crash00.ll: produce this diagnostic instead of crashing:

@t = global i8 0, align 3
                        ^

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

15 years agoHandle weak_extern in the JIT. This fixes
Dan Gohman [Mon, 5 Jan 2009 05:32:42 +0000 (05:32 +0000)]
Handle weak_extern in the JIT. This fixes
SingleSource/UnitTests/2007-04-25-weak.c in JIT mode. The test
now passes on systems which are able to produce a correct
reference output to compare with.

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

15 years agoCellSPU:
Scott Michel [Mon, 5 Jan 2009 04:05:53 +0000 (04:05 +0000)]
CellSPU:
- Teach SPU64InstrInfo.td about the remaining signed comparisons, update tests
  accordingly.

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

15 years agogc is not an obsolete keyword.
Dan Gohman [Mon, 5 Jan 2009 03:22:02 +0000 (03:22 +0000)]
gc is not an obsolete keyword.

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

15 years agoUpdate polygen grammar for recent language changes.
Dan Gohman [Mon, 5 Jan 2009 03:21:23 +0000 (03:21 +0000)]
Update polygen grammar for recent language changes.

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

15 years agoCellSPU:
Scott Michel [Mon, 5 Jan 2009 01:35:22 +0000 (01:35 +0000)]
CellSPU:
- Add an 8-bit operation test, which doesn't do much at this point.

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

15 years agoCellSPU:
Scott Michel [Mon, 5 Jan 2009 01:34:35 +0000 (01:34 +0000)]
CellSPU:
- Fix (brcond (setq ...)) bug, where BRNZ should have been used vice BRZ.
- Kill unused/unnecessary nodes in SPUNodes.td
- Beef out the i64operations.c test harness to use a lot of unaligned
  loads, test loops and LLVM loop/basic block optimizations; run the
  test harness successfully on real Cell hardware.

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

15 years agoMove the libcall annotating part from doFinalization to doInitialization.
Nick Lewycky [Mon, 5 Jan 2009 00:07:50 +0000 (00:07 +0000)]
Move the libcall annotating part from doFinalization to doInitialization.
Finalization occurs after all the FunctionPasses in the group have run, which
is clearly not what we want.

This also means that we have to make sure that we apply the right param
attributes when creating a new function.

Also, add a missed optimization: strdup and strndup. NoCapture and
NoAlias return!

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

15 years agoA few more whitespace tidyments.
Dan Gohman [Sun, 4 Jan 2009 23:49:44 +0000 (23:49 +0000)]
A few more whitespace tidyments.

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

15 years agoTidy whitespace.
Dan Gohman [Sun, 4 Jan 2009 23:44:43 +0000 (23:44 +0000)]
Tidy whitespace.

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

15 years agoRegenerate.
Bill Wendling [Sun, 4 Jan 2009 23:12:30 +0000 (23:12 +0000)]
Regenerate.

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

15 years agoModify the unittests Makefiles so that they don't rebuild parts of LLVM just to
Bill Wendling [Sun, 4 Jan 2009 23:12:21 +0000 (23:12 +0000)]
Modify the unittests Makefiles so that they don't rebuild parts of LLVM just to
run the tests. Most of this was stolen from the llvm/test Makefiles.

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

15 years agoThe .llx suffix is obsolete.
Dan Gohman [Sun, 4 Jan 2009 23:10:00 +0000 (23:10 +0000)]
The .llx suffix is obsolete.

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

15 years agoUpdate VIM LLVM IR syntax highlighting.
Dan Gohman [Sun, 4 Jan 2009 23:09:38 +0000 (23:09 +0000)]
Update VIM LLVM IR syntax highlighting.
 - Add several new keywords
 - Clean up some obsolete keywords
 - Improve the patterns for constants.
 - Add syntax-highlighting for dejagnu test command comments

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

15 years agoAdd a mechanism to specify attributes in getOrInsertFunction.
Nick Lewycky [Sun, 4 Jan 2009 22:54:40 +0000 (22:54 +0000)]
Add a mechanism to specify attributes in getOrInsertFunction.

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

15 years agoRefactor some parser interfaces to fix PR3278 and a FIXME:
Chris Lattner [Sun, 4 Jan 2009 20:44:11 +0000 (20:44 +0000)]
Refactor some parser interfaces to fix PR3278 and a FIXME:
ParseAssemblyString with a specified module would not parse
into the module, it would create and return a new one.

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

15 years agoRun a post-pass that marks known function declarations by name.
Nick Lewycky [Sun, 4 Jan 2009 20:27:34 +0000 (20:27 +0000)]
Run a post-pass that marks known function declarations by name.

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

15 years agoelf writer really wants the size of the global, not the size
Chris Lattner [Sun, 4 Jan 2009 20:19:20 +0000 (20:19 +0000)]
elf writer really wants the size of the global, not the size
of the pointer to the global.

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

15 years agoSet a few more vimrc indentation options.
Dan Gohman [Sun, 4 Jan 2009 18:59:55 +0000 (18:59 +0000)]
Set a few more vimrc indentation options.

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

15 years agoAdd utility functions for marking parameters as noalias or nocapture.
Nick Lewycky [Sun, 4 Jan 2009 18:21:35 +0000 (18:21 +0000)]
Add utility functions for marking parameters as noalias or nocapture.

Clean up some of the existing code by making it use hasFnAttr/addFnAttr
and round it off by creating removeFnAttr.

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

15 years agoXFAIL this test. The xform was removed.
Bill Wendling [Sun, 4 Jan 2009 06:32:28 +0000 (06:32 +0000)]
XFAIL this test. The xform was removed.

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

15 years agoRevert this transform. It was causing some dramatic slowdowns in a few tests. See...
Bill Wendling [Sun, 4 Jan 2009 06:19:11 +0000 (06:19 +0000)]
Revert this transform. It was causing some dramatic slowdowns in a few tests. See PR3266.

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

15 years agoAdd several more unimplemented operator overloads to ilist_iterator
Dan Gohman [Sun, 4 Jan 2009 03:22:42 +0000 (03:22 +0000)]
Add several more unimplemented operator overloads to ilist_iterator
to help catch errors.

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

15 years agoThe llvm::ELFWriter::EmitGlobal() method is calling the
Bill Wendling [Sun, 4 Jan 2009 01:47:14 +0000 (01:47 +0000)]
The llvm::ELFWriter::EmitGlobal() method is calling the
llvm::PATypeHolder::get() method when LLVM is self-hosted in Release
mode. Before the parser changed, there was a definition of llvm::PAHolder::get()
in llvmAsmParser.y. This was probably a bug that no-one noticed.

Explicitly #include the Type.h file as a temporary fix for now.

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

15 years agoadd #include guards, thanks Dan.
Chris Lattner [Sun, 4 Jan 2009 01:28:00 +0000 (01:28 +0000)]
add #include guards, thanks Dan.

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

15 years agoUse softtabstop instead of redefining tabstop.
Dan Gohman [Sun, 4 Jan 2009 00:05:43 +0000 (00:05 +0000)]
Use softtabstop instead of redefining tabstop.

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

15 years agoSwitch the vimrc file from smartindent to cindent, which is
Dan Gohman [Sun, 4 Jan 2009 00:03:54 +0000 (00:03 +0000)]
Switch the vimrc file from smartindent to cindent, which is
smarter about C-ish syntax, and supports the cinoptions
variable. Set cinoptions to suppress the extra indentation
for switch case labels.

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

15 years agoRevert r61598 as it does nothing.
Bill Wendling [Sat, 3 Jan 2009 22:46:50 +0000 (22:46 +0000)]
Revert r61598 as it does nothing.

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

15 years agoFix a DAGCombiner abort on an invalid shift count constant. This fixes PR3250.
Dan Gohman [Sat, 3 Jan 2009 19:22:06 +0000 (19:22 +0000)]
Fix a DAGCombiner abort on an invalid shift count constant. This fixes PR3250.

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

15 years agoCommuteNodesToReducePressure() is now removed.
Dan Gohman [Sat, 3 Jan 2009 19:19:30 +0000 (19:19 +0000)]
CommuteNodesToReducePressure() is now removed.

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

15 years agoRemove the code from the scheduler that commuted two-address
Dan Gohman [Sat, 3 Jan 2009 18:01:46 +0000 (18:01 +0000)]
Remove the code from the scheduler that commuted two-address
instructions to avoid copies, because TwoAddressInstructionPass
also does this optimization.  The scheduler's version didn't
account for live-out values, which resulted in spurious commutes
and missed opportunities.

Now, TwoAddressInstructionPass handles all the opportunities,
instead of just those that the scheduler missed. The result is
usually the same, though there are occasional trivial differences
resulting from the avoidance of spurious commutes.

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

15 years agoAny void readonly functions are provably dead, don't waste time adding
Nick Lewycky [Sat, 3 Jan 2009 17:05:32 +0000 (17:05 +0000)]
Any void readonly functions are provably dead, don't waste time adding
nocapture attributes to them.

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

15 years agoimprove test and address Misha's comments
Nuno Lopes [Sat, 3 Jan 2009 14:55:26 +0000 (14:55 +0000)]
improve test and address Misha's comments

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

15 years agoAdd Intel processors core i7 and atom.
Evan Cheng [Sat, 3 Jan 2009 04:24:44 +0000 (04:24 +0000)]
Add Intel processors core i7 and atom.

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

15 years agoFix PR3210: Detect more Intel processors. Patch by Torok Edwin.
Evan Cheng [Sat, 3 Jan 2009 04:04:46 +0000 (04:04 +0000)]
Fix PR3210: Detect more Intel processors. Patch by Torok Edwin.

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

15 years ago* Wrap command line flag in <tt>
Misha Brukman [Sat, 3 Jan 2009 02:35:05 +0000 (02:35 +0000)]
* Wrap command line flag in <tt>
* Wrapped long lines in code section

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

15 years agoWe know it's always a SCEVConstant if it gets here, so just cast it and
Nick Lewycky [Sat, 3 Jan 2009 01:53:24 +0000 (01:53 +0000)]
We know it's always a SCEVConstant if it gets here, so just cast it and
inline the only use of isNegative. Fixes warning reported by Mike Stump.

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

15 years agoSetting BUILD_ARCHIVE to 0 has the same effect as defining it to 1.
Bill Wendling [Sat, 3 Jan 2009 01:48:26 +0000 (01:48 +0000)]
Setting BUILD_ARCHIVE to 0 has the same effect as defining it to 1.

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

15 years agoMake sure that 'ranlib' runs only after 'ar' is completed.
Bill Wendling [Sat, 3 Jan 2009 01:11:39 +0000 (01:11 +0000)]
Make sure that 'ranlib' runs only after 'ar' is completed.

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

15 years agoCellSPU:
Scott Michel [Sat, 3 Jan 2009 00:27:53 +0000 (00:27 +0000)]
CellSPU:
- Remove custom lowering for BRCOND
- Add remaining functionality for branches in SPUInstrInfo, such as branch
  condition reversal and load/store folding. Updated BrCond test to reflect
  branch reversal.

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

15 years agoReassign the buffer to the pointer so that we don't overwrite memory.
Bill Wendling [Fri, 2 Jan 2009 23:13:30 +0000 (23:13 +0000)]
Reassign the buffer to the pointer so that we don't overwrite memory.

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

15 years agoAlphabetized #includes.
Misha Brukman [Fri, 2 Jan 2009 22:49:28 +0000 (22:49 +0000)]
Alphabetized #includes.

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

15 years agoDown with trailing whitespace!
Misha Brukman [Fri, 2 Jan 2009 22:46:48 +0000 (22:46 +0000)]
Down with trailing whitespace!

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

15 years agoVerifyLineLength() actually takes a max length parameter.
Misha Brukman [Fri, 2 Jan 2009 21:24:29 +0000 (21:24 +0000)]
VerifyLineLength() actually takes a max length parameter.

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

15 years agoAdded some basic lint tools for C++ and generic lint tool applicable to all
Misha Brukman [Fri, 2 Jan 2009 21:15:30 +0000 (21:15 +0000)]
Added some basic lint tools for C++ and generic lint tool applicable to all
types of files (TableGen, LLVM assembly, HTML files, etc.)

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

15 years ago- Make copyRegToReg use the "LR" assembler synonym for "OR". Makes finding
Scott Michel [Fri, 2 Jan 2009 20:52:08 +0000 (20:52 +0000)]
- Make copyRegToReg use the "LR" assembler synonym for "OR". Makes finding
  register copies a little easier to pick out from the output.
- Fix bug 3192.

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

15 years ago* Alphabetized system headers per the style guide
Misha Brukman [Fri, 2 Jan 2009 20:26:30 +0000 (20:26 +0000)]
* Alphabetized system headers per the style guide
* Minor spacing and comment cleanups

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

15 years agoDon't try to analyze this "backward" case. This is overly conservative
Nick Lewycky [Fri, 2 Jan 2009 18:54:17 +0000 (18:54 +0000)]
Don't try to analyze this "backward" case. This is overly conservative
pending a correct solution.

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

15 years agoSo *this* is where all the trailing whitespace in file header comments come
Misha Brukman [Fri, 2 Jan 2009 16:58:42 +0000 (16:58 +0000)]
So *this* is where all the trailing whitespace in file header comments come
from: copy-pasted straight from the coding standards doc!

Oh, the irony.

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

15 years agoRemove comma at end of enumerator list.
Daniel Dunbar [Fri, 2 Jan 2009 16:32:55 +0000 (16:32 +0000)]
Remove comma at end of enumerator list.

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

15 years agoRemove bison specific Makefile bits for AsmParser.
Daniel Dunbar [Fri, 2 Jan 2009 16:29:09 +0000 (16:29 +0000)]
Remove bison specific Makefile bits for AsmParser.

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

15 years agoDeleted trailing whitespace; no functional changes.
Misha Brukman [Fri, 2 Jan 2009 16:28:18 +0000 (16:28 +0000)]
Deleted trailing whitespace; no functional changes.

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

15 years agovimrc
Misha Brukman [Fri, 2 Jan 2009 16:26:14 +0000 (16:26 +0000)]
vimrc
* Fixed cursors in terminal by setting nocompatible (sorry, vi users)
* Enable syntax highlighting so that this file can stand on its own
* Highlight trailing whitespace
* Fixed commands to delete trailing whitespaces and convert tabs to spaces

llvm.vim and tablegen.vim
* Removed trailing whitespace, as it's now very visible

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

15 years agoWe also removed gtest-all.cc from the distribution tarball.
Misha Brukman [Fri, 2 Jan 2009 15:28:00 +0000 (15:28 +0000)]
We also removed gtest-all.cc from the distribution tarball.

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

15 years agoLoad tracking means that the value analyzed may
Duncan Sands [Fri, 2 Jan 2009 15:16:38 +0000 (15:16 +0000)]
Load tracking means that the value analyzed may
not have pointer type.  In particular, it may
be the condition argument for a select or a GEP
index.  While I was unable to construct a testcase
for which some bits of the original pointer are
captured due to one of these, it's very very close
to being possible - so play safe and exclude these
possibilities.

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

15 years agofist short at a new unit test for ImmutableSets. no bugs found, though :P
Nuno Lopes [Fri, 2 Jan 2009 13:49:50 +0000 (13:49 +0000)]
fist short at a new unit test for ImmutableSets. no bugs found, though :P

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

15 years agomake 'make clean' remove test binaries as well
Nuno Lopes [Fri, 2 Jan 2009 12:25:22 +0000 (12:25 +0000)]
make 'make clean' remove test binaries as well

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

15 years agoignore build dirs
Nuno Lopes [Fri, 2 Jan 2009 12:18:41 +0000 (12:18 +0000)]
ignore build dirs

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

15 years agoWhen calculating 'nocapture' argument attributes, allow
Duncan Sands [Fri, 2 Jan 2009 11:54:37 +0000 (11:54 +0000)]
When calculating 'nocapture' argument attributes, allow
the argument to be stored to an alloca by tracking uses
of the alloca.  This occurs 4 times (out of 7121, 0.05%)
in MultiSource/Applications, so may not be worth it.  On
the other hand, it is easy to do and fairly cheap.  The
functions it helps are: W_addcom and W_addlit in spiff;
process_args (argv) in d (make_dparser); ercPixConcealIMB
in JM/ldecod.

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

15 years agoImprove comments and reorganize a bit - no functionality
Duncan Sands [Fri, 2 Jan 2009 11:46:24 +0000 (11:46 +0000)]
Improve comments and reorganize a bit - no functionality
change.

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

15 years agoDeleted too many properties: restore some.
Duncan Sands [Fri, 2 Jan 2009 09:01:57 +0000 (09:01 +0000)]
Deleted too many properties: restore some.

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

15 years agoFix a really horrible typo, which caused undefined behavior.
Chris Lattner [Fri, 2 Jan 2009 08:49:06 +0000 (08:49 +0000)]
Fix a really horrible typo, which caused undefined behavior.

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

15 years agoRemove the "ignore" property on this directory.
Duncan Sands [Fri, 2 Jan 2009 08:40:06 +0000 (08:40 +0000)]
Remove the "ignore" property on this directory.

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

15 years agominor cleanups and comment improvements.
Chris Lattner [Fri, 2 Jan 2009 08:05:26 +0000 (08:05 +0000)]
minor cleanups and comment improvements.

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

15 years agoadd a #include to hopefully get the x86-64-linux buildbot building.
Chris Lattner [Fri, 2 Jan 2009 07:18:46 +0000 (07:18 +0000)]
add a #include to hopefully get the x86-64-linux buildbot building.

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

15 years agoRemove lex/bison support from makefile.rules.
Chris Lattner [Fri, 2 Jan 2009 07:16:45 +0000 (07:16 +0000)]
Remove lex/bison support from makefile.rules.

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

15 years agoupdate the cmakefile. This is a "best guess", I haven't tested this.
Chris Lattner [Fri, 2 Jan 2009 07:14:23 +0000 (07:14 +0000)]
update the cmakefile.  This is a "best guess", I haven't tested this.

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

15 years agolex and bison aren't needed to build llvm anymore.
Chris Lattner [Fri, 2 Jan 2009 07:10:51 +0000 (07:10 +0000)]
lex and bison aren't needed to build llvm anymore.

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

15 years agonew non-ambiguous syntax.
Chris Lattner [Fri, 2 Jan 2009 07:02:56 +0000 (07:02 +0000)]
new non-ambiguous syntax.

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

15 years agoReimplement the old and horrible bison parser for .ll files with a nice
Chris Lattner [Fri, 2 Jan 2009 07:01:27 +0000 (07:01 +0000)]
Reimplement the old and horrible bison parser for .ll files with a nice
and clean recursive descent parser.

This change has a couple of ramifications:
1. The parser code is about 400 lines shorter (in what we maintain, not
   including what is autogenerated).
2. The code should be significantly faster than the old code because we
   don't have to work around bison's poor handling of datatypes with
   ctors/dtors.  This also makes the code much more resistant to memory
   leaks.
3. We now get caret diagnostics from the .ll parser, woo.
4. The actual diagnostics emited from the parser are completely different
   so a bunch of testcases had to be updated.
5. I now disallow "%ty = type opaque %ty = type i32".  There was no good
   reason to support this, it was just an accident of the old
   implementation.  I have no reason to think that anyone is actually using
   this.
6. The syntax for sticking a global variable has changed to make it
   unambiguous.  I don't think anyone is depending on this since only clang
   supports this and it is not solid yet, so I'm not worried about anything
   breaking.
7. This gets rid of the last use of bison, and along with it the .cvs files.
   I'll prune this from the makefiles as a subsequent commit.

There are a few minor cleanups that can be done after this commit (suggestions
welcome!) but this passes dejagnu testing and is ready for its time in the
limelight.

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

15 years agoDo not isel load folding bt instructions for pentium m, core, core2, and AMD processo...
Evan Cheng [Fri, 2 Jan 2009 05:35:45 +0000 (05:35 +0000)]
Do not isel load folding bt instructions for pentium m, core, core2, and AMD processors. These are significantly slower than a load followed by a bt of a register.

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

15 years agoFix x86 CPU id detection to identify Penryn (and future processors).
Evan Cheng [Fri, 2 Jan 2009 05:29:20 +0000 (05:29 +0000)]
Fix x86 CPU id detection to identify Penryn (and future processors).

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

15 years agoUse movaps / movd to extract vector element 0 even with sse4.1. It's still cheaper...
Evan Cheng [Fri, 2 Jan 2009 05:29:08 +0000 (05:29 +0000)]
Use movaps / movd to extract vector element 0 even with sse4.1. It's still cheaper than pextrw especially if the value is in memory.

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

15 years agoFix typo.
Nick Lewycky [Fri, 2 Jan 2009 05:01:22 +0000 (05:01 +0000)]
Fix typo.

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

15 years agoRemove the cyclic part of this test, it was passing for the wrong
Nick Lewycky [Fri, 2 Jan 2009 03:52:27 +0000 (03:52 +0000)]
Remove the cyclic part of this test, it was passing for the wrong
reason. Two functions which mutually require each other to be nocapture
are not currently supported.

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

15 years agoMake adding nocapture a bit stronger. FreeInst is nocapture. Also,
Nick Lewycky [Fri, 2 Jan 2009 03:46:56 +0000 (03:46 +0000)]
Make adding nocapture a bit stronger. FreeInst is nocapture. Also,
functions that don't write can't leak a pointer except through
the return value, so a void readonly function is implicitly nocapture.

Test these, and add a test that verifies that f1 calling f2 with an
otherwise dead pointer gets both of them marked nocapture.

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

15 years agoDon't error out if ranlib fails.
Bill Wendling [Fri, 2 Jan 2009 02:53:24 +0000 (02:53 +0000)]
Don't error out if ranlib fails.

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

15 years agorename a file to follow naming conventions.
Chris Lattner [Fri, 2 Jan 2009 01:52:35 +0000 (01:52 +0000)]
rename a file to follow naming conventions.

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

15 years agoAdd tests for two types of traps that escape analysis
Duncan Sands [Fri, 2 Jan 2009 00:55:51 +0000 (00:55 +0000)]
Add tests for two types of traps that escape analysis
might one day fall into.

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

15 years agoMention that this pass does escape analysis in the
Duncan Sands [Thu, 1 Jan 2009 20:45:19 +0000 (20:45 +0000)]
Mention that this pass does escape analysis in the
leading comments.

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

15 years agoFactorize (and generalize) the code promoting SELECT
Duncan Sands [Thu, 1 Jan 2009 20:36:20 +0000 (20:36 +0000)]
Factorize (and generalize) the code promoting SELECT
and BRCOND conditions.  Reorder a few methods while
there.

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

15 years ago* Quoted the executable 'runtest' to emphasize the binary needed;
Misha Brukman [Thu, 1 Jan 2009 20:26:05 +0000 (20:26 +0000)]
* Quoted the executable 'runtest' to emphasize the binary needed;
  otherwise, some unlucky souls start looking for a 'dejagnu' binary...
* Properly capitalized LLVM.

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

15 years agoRemove trailing spaces.
Duncan Sands [Thu, 1 Jan 2009 19:56:02 +0000 (19:56 +0000)]
Remove trailing spaces.

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

15 years agoFix PR3274: when promoting the condition of a BRCOND node,
Duncan Sands [Thu, 1 Jan 2009 15:52:00 +0000 (15:52 +0000)]
Fix PR3274: when promoting the condition of a BRCOND node,
promote from i1 all the way up to the canonical SetCC type.
In order to discover an appropriate type to use, pass
MVT::Other to getSetCCResultType.  In order to be able to
do this, change getSetCCResultType to take a type as an
argument, not a value (this is also more logical).

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

15 years agoOriginal patch by Talin.
Misha Brukman [Thu, 1 Jan 2009 02:24:48 +0000 (02:24 +0000)]
Original patch by Talin.

* Added the first LLVM unittest -- DenseMap.
* Updated mkpatch utility to include llvm/unittests dir
* Added top-level target "unittests" to run all unittests

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

15 years ago* Removed gtest-all.cc; .cc files including other .cc files is weird
Misha Brukman [Thu, 1 Jan 2009 02:05:43 +0000 (02:05 +0000)]
* Removed gtest-all.cc; .cc files including other .cc files is weird
* Removed gtest_main.cc: we have our own main() elsewhere
* Simplified the Makefile as we don't need SOURCES

* Moved the internal header to gtest/internal/
* Simplified the Makefile to remove -I param to CPP.Flags

* Updated README.LLVM with all the steps I took to massage GTest to
  work in LLVM so far

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

15 years agoMoved Google Test code up one directory so that we can use a standard LLVM
Misha Brukman [Thu, 1 Jan 2009 01:29:44 +0000 (01:29 +0000)]
Moved Google Test code up one directory so that we can use a standard LLVM
Makefile with it, without resorting to the use of VPATH.

Also added Makefiles at every level of the directory tree to properly recurse
to Google Test and build it as a library (original Makefiles by Talin).

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

15 years agoFix comment.
Bill Wendling [Thu, 1 Jan 2009 01:19:59 +0000 (01:19 +0000)]
Fix comment.

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

15 years agoAdd transformation:
Bill Wendling [Thu, 1 Jan 2009 01:18:23 +0000 (01:18 +0000)]
Add transformation:

 xor (or (icmp, icmp), true) -> and(icmp, icmp)

This is possible because of De Morgan's law.

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