oota-llvm.git
16 years agoBug fix in BumpPtrAllocator: don't assume that all objects have the same alignment...
Ted Kremenek [Mon, 28 Apr 2008 17:58:07 +0000 (17:58 +0000)]
Bug fix in BumpPtrAllocator: don't assume that all objects have the same alignment.  "Bump" of the pointer for the next allocated object to be of the specified alignment.

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

16 years agoDon't call size() on each iteration of the loop.
Dan Gohman [Mon, 28 Apr 2008 17:42:03 +0000 (17:42 +0000)]
Don't call size() on each iteration of the loop.

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

16 years agoExpose parameter attributes via C bindings.
Gordon Henriksen [Mon, 28 Apr 2008 17:37:06 +0000 (17:37 +0000)]
Expose parameter attributes via C bindings.

Patch by Anders Johnsen!

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

16 years agoFix the SVOffset values for loads and stores produced by
Dan Gohman [Mon, 28 Apr 2008 17:15:20 +0000 (17:15 +0000)]
Fix the SVOffset values for loads and stores produced by
memcpy/memset expansion. It was a bug for the SVOffset value
to be used in the actual address calculations.

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

16 years agoTeach InstCombine's ComputeMaskedBits what SelectionDAG's
Dan Gohman [Mon, 28 Apr 2008 17:02:21 +0000 (17:02 +0000)]
Teach InstCombine's ComputeMaskedBits what SelectionDAG's
ComputeMaskedBits knows about cttz, ctlz, and ctpop. Teach
SelectionDAG's ComputeMaskedBits what InstCombine's knows
about SRem. And teach them both some things about high bits
in Mul, UDiv, URem, and Sub. This allows instcombine and
dagcombine to eliminate sign-extension operations in
several new cases.

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

16 years agoTeach DAGCombine to convert (sext x) to (zext x) when the
Dan Gohman [Mon, 28 Apr 2008 16:58:24 +0000 (16:58 +0000)]
Teach DAGCombine to convert (sext x) to (zext x) when the
sign-bit of x is known to be zero.

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

16 years agoAdd support for response files to the CommandLine library.
Mikhail Glushenkov [Mon, 28 Apr 2008 16:44:25 +0000 (16:44 +0000)]
Add support for response files to the CommandLine library.

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

16 years agoFix FP return for Win64 ABI
Anton Korobeynikov [Mon, 28 Apr 2008 07:40:07 +0000 (07:40 +0000)]
Fix FP return for Win64 ABI

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

16 years agoAnother collection of random cleanups. No functionality change.
Chris Lattner [Mon, 28 Apr 2008 07:16:35 +0000 (07:16 +0000)]
Another collection of random cleanups.  No functionality change.

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

16 years agoRemove the SmallVector ctor that converts from a SmallVectorImpl. This
Chris Lattner [Mon, 28 Apr 2008 06:44:42 +0000 (06:44 +0000)]
Remove the SmallVector ctor that converts from a SmallVectorImpl.  This
conversion open the door for many nasty implicit conversion issues, and
can be easily solved by initializing with (V.begin(), V.end()) when
needed.

This patch includes many small cleanups for sdisel also.

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

16 years agorestore the copy ctor in SmallVector. This fixes serious
Chris Lattner [Mon, 28 Apr 2008 06:32:08 +0000 (06:32 +0000)]
restore the copy ctor in SmallVector.  This fixes serious
errors I introduced in my last patch.

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

16 years agoswitch RegsForValue::Regs to be a SmallVector to avoid
Chris Lattner [Mon, 28 Apr 2008 06:02:19 +0000 (06:02 +0000)]
switch RegsForValue::Regs to be a SmallVector to avoid
heap thrash on tiny (usually single-element) vectors.

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

16 years agogeneralize SmallVector copy ctor, there is no requirement for
Chris Lattner [Mon, 28 Apr 2008 06:01:06 +0000 (06:01 +0000)]
generalize SmallVector copy ctor, there is no requirement for
the initialization vector to have the same fixed size, just the
same element type.

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

16 years agoFix PR2256, yet another miscompilation in simplifycfg of i
Chris Lattner [Mon, 28 Apr 2008 00:19:07 +0000 (00:19 +0000)]
Fix PR2256, yet another miscompilation in simplifycfg of i
multiple return values.

Bill, please pull this into Tak.

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

