oota-llvm.git
15 years agoUse DenseMap to keep track of last users.
Devang Patel [Tue, 12 Aug 2008 00:26:16 +0000 (00:26 +0000)]
Use DenseMap to keep track of last users.
Use inversed map for faster queries.

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

15 years agoSome fixes for x86-64 JIT. Make it use small code
Dale Johannesen [Mon, 11 Aug 2008 23:46:25 +0000 (23:46 +0000)]
Some fixes for x86-64 JIT.  Make it use small code
model, except for external calls; this makes
addressing modes PC-relative.  Incomplete.

The assertion at the top of Emitter::runOnMachineFunction
was obviously bogus (always true) so I removed it.
If someone knows what the correct test should be to cover
all the various targets, please fix.

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

15 years agoadd a helper method to sys::Path for clang, patch by
Chris Lattner [Mon, 11 Aug 2008 23:39:47 +0000 (23:39 +0000)]
add a helper method to sys::Path for clang, patch by
Kovarththanan Rajaratnam!

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

15 years agoImplement support for simplifying vector comparisons by 0.0 and 1.0 like we
Chris Lattner [Mon, 11 Aug 2008 22:06:05 +0000 (22:06 +0000)]
Implement support for simplifying vector comparisons by 0.0 and 1.0 like we
do for scalars.  Patch contributed by Nicolas Capens

This also generalizes the previous xforms to work on long double, now that
isExactlyValue works for long double.

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

15 years agoKeep track of analysis usage information for passes. Avoid invoking
Devang Patel [Mon, 11 Aug 2008 21:13:39 +0000 (21:13 +0000)]
Keep track of analysis usage information for passes. Avoid invoking
getAnalysisUsage() repeatedly.

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

15 years agoImprove the grep commands for this test to be tolerant of ABI
Dan Gohman [Mon, 11 Aug 2008 20:10:41 +0000 (20:10 +0000)]
Improve the grep commands for this test to be tolerant of ABI
differences, and to be more specific.

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

15 years agoTake the FrameOffset into account when computing the alignment
Dan Gohman [Mon, 11 Aug 2008 18:27:03 +0000 (18:27 +0000)]
Take the FrameOffset into account when computing the alignment
of stack objects. This fixes PR2656.

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

15 years agoImplement ISD::TRAP support on PPC
Nate Begeman [Mon, 11 Aug 2008 17:36:31 +0000 (17:36 +0000)]
Implement ISD::TRAP support on PPC

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

15 years agoMake it possible to use different constant
Duncan Sands [Mon, 11 Aug 2008 15:29:30 +0000 (15:29 +0000)]
Make it possible to use different constant
folding policies with IRBuilder.  The default,
provided by ConstantFolder, is to do minimal
folding like now: what ConstantExpr provides.
An alternative is to use TargetFolder, which
uses target information to fold constants more.

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

15 years agothe stacker doc is way out of date.
Chris Lattner [Mon, 11 Aug 2008 06:13:31 +0000 (06:13 +0000)]
the stacker doc is way out of date.

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

15 years agoremove obsolete files
Chris Lattner [Mon, 11 Aug 2008 06:12:45 +0000 (06:12 +0000)]
remove obsolete files

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

15 years agomove some more stuff out of my email into readme.txt
Chris Lattner [Sun, 10 Aug 2008 01:14:08 +0000 (01:14 +0000)]
move some more stuff out of my email into readme.txt

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

15 years agoadd a note
Chris Lattner [Sun, 10 Aug 2008 00:47:21 +0000 (00:47 +0000)]
add a note

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

15 years ago"This patch adds a virtual call to AbstractLatticeFunction to derive a
Chris Lattner [Sat, 9 Aug 2008 17:23:35 +0000 (17:23 +0000)]
"This patch adds a virtual call to AbstractLatticeFunction to derive a
type lattice value for an Argument*, giving clients the opportunity to
use something other than Top for it if they choose to."

Patch by John McCall!

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

15 years agoUnbreak the llvm-gcc build: recent changes to
Duncan Sands [Sat, 9 Aug 2008 15:14:59 +0000 (15:14 +0000)]
Unbreak the llvm-gcc build: recent changes to
IRBuilder are not expecting null names.

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

15 years agoupdate VS project.
Cedric Venet [Sat, 9 Aug 2008 11:57:39 +0000 (11:57 +0000)]
update VS project.

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

