Chris Lattner
7353b07275
expose DWARF_LABEL opcode# so the branch folder can update debug info properly.
...
llvm-svn: 31024
2006-10-17 22:41:45 +00:00
Chris Lattner
ea84388ac0
update comment
...
llvm-svn: 31023
2006-10-17 22:12:15 +00:00
Chris Lattner
dd39b9d358
Do not leak all of the SourceLineInfo objects. Do not bother mallocing each
...
one separately.
llvm-svn: 31022
2006-10-17 22:06:46 +00:00
Chris Lattner
9771af72c1
minor cleanups
...
llvm-svn: 31021
2006-10-17 21:51:44 +00:00
Evan Cheng
582d22a821
Split PRE_INDEXED to PRE_INC / PRE_DEC and similarly for POST_INDEXED.
...
llvm-svn: 31015
2006-10-17 21:12:56 +00:00
Jim Laskey
37679253ae
Clean up interface to getGlobalLinkName.
...
llvm-svn: 31001
2006-10-17 17:17:24 +00:00
Jim Laskey
620df3ea5f
Basic support for getGlobalLinkName.
...
llvm-svn: 30997
2006-10-17 13:41:07 +00:00
Jim Laskey
06f4428abc
Pass AliasAnalysis thru to DAGCombiner.
...
llvm-svn: 30984
2006-10-16 20:52:31 +00:00
Chris Lattner
3bfbb5eabd
add a ReplaceMBBInJumpTables method
...
llvm-svn: 30983
2006-10-16 20:41:42 +00:00
Evan Cheng
c8b9d15614
Start checking from the root of the matched sub-tree.
...
llvm-svn: 30957
2006-10-14 08:30:53 +00:00
Chris Lattner
25ad62d132
When SimplifySetCC was moved to the DAGCombiner, it was never removed from
...
SelectionDAG and it has since bitrotted. Remove the copy from SelectionDAG.
Next, remove the constant folding piece of DAGCombiner::SimplifySetCC into
a new FoldSetCC method which can be used by getNode() and SimplifySetCC.
This fixes obscure bugs.
llvm-svn: 30952
2006-10-14 00:41:01 +00:00
Evan Cheng
fe5bb5dbe6
Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
...
llvm-svn: 30945
2006-10-13 21:14:26 +00:00
Chris Lattner
b441d8e8ce
it is easier to implement these when they are virtual
...
llvm-svn: 30944
2006-10-13 21:02:27 +00:00
Chris Lattner
520bf168f5
allow branch reversal to fail
...
llvm-svn: 30943
2006-10-13 20:59:31 +00:00
Bill Wendling
85f53a4427
Corrected formatting.
...
llvm-svn: 30942
2006-10-13 20:53:50 +00:00
Chris Lattner
f8eaaded24
replace the existing branch inspection/modification APIs with something more
...
useful and general.
llvm-svn: 30940
2006-10-13 20:44:01 +00:00
Chris Lattner
63ec35db20
Expose method and ivars for measuring inline asm length properly.
...
llvm-svn: 30934
2006-10-13 17:50:07 +00:00
Chris Lattner
cf5bfb0e80
simplify trivial function
...
llvm-svn: 30924
2006-10-12 23:50:28 +00:00
Evan Cheng
61afb767eb
Add RemoveDeadNode to remove a dead node and its (potentially) dead operands.
...
llvm-svn: 30916
2006-10-12 20:34:05 +00:00
Evan Cheng
9b31a4d4ed
Naming consistency.
...
llvm-svn: 30878
2006-10-11 07:10:22 +00:00
Andrew Lenharth
4b783303e5
Jimptables working again on alpha.
...
As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.
llvm-svn: 30873
2006-10-11 04:29:42 +00:00
Chris Lattner
aa1741fc87
add two helper methods.
...
llvm-svn: 30869
2006-10-11 03:58:02 +00:00
Evan Cheng
8090a67f40
Comments; getChain(), getBasePtr(), etc. should return a SDOperand by value.
...
llvm-svn: 30850
2006-10-10 01:44:58 +00:00
Evan Cheng
967d6af1d2
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.
llvm-svn: 30843
2006-10-09 20:55:20 +00:00
Andrew Lenharth
6223a6ce63
Fix build error in gcc 3.4 and make more this general
...
llvm-svn: 30839
2006-10-09 19:05:44 +00:00
Nick Lewycky
3c69e2291b
Fix usage example.
...
llvm-svn: 30837
2006-10-09 18:33:08 +00:00
Chris Lattner
e3f0524253
Fix PR897
...
llvm-svn: 30820
2006-10-08 22:28:34 +00:00
Chris Lattner
77545e4a28
Add support for targets to declare that they use a GOT
...
llvm-svn: 30777
2006-10-06 22:46:34 +00:00
Chris Lattner
621a182abd
add an accessor
...
llvm-svn: 30761
2006-10-06 01:16:29 +00:00
Evan Cheng
c9e079d0c1
Add getStore() helper function to create ISD::STORE nodes.
...
llvm-svn: 30758
2006-10-05 22:57:11 +00:00
Chris Lattner
14ad447136
Add insertelement/extractelement helper ctors.
...
llvm-svn: 30750
2006-10-05 06:24:58 +00:00
Chris Lattner
94d1cfd32d
remove JumpTableTextSection
...
llvm-svn: 30746
2006-10-05 03:14:23 +00:00
Chris Lattner
068190eb91
Pass the MachineFunction into EmitJumpTableInfo.
...
llvm-svn: 30742
2006-10-05 03:01:21 +00:00
Chris Lattner
da8321b52e
move getSectionForFunction to AsmPrinter.
...
llvm-svn: 30734
2006-10-05 02:41:43 +00:00
Chris Lattner
6ba6d0e937
Give TargetAsmInfo a virtual dtor, add a new getSectionForFunction method.
...
llvm-svn: 30732
2006-10-05 00:35:16 +00:00
Evan Cheng
494e8e6971
Combine ISD::EXTLOAD, ISD::SEXTLOAD, ISD::ZEXTLOAD into ISD::LOADX. Add an
...
extra operand to LOADX to specify the exact value extension type.
llvm-svn: 30714
2006-10-04 00:56:09 +00:00
Chris Lattner
a05ee6de92
ADd a method
...
llvm-svn: 30707
2006-10-03 20:16:45 +00:00
Chris Lattner
77aa419991
Provide a function that ensures MBB numbering is dense and inorder. This
...
can be used by MachineFunctionPasses who need this property.
llvm-svn: 30706
2006-10-03 19:18:57 +00:00
Chris Lattner
4b7c9854bf
clean up use of 'explicit'. This is PR934.
...
Patch contributed by Kevin Sopp!
llvm-svn: 30701
2006-10-03 17:09:12 +00:00
Bill Wendling
9b15198af4
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.
llvm-svn: 30697
2006-10-03 07:20:20 +00:00
Chris Lattner
895cf34500
Move DominatorTree to immediately follow DominatorTreeBase
...
llvm-svn: 30693
2006-10-03 05:24:56 +00:00
Jim Laskey
3d44b337d9
Add ability to annotate (color) nodes in a viewGraph.
...
llvm-svn: 30686
2006-10-02 12:26:53 +00:00
Chris Lattner
1ab553b24d
Override use_back in instruction/basicblock to provide more type information.
...
llvm-svn: 30678
2006-09-30 22:20:34 +00:00
Chris Lattner
78e10ebf8a
Add a version of the globalvariable ctor that inserts at a specific location.
...
llvm-svn: 30677
2006-09-30 21:31:26 +00:00
Chris Lattner
220e198fbe
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.
llvm-svn: 30667
2006-09-28 23:38:07 +00:00
Chris Lattner
155e6b8403
Eliminate ConstantBool::True and ConstantBool::False. Instead, provide
...
ConstantBool::getTrue() and ConstantBool::getFalse().
llvm-svn: 30666
2006-09-28 23:36:21 +00:00
Chris Lattner
b512048344
refactor critical edge breaking out into the SplitCritEdgesForPHIConstants method.
...
This is a baby step towards fixing PR925.
llvm-svn: 30643
2006-09-28 06:17:10 +00:00
Chris Lattner
7e0e7c7bc9
remove dead method
...
llvm-svn: 30640
2006-09-28 00:37:43 +00:00
Chris Lattner
30da1ba0a2
new helper class to provide more explicit management of static ctor/dtors.
...
llvm-svn: 30638
2006-09-28 00:31:55 +00:00
Evan Cheng
51144ea51c
- 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.
llvm-svn: 30635
2006-09-28 00:07:19 +00:00
Chris Lattner
ddf92db1ca
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.
llvm-svn: 30619
2006-09-26 23:59:50 +00:00
Chris Lattner
167aa73273
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.
llvm-svn: 30604
2006-09-26 03:38:18 +00:00
Chris Lattner
bab51c66fc
order this properly to avoid warnings in TargetAsmInfo.cpp. Add a comment
...
in a format that matches every other ivars in this class.
llvm-svn: 30603
2006-09-25 22:38:36 +00:00
Andrew Lenharth
58f5a24f0c
Add support for other relocation bases to jump tables, as well as custom asm directives
...
llvm-svn: 30593
2006-09-24 19:45:58 +00:00
Chris Lattner
941d6d205a
remove misleading comment
...
llvm-svn: 30585
2006-09-23 06:09:45 +00:00
Chris Lattner
bf0b610dfa
add method, correct comment
...
llvm-svn: 30584
2006-09-23 04:03:45 +00:00
Devang Patel
8248ba3afc
Use iterative algorith to assign DFS number. This reduces
...
call stack depth.
llvm-svn: 30575
2006-09-22 01:05:33 +00:00
Devang Patel
5bc8dcf913
Use abstract class to facilitate dlopen() interface.
...
llvm-svn: 30569
2006-09-21 17:22:55 +00:00
Nick Lewycky
ad4eb4f0de
Fix findCaseDest to return null when BB is both the default dest and one
...
of the numeric cases.
llvm-svn: 30468
2006-09-18 20:44:37 +00:00
Nick Lewycky
87f79d5d69
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.
llvm-svn: 30466
2006-09-18 19:03:59 +00:00
Jim Laskey
07ac577a34
Sort out mangled names for globals
...
llvm-svn: 30460
2006-09-18 14:47:26 +00:00
Chris Lattner
3c4ca91dbd
Add support for pattern matching cast operations
...
llvm-svn: 30454
2006-09-18 05:17:11 +00:00
Chris Lattner
93bc6e881f
fix typo
...
llvm-svn: 30453
2006-09-18 04:58:06 +00:00
Chris Lattner
be102d68c2
add a helper method
...
llvm-svn: 30452
2006-09-18 04:54:57 +00:00
Anton Korobeynikov
7c2118575c
Added some eye-candy for Subtarget type checking
...
Added X86 StdCall & FastCall calling conventions. Codegen will follow.
llvm-svn: 30446
2006-09-17 20:25:45 +00:00
Chris Lattner
547b62a967
Add ShiftInst::isLogical/ArithmeticShift methods.
...
llvm-svn: 30445
2006-09-17 19:29:56 +00:00
Chris Lattner
8aa718b0ed
Add new SetCondInst::isRelational/isEquality methods. Rename
...
Instruction::isRelational to Instruction::isComparison.
llvm-svn: 30444
2006-09-17 19:14:47 +00:00
Chris Lattner
9306fac571
Keep track of the start of MBB's in a separate map from instructions. This
...
is faster and is needed for future improvements.
llvm-svn: 30383
2006-09-15 03:57:23 +00:00
Devang Patel
0d540a2f9a
Undo previous check-in.
...
Reintroduce recursive assignDFSNumber().
llvm-svn: 30380
2006-09-14 21:43:24 +00:00
Anton Korobeynikov
6e19f80688
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.
llvm-svn: 30374
2006-09-14 18:23:27 +00:00
Evan Cheng
489428e6f8
Add MachineConstantPoolEntry getOffset() accessor.
...
llvm-svn: 30325
2006-09-14 07:32:32 +00:00
Evan Cheng
b25fd42e43
The top bit is used to determine whether it's a MachineConstantPoolValue.
...
llvm-svn: 30324
2006-09-14 07:30:48 +00:00
Chris Lattner
31e8414b3f
revert accidentally committed file
...
llvm-svn: 30323
2006-09-14 06:42:17 +00:00
Chris Lattner
2544818d6b
Remove dead methods, add getNumBlockIDs() method
...
llvm-svn: 30322
2006-09-14 06:40:48 +00:00
Reid Spencer
2a3ab75d50
Add a HAVE_MACH_MACH_H #define to detect the presence of the mach/mach.h
...
header file on Darwin.
llvm-svn: 30319
2006-09-14 06:17:21 +00:00
Evan Cheng
b68bfafe09
Mirrors ConstantPoolSDNode.
...
llvm-svn: 30314
2006-09-14 05:48:39 +00:00
Devang Patel
2983c628cd
Avoid recursion in assignDFSNumber(). Move def from ET-Forest.h
...
to Dominators.h
llvm-svn: 30309
2006-09-14 01:27:42 +00:00
Evan Cheng
499d77553a
Added support for machine specific constantpool values. These are useful for
...
representing expressions that can only be resolved at link time, etc.
llvm-svn: 30278
2006-09-12 21:00:35 +00:00
Nick Lewycky
a2c3d7b1ca
Add ability to remove nodes from DominatorTree, for when a BasicBlock
...
is being removed.
llvm-svn: 30270
2006-09-12 00:18:28 +00:00
Nate Begeman
1109e4a222
Behold, more work on relocations. Things are looking pretty good now.
...
llvm-svn: 30240
2006-09-10 23:03:44 +00:00
Chris Lattner
7005757ced
Implement new fpowi node
...
llvm-svn: 30223
2006-09-09 05:55:44 +00:00
Nate Begeman
2dfa13e74f
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.
llvm-svn: 30207
2006-09-08 22:42:09 +00:00
Chris Lattner
98c39f8e5b
add powi intrinsics.
...
llvm-svn: 30176
2006-09-08 06:43:00 +00:00
Jim Laskey
160a8aa339
1. Remove condition on delete.
...
2. Protect and outline createTargetAsmInfo.
3. Misc. kruft.
llvm-svn: 30169
2006-09-07 23:39:26 +00:00
Jim Laskey
9da25f6119
Make target asm info a property of the target machine.
...
llvm-svn: 30162
2006-09-07 22:06:40 +00:00
Chris Lattner
47f39eb3db
Add new option to leave asm names alone
...
llvm-svn: 30149
2006-09-07 18:20:41 +00:00
Devang Patel
2e6c5085f8
Add getTargetTriple() that linker can use to query target architecture.
...
llvm-svn: 30132
2006-09-06 20:16:28 +00:00
Devang Patel
bb3ca8e494
Keep track of all modules crated using a name to module map.
...
Add private member function getMoudle().
llvm-svn: 30130
2006-09-06 18:50:26 +00:00
Jim Laskey
b3cfa98236
Separate target specifc asm properties from asm printers.
...
llvm-svn: 30127
2006-09-06 18:35:33 +00:00
Jim Laskey
6b86ef852c
Separate target specific asm properties from the asm printers.
...
llvm-svn: 30126
2006-09-06 18:34:40 +00:00
Devang Patel
208eaf86a6
Extract target triplet from optimized module.
...
Untabify.
llvm-svn: 30123
2006-09-06 00:28:22 +00:00
Evan Cheng
e7875b655d
IsDef can only be accessed / set if operand is a register.
...
llvm-svn: 30119
2006-09-05 20:20:04 +00:00
Evan Cheng
f041d2de7e
Initialize IsDef of all non-register MachineOperand to false.
...
llvm-svn: 30116
2006-09-05 18:56:02 +00:00
Chris Lattner
9cd4e3429e
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
40e16d9e51
ADd getImm/setImm methods
...
llvm-svn: 30105
2006-09-04 23:35:22 +00:00
Chris Lattner
35f1acab3a
Add some short-hand accessors
...
llvm-svn: 30104
2006-09-04 23:05:29 +00:00
Duraid Madina
51396ffd3e
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
33c9ddc91d
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
50f76d4c5d
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
2024543fb2
Eliminate target name.
...
llvm-svn: 30071
2006-09-03 18:44:26 +00:00
Chris Lattner
b590a41f7b
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
cc5b4bff8f
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
518f055373
Fix a typo pointed out by Gabor
...
llvm-svn: 30058
2006-09-02 22:27:29 +00:00
Chris Lattner
c01fbffc67
add a prototype
...
llvm-svn: 30051
2006-09-02 05:37:53 +00:00
Chris Lattner
dfda549a00
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
llvm-svn: 30050
2006-09-02 05:32:53 +00:00
Chris Lattner
9ad19f6f8b
new method
...
llvm-svn: 30048
2006-09-02 05:26:01 +00:00
Chris Lattner
89a7eadf22
remove some particularly expensive assertions
...
llvm-svn: 30014
2006-09-01 06:57:35 +00:00
Chris Lattner
7453a7d197
add a simple reserve method.
...
llvm-svn: 30011
2006-09-01 06:08:16 +00:00
Chris Lattner
0c120af606
Iterative coallescing doesn't buy us anything (we get identical results on
...
crafty with and without it). Removing it speeds up live intervals 6%.
llvm-svn: 30010
2006-09-01 04:02:42 +00:00
Chris Lattner
998dd9b42e
avoid calling the virtual isMoveInstr method endlessly by caching its results.
...
llvm-svn: 29994
2006-08-31 05:54:43 +00:00
Chris Lattner
45063c4be4
Restore source-level compatibility with clients of these functions.
...
llvm-svn: 29978
2006-08-30 20:47:48 +00:00
Chris Lattner
c7fb7a05bf
fix 80 column issue
...
llvm-svn: 29972
2006-08-30 05:56:52 +00:00
Chris Lattner
e84b1b8352
Instantiate Statistic<> in one place, not in every .o file that uses it.
...
llvm-svn: 29971
2006-08-30 04:17:00 +00:00
Chris Lattner
3a4d512930
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.
llvm-svn: 29968
2006-08-29 23:18:15 +00:00
Devang Patel
a5bb9b49d3
Do not rely on std::sort and std::erase to get list of unique
...
exit blocks. The output is dependent on addresses of basic block.
Add and use Loop::getUniqueExitBlocks.
llvm-svn: 29966
2006-08-29 22:29:16 +00:00
Evan Cheng
2335c819cd
Move isCommutativeBinOp from SelectionDAG.cpp and DAGCombiner.cpp out. Make it a static method of SelectionDAG.
...
llvm-svn: 29951
2006-08-29 06:42:35 +00:00
Nick Lewycky
9535a84c33
Add PredicateSimplifier pass. Collapses equal variables into one form
...
and simplifies expressions. This implements the optimization described
in PR807.
llvm-svn: 29947
2006-08-28 22:44:55 +00:00
Chris Lattner
4fa85705f6
Add 2nd form of resize
...
llvm-svn: 29945
2006-08-28 21:52:08 +00:00
Chris Lattner
5571652921
remove extraneous space
...
llvm-svn: 29940
2006-08-28 17:30:49 +00:00
Reid Spencer
959705759f
Back out last revision which should not have been committed (yet).
...
llvm-svn: 29935
2006-08-28 01:08:45 +00:00
Reid Spencer
2567610703
For PR387:
...
Close out this long standing bug by removing the remaining overloaded
virtual functions in LLVM. The -Woverloaded-virtual option is now turned on.
llvm-svn: 29934
2006-08-28 01:02:49 +00:00
Chris Lattner
8a59e8be23
simplify AnalysisGroup registration, eliminating one typeid call.
...
llvm-svn: 29932
2006-08-28 00:42:29 +00:00
Chris Lattner
6474b3fe80
Silence -Woverloaded-virtual warnings.
...
llvm-svn: 29929
2006-08-28 00:09:00 +00:00
Chris Lattner
a39dcb5377
eliminate RegisterOpt. It does the same thing as RegisterPass.
...
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Chris Lattner
f530302eda
Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.
...
llvm-svn: 29921
2006-08-27 22:30:17 +00:00
Chris Lattner
216059ff5a
We no longer care whether something is an opt vs analysis pass, only whether
...
something is a pass vs an analysis group now. Simplify interfaces.
llvm-svn: 29920
2006-08-27 22:21:55 +00:00
Chris Lattner
dc7bad1787
Remove a dead class.
...
llvm-svn: 29918
2006-08-27 22:11:07 +00:00
Chris Lattner
db0a995bbe
add directive to disable inlining
...
llvm-svn: 29912
2006-08-27 13:16:05 +00:00
Chris Lattner
33bd5dcfb7
s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|
...
llvm-svn: 29911
2006-08-27 12:54:02 +00:00
Chris Lattner
91f098c9f7
Add external definitions for commonly-used template specializations and add
...
anchor methods to others. This eliminates the vtable/template method bloat
in .o files that defining a cl::opt used to impose (~4K per .o file for one
cp::opt<unsigned>).
llvm-svn: 29909
2006-08-27 12:45:47 +00:00
Chris Lattner
a72e220a25
New place to put compiler-specific functionality. This replaces Visibility.h,
...
and provides macros that can be used to make explicit instantiations of
template specializations, which is a gcc-specific feature.
llvm-svn: 29908
2006-08-27 12:42:45 +00:00
Evan Cheng
6e08e7035f
Eliminate SelectNodeTo() and getTargetNode() variants which take more than
...
3 SDOperand operands. They are replaced by versions which take an array
of SDOperand and the number of operands.
llvm-svn: 29905
2006-08-27 08:08:54 +00:00
Chris Lattner
5d7bd21c41
make optional pointer really optional
...
llvm-svn: 29904
2006-08-27 07:11:54 +00:00
Nate Begeman
f94ddf0d12
Properly size the string table, and emit symbol table and string table
...
entries in the correct order, fixing several fixmes.
llvm-svn: 29902
2006-08-26 15:46:34 +00:00
Evan Cheng
1c3d571e4b
SelectNodeTo now returns a SDNode*.
...
llvm-svn: 29901
2006-08-26 08:00:10 +00:00
Chris Lattner
ec9c7fa089
Completely change the way that joining with physregs is implemented. This
...
paves the way for future changes, increases coallescing opportunities (in
theory, not witnessed in practice), and eliminates the really expensive
LiveIntervals::overlapsAliases method.
llvm-svn: 29890
2006-08-25 23:41:24 +00:00
Jim Laskey
e9b0e1014e
Tidy up.
...
llvm-svn: 29888
2006-08-25 22:56:30 +00:00
Reid Spencer
9b5ea0704e
For PR797:
...
Make the Win32 code exception free (untested/uncompiled) which forced some
interface changes which had ripple effect. This should be the last of 797.
llvm-svn: 29884
2006-08-25 21:37:17 +00:00
Reid Spencer
e2b7b29a82
For PR797:
...
Final commit for this bug. This removes the last EH holdouts in LLVM
and turns off exception support by using the -fno-exceptions option. This
leads to the following reduction in library and executable sizes:
DEBUG BUILD RELEASE BUILD
before after delta before after delta
lib 162,328K 157,616K 4,712 17,864K 16,416K 1,448K
bin 571,444K 557,156K 14,288 63,296K 56,996K 6,300K
Debug Improvement: 19,000K (2.59%)
Release Improvement: 7,748K (9.55%)
llvm-svn: 29882
2006-08-25 19:54:53 +00:00
Jim Laskey
3af6953257
Consolidate callee saved register information so that it can me used by debug
...
information and exception handling.
llvm-svn: 29881
2006-08-25 19:45:51 +00:00
Reid Spencer
741140980f
For PR797:
...
Remove exception throwing/handling from lib/Bytecode, and adjust its users
to compensate for changes in the interface.
llvm-svn: 29875
2006-08-25 17:43:11 +00:00
Nate Begeman
ce8ab85260
Get closer to handling globals correctly. We now generally get them in the
...
right section.
llvm-svn: 29871
2006-08-25 06:36:58 +00:00
Reid Spencer
d813eae003
For PR797:
...
Remove exception handling from the bytecode archiver and adjust the llvm-ar
tool to accommodate the new interfaces.
llvm-svn: 29866
2006-08-24 23:45:08 +00:00
Chris Lattner
28645a15bd
Take advantage of the recent improvements to the liveintervals set (tracking
...
instructions which define each value#) to simplify and improve the coallescer.
In particular, this patch:
1. Implements iterative coallescing.
2. Reverts an unsafe hack from handlePhysRegDef, superceeding it with a
better solution.
3. Implements PR865, "coallescing" away the second copy in code like:
A = B
...
B = A
This also includes changes to symbolically print registers in intervals
when possible.
llvm-svn: 29862
2006-08-24 22:43:55 +00:00
Reid Spencer
88bbd0bcf8
Remove a FIXME. Don't use strlcpy that isn't available on non-BSD platforms
...
and ensure that a memory overrun won't occur while still writing Length
bytes in the outstring function.
llvm-svn: 29855
2006-08-24 14:25:39 +00:00
Chris Lattner
a6ad752f16
update some comments
...
llvm-svn: 29853
2006-08-24 00:21:32 +00:00
Nate Begeman
0f0148d5f8
Correctly attribute file author & remote tabs
...
llvm-svn: 29852
2006-08-23 21:33:27 +00:00
Nate Begeman
1268d6cd46
Initial checkin of the Mach-O emitter. There's plenty of fixmes, but it
...
does emit linkable .o files in very simple cases.
llvm-svn: 29850
2006-08-23 21:08:52 +00:00
Reid Spencer
71c3f66dc6
For PR797:
...
Final removal of exceptions from lib/System and adjustment of users to
accommodate.
llvm-svn: 29846
2006-08-23 20:34:57 +00:00
Reid Spencer
b702899462
Fix constructor documentation.
...
llvm-svn: 29845
2006-08-23 17:43:20 +00:00
Reid Spencer
bc4c8e8ac0
For PR797:
...
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.
llvm-svn: 29843
2006-08-23 07:30:48 +00:00
Reid Spencer
0bc83e3c5e
For PR797:
...
Remove exception throwing from Path::getDirectoryContents and its users.
llvm-svn: 29841
2006-08-23 06:56:27 +00:00
Reid Spencer
baf54399e7
For PR797:
...
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.
llvm-svn: 29840
2006-08-23 00:39:35 +00:00
Reid Spencer
45120b0798
For PR797:
...
Change the Path::make*OnDisk methods exception free and adjust their usage.
llvm-svn: 29836
2006-08-22 23:27:23 +00:00
Reid Spencer
353b72a7c0
Make the sys::Path::GetTemporaryDirectory method not throw exceptions and
...
adjust users of it to compensate.
llvm-svn: 29831
2006-08-22 19:01:30 +00:00
Chris Lattner
410c49afd3
Improve the LiveInterval class to keep track of which machine instruction
...
defines each value# tracked by the interval. This will be used to improve
coallescing.
llvm-svn: 29830
2006-08-22 18:19:46 +00:00
Reid Spencer
4e1170d5d3
Fix some indentation.
...
llvm-svn: 29825
2006-08-22 17:38:05 +00:00
Chris Lattner
a6735ae8d1
add resize, move swap out of line
...
llvm-svn: 29823
2006-08-22 17:28:57 +00:00
Reid Spencer
e9b9e6a6c2
For PR797:
...
Adjust users of MappedFile to its new non-throwing interface. Note that in
most cases the lazy step of just throwing after a call to MappedFile was
installed. This was done in the name of incremental changes. Getting rid of
the new throw statements will take adjustment of interfaces and propagation
of errors to higher levels. Those changes will come in subsequent patches.
llvm-svn: 29817
2006-08-22 16:06:27 +00:00
Reid Spencer
9fbfd7c399
For PR797:
...
Make MappedFile not throw any exceptions.
llvm-svn: 29816
2006-08-22 16:04:22 +00:00
Chris Lattner
0a5e21e28d
Switch to using smallvector for liveintervals. This speeds up live interval
...
analysis 11% on kc++.
llvm-svn: 29812
2006-08-22 06:32:56 +00:00
Chris Lattner
19d59ce917
add a bunch more operations, including swap, insert, erase, front(), and
...
bugfixes for operator=.
llvm-svn: 29811
2006-08-22 06:27:16 +00:00
Chris Lattner
2e9885371b
move LiveInterval state all together
...
llvm-svn: 29806
2006-08-21 23:15:12 +00:00
Jim Laskey
db9724d6e4
Adding new Dwarf constants.
...
llvm-svn: 29798
2006-08-21 21:18:10 +00:00
Reid Spencer
8b5b0a7fb3
For PR797:
...
Change interface for error recovery without exceptions.
llvm-svn: 29789
2006-08-21 06:00:58 +00:00
Reid Spencer
88f6824b35
Fix the documentation for this file.
...
llvm-svn: 29788
2006-08-21 05:37:03 +00:00
Reid Spencer
eb02f1c668
For PR885:
...
Consolidate the LinkAllAnalyses.h and LinkAllPasses.h headers into one
so there is no dupliation.
llvm-svn: 29787
2006-08-21 05:34:03 +00:00
Reid Spencer
5ed787710d
For PR797:
...
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.
llvm-svn: 29785
2006-08-21 02:04:43 +00:00
Chris Lattner
1bee472fca
vpkuwus didn't work, due to this typo
...
llvm-svn: 29776
2006-08-18 19:25:35 +00:00
Reid Spencer
c7c0e6c6ef
For PR797:
...
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.
llvm-svn: 29763
2006-08-18 08:43:06 +00:00
Chris Lattner
db290f7479
Constify some methods. Patch provided by Anton Vayvod, thanks!
...
llvm-svn: 29756
2006-08-17 22:00:08 +00:00
Chris Lattner
a2eba83561
switch the SUnit pred/succ sets from being std::sets to being smallvectors.
...
This reduces selectiondag time on kc++ from 5.43s to 4.98s (9%). More
significantly, this speeds up the default ppc scheduler from ~1571ms to 1063ms,
a 33% speedup.
llvm-svn: 29743
2006-08-17 00:09:56 +00:00
Chris Lattner
c0e2997872
add an accessor
...
llvm-svn: 29739
2006-08-16 22:57:08 +00:00
Chris Lattner
1e0b221fb2
Convert vector to smallvector: 4% speedup.
...
llvm-svn: 29735
2006-08-16 22:12:48 +00:00
Chris Lattner
402986c13f
silence a warning.
...
llvm-svn: 29734
2006-08-16 22:09:24 +00:00
Chris Lattner
c1654416d6
Change the use_list to be a smallvector instead of a vector. This reduces
...
isel time from 6.79s to 5.53s (22%) on kc++ with a release build on ppc.
Go smallvector! :)
llvm-svn: 29731
2006-08-16 21:01:10 +00:00
Chris Lattner
cccfd59edf
add a way to have multiple modules in a JIT :)
...
llvm-svn: 29723
2006-08-16 02:53:27 +00:00
Chris Lattner
1eabe5fb58
initial changes to support JIT'ing from multiple module providers, implicitly
...
linking the program on the fly.
llvm-svn: 29721
2006-08-16 01:24:12 +00:00
Chris Lattner
2cd25d1642
Bugfixes for smallvector when the element size is small and N is small.
...
llvm-svn: 29720
2006-08-16 01:23:31 +00:00
Chris Lattner
cb3adb8225
Start using SDVTList more consistently
...
llvm-svn: 29711
2006-08-15 19:11:05 +00:00
Chris Lattner
ff1826e850
add a new SDVTList type and new SelectionDAG::getVTList methods to streamline
...
the creation of canonical VTLists.
llvm-svn: 29709
2006-08-15 17:46:01 +00:00
Chris Lattner
28369b8d7d
Make getNodeValueTypes methods public.
...
llvm-svn: 29688
2006-08-14 23:54:24 +00:00
Chris Lattner
8e8d9a3358
Add a new getNode() method that takes a pointer to an already-intern'd list
...
of value-type nodes. This avoids having to do mallocs for std::vectors of
valuetypes when a node returns more than one type.
llvm-svn: 29685
2006-08-14 23:31:51 +00:00
Devang Patel
91349ea154
Avoid extra string copy.
...
llvm-svn: 29684
2006-08-14 23:27:36 +00:00
Devang Patel
c97ee74e6a
Use mangler, instead of addUnderscore(), to get mangled name.
...
Now, LLVMSymbol keeps symbol original name and mangled name.
llvm-svn: 29679
2006-08-14 22:36:16 +00:00
Chris Lattner
9ff7eb17e0
remove SelectionDAG::InsertISelMapEntry, it is dead
...
llvm-svn: 29677
2006-08-14 22:24:39 +00:00
Chris Lattner
fe1fd00ce8
Add code to resize the CSEMap hash table. This doesn't speedup codegen of
...
kimwitu, but seems like a good idea from a "avoid performance cliffs" standpoint :)
llvm-svn: 29675
2006-08-14 22:19:25 +00:00
Chris Lattner
67305e3cf6
avoid a warning
...
llvm-svn: 29674
2006-08-14 21:47:50 +00:00
Nate Begeman
0e92042770
Emit .set directives for jump table entries when possible, which reduces
...
the number of relocations in object files, shrinkifying them.
llvm-svn: 29650
2006-08-12 21:29:52 +00:00
Chris Lattner
7d59e9d16c
Track # nodes in a CSEMap.
...
llvm-svn: 29643
2006-08-12 01:07:51 +00:00
Chris Lattner
5510fa4ac5
Switch NodeID to track 32-bit chunks instead of 8-bit chunks, for a 2.5%
...
speedup in isel time.
llvm-svn: 29640
2006-08-11 23:55:53 +00:00
Chris Lattner
4966686ef8
remove IncludeFile turds in MathExtras.h, which bloats every .o file that
...
#includes it.
llvm-svn: 29639
2006-08-11 23:52:54 +00:00
Chris Lattner
870808beda
move code out of line so that GCC doesn't inline it at -O3
...
llvm-svn: 29636
2006-08-11 23:40:23 +00:00
Chris Lattner
6c9bcb32a3
Split SmallVector into SmallVector and SmallVectorImpl, which allows us to
...
eliminate code duplication due to the 'N' parameter.
llvm-svn: 29634
2006-08-11 23:19:51 +00:00
Chris Lattner
a271f8f58c
Remove 8 more std::map's.
...
llvm-svn: 29631
2006-08-11 21:55:30 +00:00
Chris Lattner
173c5fb3f3
remove old piece of the V9 backend.
...
llvm-svn: 29628
2006-08-11 21:11:35 +00:00
Chris Lattner
c3f78d1407
Start moving leaf nodes over to the CSEMap.
...
llvm-svn: 29625
2006-08-11 21:00:46 +00:00
Chris Lattner
c3def8c8f4
new method for adding ints
...
llvm-svn: 29622
2006-08-11 18:53:44 +00:00
Chris Lattner
3c504c013b
eliminate the NullaryOps map, use CSEMap instead.
...
llvm-svn: 29621
2006-08-11 18:38:11 +00:00
Chris Lattner
d154649343
Change one ReplaceAllUsesWith method to take an array of operands to replaceinstead of a vector of operands.
...
llvm-svn: 29617
2006-08-11 17:46:44 +00:00