16 years agoseveral multiple-retval fixes for bugpoint.
Chris Lattner [Mon, 28 Apr 2008 00:04:58 +0000 (00:04 +0000)]
several multiple-retval fixes for bugpoint.

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

16 years agomove static function out of anon namespace, no functionality change.
Chris Lattner [Sun, 27 Apr 2008 23:48:12 +0000 (23:48 +0000)]
move static function out of anon namespace, no functionality change.

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

16 years agoAnother step to getting multiple result inline asm to work.
Chris Lattner [Sun, 27 Apr 2008 23:44:28 +0000 (23:44 +0000)]
Another step to getting multiple result inline asm to work.

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

16 years agoAllow asms to return multiple results by value.
Chris Lattner [Sun, 27 Apr 2008 23:33:55 +0000 (23:33 +0000)]
Allow asms to return multiple results by value.

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

16 years agoProperly lower vararg's FORMAL_ARGUMENTS node on win64
Anton Korobeynikov [Sun, 27 Apr 2008 23:15:03 +0000 (23:15 +0000)]
Properly lower vararg's FORMAL_ARGUMENTS node on win64

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

16 years agoHandle fp80 for win64
Anton Korobeynikov [Sun, 27 Apr 2008 22:54:09 +0000 (22:54 +0000)]
Handle fp80 for win64

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

16 years agoAdded support for:
Bill Wendling [Sun, 27 Apr 2008 09:44:10 +0000 (09:44 +0000)]
Added support for:
- defm and multiclass
- imbricatable multiline C style comment
- FIXME/TODO highlight in comment
- binary and hexadecimal number
- code using [{ }] is no highlighted as special (perhaps not the best
choice)
Patch by Cedric Venet!

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

16 years agotypo
Chris Lattner [Sun, 27 Apr 2008 01:49:46 +0000 (01:49 +0000)]
typo

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

16 years agoImplement a signficant optimization for inline asm:
Chris Lattner [Sun, 27 Apr 2008 00:37:18 +0000 (00:37 +0000)]
Implement a signficant optimization for inline asm:
When choosing between constraints with multiple options,
like "ir", test to see if we can use the 'i' constraint and
go with that if possible.  This produces more optimal ASM in
all cases (sparing a register and an instruction to load it),
and fixes inline asm like this:

void test () {
  asm volatile (" %c0 %1 " : : "imr" (42), "imr"(14));
}

Previously we would dump "42" into a memory location (which
is ok for the 'm' constraint) which would cause a problem
because the 'c' modifier is not valid on memory operands.

Isn't it great how inline asm turns 'missed optimization'
into 'compile failed'??

Incidentally, this was the todo in
PowerPC/2007-04-24-InlineAsm-I-Modifier.ll

Please do NOT pull this into Tak.

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

16 years agoisa+cast -> dyn_cast
Chris Lattner [Sun, 27 Apr 2008 00:16:18 +0000 (00:16 +0000)]
isa+cast -> dyn_cast

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

16 years agoMove a bunch of inline asm code out of line.
Chris Lattner [Sun, 27 Apr 2008 00:09:47 +0000 (00:09 +0000)]
Move a bunch of inline asm code out of line.

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

16 years agoA few inline asm cleanups:
Chris Lattner [Sat, 26 Apr 2008 23:02:14 +0000 (23:02 +0000)]
A few inline asm cleanups:
  - Make targetlowering.h fit in 80 cols.
  - Make LowerAsmOperandForConstraint const.
  - Make lowerXConstraint -> LowerXConstraint
  - Make LowerXConstraint return a const char* instead of taking a string byref.

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

16 years agono need to implement this method and just have it call
Chris Lattner [Sat, 26 Apr 2008 22:59:59 +0000 (22:59 +0000)]
no need to implement this method and just have it call
the default impl.

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

