Commit Graph

4382 Commits

Author SHA1 Message Date
Bill Wendling
1ccc47ec38 Corrected formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30942 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 20:53:50 +00:00
Chris Lattner
b2cd261279 replace the existing branch inspection/modification APIs with something more
useful and general.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30940 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 20:44:01 +00:00
Chris Lattner
4c7b07a66f Expose method and ivars for measuring inline asm length properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30934 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:50:07 +00:00
Chris Lattner
f3799d6317 simplify trivial function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30924 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 23:50:28 +00:00
Evan Cheng
130a6471b9 Add RemoveDeadNode to remove a dead node and its (potentially) dead operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30916 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 20:34:05 +00:00
Evan Cheng
2e49f090f9 Naming consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30878 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 07:10:22 +00:00
Andrew Lenharth
82c3d8f81a Jimptables working again on alpha.
As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30873 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 04:29:42 +00:00
Chris Lattner
755480681c add two helper methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30869 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 03:58:02 +00:00
Evan Cheng
81c3845788 Comments; getChain(), getBasePtr(), etc. should return a SDOperand by value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30850 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 01:44:58 +00:00
Evan Cheng
24446e253a Merging ISD::LOAD and ISD::LOADX. Added LoadSDNode to represent load nodes.
Chain and address ptr remains as operands. SrcValue, extending mode, extending
VT (or rather loaded VT before extension) are now instance variables of
LoadSDNode.

Introduce load / store addressing modes to represent pre- and post-indexed
load and store. Also added an additional operand offset that is only used in
post-indexed mode (i.e. base ptr += offset after load/store).