15 years agoMake 'Insert' set the name for Loads, instead of passing the name into the
Chris Lattner [Sat, 9 Aug 2008 06:26:23 +0000 (06:26 +0000)]
Make 'Insert' set the name for Loads, instead of passing the name into the
LoadInst ctor, which causes std::string thrashing.

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

15 years agocomment update
Chris Lattner [Sat, 9 Aug 2008 06:25:46 +0000 (06:25 +0000)]
comment update

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

15 years agoFix some typos. Apparently I think C needs a power-of operator.
Gordon Henriksen [Sat, 9 Aug 2008 03:48:46 +0000 (03:48 +0000)]
Fix some typos. Apparently I think C needs a power-of operator.

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

15 years agoDelete a redundant binding, LLVMHasInitializer.
Gordon Henriksen [Sat, 9 Aug 2008 02:13:58 +0000 (02:13 +0000)]
Delete a redundant binding, LLVMHasInitializer.

Please use !LLVMIsDeclaration instead.

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

15 years ago[PR-2610] Adding Ocaml bindings for Switch::addCase.
Gordon Henriksen [Sat, 9 Aug 2008 01:55:52 +0000 (01:55 +0000)]
[PR-2610] Adding Ocaml bindings for Switch::addCase.

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

15 years agoIgnore output directories.
Gordon Henriksen [Sat, 9 Aug 2008 01:53:27 +0000 (01:53 +0000)]
Ignore output directories.

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

15 years agoFix the LLVMCreateJITCompiler C binding.
Gordon Henriksen [Fri, 8 Aug 2008 20:49:28 +0000 (20:49 +0000)]
Fix the LLVMCreateJITCompiler C binding.

Evan broke it in r54523 by adding a parameter in the implementation without
updating the header correspondingly.

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

15 years agoHave IRBuilder take a template argument on whether or not to preserve
Eric Christopher [Fri, 8 Aug 2008 19:39:37 +0000 (19:39 +0000)]
Have IRBuilder take a template argument on whether or not to preserve
names. This can save a lot of allocations if you aren't going to be
looking at the output.

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

15 years agoCanonicalize nested AddRecs in by nesting them in order of loop depth.
Dan Gohman [Fri, 8 Aug 2008 18:33:12 +0000 (18:33 +0000)]
Canonicalize nested AddRecs in by nesting them in order of loop depth.

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

15 years agoAdd an EXTRACTPSmr pattern to match the pattern that
Dan Gohman [Fri, 8 Aug 2008 18:30:21 +0000 (18:30 +0000)]
Add an EXTRACTPSmr pattern to match the pattern that
X86ISelLowering creates.

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

15 years agoProperly print flags on Sparc
Anton Korobeynikov [Fri, 8 Aug 2008 18:26:10 +0000 (18:26 +0000)]
Properly print flags on Sparc

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

15 years agoGeneralize
Anton Korobeynikov [Fri, 8 Aug 2008 18:25:52 +0000 (18:25 +0000)]
Generalize

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

15 years agoUse mergeable strings sections on sparc
Anton Korobeynikov [Fri, 8 Aug 2008 18:25:29 +0000 (18:25 +0000)]
Use mergeable strings sections on sparc

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

15 years agoHandle visibility printing with all generality. Remove bunch of duplicate code.
Anton Korobeynikov [Fri, 8 Aug 2008 18:25:07 +0000 (18:25 +0000)]
Handle visibility printing with all generality. Remove bunch of duplicate code.

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

15 years agoUse chars, where possible
Anton Korobeynikov [Fri, 8 Aug 2008 18:24:10 +0000 (18:24 +0000)]
Use chars, where possible

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

15 years agoConvert PPC/Linux to new section printing stuff
Anton Korobeynikov [Fri, 8 Aug 2008 18:23:49 +0000 (18:23 +0000)]
Convert PPC/Linux to new section printing stuff

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

15 years agoSwitch PPC/Darwin to new section handling stuff
Anton Korobeynikov [Fri, 8 Aug 2008 18:23:25 +0000 (18:23 +0000)]
Switch PPC/Darwin to new section handling stuff

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

15 years agoCleanup
Anton Korobeynikov [Fri, 8 Aug 2008 18:22:59 +0000 (18:22 +0000)]
Cleanup

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

