Commit Graph

26441 Commits

Author SHA1 Message Date
Chris Lattner e3d2e1e41e Update the X86 JIT to make it work with the new two-addr changes. This also
adds assertions that check to make sure every operand gets emitted.

llvm-svn: 30110
2006-09-05 02:52:35 +00:00
Chris Lattner af23f9b5f6 Completely eliminate def&use operands. Now a register operand is EITHER a
def operand or a use operand.

llvm-svn: 30109
2006-09-05 02:31:13 +00:00
Chris Lattner 13a5dcddce Fix a long-standing wart in the code generator: two-address instruction lowering
actually *removes* one of the operands, instead of just assigning both operands
the same register.  This make reasoning about instructions unnecessarily complex,
because you need to know if you are before or after register allocation to match
up operand #'s with the target description file.

Changing this also gets rid of a bunch of hacky code in various places.

This patch also includes changes to fold loads into cmp/test instructions in
the X86 backend, along with a significant simplification to the X86 spill
folding code.

llvm-svn: 30108
2006-09-05 02:12:02 +00:00
Andrew Lenharth 3852b2ce7e jmp_bufs are this big on alpha.
llvm-svn: 30107
2006-09-05 00:22:25 +00:00
Bill Wendling bb902cf0b9 First draft of the "Live Interval Analysis" section. This is the "Live
Variable Analysis" pass.

llvm-svn: 30106
2006-09-04 23:35:52 +00:00
Chris Lattner af87314781 ADd getImm/setImm methods
llvm-svn: 30105
2006-09-04 23:35:22 +00:00
Chris Lattner 22f29396db Add some short-hand accessors
llvm-svn: 30104
2006-09-04 23:05:29 +00:00
Rafael Espindola 8386105f3f add support for returning 64bit values
llvm-svn: 30103
2006-09-04 19:05:01 +00:00
Chris Lattner 49c45d3a13 Fix some X86 JIT failures. This should really come from TargetJITInfo.
llvm-svn: 30102
2006-09-04 18:48:41 +00:00
Chris Lattner af726fe9d5 lli uses LinkAllCodegenComponents, so it needs this. Thanks to
Rafael Esp?ndola for pointing this out

llvm-svn: 30100
2006-09-04 18:34:16 +00:00
Chris Lattner 1eed04d1fb Correct fix for a crasher on functions with live in values
llvm-svn: 30099
2006-09-04 18:27:40 +00:00
Chris Lattner bff0b5969f Hack around a regression I introduced yesterday
llvm-svn: 30098
2006-09-04 18:20:15 +00:00
Duraid Madina 373be1d1a2 forgot this
llvm-svn: 30097
2006-09-04 07:44:11 +00:00
Chris Lattner a5d27b19e1 Fix a build problem
llvm-svn: 30096
2006-09-04 06:39:52 +00:00
Duraid Madina cf6749e4c0 add setJumpBufSize() and setJumpBufAlignment() to target-lowering.
Call these from your backend to enjoy setjmp/longjmp goodness, see
lib/Target/IA64/IA64ISelLowering.cpp for an example

llvm-svn: 30095
2006-09-04 06:21:35 +00:00
Chris Lattner a59bee75a7 Update this to reflect llvm-config usage
llvm-svn: 30094
2006-09-04 06:12:14 +00:00
Chris Lattner 79baf1ee7c Remove some dead makefilery
llvm-svn: 30093
2006-09-04 06:07:12 +00:00
Chris Lattner e63072ea0a Use llvm-config to determine what to link in
llvm-svn: 30092
2006-09-04 06:04:03 +00:00
Chris Lattner 3b78c704d1 Use llvm-config instead of magic JIT thing to link in libs
llvm-svn: 30091
2006-09-04 06:01:43 +00:00
Chris Lattner 28689ff2d0 Use LINK_COMPONENTS to specify *components* to link against instead of
using USED_LIBS to specify *libraries* to link against.

llvm-svn: 30090
2006-09-04 05:59:09 +00:00
Chris Lattner 2d4cae9896 Allow things like --libs CBackend
llvm-svn: 30089
2006-09-04 05:35:23 +00:00
Chris Lattner 956f73bdfa Switch to using llvm-config to build
llvm-svn: 30088
2006-09-04 05:24:16 +00:00
Chris Lattner 68c9754e76 Bugfix for llvm-config support
llvm-svn: 30087
2006-09-04 05:23:20 +00:00
Chris Lattner 9a4a92e829 Make LINK_COMPONENTS interact well with make clean
llvm-svn: 30086
2006-09-04 04:50:10 +00:00
Chris Lattner 36bf108d71 Switch to using llvm-config to select components to link in.
llvm-svn: 30085
2006-09-04 04:47:49 +00:00
Chris Lattner f9ac33d8ed Add a new make option (LINK_COMPONENTS) which tools can use to specify what
libraries they need.  This uses llvm-config to link the tools.