Added alignment info (not yet used) and isVolatile fields.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30843 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 20:55:20 +00:00
Andrew Lenharth
f2bdcb3187 Fix build error in gcc 3.4 and make more this general
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30839 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 19:05:44 +00:00
Nick Lewycky
0376ade972 Fix usage example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30837 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 18:33:08 +00:00
Chris Lattner
53b06db6c7 Fix PR897
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30820 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-08 22:28:34 +00:00
Chris Lattner
428e75eaef Add support for targets to declare that they use a GOT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30777 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 22:46:34 +00:00
Chris Lattner
b6bb7e1ffe add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30761 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 01:16:29 +00:00
Evan Cheng
ad071e1cd1 Add getStore() helper function to create ISD::STORE nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30758 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 22:57:11 +00:00
Chris Lattner
06a248c238 Add insertelement/extractelement helper ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30750 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 06:24:58 +00:00
Chris Lattner
671d77bc8e remove JumpTableTextSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30746 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 03:14:23 +00:00
Chris Lattner
1da31ee472 Pass the MachineFunction into EmitJumpTableInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30742 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 03:01:21 +00:00
Chris Lattner
1279b7c2a9 move getSectionForFunction to AsmPrinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30734 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:41:43 +00:00
Chris Lattner
f5b10ec509 Give TargetAsmInfo a virtual dtor, add a new getSectionForFunction method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30732 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 00:35:16 +00:00
Evan Cheng
c548428c5d Combine ISD::EXTLOAD, ISD::SEXTLOAD, ISD::ZEXTLOAD into ISD::LOADX. Add an
extra operand to LOADX to specify the exact value extension type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30714 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-04 00:56:09 +00:00
Chris Lattner
20a6d8e630 ADd a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30707 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 20:16:45 +00:00
Chris Lattner
e70cab0ca4 Provide a function that ensures MBB numbering is dense and inorder. This
can be used by MachineFunctionPasses who need this property.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30706 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 19:18:57 +00:00
Chris Lattner
f56a8db546 clean up use of 'explicit'. This is PR934.
Patch contributed by Kevin Sopp!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30701 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 17:09:12 +00:00
Bill Wendling
f7da4e939f Fix for PR929. The PHI nodes were being gone through for each instruction
in a successor block for every block...resulting in some O(N^k) algorithm
which wasn't very good for performance. Calculating this information up
front and keeping it in a map made it much faster.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30697 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 07:20:20 +00:00
Chris Lattner
b62ff3f7f1 Move DominatorTree to immediately follow DominatorTreeBase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30693 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 05:24:56 +00:00
Jim Laskey
ec20402c90 Add ability to annotate (color) nodes in a viewGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-02 12:26:53 +00:00
Chris Lattner
cb4f10b4d5 Override use_back in instruction/basicblock to provide more type information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30678 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-30 22:20:34 +00:00
Chris Lattner
adc95467e4 Add a version of the globalvariable ctor that inserts at a specific location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30677 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-30 21:31:26 +00:00
Chris Lattner
de65fb3a8b Now that ConstantBool::True/False are gone, we can modify Type.cpp to
eliminate its static dtors, without having code that depends on order of
initialization.  Eliminate static ctors/dtors from Type.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30667 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:38:07 +00:00
Chris Lattner
003cbf35f4 Eliminate ConstantBool::True and ConstantBool::False. Instead, provide
ConstantBool::getTrue() and ConstantBool::getFalse().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30666 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:36:21 +00:00
Chris Lattner
57f9a43c64 refactor critical edge breaking out into the SplitCritEdgesForPHIConstants method.
This is a baby step towards fixing PR925.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30643 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 06:17:10 +00:00
Chris Lattner
b14cb1024a remove dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30640 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:37:43 +00:00
Chris Lattner
771cbf30bc new helper class to provide more explicit management of static ctor/dtors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30638 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:31:55 +00:00
Evan Cheng
02569d7355 - Added a hook processFunctionBeforeCalleeSaveScn(). This is called by PEI just
before it determines which callee-save registers are to be spilled. This allows
the target to make changes such as forcing certain physical registers to be
spilled.
- Modified comments. It's important to note the order of registers in the array
returns by getCalleeSaveRegs() determines the order of callee save spill code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30635 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 00:07:19 +00:00
Chris Lattner
3ce9b67e0c Add support for ${:comment}, which expands to the current target's comment
character, and ${:uid} which expands to a unique ID for the MachineInstr.
More can be added if/when they are needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30619 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 23:59:50 +00:00
Chris Lattner
cb05af852f Add support for targets that want to do something with the llvm.used list,
because they have an aggressive linker that does dead code stripping.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30604 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 03:38:18 +00:00
Chris Lattner
384299ef45 order this properly to avoid warnings in TargetAsmInfo.cpp. Add a comment
in a format that matches every other ivars in this class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30603 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-25 22:38:36 +00:00
Andrew Lenharth
beec30eaf3 Add support for other relocation bases to jump tables, as well as custom asm directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-24 19:45:58 +00:00
Chris Lattner
e87a4b6cb0 remove misleading comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30585 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-23 06:09:45 +00:00
Chris Lattner
a71965b1ad add method, correct comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30584 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-23 04:03:45 +00:00
Devang Patel
8d3ab25335 Use iterative algorith to assign DFS number. This reduces
call stack depth.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30575 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-22 01:05:33 +00:00
Devang Patel
c7cfbc58ad Use abstract class to facilitate dlopen() interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30569 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-21 17:22:55 +00:00
Nick Lewycky
d791544c9f Fix findCaseDest to return null when BB is both the default dest and one
of the numeric cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30468 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 20:44:37 +00:00
Nick Lewycky
011f184601 Add a new helper method to SwitchInst. Useful when you've got a BB from
somewhere (like the dominator graph) and would like to know which case it
came from.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30466 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 19:03:59 +00:00
Jim Laskey
e85fb6719a Sort out mangled names for globals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30460 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 14:47:26 +00:00
Chris Lattner
0ec0b539a7 Add support for pattern matching cast operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30454 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 05:17:11 +00:00
Chris Lattner
6c6b6a77c0 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 04:58:06 +00:00
Chris Lattner
79bc332ddb add a helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30452 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 04:54:57 +00:00
Anton Korobeynikov
bcb9770efe Added some eye-candy for Subtarget type checking
Added X86 StdCall & FastCall calling conventions. Codegen will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30446 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 20:25:45 +00:00
Chris Lattner
2f463865c2 Add ShiftInst::isLogical/ArithmeticShift methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30445 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 19:29:56 +00:00
Chris Lattner
a5b07404f7 Add new SetCondInst::isRelational/isEquality methods. Rename
Instruction::isRelational to Instruction::isComparison.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30444 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-17 19:14:47 +00:00
Chris Lattner
428b92eb83 Keep track of the start of MBB's in a separate map from instructions. This
is faster and is needed for future improvements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30383 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 03:57:23 +00:00
Devang Patel
697e590580 Undo previous check-in.
Reintroduce recursive assignDFSNumber().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 21:43:24 +00:00
Anton Korobeynikov
b74ed07bfd Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 18:23:27 +00:00
Evan Cheng
f379924287 Add MachineConstantPoolEntry getOffset() accessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30325 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 07:32:32 +00:00
Evan Cheng
baf4500b3a The top bit is used to determine whether it's a MachineConstantPoolValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30324 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 07:30:48 +00:00
Chris Lattner
c7695eb504 revert accidentally committed file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 06:42:17 +00:00
Chris Lattner
2540813e5d Remove dead methods, add getNumBlockIDs() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30322 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 06:40:48 +00:00
Reid Spencer
a6d990a73f Add a HAVE_MACH_MACH_H #define to detect the presence of the mach/mach.h
header file on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30319 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 06:17:21 +00:00
Evan Cheng
89abd77060 Mirrors ConstantPoolSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30314 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 05:48:39 +00:00
Devang Patel
57d12f962d Avoid recursion in assignDFSNumber(). Move def from ET-Forest.h
to Dominators.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 01:27:42 +00:00
Evan Cheng
d6594ae54c Added support for machine specific constantpool values. These are useful for
representing expressions that can only be resolved at link time, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-12 21:00:35 +00:00
Nick Lewycky
f19fb9b4f4 Add ability to remove nodes from DominatorTree, for when a BasicBlock
is being removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30270 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-12 00:18:28 +00:00
Nate Begeman
019f851ab2 Behold, more work on relocations. Things are looking pretty good now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30240 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-10 23:03:44 +00:00
Chris Lattner
dd2afb0e1f Implement new fpowi node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30223 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-09 05:55:44 +00:00
Nate Begeman
94be248dbb First pass at supporting relocations. Relocations are written correctly to
the file now, however the relocated address is currently wrong.  Fixing
that will require some deep pondering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30207 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 22:42:09 +00:00
Chris Lattner
1e5fb6928c add powi intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30176 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 06:43:00 +00:00
Jim Laskey
fde1b3bb2f 1. Remove condition on delete.
2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30169 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 23:39:26 +00:00
Jim Laskey
a0f3d17daa Make target asm info a property of the target machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30162 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 22:06:40 +00:00
Chris Lattner
833eb68a1f Add new option to leave asm names alone
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30149 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 18:20:41 +00:00
Devang Patel
a291a68161 Add getTargetTriple() that linker can use to query target architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30132 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 20:16:28 +00:00
Devang Patel
0701a2f70d Keep track of all modules crated using a name to module map.
Add private member function getMoudle().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30130 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 18:50:26 +00:00
Jim Laskey
ec0d9fe2b2 Separate target specifc asm properties from asm printers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30127 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 18:35:33 +00:00
Jim Laskey
563321a258 Separate target specific asm properties from the asm printers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30126 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 18:34:40 +00:00
Devang Patel
2681023488 Extract target triplet from optimized module.
Untabify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30123 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 00:28:22 +00:00
Evan Cheng
f89e2a9416 IsDef can only be accessed / set if operand is a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30119 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-05 20:20:04 +00:00
Evan Cheng
04957ac67c Initialize IsDef of all non-register MachineOperand to false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30116 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-05 18:56:02 +00:00
Chris Lattner
09e460662a Completely eliminate def&use operands. Now a register operand is EITHER a
def operand or a use operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30109 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-05 02:31:13 +00:00
Chris Lattner
171ce440aa ADd getImm/setImm methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30105 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 23:35:22 +00:00
Chris Lattner
930ab738c7 Add some short-hand accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 23:05:29 +00:00
Duraid Madina
2a0013f59f 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30095 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 06:21:35 +00:00
Chris Lattner
1911fd4f85 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:14:57 +00:00
Chris Lattner
b2cd4bac87 Add explicit doInitialization/doFinalization methods instead of making
the FunctionPassManager redo this for each function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30079 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:07:39 +00:00
Chris Lattner
07ac914973 Eliminate target name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30071 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-03 18:44:26 +00:00
Chris Lattner
6b128bdc58 Avoid beating on the mi2i map when we know the answer already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30066 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-03 08:07:11 +00:00
Chris Lattner
7a3abdc63c Move two methods out of line, make them work when the record for a machine
instruction includes physregs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30061 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-03 00:05:09 +00:00
Chris Lattner
0f592b388f Fix a typo pointed out by Gabor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30058 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 22:27:29 +00:00
Chris Lattner
2efe109452 add a prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30051 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 05:37:53 +00:00
Chris Lattner
1acb17cb83 Iteration is required for some cases, even if they don't occur in crafty.
Restore it, which re-fixes X86/2006-08-21-ExtraMovInst.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30050 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 05:32:53 +00:00
Chris Lattner
6bda49fd9f new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30048 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 05:26:01 +00:00
Chris Lattner
5d9b6f2823 remove some particularly expensive assertions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30014 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 06:57:35 +00:00
Chris Lattner
0750bec272 add a simple reserve method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30011 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 06:08:16 +00:00
Chris Lattner
a2a8f0919d Iterative coallescing doesn't buy us anything (we get identical results on
crafty with and without it).  Removing it speeds up live intervals 6%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30010 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 04:02:42 +00:00
Chris Lattner
91725b7585 avoid calling the virtual isMoveInstr method endlessly by caching its results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29994 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-31 05:54:43 +00:00
Chris Lattner
4382c736df Restore source-level compatibility with clients of these functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29978 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 20:47:48 +00:00
Chris Lattner
1b1a49714e fix 80 column issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29972 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 05:56:52 +00:00
Chris Lattner
52c917190a Instantiate Statistic<> in one place, not in every .o file that uses it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29971 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 04:17:00 +00:00
Chris Lattner
6d8fbef015 Teach the coallescer to coallesce live intervals joined by an arbitrary
number of copies, potentially defining live ranges that appear to have
differing value numbers that become identical when coallsced.  Among other
things, this fixes CodeGen/X86/shift-coalesce.ll and PR687.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29968 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-29 23:18:15 +00:00