15 years agoReduce the entries in a phi before testing it for deadness, because removing the...
Owen Anderson [Fri, 8 Aug 2008 18:00:05 +0000 (18:00 +0000)]
Reduce the entries in a phi before testing it for deadness, because removing the entries might make it dead.

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

15 years agoUndo most of r54519.
Evan Cheng [Fri, 8 Aug 2008 17:56:50 +0000 (17:56 +0000)]
Undo most of r54519.

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

15 years agoDon't call getAnalysisUsage unless -debug-pass is enabled. This speeds
Chris Lattner [Fri, 8 Aug 2008 15:14:09 +0000 (15:14 +0000)]
Don't call getAnalysisUsage unless -debug-pass is enabled.  This speeds
up the passmgr by avoiding useless work.

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

15 years agoAdd -fast command line option to lli. It enables fast codegen path.
Evan Cheng [Fri, 8 Aug 2008 08:12:06 +0000 (08:12 +0000)]
Add -fast command line option to lli. It enables fast codegen path.

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

15 years agoAdd new parameter Fast to createJIT to enable the fast codegen path.
Evan Cheng [Fri, 8 Aug 2008 08:11:34 +0000 (08:11 +0000)]
Add new parameter Fast to createJIT to enable the fast codegen path.

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

15 years agoAdd skeleton of simple basic block instruction selector.
Evan Cheng [Fri, 8 Aug 2008 07:27:28 +0000 (07:27 +0000)]
Add skeleton of simple basic block instruction selector.

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

15 years agoTestcase for r54520.
Nick Lewycky [Fri, 8 Aug 2008 07:00:26 +0000 (07:00 +0000)]
Testcase for r54520.

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

15 years agoIt's not legal to output a GV in a coalesced section if it's used in an ARM PIC relat...
Evan Cheng [Fri, 8 Aug 2008 06:56:16 +0000 (06:56 +0000)]
It's not legal to output a GV in a coalesced section if it's used in an ARM PIC relative constantpool.

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

15 years agoFix indentation.
Evan Cheng [Fri, 8 Aug 2008 06:43:59 +0000 (06:43 +0000)]
Fix indentation.

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

15 years agoDon't crash printing the asm for a ConstantExpr PtrToInt just because the int
Nick Lewycky [Fri, 8 Aug 2008 06:34:07 +0000 (06:34 +0000)]
Don't crash printing the asm for a ConstantExpr PtrToInt just because the int
is narrower than the pointer. This testcase emits:

  .byte (((17) - 16) & 255)

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

15 years agoSupport added for ctlz intrinsic, test case added.
Bruno Cardoso Lopes [Fri, 8 Aug 2008 06:16:31 +0000 (06:16 +0000)]
Support added for ctlz intrinsic, test case added.

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

15 years agoSpeed up the passmgr by avoiding heap thrashing on vectors.
Chris Lattner [Fri, 8 Aug 2008 05:33:04 +0000 (05:33 +0000)]
Speed up the passmgr by avoiding heap thrashing on vectors.

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

15 years agoMatch raw "psp" triple target, as done by the homebrew toolchain.
Bruno Cardoso Lopes [Fri, 8 Aug 2008 04:49:42 +0000 (04:49 +0000)]
Match raw "psp" triple target, as done by the homebrew toolchain.

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

15 years ago[Last] Batch 7 of Mips CodeGen tests
Bruno Cardoso Lopes [Fri, 8 Aug 2008 04:12:42 +0000 (04:12 +0000)]
[Last] Batch 7 of Mips CodeGen tests

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

15 years agoBatch 6 of Mips CodeGen tests
Bruno Cardoso Lopes [Fri, 8 Aug 2008 04:11:30 +0000 (04:11 +0000)]
Batch 6 of Mips CodeGen tests

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

15 years agoBatch 5 of Mips CodeGen tests
Bruno Cardoso Lopes [Fri, 8 Aug 2008 04:09:57 +0000 (04:09 +0000)]
Batch 5 of Mips CodeGen tests

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

15 years agoBatch 4 of Mips CodeGen tests
Bruno Cardoso Lopes [Fri, 8 Aug 2008 04:08:30 +0000 (04:08 +0000)]
Batch 4 of Mips CodeGen tests

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

15 years agoBatch 3 of Mips CodeGen tests
Bruno Cardoso Lopes [Fri, 8 Aug 2008 04:05:51 +0000 (04:05 +0000)]
Batch 3 of Mips CodeGen tests

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