16 years agoWhen SRoA'ing a global variable, make sure the new globals get the
Chris Lattner [Sat, 26 Apr 2008 07:40:11 +0000 (07:40 +0000)]
When SRoA'ing a global variable, make sure the new globals get the
appropriate alignment.  This fixes a miscompilation of 252.eon on
x86-64 (rdar://5891920).

Bill, please pull this into Tak.

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

16 years agoFeedback from chris
Nate Begeman [Fri, 25 Apr 2008 21:47:35 +0000 (21:47 +0000)]
Feedback from chris

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

16 years agoAdd a testcase for the recent "handle variable vector insert elt in mem" patch
Nate Begeman [Fri, 25 Apr 2008 21:26:59 +0000 (21:26 +0000)]
Add a testcase for the recent "handle variable vector insert elt in mem" patch

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

16 years agochange comments per review
Dale Johannesen [Fri, 25 Apr 2008 21:16:07 +0000 (21:16 +0000)]
change comments per review

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

16 years agoUpdate tests.
Evan Cheng [Fri, 25 Apr 2008 20:13:47 +0000 (20:13 +0000)]
Update tests.

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

16 years agoExtract the lower 64-bit if a MMX value is passed in a XMM register.
Evan Cheng [Fri, 25 Apr 2008 20:13:28 +0000 (20:13 +0000)]
Extract the lower 64-bit if a MMX value is passed in a XMM register.

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

16 years agoFix illegal MMX_MOVDQ2Qrr pattern. vector_extract result must be a scalar value.
Evan Cheng [Fri, 25 Apr 2008 20:12:46 +0000 (20:12 +0000)]
Fix illegal MMX_MOVDQ2Qrr pattern. vector_extract result must be a scalar value.

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

16 years agoSpecial handling for MMX values being passed in either GPR64 or lower 64-bits of...
Evan Cheng [Fri, 25 Apr 2008 19:11:04 +0000 (19:11 +0000)]
Special handling for MMX values being passed in either GPR64 or lower 64-bits of XMM registers.

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

16 years agoRemove the code from CodeGenPrepare that moved getresult instructions
Dan Gohman [Fri, 25 Apr 2008 18:27:55 +0000 (18:27 +0000)]
Remove the code from CodeGenPrepare that moved getresult instructions
to the block that defines their operands. This doesn't work in the
case that the operand is an invoke, because invoke is a terminator
and must be the last instruction in a block.

Replace it with support in SelectionDAGISel for copying struct values
into sequences of virtual registers.

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

16 years agoFix MMX_MOVQ2DQrr pattern. It's illegal to do a bitconvert from a smaller type to...
Evan Cheng [Fri, 25 Apr 2008 18:19:54 +0000 (18:19 +0000)]
Fix MMX_MOVQ2DQrr pattern. It's illegal to do a bitconvert from a smaller type to a larger one.

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

16 years agonew testcase
Chris Lattner [Fri, 25 Apr 2008 18:11:06 +0000 (18:11 +0000)]
new testcase

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

16 years agoPull the code to perform an INSERT_VECTOR_ELT in memory out into its own
Nate Begeman [Fri, 25 Apr 2008 18:07:40 +0000 (18:07 +0000)]
Pull the code to perform an INSERT_VECTOR_ELT in memory out into its own
function, and then use it to fix a bug in SplitVectorOp that expected inserts
to always have constant insertion indices.

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

16 years agoUpdate test
Anton Korobeynikov [Fri, 25 Apr 2008 17:54:21 +0000 (17:54 +0000)]
Update test

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

16 years agoFeedback from chris
Nate Begeman [Fri, 25 Apr 2008 17:45:52 +0000 (17:45 +0000)]
Feedback from chris

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

16 years agoadd a note
Chris Lattner [Fri, 25 Apr 2008 17:25:00 +0000 (17:25 +0000)]
add a note

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

16 years ago80 col violation.
Evan Cheng [Fri, 25 Apr 2008 17:21:40 +0000 (17:21 +0000)]
80 col violation.

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

16 years agoRemove 'unwinds to' support from mainline. This patch undoes r47802 r47989
Nick Lewycky [Fri, 25 Apr 2008 16:53:59 +0000 (16:53 +0000)]
Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.

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

16 years agoNot checking for intrinsics which do not have a chain operand.
Evan Cheng [Fri, 25 Apr 2008 08:55:28 +0000 (08:55 +0000)]
Not checking for intrinsics which do not have a chain operand.

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

16 years ago- Switch from std::set to SmallPtrSet.
Evan Cheng [Fri, 25 Apr 2008 08:22:20 +0000 (08:22 +0000)]
- Switch from std::set to SmallPtrSet.
- Add comments.

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

16 years agoMMX argument passing fixes:
Evan Cheng [Fri, 25 Apr 2008 07:56:45 +0000 (07:56 +0000)]
MMX argument passing fixes:
On Darwin / Linux x86-32, v8i8, v4i16, v2i32 values are passed in MM[0-2].
On Darwin / Linux x86-32, v1i64 values are passed in memory.
On Darwin x86-64, v8i8, v4i16, v2i32 values are passed in XMM[0-7].
On Darwin x86-64, v1i64 values are passed in 64-bit GPRs.

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

16 years agoTeach the PruningFunctionCloner how to look through loads with
Nate Begeman [Fri, 25 Apr 2008 06:37:06 +0000 (06:37 +0000)]
Teach the PruningFunctionCloner how to look through loads with
ConstantExpression GEPs pointing into constant globals.

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

16 years agoLoosen up an assertion to allow intrinsics. I really have no
Chris Lattner [Fri, 25 Apr 2008 05:13:01 +0000 (05:13 +0000)]
Loosen up an assertion to allow intrinsics.  I really have no
idea what this code (findNonImmUse) does, so I'm only guessing
that this is the right thing.  It would be really really nice
if this had comments and perhaps switched to SmallPtrSet
(hint hint) :)

