Commit Graph

25216 Commits

Author SHA1 Message Date
Chris Lattner ac59ab515a Gaar! Don't use r11 for CR save/restore, use R0. R11 can be register
allocated, thus live across the save/reload.  This fixes

llc-beta /MultiSource/Applications/spiff/spiff
llc-beta /MultiSource/Benchmarks/sim/sim:
llc-beta /MultiSource/Benchmarks/Ptrdist/bc/bc
llc-beta /MultiSource/Benchmarks/McCat/12-IOtest/iotest:
llc-beta /MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow
llc-beta /MultiSource/Benchmarks/Fhourstones-3.1/fhourstones3.1
llc-beta /MultiSource/Benchmarks/mediabench/adpcm/rawdaudio/rawdaudio
llc-beta /MultiSource/Benchmarks/mediabench/adpcm/rawcaudio/rawcaudio
llc-beta /MultiSource/Benchmarks/mediabench/g721/g721encode/encode
llc-beta /MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/cjpeg

and probably others, with -regalloc=local.

llvm-svn: 28761
2006-06-12 23:59:16 +00:00
Chris Lattner 6b043a24a1 Fix spilling and reloading of CR regs to reload the right values. This fixes
Olden/power (and probably others) with -regalloc=local.

llvm-svn: 28760
2006-06-12 21:50:57 +00:00
Owen Anderson fd0a3d6e5c Reapply my 6/9 changes. The bug Evan saw no longer occurs.
llvm-svn: 28759
2006-06-12 21:49:21 +00:00
Chris Lattner b5c9d7a0af Fix an infinite loop on Transforms/SimplifyCFG/2006-06-12-InfLoop.ll
llvm-svn: 28758
2006-06-12 20:18:01 +00:00
Chris Lattner 9c4ddf8314 TEstcase that makes simplifycfg infloop.
llvm-svn: 28757
2006-06-12 20:17:44 +00:00
Chris Lattner b3c62e43d1 Add a new -compileflags options, remove old externals location specifiers.
People should just use -with-externals.

llvm-svn: 28756
2006-06-12 19:03:17 +00:00
Chris Lattner 32d92e004d Make sure to update the CFG correctly if a switch only has a default dest.
This fixes CodeGen/Generic/2006-06-12-LowerSwitchCrash.ll

llvm-svn: 28755
2006-06-12 18:25:29 +00:00
Chris Lattner eecff6c21f New testcase that crashes llc
llvm-svn: 28754
2006-06-12 18:24:32 +00:00
Andrew Lenharth 80528499cf Let the alpha breakage begin. First Formals and RET. next Calls
llvm-svn: 28753
2006-06-12 18:09:24 +00:00
Andrew Lenharth 0e57b2cb92 Start on my todo list
llvm-svn: 28752
2006-06-12 16:07:18 +00:00
Rafael Espindola 4e76015e0b lower more then 4 formal arguments. The offset is currently hard coded.
implement SelectFrameIndex

llvm-svn: 28751
2006-06-12 12:28:08 +00:00
Owen Anderson 0ac336965e Fix for 2006-06-26-MultipleExitsSingleBlock.
If a single exit block has multiple predecessors within the loop, it will
appear in the exit blocks list more than once.  LCSSA needs to take that into
account so that it doesn't double process that exit block.

llvm-svn: 28750
2006-06-12 07:10:16 +00:00
Owen Anderson ecb8036e60 Make sure that LCSSA works properly when it encounters an exit block that has
more than one predecessor inside the loop.

llvm-svn: 28749
2006-06-12 07:05:47 +00:00
Owen Anderson b538f14d2a Re-commit the safe parts of my 6/9 patch. Still working on fixing the unsafe parts.
llvm-svn: 28748
2006-06-11 19:22:28 +00:00
Evan Cheng 1b6e310e6f Back out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others).
llvm-svn: 28747
2006-06-11 09:32:57 +00:00
Chris Lattner bfd0b6d8e4 Add a missing assertion that would have helped out Reid
llvm-svn: 28746
2006-06-10 04:16:23 +00:00
Chris Lattner b055c8737f Work around a nasty tblgen bug where it doesn't add operands for varargs
nodes correctly.

llvm-svn: 28745
2006-06-10 01:15:02 +00:00
Chris Lattner 006b2c6ab9 Fix a problem exposed by the local allocator. CALL instructions are not marked
as using incoming argument registers, so the local allocator would clobber them
between their set and use.  To fix this, we give the call instructions a variable
number of uses in the CALL MachineInstr itself, so live variables understands
the live ranges of these register arguments.

llvm-svn: 28744
2006-06-10 01:14:28 +00:00
Chris Lattner deafba0325 Wrap to 80 cols
llvm-svn: 28743
2006-06-09 23:59:44 +00:00
Chris Lattner 572e78c2f9 After telling GCC to type of the input file with -x asm/-x c, switch back to
-x none, to not foul up autodetection of .a file or .dylibs.

llvm-svn: 28741
2006-06-09 21:31:53 +00:00
Evan Cheng 09cf82992b Don't pull in environ, not always safe. Global variables are bad anyway.
Use execve when explicit environment variables ptr is available. Otherwise
just use execv.

llvm-svn: 28740
2006-06-09 20:43:11 +00:00
Owen Anderson b1dc1d44f8 Add LCSSA as a requirement for LoopUnswitch, and assert that LoopUnswitch preserves
LCSSA.

llvm-svn: 28739
2006-06-09 18:40:32 +00:00
Owen Anderson 505adff3f0 Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert
on this.