15 years agoBatch 2 of Mips CodeGen tests
Bruno Cardoso Lopes [Fri, 8 Aug 2008 04:03:25 +0000 (04:03 +0000)]
Batch 2 of Mips CodeGen tests

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

15 years agoBatch 1 of Mips CodeGen tests, more coming...
Bruno Cardoso Lopes [Fri, 8 Aug 2008 03:58:34 +0000 (03:58 +0000)]
Batch 1 of Mips CodeGen tests, more coming...
I had a lot of simple local codegen tests and they are now ready to be placed
in test/CodeGen.

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

15 years agoTestcases for 54503. One derived from PR 2533, the
Dale Johannesen [Fri, 8 Aug 2008 03:37:11 +0000 (03:37 +0000)]
Testcases for 54503.  One derived from PR 2533, the
other from Python.

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

15 years agouse the more precise 'op1' instead of 'var1' since the latter can be misunderstood...
Gabor Greif [Thu, 7 Aug 2008 21:46:00 +0000 (21:46 +0000)]
use the more precise 'op1' instead of 'var1' since the latter can be misunderstood to not encompass constants

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

15 years agoAdded Mips support for DYNAMIC_STACKALLOC
Bruno Cardoso Lopes [Thu, 7 Aug 2008 19:08:11 +0000 (19:08 +0000)]
Added Mips support for DYNAMIC_STACKALLOC
Fixed bug in adjustMipsStackFrame, which was breaking
while trying to access a dead stack object index. Also added
one more alignment before fixing the callee saved registers
stack offset adjustment.

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

15 years agoAdd the remaining fp_round libcalls:
Bruno Cardoso Lopes [Thu, 7 Aug 2008 19:01:24 +0000 (19:01 +0000)]
Add the remaining fp_round libcalls:
FPROUND_F80_F32, FPROUND_PPCF128_F32,
FPROUND_F80_F64, FPROUND_PPCF128_F64

Support for soften float fp_round operands is added, Mips
needs this to round f64->f32.

Also added support to soften float FABS result, Mips doesn't
support double fabs results while in 'single float only' mode.

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

15 years agoDo a dominator walk when scheduling copies, rather than a DFS on the CFG. Also,...
Owen Anderson [Thu, 7 Aug 2008 18:28:07 +0000 (18:28 +0000)]
Do a dominator walk when scheduling copies, rather than a DFS on the CFG.  Also, fix a few problems when creating
live intervals for temporaries created by phi elimination.

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

15 years agoUse correct compiler component names for objc
Duncan Sands [Thu, 7 Aug 2008 17:59:54 +0000 (17:59 +0000)]
Use correct compiler component names for objc
and objc++.

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

15 years agoMove tests of the ObjC++ front-end to their own
Duncan Sands [Thu, 7 Aug 2008 17:48:08 +0000 (17:48 +0000)]
Move tests of the ObjC++ front-end to their own
directory: some people (guess who!) may build llvm-gcc
with support for objc but not with support for objc++.

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

15 years agoLet SRETPromotion properly preserve the function name instead of (implicitly)
Matthijs Kooijman [Thu, 7 Aug 2008 16:01:23 +0000 (16:01 +0000)]
Let SRETPromotion properly preserve the function name instead of (implicitly)
postfixing it with a number.

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

15 years agoFix SRETPromotion, it was generating functions without returns statements since
Matthijs Kooijman [Thu, 7 Aug 2008 15:58:09 +0000 (15:58 +0000)]
Fix SRETPromotion, it was generating functions without returns statements since
r53941 (but this was not noticed due to the lack of a basic test for
SRETPromotion).

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

15 years agoAdd a basic test for the SRETPromotion pass.
Matthijs Kooijman [Thu, 7 Aug 2008 15:55:18 +0000 (15:55 +0000)]
Add a basic test for the SRETPromotion pass.

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

15 years agoMove two tests from SRETPromotion to Inline, since they only call opt -inline.
Matthijs Kooijman [Thu, 7 Aug 2008 15:36:46 +0000 (15:36 +0000)]
Move two tests from SRETPromotion to Inline, since they only call opt -inline.

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

15 years agoAdd some debug output to SRETPromotion.
Matthijs Kooijman [Thu, 7 Aug 2008 15:14:04 +0000 (15:14 +0000)]
Add some debug output to SRETPromotion.

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