llvm-svn: 30084
2006-09-04 04:47:21 +00:00
Chris Lattner 31b4aa5b8d Document build order dependencies. Make sure that llvm-config is built before
tools.

llvm-svn: 30083
2006-09-04 04:27:07 +00:00
Chris Lattner a916db12e4 new file
llvm-svn: 30082
2006-09-04 04:16:09 +00:00
Chris Lattner 12e97307a1 Completely rearchitect the interface between targets and the pass manager.
This pass:

1. Splits TargetMachine into TargetMachine (generic targets, can be implemented
any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by
things using libcodegen and other support).
2. Instead of having each target fully populate the passmgr for file or JIT
   output, move all this to common code, and give targets hooks they can
   implement.
3. Commonalize the target population stuff between file emission and JIT
   emission.
4. All (native code) codegen stuff now happens in a FunctionPassManager, which
   paves the way for "fast -O0" stuff in the CFE later, and now LLC could
   lazily stream .bc files from disk to use less memory.
5. There are now many fewer #includes and the targets don't depend on the
   scalar xforms or libanalysis anymore (but codegen does).
6. Changing common code generator pass ordering stuff no longer requires
   touching all targets.
7. The JIT now has the option of "-fast" codegen or normal optimized codegen,
   which is now orthogonal to the fact that JIT'ing is being done.

llvm-svn: 30081
2006-09-04 04:14:57 +00:00
Chris Lattner e8ce162969 Add accessor
llvm-svn: 30080
2006-09-04 04:08:58 +00:00
Chris Lattner 2f77922d30 Add explicit doInitialization/doFinalization methods instead of making
the FunctionPassManager redo this for each function.

llvm-svn: 30079
2006-09-04 04:07:39 +00:00
Chris Lattner 2f93c0fd33 remove #include
llvm-svn: 30078
2006-09-04 04:06:01 +00:00
Chris Lattner d140393a49 rearrange targets to satisfy dependencies. Too bad we aren't using llvm-config.
llvm-svn: 30077
2006-09-04 04:04:41 +00:00
Chris Lattner c754b0a37f If a cycle exists, don't succeed building the second time around.
llvm-svn: 30076
2006-09-04 01:49:10 +00:00
Chris Lattner dcd72422fd remove message
llvm-svn: 30075
2006-09-04 01:48:32 +00:00
Chris Lattner de54ffc225 Rearrange library linkage order.
llvm-svn: 30074
2006-09-04 01:02:25 +00:00
Chris Lattner 9183d57c37 Eliminate target name.
llvm-svn: 30071
2006-09-03 18:44:26 +00:00
Chris Lattner 0fc4541c67 Simplify target construction.
llvm-svn: 30070
2006-09-03 18:44:02 +00:00
Chris Lattner 2ecd34e869 Remove use of target::getName()
llvm-svn: 30069
2006-09-03 18:38:30 +00:00
Chris Lattner ad36544457 eliminate use of TM.getName()
llvm-svn: 30068
2006-09-03 18:37:12 +00:00
Rafael Espindola 5328ba96e1 add the SETULT condition code
llvm-svn: 30067
2006-09-03 13:19:16 +00:00
Chris Lattner 8584e940b8 Avoid beating on the mi2i map when we know the answer already.
llvm-svn: 30066
2006-09-03 08:07:11 +00:00
Chris Lattner 774785a79d minor speedup
llvm-svn: 30065
2006-09-03 07:53:50 +00:00
Chris Lattner 7cc20d418b Fix Regression/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll on X86.
Just because an alias of a register is available, it doesn't mean that we
can arbitrarily evict the register.

llvm-svn: 30064
2006-09-03 07:15:37 +00:00
Chris Lattner 798e9658d7 Testcase (distilled from crafty) that crashed the local RA on X86.
llvm-svn: 30063
2006-09-03 07:14:47 +00:00
Chris Lattner bd79458b0e When deleting a machine instruction, make sure to remove it from the
livevariables information.  This fixes several regalloc=local failures on x86

llvm-svn: 30062
2006-09-03 00:06:08 +00:00
Chris Lattner f8f724a2b1 Move two methods out of line, make them work when the record for a machine
instruction includes physregs.

llvm-svn: 30061
2006-09-03 00:05:09 +00:00
Chris Lattner 5e02f4e141 Count the time for a pass to ReleaseMemory against that pass. Not doing this
was under accounting for the time that livevariables cost

llvm-svn: 30060
2006-09-02 23:09:24 +00:00
Owen Anderson bcb301c4a2 Make this testcase actually recursive. I accidentally committed the wrong copy last time.
llvm-svn: 30059
2006-09-02 22:46:58 +00:00
Chris Lattner 5aca72aecc Fix a typo pointed out by Gabor
llvm-svn: 30058
2006-09-02 22:27:29 +00:00