This fixes rdar://5886601, a crash on gcc.target/i386/sse4_1-pblendw.c

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

16 years agoDon't infininitely thread branches when a threaded edge
Chris Lattner [Fri, 25 Apr 2008 04:12:29 +0000 (04:12 +0000)]
Don't infininitely thread branches when a threaded edge
goes back to the block, e.g.:

  Threading edge through bool from 'bb37.us.thread3829' to 'bb37.us' with cost: 1, across block:

bb37.us: ; preds = %bb37.us.thread3829, %bb37.us, %bb33
%D1361.1.us = phi i32 [ %tmp36, %bb33 ], [ %D1361.1.us, %bb37.us ], [ 0, %bb37.us.thread3829 ] ; <i32> [#uses=2]
%tmp39.us = icmp eq i32 %D1361.1.us, 0 ; <i1> [#uses=1]
br i1 %tmp39.us, label %bb37.us, label %bb42.us

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

16 years agoPR2245: Misleading parameter name in llvm-c/Core.h:LLVMConstArray
Gordon Henriksen [Fri, 25 Apr 2008 03:21:19 +0000 (03:21 +0000)]
PR2245: Misleading parameter name in llvm-c/Core.h:LLVMConstArray

Applying fix by Frits van Bommel.

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

16 years agoPR2202: LLVMCreateInterpreter creates a JIT
Gordon Henriksen [Fri, 25 Apr 2008 02:52:30 +0000 (02:52 +0000)]
PR2202: LLVMCreateInterpreter creates a JIT

Applying fix by Frits van Bommel.

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

16 years agoFix bug in x86 memcpy / memset lowering. If there are trailing bytes not handled...
Evan Cheng [Fri, 25 Apr 2008 00:26:43 +0000 (00:26 +0000)]
Fix bug in x86 memcpy / memset lowering. If there are trailing bytes not handled by rep instructions, a new memcpy / memset is introduced for them. However, since source / destination addresses are already adjusted, their offsets should be zero.

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

16 years agoImplement != for DenseSet iterators.
Ted Kremenek [Thu, 24 Apr 2008 23:49:45 +0000 (23:49 +0000)]
Implement != for DenseSet iterators.

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

16 years agoAdded iterator support for DenseSet.
Ted Kremenek [Thu, 24 Apr 2008 23:48:12 +0000 (23:48 +0000)]
Added iterator support for DenseSet.

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

16 years agoNew test.
Evan Cheng [Thu, 24 Apr 2008 20:01:58 +0000 (20:01 +0000)]
New test.

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

16 years agoAdjust inline cost computation to be less aggressive.
Evan Cheng [Thu, 24 Apr 2008 18:42:47 +0000 (18:42 +0000)]
Adjust inline cost computation to be less aggressive.

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

16 years agoAdd EXTRA_OPTIONS on the llvmgxx command line.
Devang Patel [Thu, 24 Apr 2008 17:59:03 +0000 (17:59 +0000)]
Add EXTRA_OPTIONS on the llvmgxx command line.

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

16 years agoAdd EXTRA_OPTIONS on the llvmgcc command line.
Devang Patel [Thu, 24 Apr 2008 17:54:25 +0000 (17:54 +0000)]
Add EXTRA_OPTIONS on the llvmgcc command line.

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

16 years agooverlook Output directory
Gabor Greif [Thu, 24 Apr 2008 16:17:27 +0000 (16:17 +0000)]
overlook Output directory

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

16 years ago- Check if a register is livein before removing it. It may have already been removed.
Evan Cheng [Thu, 24 Apr 2008 09:06:33 +0000 (09:06 +0000)]
- Check if a register is livein before removing it. It may have already been removed.
- Do not iterate over SmallPtrSet, the order of iteration is not deterministic.

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

16 years ago% -> @
Chris Lattner [Thu, 24 Apr 2008 06:00:30 +0000 (06:00 +0000)]
% -> @

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

16 years agoDoc updates/edits, contributed by Terence Parr!
Chris Lattner [Thu, 24 Apr 2008 05:59:56 +0000 (05:59 +0000)]
Doc updates/edits, contributed by Terence Parr!

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

16 years agocode restructuring, not functionality change.
Chris Lattner [Thu, 24 Apr 2008 00:21:50 +0000 (00:21 +0000)]
code restructuring, not functionality change.

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

16 years agoDon't replace multiple result of calls with undef,
Chris Lattner [Thu, 24 Apr 2008 00:19:54 +0000 (00:19 +0000)]
Don't replace multiple result of calls with undef,
sccp tracks getresult values, not call values in this
case.

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

16 years agocode cleanup, no functionality change.
Chris Lattner [Thu, 24 Apr 2008 00:16:28 +0000 (00:16 +0000)]
code cleanup, no functionality change.

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

16 years agoSplit some code out of the main SimplifyCFG loop into its own function.
Chris Lattner [Thu, 24 Apr 2008 00:01:19 +0000 (00:01 +0000)]
Split some code out of the main SimplifyCFG loop into its own function.
Fix said code to handle merging return instructions together correctly
when handling multiple return values.

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

16 years agoMake these variables static.
Dan Gohman [Wed, 23 Apr 2008 23:15:23 +0000 (23:15 +0000)]
Make these variables static.

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

16 years agoDisable building of llvm2cpp. The directory will be removed before 2.3 release.
Anton Korobeynikov [Wed, 23 Apr 2008 22:46:24 +0000 (22:46 +0000)]
Disable building of llvm2cpp. The directory will be removed before 2.3 release.

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

16 years agoDrop dead includes
Anton Korobeynikov [Wed, 23 Apr 2008 22:44:03 +0000 (22:44 +0000)]
Drop dead includes

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

16 years agoFix tests due to llvm2cpp move to llc target
Anton Korobeynikov [Wed, 23 Apr 2008 22:41:53 +0000 (22:41 +0000)]
Fix tests due to llvm2cpp move to llc target

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

16 years agoAdjust option names for C++ backend
Anton Korobeynikov [Wed, 23 Apr 2008 22:37:03 +0000 (22:37 +0000)]
Adjust option names for C++ backend

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

16 years agoFirst step of implementing PR1538: move llvm2cpp logic to new 'target'
Anton Korobeynikov [Wed, 23 Apr 2008 22:29:24 +0000 (22:29 +0000)]
First step of implementing PR1538: move llvm2cpp logic to new 'target'

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

16 years agoInitial CBE support for multiple return values.
Dan Gohman [Wed, 23 Apr 2008 21:49:29 +0000 (21:49 +0000)]
Initial CBE support for multiple return values.

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

16 years agotighten up verifier checks which missed cases where
Chris Lattner [Wed, 23 Apr 2008 20:33:41 +0000 (20:33 +0000)]
tighten up verifier checks which missed cases where
return instrs operands didn't match up with function results.

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

16 years agoUse isa instead of dyn_cast.
Dan Gohman [Wed, 23 Apr 2008 20:25:16 +0000 (20:25 +0000)]
Use isa instead of dyn_cast.

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

16 years agoAdd support to codegen for getresult instructions with undef operands.
Dan Gohman [Wed, 23 Apr 2008 20:21:29 +0000 (20:21 +0000)]
Add support to codegen for getresult instructions with undef operands.

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

16 years agoCheck type instead of no. of operands.
Devang Patel [Wed, 23 Apr 2008 20:18:29 +0000 (20:18 +0000)]
Check type instead of no. of operands.

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

16 years agoAllow llvm-as to parse a getresult with an undef operand.
Dan Gohman [Wed, 23 Apr 2008 20:11:27 +0000 (20:11 +0000)]
Allow llvm-as to parse a getresult with an undef operand.

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

16 years agoRewrite previous patch to suit Chris's preference.
Dale Johannesen [Wed, 23 Apr 2008 18:34:37 +0000 (18:34 +0000)]
Rewrite previous patch to suit Chris's preference.

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

16 years agoUnbreak JIT
Anton Korobeynikov [Wed, 23 Apr 2008 18:26:03 +0000 (18:26 +0000)]
Unbreak JIT

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

16 years agoDisable stack realignment for these tests
Anton Korobeynikov [Wed, 23 Apr 2008 18:25:44 +0000 (18:25 +0000)]
Disable stack realignment for these tests

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

16 years agoFix test becase ABI stack alignment dropped to 'normal' value
Anton Korobeynikov [Wed, 23 Apr 2008 18:25:16 +0000 (18:25 +0000)]
Fix test becase ABI stack alignment dropped to 'normal' value

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

16 years agoFix test, instruction count is valid only if stack is not realigned
Anton Korobeynikov [Wed, 23 Apr 2008 18:24:48 +0000 (18:24 +0000)]
Fix test, instruction count is valid only if stack is not realigned

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

16 years agoFix typo
Anton Korobeynikov [Wed, 23 Apr 2008 18:24:25 +0000 (18:24 +0000)]
Fix typo

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

16 years agoOnly allow increase of max alignment value
Anton Korobeynikov [Wed, 23 Apr 2008 18:23:50 +0000 (18:23 +0000)]
Only allow increase of max alignment value

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

16 years agoBe over-conservative: scan for all used virtual registers and calculate maximal stack...
Anton Korobeynikov [Wed, 23 Apr 2008 18:23:30 +0000 (18:23 +0000)]
Be over-conservative: scan for all used virtual registers and calculate maximal stack alignment in assumption, that there will be spill of vector register.

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

16 years agoAdd X86 Maximal Stack Alignment Calculator Pass before RA
Anton Korobeynikov [Wed, 23 Apr 2008 18:23:05 +0000 (18:23 +0000)]
Add X86 Maximal Stack Alignment Calculator Pass before RA

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

16 years agoAdd facility for pre-RA passes
Anton Korobeynikov [Wed, 23 Apr 2008 18:22:28 +0000 (18:22 +0000)]
Add facility for pre-RA passes

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

16 years agoUse precomputed value, if any
Anton Korobeynikov [Wed, 23 Apr 2008 18:21:50 +0000 (18:21 +0000)]
Use precomputed value, if any

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

16 years agoDo proper book-keeping of offsets and prologue/epilogue code for stack realignment
Anton Korobeynikov [Wed, 23 Apr 2008 18:21:27 +0000 (18:21 +0000)]
Do proper book-keeping of offsets and prologue/epilogue code for stack realignment

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

16 years agoIf stack realignment is used - incoming args will use EBP as base register and locals...
Anton Korobeynikov [Wed, 23 Apr 2008 18:21:02 +0000 (18:21 +0000)]
If stack realignment is used - incoming args will use EBP as base register and locals - ESP

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

16 years agoEastimate required stack alignment early, so we can decide, whether we will need...
Anton Korobeynikov [Wed, 23 Apr 2008 18:20:17 +0000 (18:20 +0000)]
Eastimate required stack alignment early, so we can decide, whether we will need frame pointer or not

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

16 years agoCleanup
Anton Korobeynikov [Wed, 23 Apr 2008 18:19:47 +0000 (18:19 +0000)]
Cleanup

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

16 years agoCleanup
Anton Korobeynikov [Wed, 23 Apr 2008 18:19:23 +0000 (18:19 +0000)]
Cleanup

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

16 years agoSimplify
Anton Korobeynikov [Wed, 23 Apr 2008 18:18:36 +0000 (18:18 +0000)]
Simplify

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

16 years agoMake stack alignment options global for all targets
Anton Korobeynikov [Wed, 23 Apr 2008 18:18:10 +0000 (18:18 +0000)]
Make stack alignment options global for all targets

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

16 years agoProvide option for enabling-disabling stack realignment
Anton Korobeynikov [Wed, 23 Apr 2008 18:17:11 +0000 (18:17 +0000)]
Provide option for enabling-disabling stack realignment

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

16 years agoDisable stack realignment for functions with dynamic-sized alloca's
Anton Korobeynikov [Wed, 23 Apr 2008 18:16:43 +0000 (18:16 +0000)]
Disable stack realignment for functions with dynamic-sized alloca's

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

16 years agoProvide ABI-correct stack alignment
Anton Korobeynikov [Wed, 23 Apr 2008 18:16:16 +0000 (18:16 +0000)]
Provide ABI-correct stack alignment

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