15 years agoSilence a warning.
Matthijs Kooijman [Thu, 7 Aug 2008 13:36:30 +0000 (13:36 +0000)]
Silence a warning.

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

15 years agoRemove dead forward decl
Anton Korobeynikov [Thu, 7 Aug 2008 09:55:25 +0000 (09:55 +0000)]
Remove dead forward decl

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

15 years agoPrint section flags ok on platforms, which use '@' as comment string. Fix test.
Anton Korobeynikov [Thu, 7 Aug 2008 09:55:06 +0000 (09:55 +0000)]
Print section flags ok on platforms, which use '@' as comment string. Fix test.

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

15 years agoAdd assertion for easy debugging of missing stuff
Anton Korobeynikov [Thu, 7 Aug 2008 09:54:40 +0000 (09:54 +0000)]
Add assertion for easy debugging of missing stuff

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

15 years agoSwitch ARM to new section handling stuff
Anton Korobeynikov [Thu, 7 Aug 2008 09:54:23 +0000 (09:54 +0000)]
Switch ARM to new section handling stuff

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

15 years agoSwitch Alpha to new section handling stuff
Anton Korobeynikov [Thu, 7 Aug 2008 09:53:57 +0000 (09:53 +0000)]
Switch Alpha to new section handling stuff

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

15 years agoUse EmitAlignment consistently
Anton Korobeynikov [Thu, 7 Aug 2008 09:53:38 +0000 (09:53 +0000)]
Use EmitAlignment consistently

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

15 years agoCleanup
Anton Korobeynikov [Thu, 7 Aug 2008 09:53:13 +0000 (09:53 +0000)]
Cleanup

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

15 years agoCleanup
Anton Korobeynikov [Thu, 7 Aug 2008 09:52:54 +0000 (09:52 +0000)]
Cleanup

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

15 years agoSwitch IA64 to new section-handling stuff
Anton Korobeynikov [Thu, 7 Aug 2008 09:52:35 +0000 (09:52 +0000)]
Switch IA64 to new section-handling stuff

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

15 years agoCleanup
Anton Korobeynikov [Thu, 7 Aug 2008 09:52:13 +0000 (09:52 +0000)]
Cleanup

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

15 years agoProvide convenient helpers
Anton Korobeynikov [Thu, 7 Aug 2008 09:51:54 +0000 (09:51 +0000)]
Provide convenient helpers

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

15 years agoSwitch Sparc to new section handling stuff. Refactor printing of module-level GVs...
Anton Korobeynikov [Thu, 7 Aug 2008 09:51:25 +0000 (09:51 +0000)]
Switch Sparc to new section handling stuff. Refactor printing of module-level GVs significantly.

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

15 years agoAdd hook for constant pool section selection for darwin.
Anton Korobeynikov [Thu, 7 Aug 2008 09:51:02 +0000 (09:51 +0000)]
Add hook for constant pool section selection for darwin.

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

15 years agoSelect section for constant pool entries
Anton Korobeynikov [Thu, 7 Aug 2008 09:50:34 +0000 (09:50 +0000)]
Select section for constant pool entries

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

15 years agoRemove trailing spaces.
Matthijs Kooijman [Thu, 7 Aug 2008 09:00:46 +0000 (09:00 +0000)]
Remove trailing spaces.

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

15 years agoDon't verify passes when assertions are disabled.
Chris Lattner [Thu, 7 Aug 2008 07:34:50 +0000 (07:34 +0000)]
Don't verify passes when assertions are disabled.

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

15 years agoRe-enable elimination of unnecessary SUBREG_TO_REG instructions in
Dan Gohman [Thu, 7 Aug 2008 02:54:50 +0000 (02:54 +0000)]
Re-enable elimination of unnecessary SUBREG_TO_REG instructions in
LowerSubregs, and fix an x86-64 isel bug that this exposed.

SUBREG_TO_REG for x86-64 implicit zero extension is only safe for
isel to generate when the source is known to always have zeros in
the high 32 bits. The EXTRACT_SUBREG instruction does not clear
the high 32 bits.

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

15 years agoAdd an extra example that shouldn't get an and instruction.
Dan Gohman [Thu, 7 Aug 2008 02:23:06 +0000 (02:23 +0000)]
Add an extra example that shouldn't get an and instruction.

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