llvm-svn: 28738
2006-06-09 18:33:30 +00:00
Evan Cheng beedf824e3 Comments to appease sabre.
llvm-svn: 28737
2006-06-09 06:25:10 +00:00
Evan Cheng 0e14a56d35 Minor compilation speed improvement.
llvm-svn: 28736
2006-06-09 06:24:42 +00:00
Evan Cheng 398f70292c RewriteExpr, either the new PHI node of induction variable or the
post-increment value, should be first cast to the appropriated type (to the
type of the common expr). Otherwise, the rewrite of a use based on (common +
iv) may end up with an incorrect type.

llvm-svn: 28735
2006-06-09 00:12:42 +00:00
Owen Anderson 5d029264ec Update some comments, and expose LCSSAID in preparation for having other passes
require LCSSA.

llvm-svn: 28734
2006-06-08 20:02:53 +00:00
Chris Lattner c03a9259c0 Fix X86/inline-asm.ll:test2, a case where an input value was implicitly
truncated.

llvm-svn: 28733
2006-06-08 18:27:11 +00:00
Chris Lattner 38b318d436 Add new testcase
llvm-svn: 28732
2006-06-08 18:26:48 +00:00
Chris Lattner 705948d742 Fix Regression/CodeGen/X86/inline-asm.ll, a case where inline asm causes
implement extension of a register.

llvm-svn: 28731
2006-06-08 18:22:48 +00:00
Chris Lattner 1b66dd690c New testcase, using "AX" as i32.
llvm-svn: 28730
2006-06-08 18:20:13 +00:00
Reid Spencer 36bc2b00eb Squelch a warning about signed/unsigned.
llvm-svn: 28729
2006-06-08 18:08:43 +00:00
Chris Lattner ba1ed585ee Add support for "m" inline asm constraints.
llvm-svn: 28728
2006-06-08 18:03:49 +00:00
Chris Lattner 8f8b5e4631 Fix an assert-on-inline-inline-asm bug.
llvm-svn: 28727
2006-06-08 18:00:47 +00:00
Reid Spencer 5e91c03fa9 For PR804:
Change the file size field of StatusInfo to be uint64_t instead of size_t
so that we know it is always 64 bits. This prevents some overflow on
systems where size_t is 32 bits when it ought to be 64.

llvm-svn: 28726
2006-06-08 17:00:08 +00:00
Vladimir Prus 9bc4009e9b Remove dead code.
llvm-svn: 28725
2006-06-08 16:03:13 +00:00
Vladimir Prus b5b6dc49e2 New method BasicBlock::getFirstNonPHI.
llvm-svn: 28724
2006-06-08 15:46:18 +00:00
Chris Lattner c944417749 This no longer needs plugins, this it doesn't need all of VMCore.
llvm-svn: 28723
2006-06-08 00:25:44 +00:00
Reid Spencer ab97f22ccc For PR787:
Provide new llvm::sys::Program facilities for converting the stdout and
stdin to binary mode. There is no standard way to do this and the available
mechanisms are platform specific. Adjust the bytecode reader and writer to
use these methods when their input is stdin or output is stdout. THis avoids
the problem with \n writing CRLF to a bytecode file on windows.

Patch Contributed by Michael Smith.

llvm-svn: 28722
2006-06-07 23:18:34 +00:00
Reid Spencer ed95105b45 Shorten a value description so --help out isn't so wide.
llvm-svn: 28721
2006-06-07 23:07:51 +00:00
Reid Spencer c1588f624c Make sure this tool links in all of libVMCore.a because it can --load
shared objects.

llvm-svn: 28720
2006-06-07 23:06:50 +00:00
Reid Spencer 5113dc5cfe For PR780:
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.

llvm-svn: 28719
2006-06-07 23:03:13 +00:00
Chris Lattner 5bd30fa310 Add a virtual dtor to the InlineAsm class so that the principle method of
the class can be defined in InlineAsm.cpp

llvm-svn: 28718
2006-06-07 22:47:44 +00:00
Chris Lattner 5ff8b962c8 Fix a bug where the types for inlineasm nodes were not properly entered into
the compaction table for a function.  This broke compilation of hexxagon
on darwin/x86 with recent changes.

llvm-svn: 28717
2006-06-07 22:20:03 +00:00
Reid Spencer fa80953280 Previous version of this file wasn't supposed to be committed. This version
attempts to get all of libVMCore.a through the least number of declarations.

llvm-svn: 28716
2006-06-07 22:09:38 +00:00
Reid Spencer be535661cc For PR780:
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace
2. Replace the previous explicit mechanism in all the .h and .cpp files
   with the macros in IncludeFile.h
This gets us a consistent mechanism throughout LLVM for ensuring linkage.
Next step is to make sure its used in enough places.

llvm-svn: 28715
2006-06-07 22:00:26 +00:00
Reid Spencer d4b795902c Fix a spello in a comment.
llvm-svn: 28714
2006-06-07 21:24:10 +00:00
Reid Spencer 1707fcb7db For PR780:
This change was suggested by Chris so that we can select an alternate
(or even no-op) implementation of the link assurance. I'm committing this
for your review, Chris. If the names and definitions are okay, I'll adjust
all the .h and .cpp files in a later patch.

llvm-svn: 28712
2006-06-07 20:35:46 +00:00
Reid Spencer 54cb2d8533 For PR780:
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.

llvm-svn: 28709
2006-06-07 20:00:19 +00:00
Evan Cheng 5fc4f3328f Add -extraflags FLAGS to pass extra compilation options.
llvm-svn: 28707
2006-06-07 05:28:07 +00:00