15 years agoRewrite JIT handling of GlobalVariables so they
Dale Johannesen [Thu, 7 Aug 2008 01:30:15 +0000 (01:30 +0000)]
Rewrite JIT handling of GlobalVariables so they
are allocated in the same buffer as the code,
jump tables, etc.

The default JIT memory manager does not handle buffer
overflow well.  I didn't introduce this and I'm not
attempting to fix it here, but it is more likely to
be hit now since we're putting more stuff in the
buffer.  This affects one test that I know of so far,
MultiSource/Benchmarks/NPB-serial/is.

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

15 years agoFactor code that finalize PHI nodes, jump tables, etc. out of SelectBasicBlock. No...
Evan Cheng [Thu, 7 Aug 2008 00:43:25 +0000 (00:43 +0000)]
Factor code that finalize PHI nodes, jump tables, etc. out of SelectBasicBlock. No functionality changes.

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

15 years agoSDISel's constant branch folding can fold away self-loops, which doesn't result in...
Owen Anderson [Wed, 6 Aug 2008 23:16:52 +0000 (23:16 +0000)]
SDISel's constant branch folding can fold away self-loops, which doesn't result in any dead blocks, but
rather an incorrect phi input.  Add code to UnreachableMachineBlockElim to get rid of these entries.

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

15 years agoCorrect handle cases where two phis are coalesced together, and correct break up...
Owen Anderson [Wed, 6 Aug 2008 22:08:58 +0000 (22:08 +0000)]
Correct handle cases where two phis are coalesced together, and correct break up the case where two different
phis want to coalesce with the same vreg.

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

15 years agoOops, didn't mean to commit this.
Owen Anderson [Wed, 6 Aug 2008 20:58:38 +0000 (20:58 +0000)]
Oops, didn't mean to commit this.

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

15 years agoAdd libDriver.vcproj to solution file.
Ted Kremenek [Wed, 6 Aug 2008 20:57:07 +0000 (20:57 +0000)]
Add libDriver.vcproj to solution file.

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

15 years agoWe don't need to try to coalesce input vregs that are the same as the output vreg.
Owen Anderson [Wed, 6 Aug 2008 20:29:20 +0000 (20:29 +0000)]
We don't need to try to coalesce input vregs that are the same as the output vreg.

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

15 years agoOnly trim a live interval if the register is not used after the PHI node.
Owen Anderson [Wed, 6 Aug 2008 18:36:17 +0000 (18:36 +0000)]
Only trim a live interval if the register is not used after the PHI node.

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

15 years agoOnly remap each VNInfo once when doing renumbering.
Owen Anderson [Wed, 6 Aug 2008 18:35:45 +0000 (18:35 +0000)]
Only remap each VNInfo once when doing renumbering.

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

15 years agoRe-introduce the 8-bit subreg zext-inreg patterns for x86-32,
Dan Gohman [Wed, 6 Aug 2008 18:27:21 +0000 (18:27 +0000)]
Re-introduce the 8-bit subreg zext-inreg patterns for x86-32,
this time using MOV32to32_ and MOV16to16_. Thanks to Evan for
suggesting this.

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

15 years agoFix a shufflevector instcombine that was emitting invalid masks indices
Dan Gohman [Wed, 6 Aug 2008 18:17:32 +0000 (18:17 +0000)]
Fix a shufflevector instcombine that was emitting invalid masks indices
when it meant to be emitting undef indices.

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

15 years agoPR2535, not PR2355.
Evan Cheng [Wed, 6 Aug 2008 18:06:48 +0000 (18:06 +0000)]
PR2535, not PR2355.

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

15 years agoFix PR2355: bug in ChangeCompareStride. When the loop termination compare is the...
Evan Cheng [Wed, 6 Aug 2008 18:04:43 +0000 (18:04 +0000)]
Fix PR2355: bug in ChangeCompareStride. When the loop termination compare is the only use of its iv stride, the stride can be eliminated by moving it to another stride. If the scale is negative, swap the predicate instead of using a inverse predicate.

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

15 years agoxchg does not modify FLAGS.
Dan Gohman [Wed, 6 Aug 2008 15:52:50 +0000 (15:52 +0000)]
xchg does not modify FLAGS.

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

15 years agoClarify "node" vs. "value" in some comments.
Dan Gohman [Wed, 6 Aug 2008 15:18:10 +0000 (15:18 +0000)]
Clarify "node" vs. "value" in some comments.

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