Chris Lattner
0505c89e9c
allow functions and modules to have an explicit alignment
...
llvm-svn: 24209
2005-11-06 06:44:42 +00:00
Chris Lattner
cfaf9f14c0
add an accessor
...
llvm-svn: 24201
2005-11-05 21:58:30 +00:00
Nate Begeman
f299b9fb03
Add support alignment of allocation instructions.
...
Add support for specifying alignment and size of setjmp jmpbufs.
No targets currently do anything with this information, nor is it presrved
in the bytecode representation. That's coming up next.
llvm-svn: 24196
2005-11-05 09:21:28 +00:00
Jeff Cohen
16669485c1
<cassert> no longer required to make VC++ happy.
...
llvm-svn: 24177
2005-11-04 02:59:16 +00:00
Duraid Madina
feeaabd6f1
change NULL to 0, unbreaks the ppc target when building on ia64
...
llvm-svn: 24176
2005-11-04 01:45:04 +00:00
Jim Laskey
42681c1d58
1. Remove ranges from itinerary data.
...
2. Tidy up the subtarget emittined code.
llvm-svn: 24172
2005-11-03 22:47:41 +00:00
Jeff Cohen
ae39880d3a
Keep VC++ happy.
...
llvm-svn: 24148
2005-11-02 04:03:16 +00:00
Jim Laskey
4cb1e29b27
Allow itineraries to be passed through the Target Machine.
...
llvm-svn: 24139
2005-11-01 20:06:59 +00:00
Chris Lattner
dae0aafea8
Remove the LowerConstantExpressionsPass pass
...
llvm-svn: 24089
2005-10-29 05:32:20 +00:00
Chris Lattner
3736ba002f
remove a dead header
...
llvm-svn: 24084
2005-10-29 04:43:10 +00:00
Jim Laskey
03f8b2a366
Structures used to hold scheduling information.
...
llvm-svn: 24049
2005-10-27 18:18:05 +00:00
John Criswell
0893d5847f
Move some constant folding functions into LLVMAnalysis since they are used
...
by Analysis and Transformation passes.
llvm-svn: 24038
2005-10-27 16:00:10 +00:00
Jeff Cohen
ca14516b15
Fix comment.
...
llvm-svn: 24004
2005-10-26 15:02:21 +00:00
Jeff Cohen
342597c279
Eliminate use of sed in Visual Studio builds.
...
llvm-svn: 24003
2005-10-26 14:48:53 +00:00
Chris Lattner
4ab26b20b7
Add a method
...
llvm-svn: 23989
2005-10-25 21:02:21 +00:00
Chris Lattner
6d5166d861
Remove some dead argument names which irritates GCC at certain warning levels.
...
llvm-svn: 23979
2005-10-25 17:59:28 +00:00
Chris Lattner
71195650ea
Add a missing Module::setTargetTriple method.
...
Remove Function::aiterator and Module::giterator typedefs (and const versions)
as they should have been removed when abegin/gbegin were removed. Thanks to
alkis for bringing this to my attn.
llvm-svn: 23978
2005-10-25 17:58:00 +00:00
Jim Laskey
b377b32a58
Preparation of supporting scheduling info. Need to find info based on selected
...
CPU.
llvm-svn: 23974
2005-10-25 15:15:28 +00:00
Chris Lattner
b299faa5c1
Move the END_WITH_NULL marker. Vladimir suggests that this works better with
...
GCC 4.1. I tried it with 4.0 and 3.3 and it seems fine.
llvm-svn: 23957
2005-10-24 05:03:46 +00:00
Chris Lattner
1245463d22
Remove a prototype
...
llvm-svn: 23951
2005-10-24 04:13:21 +00:00
Chris Lattner
8a287bab72
This pass is very old and quite useless, remove it.
...
llvm-svn: 23946
2005-10-24 02:35:24 +00:00
Chris Lattner
bd6a973ae0
Don't link these three passes in anymore
...
llvm-svn: 23941
2005-10-24 02:30:25 +00:00
Chris Lattner
48f3be3f64
add a proto
...
llvm-svn: 23923
2005-10-24 01:00:32 +00:00
Chris Lattner
b035470bae
new header
...
llvm-svn: 23921
2005-10-24 00:59:49 +00:00
Chris Lattner
1cb80df69b
add some prototypes
...
llvm-svn: 23919
2005-10-24 00:38:25 +00:00
Chris Lattner
2f752062c1
Don't invade the system namespace
...
llvm-svn: 23917
2005-10-24 00:16:03 +00:00
Chris Lattner
31ac6df518
There is no need for this to be VC++ only
...
llvm-svn: 23915
2005-10-24 00:08:51 +00:00
Jeff Cohen
dda264c50a
Work around GCC's dislike of attributes on function definitions.
...
llvm-svn: 23896
2005-10-23 15:22:50 +00:00
Chris Lattner
79ea8acebc
Move static functions to .cpp file, reduce #includes, pass strings by
...
const&.
llvm-svn: 23890
2005-10-23 05:25:19 +00:00
Jeff Cohen
a38c737e85
When a function takes a variable number of pointer arguments, with a zero
...
pointer marking the end of the list, the zero *must* be cast to the pointer
type. An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.
The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.
llvm-svn: 23888
2005-10-23 04:37:20 +00:00
Andrew Lenharth
9fad56d2d2
add TargetExternalSymbol
...
llvm-svn: 23886
2005-10-23 03:40:17 +00:00
Chris Lattner
610724aedd
add missing prototype
...
llvm-svn: 23867
2005-10-21 15:49:28 +00:00
Nate Begeman
6c42f509bc
Invert the TargetLowering flag that controls divide by consant expansion.
...
Add a new flag to TargetLowering indicating if the target has really cheap
signed division by powers of two, make ppc use it. This will probably go
away in the future.
Implement some more ISD::SDIV folds in the dag combiner
Remove now dead code in the x86 backend.
llvm-svn: 23853
2005-10-21 00:02:42 +00:00
Chris Lattner
ca5f516c08
add a new method
...
llvm-svn: 23840
2005-10-20 07:37:59 +00:00
Nate Begeman
2b0b27775d
Enable targets to say that integer divide is expensive, which will trigger
...
an upcoming optimization in the DAG Combiner.
llvm-svn: 23834
2005-10-20 02:14:14 +00:00
Chris Lattner
dac26c2440
Make this work with the internalize change
...
llvm-svn: 23812
2005-10-19 01:41:47 +00:00
Nate Begeman
ee581735d9
Add the ability to lower return instructions to TargetLowering. This
...
allows us to lower legal return types to something else, to meet ABI
requirements (such as that i64 be returned in two i32 regs on Darwin/ppc).
llvm-svn: 23802
2005-10-18 23:23:37 +00:00
Chris Lattner
211f996c92
add an option to the internalize pass
...
llvm-svn: 23782
2005-10-18 06:28:16 +00:00
Chris Lattner
26f6c4de3d
Fix errors when compiling with -pedantic
...
llvm-svn: 23719
2005-10-14 00:33:05 +00:00
Nate Begeman
b49e7aa166
SimplifySelectCC is dead
...
llvm-svn: 23705
2005-10-13 03:10:46 +00:00
Chris Lattner
2800856064
remove a comma to compile with pedantic gcc
...
llvm-svn: 23667
2005-10-08 01:24:19 +00:00
Jeff Cohen
3151f1ba38
Remove prolific source of VC++ truncation warnings.
...
llvm-svn: 23657
2005-10-07 05:29:25 +00:00
Chris Lattner
bc5ae03dea
add a helper class
...
llvm-svn: 23633
2005-10-05 06:34:34 +00:00
Chris Lattner
536a465ceb
Change the signature of replaceUsesOfWithOnConstant to take a Use* and not
...
take the bool. The bool is always true dynamically.
llvm-svn: 23625
2005-10-04 18:12:13 +00:00
Chris Lattner
4bb574585f
Fix case of path
...
llvm-svn: 23605
2005-10-03 03:32:39 +00:00
Chris Lattner
3a47224042
This member can be const too
...
llvm-svn: 23600
2005-10-03 00:21:25 +00:00
Chris Lattner
b19d4e5584
Expose the actual valuetype of each register class
...
llvm-svn: 23583
2005-10-02 06:23:19 +00:00
Chris Lattner
9c069d09a5
Annotate nodes with their addresses if a graph requests it.
...
This is Jim's feature implemented so that graphs could 'opt-in' and get
this behavior. This is currently used by selection dags.
llvm-svn: 23576
2005-10-01 00:19:21 +00:00
Chris Lattner
2a439615b7
add a method
...
llvm-svn: 23575
2005-10-01 00:17:07 +00:00
Jim Laskey
7dcadb97aa
Reverting change moving to selection dag graph.
...
llvm-svn: 23568
2005-09-30 19:33:41 +00:00
Jim Laskey
1c928ba21a
Added allnodes_size for scheduling support.
...
llvm-svn: 23567
2005-09-30 19:27:01 +00:00
Jim Laskey
35efa80550
Add the node name (thus the address) to node label.
...
llvm-svn: 23565
2005-09-30 19:11:53 +00:00
Chris Lattner
c744d9398f
Rename MRegisterDesc -> TargetRegisterDesc for consistency
...
llvm-svn: 23564
2005-09-30 17:49:27 +00:00
Chris Lattner
6124aae803
trim down the target info structs now that we have a preferred spill register class for each callee save register
...
llvm-svn: 23560
2005-09-30 17:35:22 +00:00
Chris Lattner
18454e037b
expose a new virtual method
...
llvm-svn: 23555
2005-09-30 07:06:37 +00:00
Chris Lattner
ec85d13393
Change these methods to take RC's
...
llvm-svn: 23535
2005-09-30 01:28:14 +00:00
Chris Lattner
9a2fb006e4
Add FP versions of the binary operators, keeping the int and fp worlds seperate.
...
llvm-svn: 23506
2005-09-28 22:29:58 +00:00
Chris Lattner
62922d5727
Add a new flag for targets where setjmp/longjmp saves/restores the signal mask,
...
and _setjmp/_longjmp should be used instead (for llvm.setjmp/llvm.longjmp).
llvm-svn: 23479
2005-09-27 22:13:36 +00:00
Chris Lattner
dbef366ea5
allow demotion to volatile values
...
llvm-svn: 23472
2005-09-27 19:38:43 +00:00
Chris Lattner
96f29dbdbe
Make this slightly more efficient by pushing actual type information down
...
into the evaluator. This shrinks a release build of instcombine's text
section from 216363 to 215975 bytes (on PPC).
llvm-svn: 23468
2005-09-27 06:38:05 +00:00
Chris Lattner
92616caa1a
Split SimpleConstantVal up into its components, so each Constant subclass gets
...
a different enum value. This allows 'classof' for these to be really simple,
not needing to call getType() anymore.
This speeds up isa/dyncast/etc for constants, and also makes them smaller.
For example, the text section of a release build of InstCombine.cpp shrinks
from 230037 bytes to 216363 bytes, a 6% reduction.
llvm-svn: 23466
2005-09-27 06:08:32 +00:00
Chris Lattner
2a5d66d0e1
add a new function
...
llvm-svn: 23443
2005-09-26 05:26:32 +00:00
Chris Lattner
808a5d8750
Add long-overdue helpers for getting constants with known upper bits
...
llvm-svn: 23426
2005-09-24 22:57:28 +00:00
Chris Lattner
830b7b7f9a
change proto slightly
...
llvm-svn: 23420
2005-09-24 08:23:53 +00:00
Chris Lattner
288e5b0a7d
Expose the LiveInterval interfaces as public headers.
...
llvm-svn: 23400
2005-09-21 04:19:09 +00:00
Chris Lattner
e8cb4e7356
add a new callback
...
llvm-svn: 23373
2005-09-17 01:02:45 +00:00
Chris Lattner
f3471861a6
new method
...
llvm-svn: 23314
2005-09-12 17:03:16 +00:00
Chris Lattner
b68c833b48
Add a new argument to ReplaceAllUsesWith to keep track of nodes deleted by
...
this method
llvm-svn: 23254
2005-09-07 05:36:18 +00:00
Chris Lattner
7862cff120
add a map for nullary ops
...
llvm-svn: 23223
2005-09-02 19:35:42 +00:00
Jim Laskey
1f9c40400c
Add help support for -mcpu and -mattr.
...
llvm-svn: 23222
2005-09-02 19:27:43 +00:00
Chris Lattner
49eef12127
Move a bunch of non-deprecated methods above the "deprecated line"
...
llvm-svn: 23216
2005-09-02 18:16:20 +00:00
Jeff Cohen
930e81f03b
Fix VC++ build errors
...
llvm-svn: 23210
2005-09-02 02:51:42 +00:00
Chris Lattner
a0ac88861d
Add a new ANY_EXTEND node, which operates like an extension but has undefined
...
top bits.
llvm-svn: 23200
2005-09-02 00:14:40 +00:00
Jim Laskey
f32ef9a37f
1. Use SubtargetFeatures in llc/lli.
...
2. Propagate feature "string" to all targets.
3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.
llvm-svn: 23192
2005-09-01 21:38:21 +00:00
Jim Laskey
09a731071f
This new class provides support for platform specific "features". The intent
...
is to manage processor specific attributes from the command line. See examples
of use in llc/lli and PowerPCTargetSubtarget.
llvm-svn: 23191
2005-09-01 21:36:18 +00:00
Nate Begeman
be2fa8f86f
First pass at the DAG Combiner. It isn't used anywhere yet, but it should
...
be mostly functional. It currently has all folds from SelectionDAG.cpp
that do not involve a condition code.
llvm-svn: 23184
2005-09-01 00:19:25 +00:00
Chris Lattner
ed58907fa3
remove an inappropriate comment
...
llvm-svn: 23182
2005-08-31 22:49:51 +00:00
Nate Begeman
5ad0e12280
Add support for count trailing zeroes, and population count. These are
...
needed for folding constants in the upcoming dag combiner.
llvm-svn: 23163
2005-08-31 00:25:01 +00:00
Chris Lattner
b06ce2e026
Allow physregs to occur in the dag with multiple types. Though I don't like
...
this, it is a requirement on PPC, which can have an f32 value in r3 at one
point in a function and a f64 value in r3 at another point. :(
llvm-svn: 23160
2005-08-30 22:38:05 +00:00
Nate Begeman
f279937fd9
Add AssertSext, AssertZext nodes for targets that pass arguments in
...
registers, and the incoming values have already been zero or sign extended
from the appopriate type to the register width.
llvm-svn: 23146
2005-08-30 02:39:32 +00:00
Chris Lattner
d6753aa388
add some method variants
...
llvm-svn: 23142
2005-08-30 01:56:13 +00:00
Chris Lattner
1a17dba9d1
improve comment
...
llvm-svn: 23134
2005-08-29 22:48:32 +00:00
Chris Lattner
05f6bb1b68
Add a new API for nate
...
llvm-svn: 23132
2005-08-29 22:00:00 +00:00
Reid Spencer
31b20389f9
Change the names of member variables per Chris' instructions, and document
...
them more clearly.
llvm-svn: 23118
2005-08-27 19:09:02 +00:00
Reid Spencer
71966308fc
Fix a typo.
...
llvm-svn: 23117
2005-08-27 19:06:05 +00:00
Chris Lattner
e91069c4de
add some forward defs
...
llvm-svn: 23100
2005-08-26 21:06:40 +00:00
Chris Lattner
ac19224b29
spell this right!
...
llvm-svn: 23097
2005-08-26 20:53:44 +00:00
Chris Lattner
98bd9339ce
Add a hook
...
llvm-svn: 23096
2005-08-26 20:53:09 +00:00
Chris Lattner
fd72abe85b
Add a new instruction flag
...
llvm-svn: 23093
2005-08-26 20:31:24 +00:00
Chris Lattner
25b6e62a46
Add a new version of ReplaceAllUsesWith, make the comments more useful.
...
llvm-svn: 23086
2005-08-26 18:35:58 +00:00
Chris Lattner
a31708e6b3
Change ConstantPoolSDNode to actually hold the Constant itself instead of
...
putting it into the constant pool. This allows the isel machinery to
create constants that it will end up deciding are not needed, without them
ending up in the resultant function constant pool.
llvm-svn: 23081
2005-08-26 17:15:30 +00:00
Chris Lattner
929c00e9e9
Fix a huge annoyance: SelectNodeTo took types before the opcode unlike
...
every other SD API. Fix it to take the opcode before the types.
llvm-svn: 23079
2005-08-26 16:36:26 +00:00
Jim Laskey
a841c4183a
Change unsigned lng to unsigned.
...
llvm-svn: 23077
2005-08-26 09:24:46 +00:00
Jim Laskey
236ef88c39
Added cl::bits option type (bit vectors). See "Collecting options as a set
...
of flags" in the Command Line doc.
llvm-svn: 23067
2005-08-25 23:31:45 +00:00
Chris Lattner
70cc927742
add a method
...
llvm-svn: 23049
2005-08-25 17:24:09 +00:00
Chris Lattner
713643bc71
add an enum value
...
llvm-svn: 23048
2005-08-25 17:07:09 +00:00
Jim Laskey
4878a218a4
Recommended to use std::algorithms instead.
...
llvm-svn: 23046
2005-08-25 16:21:56 +00:00
Jim Laskey
86cc9d4550
Added support for generic linear/binary search.
...
llvm-svn: 23044
2005-08-25 13:32:25 +00:00
Chris Lattner
165fcbcd64
Fix a problem Duraid noticed, where we weren't removing values from the kills
...
list when doing two-address and phi node lowering during register allocation.
llvm-svn: 23043
2005-08-25 05:45:31 +00:00
Chris Lattner
70cb011425
Add support for TargetConstantPool node
...
llvm-svn: 23040
2005-08-25 05:02:41 +00:00
Chris Lattner
813f6ddaf8
add a new TargetFrameIndex node
...
llvm-svn: 23035
2005-08-25 00:43:01 +00:00
Chris Lattner
22c6c99e5d
add a method
...
llvm-svn: 23027
2005-08-24 23:00:29 +00:00
Chris Lattner
79191b194f
add two new methods
...
llvm-svn: 23024
2005-08-24 22:43:53 +00:00
Chris Lattner
b71b78a79d
rename hasNativeSupportFor* -> is(Operation|Type)Legal.
...
llvm-svn: 23011
2005-08-24 16:34:59 +00:00
Misha Brukman
14a6b6e354
Wrap long lines
...
llvm-svn: 23009
2005-08-24 14:03:07 +00:00
Reid Spencer
124828d796
Remove some tabs.
...
Wrap a line.
llvm-svn: 23008
2005-08-24 10:57:30 +00:00
Reid Spencer
a1470f81ae
For PR616:
...
These patches make threading optional in LLVM. The configuration scripts are now
modified to accept a --disable-threads switch. If this is used, the Mutex class
will be implemented with all functions as no-op. Furthermore, linking against
libpthread will not be done. Finally, the ParallelJIT example needs libpthread
so its makefile was changed to always add -lpthread to the link line.
llvm-svn: 23003
2005-08-24 10:07:20 +00:00
Chris Lattner
180f2050d0
Keep the killed/dead sets sorted, so that "KillsRegister" can do a quick
...
binary search to test for membership. This speeds up LLC a bit more on KC++,
e.g. on itanium from 16.6974s to 14.8272s, PPC from 11.4926s to 10.7089s and
X86 from 10.8128s to 9.7943s, with no difference in generated code (like all
of the RA patches).
With these changes, isel is the slowest pass for PPC/X86, but linscan+live
intervals is still > 50% of the compile time for itanium. More work could
be done, but this is the last for now.
llvm-svn: 22993
2005-08-24 00:09:02 +00:00
Chris Lattner
3bb878f134
Change live variables from using multimaps to using maps of vectors and
...
rearrange some of the accessors to be more efficient.
This makes it much more efficient to iterate over all of the things with the
same value. This speeds up liveintervals analysis from 8.63s to 3.79s with
a release build of llc on kc++ with -march=ia64. This also speeds up live
var from 1.66s -> 0.87s as well, reducing total llc time from 20.1s->15.2s.
This also speeds up other targets slightly, e.g. llc time on X86 from 16.84
-> 16.45s, and PPC from 17.64->17.03s.
llvm-svn: 22990
2005-08-23 23:40:41 +00:00
Chris Lattner
f91a79a306
Add RegisterDefIsDead to correspond to KillsRegister, mark both const
...
llvm-svn: 22987
2005-08-23 22:43:24 +00:00
Chris Lattner
a6da5575c8
add a method
...
llvm-svn: 22985
2005-08-23 21:45:31 +00:00
Chris Lattner
a51be5a84c
add a method
...
llvm-svn: 22958
2005-08-21 22:30:42 +00:00
Chris Lattner
5c82be2ffc
ADd a method
...
llvm-svn: 22954
2005-08-21 19:48:53 +00:00
Chris Lattner
d76cf28d13
Add 5-operand version of SelectNodeTo
...
llvm-svn: 22950
2005-08-21 18:49:58 +00:00
Chris Lattner
0c4565bf91
ADd support for TargetGlobalAddress nodes
...
llvm-svn: 22939
2005-08-19 22:31:34 +00:00
Chris Lattner
6fcfaee2fc
Add a new field to TargetInstrDescriptor for tracking information about
...
operands.
llvm-svn: 22908
2005-08-19 16:56:26 +00:00
Nate Begeman
0966f7d0b9
Add support for target nodes with more than 3 operands, required by ppc
...
llvm-svn: 22894
2005-08-19 00:56:28 +00:00
Nate Begeman
a978ae8b7d
Remove the X86 and PowerPC Simple instruction selectors; their time has
...
passed.
llvm-svn: 22886
2005-08-18 23:53:15 +00:00
Chris Lattner
2e3f21c27f
add a method
...
llvm-svn: 22867
2005-08-18 18:44:33 +00:00
Nate Begeman
474ec3c02d
Add support for target DAG nodes that take 4 operands, such as PowerPC's
...
rlwinm.
llvm-svn: 22856
2005-08-18 07:30:15 +00:00
Jim Laskey
b45eb1e518
include/llvm/Support/MathExtras.h
...
llvm-svn: 22846
2005-08-17 23:54:12 +00:00
Nate Begeman
50efb750b6
Add two new methods isTargetOpcode() which returns true if the node type
...
is greater than the range of building selection dag node types, and
getTargetOpcode(), which returns the node opcode less the value of
isd::builtin_op_end, which specifies the end of the builtin types.
llvm-svn: 22844
2005-08-17 23:44:54 +00:00
Jim Laskey
d761e8859d
Move the code dependency for MathExtras.h from SelectionDAGNodes.h.
...
Added some class dividers in SelectionDAG.cpp.
llvm-svn: 22841
2005-08-17 20:08:02 +00:00
Jim Laskey
5f57048c62
Move code dependency for MathExtras.h out of Constants.h.
...
llvm-svn: 22840
2005-08-17 20:06:22 +00:00
Jim Laskey
61e3d7bca5
Culling out use of unions for converting FP to bits and vice versa.
...
llvm-svn: 22838
2005-08-17 19:34:49 +00:00
Chris Lattner
14518a342f
add ReplaceAllUsesWith, and a helper to implemented it
...
llvm-svn: 22833
2005-08-17 18:59:17 +00:00
Chris Lattner
1e93590d9f
Make removeUser more efficient, add a matching addUser.
...
Fix the setOperands methods I added to update use/def information correctly.
llvm-svn: 22832
2005-08-17 18:58:38 +00:00
Jim Laskey
f183efcfa2
Added support for converting raw bits to FP, and FP to raw bits. The intent
...
is to avoid the distraction of the union declarations.
llvm-svn: 22830
2005-08-17 17:27:47 +00:00
Chris Lattner
d3add16ed6
This was moved to the .cpp file
...
llvm-svn: 22827
2005-08-17 06:46:50 +00:00
Chris Lattner
1fc1d60d5a
add a helper
...
llvm-svn: 22823
2005-08-17 06:34:37 +00:00
Chris Lattner
dd99fbadb7
make sure to remove a node from the use list of its operands when we replace
...
it.
llvm-svn: 22820
2005-08-17 01:54:00 +00:00
Chris Lattner
3895acdb6a
add some helper methods, and a new TargetConstant node, which is not
...
subjected to folding.
llvm-svn: 22812
2005-08-17 00:33:30 +00:00
Chris Lattner
9838157648
remove a dead enum value, making a comment above correct again
...
llvm-svn: 22810
2005-08-16 22:04:58 +00:00
Chris Lattner
3b7e157005
Eliminate the RegSDNode class, which 3 nodes (CopyFromReg/CopyToReg/ImplicitDef)
...
used to tack a register number onto the node.
Instead of doing this, make a new node, RegisterSDNode, which is a leaf
containing a register number. These three operations just become normal
DAG nodes now, instead of requiring special handling.
Note that with this change, it is no longer correct to make illegal
CopyFromReg/CopyToReg nodes. The legalizer will not touch them, and this
is bad, so don't do it. :)
llvm-svn: 22806
2005-08-16 21:55:35 +00:00
Nate Begeman
f6b6378f23
Implement BR_CC and BRTWOWAY_CC. This allows the removal of a rather nasty
...
fixme from the PowerPC backend. Emit slightly better code for legalizing
select_cc.
llvm-svn: 22805
2005-08-16 19:49:35 +00:00
Chris Lattner
c93a92c951
allow passing a dag into getOperationName and dump
...
llvm-svn: 22803
2005-08-16 18:32:18 +00:00
Chris Lattner
0b9933e14b
add some methods for dag->dag isel
...
llvm-svn: 22800
2005-08-16 18:16:24 +00:00
Nate Begeman
021a5b3fe1
Remove an unncessary argument to SimplifySelectCC and add an additional
...
assert when creating a select_cc node.
llvm-svn: 22780
2005-08-13 06:14:17 +00:00
Nate Begeman
4e8f777256
Fix the fabs regression on x86 by abstracting the select_cc optimization
...
out into SimplifySelectCC. This allows both ISD::SELECT and ISD::SELECT_CC
to use the same set of simplifying folds.
llvm-svn: 22779
2005-08-13 06:00:21 +00:00
Chris Lattner
879c4db070
add a helper method
...
llvm-svn: 22767
2005-08-12 22:13:27 +00:00
Nate Begeman
206e850add
Some SELECT_CC cleanups:
...
1. move assertions for node creation to getNode()
2. legalize the values returned in ExpandOp immediately
3. Move select_cc optimizations from SELECT's getNode() to SELECT_CC's,
allowing them to be cleaned up significantly.
This paves the way to pick up additional optimizations on SELECT_CC, such
as sum-of-absolute-differences.
llvm-svn: 22757
2005-08-11 01:12:20 +00:00
Nate Begeman
eddc9d4856
Add new node, SELECT_CC. This node is for targets that don't natively
...
implement SELECT.
llvm-svn: 22755
2005-08-10 20:51:12 +00:00
Chris Lattner
7597afd2b5
add two helper methods
...
llvm-svn: 22735
2005-08-09 23:36:18 +00:00
Chris Lattner
40937543ee
I can't believe I caught this before Misha! :)
...
llvm-svn: 22733
2005-08-09 23:08:53 +00:00
Chris Lattner
0fa4402b59
Eliminate the SetCCSDNode in favor of a CondCodeSDNode class. This pulls the
...
CC out of the SetCC operation, making SETCC a standard ternary operation and
CC's a standard DAG leaf. This will make it possible for other node to use
CC's as operands in the future...
llvm-svn: 22728
2005-08-09 20:20:18 +00:00
Chris Lattner
cb28e2f105
add a new helper method
...
llvm-svn: 22697
2005-08-08 05:21:33 +00:00
Chris Lattner
feb0442901
Since getSubtarget() always provides a const Subtarget, dont' require the user
...
to pass it in. Also, since it always returns a non-null pointer, make it
return a reference instead for easier use.
llvm-svn: 22686
2005-08-05 21:53:21 +00:00
Chris Lattner
752c3e7b35
Mark hasConstantValue as a const method
...
llvm-svn: 22666
2005-08-05 00:49:06 +00:00
Nate Begeman
7547f4085b
Add an extra parameter that Chris requested
...
llvm-svn: 22665
2005-08-04 23:50:43 +00:00
Nate Begeman
ef41400067
Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into
...
BasicBlock's removePredecessor routine. This requires shuffling around
the definition and implementation of hasContantValue from Utils.h,cpp into
Instructions.h,cpp
llvm-svn: 22664
2005-08-04 23:24:19 +00:00
Chris Lattner
b2f675c588
Fix an obvious bug in the Log2 stuff that broke SingleSource/UnitTests/2005-05-12-Int64ToFP
...
last night.
llvm-svn: 22630
2005-08-03 20:53:19 +00:00
Chris Lattner
42474809e3
Wrap comments to 80 cols, fix code sequence for CountLeadingZeros_64 on
...
non-ppc GCC 4.0 machines. Patch by Jim Laskey!
llvm-svn: 22618
2005-08-03 16:53:58 +00:00
Chris Lattner
260411fd9f
Fix another bug in the clz patch that caused miscompilations when !gcc4
...
llvm-svn: 22616
2005-08-03 01:04:40 +00:00
Chris Lattner
420424b477
Fix the non-gcc 4.0 paths for countleadingzeros
...
Patch fixed by Jim Laskey
llvm-svn: 22598
2005-08-02 20:21:33 +00:00
Chris Lattner
4b86bc6f31
Fix inverted conditionals
...
llvm-svn: 22597
2005-08-02 20:06:18 +00:00
Chris Lattner
a9994bf67a
Fix the non-gcc 4.0 path to compile
...
llvm-svn: 22593
2005-08-02 19:21:51 +00:00
Chris Lattner
eed3c76305
Consolidate all of the various log2 computing functions into MathExtras.h.
...
Also, provide accelerated implementations when building with GCC.
Patch contributed by Jim Laskey!
llvm-svn: 22591
2005-08-02 19:15:30 +00:00
Jeff Cohen
82a6b596d0
Implement SetInterruptFunction for Windows.
...
llvm-svn: 22582
2005-08-02 03:04:47 +00:00
Chris Lattner
4558fc8536
add a new function proto
...
llvm-svn: 22577
2005-08-02 02:13:42 +00:00
Chris Lattner
367080bfc2
Mark these as V9 specific
...
llvm-svn: 22572
2005-08-01 20:38:31 +00:00
Jeff Cohen
019104459d
Keep tabs and trailing spaces out.
...
llvm-svn: 22565
2005-07-30 18:33:25 +00:00
Nate Begeman
0d1a7b6737
Break SCEVExpander out of IndVarSimplify into its own .h/.cpp file so that
...
other passes may use it.
llvm-svn: 22557
2005-07-30 00:12:19 +00:00
Andrew Lenharth
d8bfbd99e9
support near allocations for the JIT
...
llvm-svn: 22554
2005-07-29 23:40:16 +00:00
Andrew Lenharth
f623af9b64
new is not a valid default anywhere, so make this pure virtual
...
llvm-svn: 22542
2005-07-28 18:13:59 +00:00
Andrew Lenharth
02e0c80ecb
Like constants, globals on some platforms are GOT relative. This means they have to be allocated
...
near the GOT, which new doesn't do. So break out the allocate into a new function.
Also move GOT index handling into JITResolver. This lets it update the mapping when a Lazy
function is JITed. It doesn't managed the table, just the mapping. Note that this is
still non-ideal, as any function that takes a function address should also take a GOT
index, but that is a lot of changes. The relocation resolve process updates any GOT entry
it sees is out of date.
llvm-svn: 22537
2005-07-28 12:44:13 +00:00
Jeff Cohen
2894295331
Please do not reintroduce tabs.
...
llvm-svn: 22531
2005-07-28 02:04:44 +00:00
Reid Spencer
e82a9e2218
Fix PR608:
...
Previously the script assumed the version number was the last field, now
it assumes it is the first sequence of digits.
llvm-svn: 22527
2005-07-27 21:58:38 +00:00
Jeff Cohen
81980781a1
Eliminate tabs and trailing spaces.
...
llvm-svn: 22520
2005-07-27 05:53:44 +00:00
Andrew Lenharth
8fc535e9bd
allow constants to be relocated like GV (necessary for alpha, as constants are relocated with globals, not with .text), and allow targets to have a GOT managed for them
...
llvm-svn: 22496
2005-07-22 20:46:42 +00:00
Reid Spencer
40c5ebe4eb
For: memory operations -> stores
...
This is the first incremental patch to implement this feature. It adds no
functionality to LLVM but setup up the information needed from targets in
order to implement the optimization correctly. Each target needs to specify
the maximum number of store operations for conversion of the llvm.memset,
llvm.memcpy, and llvm.memmove intrinsics into a sequence of store operations.
The limit needs to be chosen at the threshold of performance for such an
optimization (generally smallish). The target also needs to specify whether
the target can support unaligned stores for multi-byte store operations.
This helps ensure the optimization doesn't generate code that will trap on
an alignment errors.
More patches to follow.
llvm-svn: 22468
2005-07-19 04:52:44 +00:00
Chris Lattner
5aed419b6d
Add two helper methods, adjust a prototype
...
llvm-svn: 22456
2005-07-16 17:40:34 +00:00
Chris Lattner
e40a414500
Add ability to set TYPE and FLAGS field for section trivially
...
llvm-svn: 22454
2005-07-16 17:35:26 +00:00
Chris Lattner
40fbf63df8
Major refactor of the ELFWriter code. Instead of building up one big
...
vector that represents the .o file at once, build up a vector for each
section of the .o file. This is needed because the .o file writer needs
to be able to switch between sections as it emits them (e.g. switch
between the .text section and the .rel section when emitting code).
This patch has no functionality change.
llvm-svn: 22453
2005-07-16 08:01:13 +00:00
Reid Spencer
d390dabdd5
* Correct the AC_DEFINE for LLVM_PATH_GRAPHVIZ to use AC_DEFINE_UNQUOTED so
...
we actually get the path and not $GRAPHVIZ as the value.
* Add a #define for the gv program (HAVE_GV) and its value LLVM_PATH_GV.
llvm-svn: 22433
2005-07-14 05:19:12 +00:00
Reid Spencer
878f3f051f
Put the path to the Graphviz program in the #defines so it can be used.
...
llvm-svn: 22430
2005-07-14 02:25:12 +00:00
Reid Spencer
4ca34a740e
Implement a test for the Graphviz program for Chris Lattner. The symbol
...
GRAPHVIZ will contain the path to the program if its found (or "echo Graphviz"
if not) and the #define HAVE_GRAPHVIZ will be defined if its found.
llvm-svn: 22424
2005-07-13 03:20:14 +00:00
Jeff Cohen
6e01930e34
Eliminate tabs
...
llvm-svn: 22421
2005-07-13 02:19:59 +00:00
Jeff Cohen
0882aa2a75
Win32 support for Mutex class.
...
llvm-svn: 22420
2005-07-13 02:15:18 +00:00
Reid Spencer
78910545f0
For PR540:
...
This patch completes the changes for making lli thread-safe. Here's the list
of changes:
* The Support/ThreadSupport* files were removed and replaced with the
MutexGuard.h file since all ThreadSupport* declared was a Mutex Guard.
The implementation of MutexGuard.h is now based on sys::Mutex which hides
its implementation and makes it unnecessary to have the -NoSupport.h and
-PThreads.h versions of ThreadSupport.
* All places in ExecutionEngine that previously referred to "Mutex" now
refer to sys::Mutex
* All places in ExecutionEngine that previously referred to "MutexLocker"
now refer to MutexGuard (this is frivolous but I believe the technically
correct name for such a class is "Guard" not a "Locker").
These changes passed all of llvm-test. All we need now are some test cases
that actually use multiple threads.
llvm-svn: 22404
2005-07-12 15:51:55 +00:00
Reid Spencer
5f037ea395
For PR540:
...
Add a Mutex class for thread synchronization in a platform-independent way.
The current implementation only supports pthreads. Win32 use of Critical
Sections will be added later. The design permits other threading models to
be used if (and only if) pthreads is not available.
llvm-svn: 22403
2005-07-12 15:37:43 +00:00
Reid Spencer
373e553223
For PR540:
...
* Add check for pthread.h
* Make sure -lpthread gets added to LIBS if its available
llvm-svn: 22402
2005-07-12 15:24:20 +00:00
Chris Lattner
81e3035723
Add support for emitting 64-bit integers
...
llvm-svn: 22399
2005-07-12 06:57:26 +00:00
Chris Lattner
79e388c0f6
Add some apparently undocumented ELF section header flags
...
llvm-svn: 22398
2005-07-12 06:40:29 +00:00
Nate Begeman
0a08ce9c07
Clean up and add comments to the newly implemented subtarget code.
...
llvm-svn: 22396
2005-07-12 03:04:49 +00:00
Nate Begeman
4d96f2769c
Clean up the TargetSubtarget class a bit, removing an unnecessary argument
...
to the constructor.
llvm-svn: 22392
2005-07-12 02:41:19 +00:00
Nate Begeman
626fb671c8
Implement Subtarget support
...
Implement the X86 Subtarget.
This consolidates the checks for target triple, and setting options based
on target triple into one place. This allows us to convert the asm printer
and isel over from being littered with "forDarwin", "forCygwin", etc. into
just having the appropriate flags for each subtarget feature controlling
the code for that feature.
This patch also implements indirect external and weak references in the
X86 pattern isel, for darwin. Next up is to convert over the asm printers
to use this new interface.
llvm-svn: 22389
2005-07-12 01:41:54 +00:00
Chris Lattner
3efcbfbfc7
The symbol table just needs a const GlobalValue*, not a non-const one.
...
llvm-svn: 22377
2005-07-11 06:16:24 +00:00
Chris Lattner
e788f4d773
expose a new code emitter object
...
llvm-svn: 22374
2005-07-11 05:15:32 +00:00
Chris Lattner
fe9d6ce97a
add a helper method
...
llvm-svn: 22373
2005-07-11 04:49:33 +00:00
Chris Lattner
fada9c1e1f
add a name mangler object
...
llvm-svn: 22370
2005-07-11 03:11:10 +00:00
Chris Lattner
6e49696ba6
Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.
...
This is the last MVTSDNode.
This allows us to eliminate a bunch of special case code for handling
MVTSDNodes.
llvm-svn: 22367
2005-07-10 01:55:33 +00:00
Chris Lattner
a966d80ab8
Move TRUNCSTORE to using a VTSDNode operand instead of being a MVTSDNode.
...
Also update some comments that Andrew forgot to update when he changed
loads/stores.
llvm-svn: 22365
2005-07-10 00:28:25 +00:00
Chris Lattner
c355896290
Introduce a new VTSDNode class with the ultimate goal of eliminating the
...
MVTSDNode class. This class is used to provide an operand to operators
that require an extra type. We start by converting FP_ROUND_INREG and
SIGN_EXTEND_INREG over to using it.
llvm-svn: 22364
2005-07-10 00:07:11 +00:00
Reid Spencer
04d734c2f6
Final Changes For PR495:
...
This chagne just renames some sys::Path methods to ensure they are not
misused. The Path documentation now divides methods into two dimensions:
Path/Disk and accessor/mutator. Path accessors and mutators only operate
on the Path object itself without making any disk accesses. Disk accessors
and mutators will also access or modify the file system. Because of the
potentially destructive nature of disk mutators, it was decided that all
such methods should end in the work "Disk" to ensure the user recognizes
that the change will occur on the file system. This patch makes that
change. The method name changes are:
makeReadable -> makeReadableOnDisk
makeWriteable -> makeWriteableOnDisk
makeExecutable -> makeExecutableOnDisk
setStatusInfo -> setStatusInfoOnDisk
createDirectory -> createDirectoryOnDisk
createFile -> createFileOnDisk
createTemporaryFile -> createTemporaryFileOnDisk
destroy -> eraseFromDisk
rename -> renamePathOnDisk
These changes pass the Linux Deja Gnu tests.
llvm-svn: 22354
2005-07-08 03:08:58 +00:00
Jeff Cohen
341ba60e2e
fix typo
...
llvm-svn: 22352
2005-07-08 02:48:04 +00:00
Reid Spencer
5534b2d505
For PR495:
...
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:
appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set
Changes pass Dejagnu and llvm-test/SingleSource tests.
llvm-svn: 22349
2005-07-07 23:21:43 +00:00
Reid Spencer
fb7bca6fa6
For PR495:
...
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute
More (incremental) changes coming to close 495.
llvm-svn: 22345
2005-07-07 18:21:42 +00:00
Chris Lattner
ad1e2361e9
Add support for building/representing the symbol table, add some enum constants
...
llvm-svn: 22342
2005-07-07 07:00:37 +00:00
Chris Lattner
bf100c8bdb
Make several cleanups to Andrews varargs change:
...
1. Pass Value*'s into lowering methods so that the proper pointers can be
added to load/stores from the valist
2. Intrinsics that return void should only return a token chain, not a token
chain/retval pair.
3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone.
llvm-svn: 22338
2005-07-05 19:57:53 +00:00
Chris Lattner
83170cd9ba
Don't crash on a query where the block is not in any loop. Thanks to
...
Sameer D. Sahasrabuddhe for pointing this out!
llvm-svn: 22314
2005-06-29 17:41:25 +00:00
Chris Lattner
85b1b5aa24
iniital checkin of ELFWriter header.
...
For now, the elf writer is only capable of emitting an empty elf file, with
a section table and a section table string table. This will be enhanced
in the future :)
llvm-svn: 22290
2005-06-27 06:28:45 +00:00
Chris Lattner
82cdeff6db
add some new file types
...
llvm-svn: 22286
2005-06-25 03:31:43 +00:00
Chris Lattner
37688fa81f
refactor these interfaces a bit
...
llvm-svn: 22281
2005-06-25 02:47:50 +00:00
Chris Lattner
24bcb4753a
improve comments
...
llvm-svn: 22280
2005-06-24 18:17:33 +00:00
Andrew Lenharth
8ff5960b39
make AliasAnalysis know that VAArg writes memory. This is extremely conservative and should be fixed
...
llvm-svn: 22267
2005-06-20 15:24:23 +00:00
Andrew Lenharth
ce40ab3077
fix DCE + va_arg problem
...
llvm-svn: 22264
2005-06-19 14:46:20 +00:00
Andrew Lenharth
108f509fb5
header file changes for varargs
...
llvm-svn: 22253
2005-06-18 18:31:30 +00:00
Reid Spencer
58090fdf3d
Make sure a variable is initialized before use to clean up a warning from
...
GCC 4.0.0 in release build.
llvm-svn: 22248
2005-06-18 16:53:27 +00:00
Chris Lattner
96e6d65c22
silence a huge number of bogus warnings with GCC 4 on Reid's tester.
...
llvm-svn: 22244
2005-06-17 13:20:15 +00:00
Tanya Lattner
e8f3fe8b46
Added ModuloSchedSB as a friend class.
...
llvm-svn: 22237
2005-06-17 03:59:51 +00:00
Reid Spencer
0628cd9f1b
Don't lie to the casual reader about Value subclassing from Annotable.
...
llvm-svn: 22215
2005-06-15 18:40:45 +00:00
Nate Begeman
68cd6aa245
Add some operators the PowerPC backend needs to efficiently and correctly
...
generate conditional branches.
llvm-svn: 22214
2005-06-15 18:28:44 +00:00
Chris Lattner
fd4bec23d6
Give the asmparser the ability to parse strings, patch contributed by
...
Alexander Friedman!
llvm-svn: 22145
2005-05-20 03:25:29 +00:00
Chris Lattner
774a5d8b9a
remove deprecated methods
...
llvm-svn: 22076
2005-05-16 01:49:23 +00:00
Reid Spencer
a9e52c8caf
Remove the check for the ffsll function. Its no longer needed by the
...
simplify-libcalls pass (pass now computes it without a call to ffsll).
llvm-svn: 22074
2005-05-15 22:15:11 +00:00
Chris Lattner
ee65cff29c
fix warning
...
llvm-svn: 22060
2005-05-15 17:25:14 +00:00
Chris Lattner
138c960903
fix compiler warning
...
llvm-svn: 22059
2005-05-15 17:23:19 +00:00
Reid Spencer
ba222e3e99
Some cleanups for compilation with GCC 4.0.0 to remove warnings:
...
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.
llvm-svn: 22057
2005-05-15 16:13:11 +00:00
Reid Spencer
9c7bfc232e
Forgot to commit this earlier. Its part of the simplify-libcalls
...
enhancement for ffs, ffsl, and ffsll optimizations. We can't do the opt
unless we also have the at least ffsll function. Notably SVR4 doesn't.
llvm-svn: 22033
2005-05-14 20:04:19 +00:00
Chris Lattner
b9ccf966b8
add a new map
...
llvm-svn: 22017
2005-05-14 07:36:02 +00:00
Chris Lattner
1032d777e6
Add a way to construct an arbitrary node, cleanly.
...
llvm-svn: 22008
2005-05-14 06:20:08 +00:00
Chris Lattner
3afe2d8d83
add accessors
...
llvm-svn: 22007
2005-05-14 06:19:11 +00:00
Chris Lattner
ae59fdbd99
Pass the dag into LowerOperation
...
llvm-svn: 22005
2005-05-14 05:51:05 +00:00
Chris Lattner
9d788e93a6
Add an isTailCall flag to LowerCallTo
...
llvm-svn: 21958
2005-05-13 18:50:42 +00:00
Chris Lattner
97505aa9ac
add TAILCALL node
...
llvm-svn: 21956
2005-05-13 18:40:17 +00:00
Chris Lattner
c79b6eeefd
add a new method
...
llvm-svn: 21929
2005-05-13 07:23:03 +00:00
Chris Lattner
5cd760d12d
allow a virtual register to be associated with live-in values.
...
llvm-svn: 21927
2005-05-13 07:08:07 +00:00
Chris Lattner
094bbfcebb
rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.
...
llvm-svn: 21915
2005-05-12 23:24:06 +00:00
Chris Lattner
ccb86c9acc
LowerCallTo now takes the cc to use
...
llvm-svn: 21901
2005-05-12 19:57:08 +00:00
Chris Lattner
045b3f0110
Add a little hook
...
llvm-svn: 21883
2005-05-12 02:02:21 +00:00
Chris Lattner
328273326d
new method
...
llvm-svn: 21869
2005-05-11 18:56:45 +00:00
Chris Lattner
9aedca57b1
Add READPORT, WRITEPORT, READIO, WRITEIO nodes, wrap long lines
...
llvm-svn: 21823
2005-05-09 20:21:27 +00:00
Jeff Cohen
eafa15885e
Silence VC++ warnings about unsafe mixing of ints and bools with the | operator.
...
llvm-svn: 21758
2005-05-07 02:44:04 +00:00
Chris Lattner
d2dfcb3c0e
Add support for explicit calling conventions
...
llvm-svn: 21745
2005-05-06 20:26:26 +00:00
Chris Lattner
b1952fe785
New file
...
llvm-svn: 21744
2005-05-06 19:59:08 +00:00
Chris Lattner
027639a16c
add a default arg
...
llvm-svn: 21733
2005-05-06 06:22:10 +00:00
Chris Lattner
72ffd7e7d5
Add a 'tail' marker for call instructions, patch contributed by
...
Alexander Friedman.
llvm-svn: 21722
2005-05-06 05:51:46 +00:00
Misha Brukman
f52511fcc6
Remove vim settings from source code; people should use llvm/utils/vim/vimrc
...
llvm-svn: 21704
2005-05-05 22:33:09 +00:00
Misha Brukman
e2e8059814
Convert tabs to spaces
...
llvm-svn: 21703
2005-05-05 22:30:40 +00:00
Andrew Lenharth
8b64bd0fd5
Implement count leading zeros (ctlz), count trailing zeros (cttz), and count
...
population (ctpop). Generic lowering is implemented, however only promotion
is implemented for SelectionDAG at the moment.
More coming soon.
llvm-svn: 21676
2005-05-03 17:19:30 +00:00
Chris Lattner
e53a188512
add direct support for making GEP instrs with one index
...
llvm-svn: 21665
2005-05-03 05:43:30 +00:00
Tanya Lattner
889ebef2ba
Add accessor method,
...
llvm-svn: 21649
2005-05-01 16:22:41 +00:00
Tanya Lattner
ec45f6a4cd
Adding ModuloSched SB.
...
llvm-svn: 21648
2005-05-01 16:14:34 +00:00
Chris Lattner
05d8a36ba7
Expose an option allowing unsafe math optimizations. Patch contributed by
...
Morten Ofstad!
llvm-svn: 21630
2005-04-30 04:09:52 +00:00
Chris Lattner
234ffe2395
Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
...
llvm-svn: 21627
2005-04-30 03:44:07 +00:00
Chris Lattner
4678a790e6
Add FSQRT, FSIN, FCOS nodes, patch contributed by Morten Ofstad
...
llvm-svn: 21605
2005-04-28 21:44:03 +00:00
Andrew Lenharth
2a00530fa7
Implement Value* tracking for loads and stores in the selection DAG. This enables one to use alias analysis in the backends.
...
(TRUNK)Stores and (EXT|ZEXT|SEXT)Loads have an extra SDOperand which is a SrcValueSDNode which contains the Value*. Note that if the operation is introduced by the backend, it will still have the operand, but the value* will be null.
llvm-svn: 21599
2005-04-27 20:10:01 +00:00
Jeff Cohen
b555ae8f95
Add SimplyLibCalls.cpp to VC++ build
...
llvm-svn: 21554
2005-04-26 02:57:49 +00:00
Reid Spencer
e952b16f37
Shut GCC 4.0 up about classes that have virtual functions but a non-virtual
...
destructor. Just add the do-nothing virtual destructor.
llvm-svn: 21524
2005-04-25 02:55:55 +00:00
Reid Spencer
a8e0496412
Declare a function to create the SimplifyLibCalls pass.
...
llvm-svn: 21523
2005-04-25 02:54:00 +00:00
Reid Spencer
27134f31f2
Older compilers won't like the inline virtual destructor in the header file
...
so we put the destructor in Pass.cpp and make it non-inline.
llvm-svn: 21520
2005-04-25 01:01:35 +00:00
Reid Spencer
a37ffe4c46
Fix a thinko in the documentation of the splitBasicBlock method. The branch
...
instruction is added to the original block, not the new block.
llvm-svn: 21513
2005-04-25 00:31:53 +00:00
Reid Spencer
2a1b7a35ea
Shut GCC 4.0 up when it complains about classes with virtual functions that
...
don't have virtual destructors.
llvm-svn: 21507
2005-04-24 22:20:32 +00:00
Chris Lattner
d40a7efbbb
allow these to take a generic Value*
...
llvm-svn: 21492
2005-04-24 07:28:04 +00:00
Misha Brukman
353d27c5fc
* The aesthetic police is on patrol!!...
...
* ... but it wasn't so busy as to not smell the roses and doxygenify comments
llvm-svn: 21487
2005-04-23 22:35:26 +00:00
Chris Lattner
9484bc95af
Add a helper method
...
llvm-svn: 21486
2005-04-23 22:20:22 +00:00
Chris Lattner
1fb1ee2b08
This file is never referenced
...
llvm-svn: 21484
2005-04-23 22:00:26 +00:00
Chris Lattner
c40ae24342
add a method, remove a dead #include
...
llvm-svn: 21482
2005-04-23 21:59:42 +00:00
Alkis Evlogimenos
4a22dbec7d
Add method to return the type this type will be promoted to if it is
...
passed through a variable argument function.
llvm-svn: 21462
2005-04-23 00:11:21 +00:00
Misha Brukman
5e38b1e17e
Convert tabs to spaces
...
llvm-svn: 21438
2005-04-22 03:46:24 +00:00
Misha Brukman
7860850b86
Convert tabs to spaces
...
llvm-svn: 21437
2005-04-22 03:35:49 +00:00
Misha Brukman
d292737471
Convert tabs to spaces
...
llvm-svn: 21436
2005-04-22 03:27:20 +00:00
Misha Brukman
af5b49b871
Convert tabs to spaces
...
llvm-svn: 21433
2005-04-22 03:18:56 +00:00
Reid Spencer
f6e98c8cf5
Change some old-style casts to C++ style casts to avoid warnings in XPS
...
compilation. This change has been waiting in the wings for a long time but
since Misha just did a global change, I figured now was the time to commit
it.
llvm-svn: 21431
2005-04-22 02:31:56 +00:00
Misha Brukman
58c97e67f3
Remove trailing whitespace
...
llvm-svn: 21412
2005-04-21 20:59:05 +00:00
Misha Brukman
8018cc9e05
Remove trailing whitespace
...
llvm-svn: 21411
2005-04-21 20:48:15 +00:00
Misha Brukman
4ad5efd1a9
Remove trailing whitespace
...
llvm-svn: 21409
2005-04-21 20:39:54 +00:00
Misha Brukman
3f0aa3dbf8
Remove trailing whitespace
...
llvm-svn: 21408
2005-04-21 20:19:05 +00:00
Reid Spencer
9990a77646
Add two new methods for getting the User Id and Group Id values for the
...
current process.
llvm-svn: 21400
2005-04-21 16:12:04 +00:00
Chris Lattner
4c73570c42
Add doxygen comments, patch contributed by Evan Jones.
...
llvm-svn: 21397
2005-04-21 16:10:03 +00:00
Chris Lattner
8ac773f1f1
add support for taking the address of free.
...
llvm-svn: 21395
2005-04-21 16:08:59 +00:00
Chris Lattner
472c891d23
Improve doxygen documentation, patch contributed by Evan Jones!
...
llvm-svn: 21393
2005-04-21 16:04:49 +00:00
Nate Begeman
ecb5b5c028
Make pattern isel default for ppc
...
Add new ppc beta option related to using condition registers
Make pattern isel control flag (-enable-pattern-isel) global and tristate
0 == off
1 == on
2 == target default
llvm-svn: 21309
2005-04-15 22:12:16 +00:00
Chris Lattner
8456833fa8
new pass
...
llvm-svn: 21307
2005-04-15 21:13:16 +00:00
Chris Lattner
ca287099e1
add a new prototype
...
llvm-svn: 21305
2005-04-15 19:24:49 +00:00
Chris Lattner
41aabb9427
Add a new helper method which returns the and that is equivalent to what
...
ZERO_EXTEND_INREG was.
llvm-svn: 21264
2005-04-13 02:37:19 +00:00
Chris Lattner
f5fe51581b
Remove the ZERO_EXTEND_INREG node which is redundant with AND
...
llvm-svn: 21263
2005-04-13 02:36:41 +00:00
Chris Lattner
ff1eca851a
add an argument.
...
llvm-svn: 21254
2005-04-12 18:51:53 +00:00
Duraid Madina
b7227cd315
rename addU64Imm() to addImm64()
...
llvm-svn: 21223
2005-04-11 07:14:41 +00:00
Jeff Cohen
4ac4db487c
Eliminate major source of VC++ "possible loss of data" warnings.
...
llvm-svn: 21215
2005-04-11 03:38:28 +00:00
Duraid Madina
a416f4bbf3
* store immediate values as int64_t, not int. come on, we should be happy
...
when there are immediates, let's not worry about the memory overhead of
this :)
* add addU64Imm(uint64_t val) to machineinstrbuilder
(seriously: this seems required to support 64-bit immediates cleanly. if it
_really_ gets on your nerves, feel free to pull it out ;) )
coming up next week: "all your floating point constants are belong to us"
llvm-svn: 21208
2005-04-10 09:18:55 +00:00
Chris Lattner
3cbcd49059
add routines to track the livein/out set for a function
...
llvm-svn: 21179
2005-04-09 15:22:53 +00:00
Chris Lattner
b0e6e4b693
Add a new node
...
llvm-svn: 21162
2005-04-09 03:21:50 +00:00
Chris Lattner
6c466448d3
fix this method for 64-bit constants
...
llvm-svn: 21158
2005-04-08 21:31:29 +00:00
Chris Lattner
f275f2af41
Allow targets which produce setcc results in non-MVT::i1 registers to describe
...
what the contents of the top bits of these registers are, in the common cases
of targets that sign and zero extend the results.
llvm-svn: 21145
2005-04-07 19:41:18 +00:00
Chris Lattner
4201b81130
document these nodes, as they are nonobvious
...
llvm-svn: 21108
2005-04-06 04:21:29 +00:00
Nate Begeman
12af81407b
Add MULHU and MULHS nodes for the high part of an (un)signed 32x32=64b
...
multiply.
llvm-svn: 21102
2005-04-05 22:36:56 +00:00
Duraid Madina
6b3090447d
a wise man once said:
...
"!!!!!!!! IF YOU CHANGE SPACES TO TABS, YOU WILL BE KILLED!!!!!!"
llvm-svn: 21062
2005-04-03 14:57:35 +00:00
Chris Lattner
dadd36cb34
merge EquivClassGraphs.h into DataStructure.h with the other DSA pass definitions.
...
llvm-svn: 21041
2005-04-02 20:08:06 +00:00
Chris Lattner
8b753bbfd9
add and use a callee_iterator typedef
...
llvm-svn: 21037
2005-04-02 20:02:32 +00:00
Chris Lattner
b58ad4e3eb
Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
...
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.
llvm-svn: 21030
2005-04-02 19:15:15 +00:00
Duraid Madina
3a10f491f0
add support for prefix/suffix strings to go around GlobalValue(s)
...
(which may or be function pointers) in the asmprinter. For the moment,
this changes nothing, except the IA64 backend which can use this to write:
data8.ua @fptr(blah__blah__mangled_function_name)
(by setting FunctionAddrPrefix/Suffix to "@fptr(" / ")")
llvm-svn: 21024
2005-04-02 12:21:51 +00:00
Chris Lattner
e74fa510c9
Add two happy new nodes for FABS and FNEG
...
llvm-svn: 21007
2005-04-02 04:58:28 +00:00
Chris Lattner
92920b74a0
fix a comment
...
llvm-svn: 21003
2005-04-02 03:59:45 +00:00
Chris Lattner
37abadec02
add some new nodes.
...
llvm-svn: 21000
2005-04-02 03:30:33 +00:00
Nate Begeman
4034852ba9
Add ISD::UNDEF node
...
Teach the SelectionDAG code how to expand and promote it
Have PPC32 LowerCallTo generate ISD::UNDEF for int arg regs used up by fp
arguments, but not shadowing their value. This allows us to do the right
thing with both fixed and vararg floating point arguments.
llvm-svn: 20988
2005-04-01 22:34:39 +00:00
Misha Brukman
b5dc9aae6c
Fix spelling of `corresponds'
...
llvm-svn: 20966
2005-03-31 21:30:35 +00:00
Andrew Lenharth
7db3834ecf
PCMarker support for DAG and Alpha
...
llvm-svn: 20965
2005-03-31 21:24:06 +00:00
Andrew Lenharth
c287cd1e4e
First step in adding pcmarker intrinsic. Second step (soon) is adding backend support.
...
llvm-svn: 20900
2005-03-28 20:05:49 +00:00
Jeff Cohen
1be6e1cb99
Fix VC++ build breakage
...
llvm-svn: 20888
2005-03-28 02:52:28 +00:00
Alkis Evlogimenos
e0e628a401
Rename createPromoteMemoryToRegister() to
...
createPromoteMemoryToRegisterPass() to be consistent with other pass
creation functions.
llvm-svn: 20885
2005-03-28 02:01:12 +00:00
Nate Begeman
e0ab2218d1
Change LowerCallTo to take a boolean isVarArg argument. This is needed
...
by the PowerPC backend, and probably others in the future.
llvm-svn: 20843
2005-03-26 01:30:30 +00:00
Chris Lattner
df0b2499ae
add new spliceFrom methods.
...
llvm-svn: 20823
2005-03-24 23:45:20 +00:00
Chris Lattner
07f8360573
if a function doesn't access memory at all, it definitely doesn't read it.
...
llvm-svn: 20794
2005-03-23 23:27:34 +00:00
Chris Lattner
03631d6bc4
a hack to allow count-aa to work with ds-aa :(
...
llvm-svn: 20791
2005-03-23 21:59:34 +00:00
Chris Lattner
deb71bf41d
Fix a serious bug where we didn't insert globals into the globalset when
...
cloning a graph.
llvm-svn: 20770
2005-03-22 19:44:11 +00:00
Chris Lattner
b2d5129f59
add a method
...
llvm-svn: 20761
2005-03-22 01:42:10 +00:00
Chris Lattner
0ed923c45a
Now that the dead ctor is gone, nothing uses the old node mapping exported by
...
cloneInto: make it an internally used mapping.
llvm-svn: 20760
2005-03-22 00:36:51 +00:00
Chris Lattner
4264b1d97e
remove a dead ctor
...
llvm-svn: 20759
2005-03-22 00:33:35 +00:00
Chris Lattner
81a96c578c
now that the second argument is always this->ReturnNodes, don't bother passing it.
...
llvm-svn: 20758
2005-03-22 00:29:44 +00:00
Chris Lattner
d76fbaa604
drop the second argument to cloneInto, which is always the local scalar map.
...
llvm-svn: 20753
2005-03-22 00:20:56 +00:00
Chris Lattner
49d2b42d89
move this stuff out of line
...
llvm-svn: 20750
2005-03-22 00:09:36 +00:00
Chris Lattner
dc160907ad
allow passing clone flags into the ctor
...
llvm-svn: 20747
2005-03-21 22:49:43 +00:00
Chris Lattner
ed74103e0c
add a new map
...
llvm-svn: 20742
2005-03-21 20:29:56 +00:00
Chris Lattner
8b4af69d5b
make this const correct
...
llvm-svn: 20741
2005-03-21 20:28:50 +00:00
Chris Lattner
7c6e697cc6
Ugh, for some reason, I can't call this unless the reference is const!?!?!?
...
llvm-svn: 20732
2005-03-21 10:00:45 +00:00
Chris Lattner
37f099ae83
Make the first operand of this method be modifiable.
...
llvm-svn: 20730
2005-03-21 09:39:20 +00:00
Chris Lattner
64f3947426
add a method
...
llvm-svn: 20729
2005-03-21 09:38:39 +00:00
Chris Lattner
7550f93ef5
If merging two calls like: foo(A) and bar(B, C), make sure the result has two
...
arguments, not one.
llvm-svn: 20728
2005-03-21 09:18:39 +00:00
Chris Lattner
df1aa8b6ed
rename a method add a data structure.
...
llvm-svn: 20722
2005-03-21 04:46:35 +00:00
Chris Lattner
5c37c87195
Provide a guaranteed definition of intptr_t. Thansk to Evan Jones for
...
pointing this out!
llvm-svn: 20721
2005-03-21 01:36:35 +00:00
Chris Lattner
334f54c1a0
Remove the InlinedGlobals set which is always empty.
...
llvm-svn: 20715
2005-03-20 04:30:16 +00:00
Chris Lattner
d5c24fc737
add a method
...
llvm-svn: 20709
2005-03-20 03:29:39 +00:00
Chris Lattner
e0771155f6
rename some methods and add some new methods for dealing with the globals list
...
in a DSNode.
llvm-svn: 20701
2005-03-20 02:38:39 +00:00
Misha Brukman
c85dd5e38e
Constant-propagate the value of `isL' variable and eliminate it.
...
llvm-svn: 20698
2005-03-19 23:39:50 +00:00
Jeff Cohen
c5c4aa7911
Silence VC++ warning about mixing intptr_t and bool, and about unused variable isL.
...
llvm-svn: 20697
2005-03-19 22:36:39 +00:00
Chris Lattner
5fc6764893
Make each scalar map contain a reference to an equivalence class of global
...
variables. Do not insert a global into the scalar map unless it is the
leader of its equivalence class.
llvm-svn: 20695
2005-03-19 22:13:13 +00:00
Chris Lattner
f279754707
Each DS collection now contains an equivalence class of globals values.
...
llvm-svn: 20694
2005-03-19 22:12:33 +00:00
Chris Lattner
09ef2499f6
add a method to clear globals from a node
...
llvm-svn: 20693
2005-03-19 22:12:03 +00:00
Chris Lattner
19068b431e
Two fixes for the copy ctor/operator=:
...
1. Make sure to clear() 'this' before adding elements to it
2. Make sure that the leaders of the RHS EC are the leaders of the LHS EC.
llvm-svn: 20692
2005-03-19 21:02:12 +00:00
Chris Lattner
d9b3369aa9
add some methods, fix a major bug in getLeader() that was causing things to
...
not be unified correctly.
llvm-svn: 20691
2005-03-19 20:42:43 +00:00
Chris Lattner
e4d74b8d85
implement a proper copy ctor, operator= and add a helper method.
...
llvm-svn: 20690
2005-03-19 19:26:14 +00:00
Alkis Evlogimenos
19bea8930f
Add new function getPtrPtrFromArrayPtr().
...
llvm-svn: 20684
2005-03-19 11:40:31 +00:00
Chris Lattner
b3103a3768
Rewrite this class, making the following improvements:
...
1. It now actually uses tarjan's algorithm, so it is a efficient inverse
ackerman's function for union operations, not linear time.
2. It now stores one copy of the data in the set instead of two.
3. It now works for elements other than pointers.
4. It now has a more STL-like interface that exposes iterators instead
of internal implementation details.
llvm-svn: 20677
2005-03-19 05:14:29 +00:00
Chris Lattner
ea7615d853
add 3 methods
...
llvm-svn: 20667
2005-03-17 23:45:35 +00:00
Duraid Madina
8b010ff8d2
dainty
...
llvm-svn: 20653
2005-03-17 18:23:22 +00:00
Chris Lattner
e0b373b2c3
remove compat_iterator, which is dead in the tree.
...
llvm-svn: 20644
2005-03-16 22:42:45 +00:00
Chris Lattner
0332fdf1d9
remove use of compat_iterator
...
llvm-svn: 20642
2005-03-16 22:42:01 +00:00
Jeff Cohen
b169eae709
Don't provide default hash struct instantiation.
...
llvm-svn: 20639
2005-03-16 05:49:06 +00:00
Jeff Cohen
f52b95ac20
Add adapter class to let VC++ hash_map use GCC's hash struct.
...
llvm-svn: 20637
2005-03-16 05:25:09 +00:00
Misha Brukman
ff0255f345
Fix grammar wrt apostrophe's
...
llvm-svn: 20635
2005-03-16 03:54:50 +00:00
Misha Brukman
d5e8033d4a
Convert tabs to spaces
...
llvm-svn: 20634
2005-03-16 03:46:55 +00:00
Chris Lattner
82b219432d
remove warning, make computeGGToGMapping return an invnodemap.
...
llvm-svn: 20621
2005-03-15 17:52:07 +00:00
Chris Lattner
4db93bc8d2
add support for hashing nodehandles.
...
llvm-svn: 20620
2005-03-15 17:51:51 +00:00
Chris Lattner
0376862732
add iterators for return nodes list.
...
llvm-svn: 20617
2005-03-15 16:46:11 +00:00
Jeff Cohen
c6d8a9188b
Do it right...
...
llvm-svn: 20605
2005-03-15 06:21:40 +00:00
Jeff Cohen
c456e6eceb
Fix VC++ breakage.
...
llvm-svn: 20604
2005-03-15 06:15:08 +00:00
Chris Lattner
3333cbe988
remove reverse BB iterators.
...
llvm-svn: 20601
2005-03-15 05:17:48 +00:00
Chris Lattner
a2fd75ccf7
remove a whole bunch of dead methods. Noone should use reverse iterators anyway.
...
llvm-svn: 20600
2005-03-15 05:13:47 +00:00
Chris Lattner
eb2e04e812
Rename method, add counterpart.
...
llvm-svn: 20592
2005-03-15 00:58:09 +00:00
Chris Lattner
fe56642977
Remove the reverse iterators for arguments and global vars.
...
Rename argument iterators arg_* instead of a*
Remove global variable iterators global_* instead of g*.
Keep the old names for temporary compatibility.
Patch contributed by Gabor Greif!
llvm-svn: 20591
2005-03-14 23:49:40 +00:00
Chris Lattner
fa7bf4a21e
Add a useful method.
...
llvm-svn: 20587
2005-03-14 19:22:33 +00:00
Chris Lattner
252d6277b5
Add support for printing EQ graphs
...
llvm-svn: 20581
2005-03-13 19:50:40 +00:00
Chris Lattner
183a6977d2
add a helper method
...
llvm-svn: 20578
2005-03-13 19:04:04 +00:00
Chris Lattner
a4bd8bd9b0
remove this from the PA namespace, leaving it in the llvm ns
...
llvm-svn: 20574
2005-03-12 12:08:52 +00:00
Chris Lattner
848760c21f
Move this from the pool allocator project to here, where it logically belongs.
...
llvm-svn: 20570
2005-03-12 11:51:30 +00:00
Chris Lattner
5c9c611068
Use static_cast and #include Instructions.h
...
llvm-svn: 20528
2005-03-09 05:35:16 +00:00
Chris Lattner
43d8ea234d
export two methods
...
llvm-svn: 20526
2005-03-09 05:34:23 +00:00
Chris Lattner
1b4201e69f
Fix problems compiling with G++ 4.x.x with -pedantic. Thanks to
...
Vladimir Merzliakov for the patch!
llvm-svn: 20513
2005-03-07 20:35:45 +00:00
Chris Lattner
ef140e77e6
new helper method
...
llvm-svn: 20491
2005-03-06 20:55:34 +00:00
Chris Lattner
3183eeac8f
move some method declarations around to make it clear that users should
...
not call insert(Value *Val), remove(Value* Val), or
changeName(Value *V, const std::string &Name)
llvm-svn: 20488
2005-03-06 06:03:44 +00:00
Chris Lattner
eddc6b4dc2
this method is never called.
...
llvm-svn: 20487
2005-03-06 06:00:24 +00:00
Chris Lattner
0371aef9a2
the only caller of insertEntry is insert, inline it and remove insertEntry
...
llvm-svn: 20485
2005-03-06 05:56:02 +00:00
Chris Lattner
e0a963283c
remove this method.
...
llvm-svn: 20482
2005-03-06 05:50:49 +00:00
Chris Lattner
6871e22bce
Delete the really inefficient method: void remove(const Type* Typ);
...
Get rid of removeEntry(type_iterator), since 'remove' is exactly the same
operation.
llvm-svn: 20480
2005-03-06 05:46:00 +00:00
Chris Lattner
b186974c85
InternallyInconsistent is dead!
...
llvm-svn: 20478
2005-03-06 05:22:05 +00:00
Chris Lattner
5549ad2f5d
remove these dead methods.
...
llvm-svn: 20475
2005-03-06 02:38:24 +00:00
Chris Lattner
8921259a3b
nuke some dead methods.
...
llvm-svn: 20470
2005-03-06 02:25:02 +00:00
Chris Lattner
60929fdff1
Add a new method, allow symtab to poke name.
...
llvm-svn: 20468
2005-03-06 02:10:40 +00:00
Chris Lattner
698c09c597
remove extraneous spaces from argument lists.
...
llvm-svn: 20465
2005-03-05 19:58:40 +00:00
Chris Lattner
b177010d51
remove all of the various setName implementations, consolidating them into
...
Value::setName, which is no longer virtual.
llvm-svn: 20464
2005-03-05 19:51:50 +00:00
Chris Lattner
93642ede7d
Remove the second argument to Value::setName, it is never needed.
...
llvm-svn: 20457
2005-03-05 18:59:36 +00:00
Jeff Cohen
29ecafb2e3
Add support for not strength reducing GEPs where the element size is a small
...
power of two. This emphatically includes the zeroeth power of two.
llvm-svn: 20429
2005-03-04 04:04:26 +00:00
Chris Lattner
f43446fb2f
Add an argument.
...
llvm-svn: 20413
2005-03-03 01:03:10 +00:00
Chris Lattner
61e4645073
Now that type does not derive from Value, these do not need to be virtual.
...
llvm-svn: 20393
2005-03-02 03:43:55 +00:00
Chris Lattner
df11946bb8
Add a prefetch intrinsic, patch contributed by Justin Wick!
...
llvm-svn: 20374
2005-02-28 19:25:57 +00:00
Chris Lattner
970db20de4
Fix this to create a recursive mutex. Patch by Evan Jones!
...
llvm-svn: 20355
2005-02-27 19:07:36 +00:00
Chris Lattner
4750a2274f
Rename include guard, patch contributed by Evan Jones!
...
llvm-svn: 20353
2005-02-27 19:05:24 +00:00
Chris Lattner
cf3862ce8d
Fix spelling, patch contributed by Gabor Greif
...
llvm-svn: 20342
2005-02-27 06:15:51 +00:00
Reid Spencer
24b41ba78d
Implement an isBytecodeArchive method to determine if an archive contains
...
bytecode file members or not.
Patch Contributed By Adam Treat
llvm-svn: 20338
2005-02-26 22:00:32 +00:00
Chris Lattner
f1e7201a6c
Fix a case where we incorrectly returned hasComputableLoopEvolution for
...
a ternary commutative expr. Remove FIXME that does not need to be fixed
(can't happen).
llvm-svn: 20335
2005-02-26 18:40:02 +00:00
Chris Lattner
902d9dc660
switch instructions only allow constantints for their values, be more specific.
...
llvm-svn: 20298
2005-02-24 05:32:09 +00:00
Chris Lattner
8044aa8d33
add a new method.
...
llvm-svn: 20293
2005-02-24 02:37:26 +00:00
Chris Lattner
fb1c36cdb3
Add new method.
...
llvm-svn: 20287
2005-02-23 16:50:59 +00:00
Chris Lattner
a43f090dcd
remove some more dead templates and a dead macro.
...
llvm-svn: 20279
2005-02-22 23:36:37 +00:00
Chris Lattner
2024801b74
Remove a bunch of dead templates.
...
llvm-svn: 20275
2005-02-22 23:19:42 +00:00
Jeff Cohen
b83e650f1f
Change __MINGW to __MINGW32__. Patch submitted by Henrik Bach.
...
llvm-svn: 20243
2005-02-19 03:01:13 +00:00
Chris Lattner
10f39c27ee
Map doubles from integers, not the double itself.
...
llvm-svn: 20229
2005-02-17 20:16:58 +00:00
Chris Lattner
e7d2b05fb0
Add a new method to make it easy to update graphs.
...
llvm-svn: 20194
2005-02-15 18:40:55 +00:00
Chris Lattner
c2aa286697
Move private helper function into the only .cpp file that uses it.
...
llvm-svn: 20169
2005-02-13 23:14:06 +00:00
Chris Lattner
4d06277d43
Do not replace ostream << Module*, only ostream << Module&.
...
llvm-svn: 20157
2005-02-13 19:15:01 +00:00
Chris Lattner
4d1409f15a
Add a new replaceSymbolicValuesWithConcrete method to the SCEV class,
...
adjust const'ness a bit to be more correct.
llvm-svn: 20145
2005-02-13 04:34:51 +00:00
Chris Lattner
7636e86e7e
Add some iterators that should have come in long ago
...
llvm-svn: 20085
2005-02-09 03:14:29 +00:00
Chris Lattner
a378bec169
Hopefully fix the build on Darwin with GCC 3.3
...
llvm-svn: 20064
2005-02-07 16:09:01 +00:00
Chris Lattner
9b289130f7
Eliminate the explicit opcode field in ConstantExpr, using the SubclassData
...
field to hold it instead. This shrinks memory usage for 176.gcc from
57628728 to 57598144 bytes, a small reduction of about 30K.
llvm-svn: 20047
2005-02-05 02:00:12 +00:00
Chris Lattner
7eb45f89a5
Eliminate the explicit volatile fields in LoadInst and StoreInst. This shrinks
...
LoadInst from 60 -> 56 bytes and StoreInst from 76 -> 72 bytes.
Note however, that this doesn't actually save any memory on common systems
where 'malloc' returns 8-byte aligned memory, as the saved space is replaced
by useless alignment padding. :(
llvm-svn: 20046
2005-02-05 01:44:18 +00:00
Chris Lattner
de2bf4ed11
SubclassID is really a small field. Split it into half and let subclasses
...
play with the unused part.
llvm-svn: 20043
2005-02-05 01:37:44 +00:00
Chris Lattner
0febe1ed81
Add some new members
...
llvm-svn: 20034
2005-02-04 19:58:06 +00:00
Chris Lattner
820991042d
add new member
...
llvm-svn: 20033
2005-02-04 19:57:57 +00:00
Chris Lattner
22eb2f789e
Add a new method.
...
llvm-svn: 20017
2005-02-03 18:40:05 +00:00
Chris Lattner
3757dc8600
remove dead method
...
llvm-svn: 19977
2005-02-01 21:37:06 +00:00
Chris Lattner
fdbedbbb45
Switch from using an ilist for uses to using a custom doubly linked list.
...
This list does not provide the ability to go backwards in the list (its
more of an unordered collection, stored in the shape of a list).
This change means that use iterators are now only forward iterators, not
bidirectional.
This improves the memory usage of use lists from '5 + 4*#use' per value to
'1 + 4*#use'. While it would be better to reduce the multiplied factor,
I'm not smart enough to do so. This list also has slightly more efficient
operators for manipulating list nodes (a few less loads/stores), due to not
needing to be able to iterate backwards through the list.
This change reduces the memory footprint required to hold 176.gcc from
66.025M -> 57.687M, a 14% reduction. It also speeds up the compiler,
7.73% in the case of bytecode loading alone (release build loading 176.gcc).
llvm-svn: 19956
2005-02-01 01:22:06 +00:00
Chris Lattner
ee6bc42f3e
* Make some methods more const correct.
...
* Change the FunctionCalls and AuxFunctionCalls vectors into std::lists.
This makes many operations on these lists much more natural, and avoids
*exteremely* expensive copying of DSCallSites (e.g. moving nodes around
between lists, erasing a node from not the end of the vector, etc).
With a profile build of analyze, this speeds up BU DS from 25.14s to
12.59s on 176.gcc. I expect that it would help TD even more, but I don't
have data for it.
This effectively eliminates removeIdenticalCalls and children from the
profile, going from 6.53 to 0.27s.
llvm-svn: 19939
2005-01-30 23:51:02 +00:00
Chris Lattner
92b24431d9
Improve spelling
...
llvm-svn: 19931
2005-01-30 00:13:34 +00:00
Chris Lattner
382abe80a0
Improve conformance with the Misha spelling benchmark suite
...
llvm-svn: 19930
2005-01-30 00:09:23 +00:00
Chris Lattner
e9c443b500
Adjust to ilist changes.
...
Based on the ilist changes avoid allocating an entire Use object for the
end of the Use chain. This saves 8 bytes of memory for each Value allocated
in the program. For 176.gcc, this reduces us from 69.5M -> 66.0M, a 5.3%
memory savings.
llvm-svn: 19925
2005-01-29 18:43:28 +00:00
Chris Lattner
aa4ae8f5b3
Adjust to ilist changes.
...
llvm-svn: 19923
2005-01-29 18:41:12 +00:00
Chris Lattner
1367f39eb9
Adjust to changes in ilist
...
llvm-svn: 19922
2005-01-29 18:41:00 +00:00
Chris Lattner
3a8cb1178e
Rename createNode -> createSentinal.
...
Add a new method, destroySentinal, that is used to delete it (instead of
requiring use of delete.
llvm-svn: 19921
2005-01-29 18:40:19 +00:00
Chris Lattner
3f035ee52d
There is no reason to include ostream here, include iosfwd instead.
...
This file was schizophrenic when it came to representing sizes. In some
cases it represented them as 'unsigneds', which are not enough for 64-bit
hosts. In other cases, it represented them as uint64_t's, which are
inefficient for 32-bit hosts.
This patch unifies all of the sizes to use size_t instead.
llvm-svn: 19917
2005-01-29 17:16:07 +00:00
Chris Lattner
41114c90af
Fix quotes.
...
llvm-svn: 19909
2005-01-29 06:29:45 +00:00
Jeff Cohen
8d28a62773
Unbreak VC++ build
...
llvm-svn: 19908
2005-01-29 06:27:16 +00:00
Chris Lattner
3b3e7f7cc2
Memory used is a delta between memuse at the start of the time and the
...
memuse at the end, thus it is signed.
llvm-svn: 19904
2005-01-29 05:21:16 +00:00
Chris Lattner
d8266ae3dd
Adjust to changes in the User class.
...
llvm-svn: 19888
2005-01-29 00:33:00 +00:00
Chris Lattner
941fce0bb5
Adjust to changes in the User class. Introduce a new UnaryInstruction
...
class.
llvm-svn: 19887
2005-01-29 00:32:51 +00:00
Chris Lattner
1567599aae
Adjust to user changes.
...
llvm-svn: 19886
2005-01-29 00:32:00 +00:00
Chris Lattner
6e2367383d
Many changes to cope with the User.h changes. Instructions now generally
...
directly embed their operands.
llvm-svn: 19885
2005-01-29 00:31:36 +00:00
Chris Lattner
91422cffe4
Adjust to User.h changes.
...
llvm-svn: 19884
2005-01-29 00:30:52 +00:00
Chris Lattner
c6c1106909
Instead of storing operands as std::vector<Use>, just maintain a pointer
...
and num operands in the User class. this allows us to embed the operands
directly in the subclasses if possible. For example, for binary operators
we store the two operands in the derived class.
The has several effects:
1. it improves locality because the operands and instruction are together
2. it makes accesses to operands faster (one less load) if you access them
through the derived class pointer. For example this:
Value *GetBinaryOperatorOp(BinaryOperator *I, int i) {
return I->getOperand(i);
}
Was compiled to:
_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
movl 4(%esp), %edx
movl 8(%esp), %eax
sall $4, %eax
movl 24(%edx), %ecx
addl %ecx, %eax
movl (%eax), %eax
ret
and is now compiled to:
_Z19GetBinaryOperatorOpPN4llvm14BinaryOperatorEi:
movl 8(%esp), %eax
movl 4(%esp), %edx
sall $4, %eax
addl %edx, %eax
movl 44(%eax), %eax
ret
Accesses through "Instruction*" are unmodified.
3. This reduces memory consumption (by about 3%) by eliminating 1 word of
vector overhead and a malloc header on a seperate object.
4. This speeds up gccas about 10% (both debug and release builds) on
large things (such as 176.gcc). For example, it takes a debug build
from 172.9 -> 155.6s and a release gccas from 67.7 -> 61.8s
llvm-svn: 19883
2005-01-29 00:29:39 +00:00
Chris Lattner
a7ce993d7f
Do not clean up if the MappedFile was never used or if the client already
...
closed the file. This unbreaks the build.
llvm-svn: 19871
2005-01-28 16:08:23 +00:00
Jeff Cohen
29092b4f26
Get VC++ compiling again
...
llvm-svn: 19869
2005-01-28 07:29:32 +00:00
Reid Spencer
dab05f06a4
Convert some old C-style casts to C++ style.
...
llvm-svn: 19868
2005-01-28 07:22:20 +00:00
Chris Lattner
d009d52fe5
Add some methods.
...
llvm-svn: 19817
2005-01-24 19:55:34 +00:00
Misha Brukman
b2961bf931
primitive' has no
a'
...
llvm-svn: 19808
2005-01-24 16:28:03 +00:00
Chris Lattner
b7a64c49f0
Do not return true from isSized for things without a size (like functions and
...
labels) even though they are concrete. This fixes the DSA regressions from
last night.
llvm-svn: 19807
2005-01-24 16:00:52 +00:00
Chris Lattner
766ad3378c
This giant patch speeds up Type::isSized(). Before, this would have to search
...
large nested types over and over again to determine if they are sized or not.
Now, isSized() is able to make snap decisions about all concrete types, which
are a common occurance (and includes all primitives).
On 177.mesa, this speeds up DSE from 39.5s -> 21.3s and GCSE from
13.2s -> 11.3s, reducing gccas time from 80s -> 61s (this is a debug build).
DSE and GCSE are still too slow on this testcase, but this is a simple
improvement.
llvm-svn: 19800
2005-01-24 02:08:34 +00:00
Chris Lattner
65c4c91477
Add an accessor.
...
llvm-svn: 19794
2005-01-23 22:57:27 +00:00
Chris Lattner
38249d15df
Expose more information from register allocation to passes that run after
...
it.
llvm-svn: 19788
2005-01-23 22:13:36 +00:00
Chris Lattner
519fcf19c2
Give SelectionDAG a TargetLowering instance instead of TM instance.
...
llvm-svn: 19778
2005-01-23 04:36:06 +00:00
Chris Lattner
18d4178fe6
Remove two dead methods and improve the comments for DiffFilesWithTolerance.
...
Also, make DiffFilesWithTolerance take sys::Path objects instead of std::strings.
llvm-svn: 19770
2005-01-23 03:30:39 +00:00
Chris Lattner
236f3c69b8
New method.
...
llvm-svn: 19765
2005-01-23 03:11:38 +00:00
Jeff Cohen
43692e25e9
Fix VC++ complaint
...
llvm-svn: 19747
2005-01-22 16:30:58 +00:00
Chris Lattner
9ee3bbc844
Keep track of node depth for each node
...
llvm-svn: 19732
2005-01-21 21:39:38 +00:00
Chris Lattner
bd8da4c80e
Apparently destroyFile() now throws an exception. Since this class is
...
designed to be put on the stack, that's not cool. Catch and ignore the
exception.
llvm-svn: 19723
2005-01-20 23:31:35 +00:00
Chris Lattner
8e17ad37f2
Eliminate the unimplemented ADDC/SUBB operations, add ADD_PARTS/SUB_PARTS instead.
...
llvm-svn: 19713
2005-01-20 18:50:39 +00:00
Chris Lattner
7005632b59
Add an accessor for targets that pass args in regs
...
llvm-svn: 19702
2005-01-19 20:19:58 +00:00
Chris Lattner
2a03fa3a5c
Add a new method, described in the comment.
...
llvm-svn: 19683
2005-01-19 06:53:02 +00:00
Jeff Cohen
a3414ac8c7
Add missing data types for VC++
...
llvm-svn: 19680
2005-01-19 05:08:31 +00:00
Chris Lattner
4938a7c8a1
Move all data members to the end of the class.
...
Add a hook to find out how the target handles shift amounts that are out of
range. Either they are undefined (the default), they mask the shift amount
to the size of the register (X86, Alpha, etc), or they extend the shift (PPC).
This defaults to undefined, which is conservatively correct.
llvm-svn: 19676
2005-01-19 03:36:03 +00:00
Chris Lattner
0697def39d
Keep track of the returned value type as well.
...
llvm-svn: 19669
2005-01-18 19:26:18 +00:00
Chris Lattner
818e819e43
Allow setcc operations to have non-bool types.
...
llvm-svn: 19655
2005-01-18 02:51:41 +00:00
Chris Lattner
e2fd07b43d
Make methods private, add a method.
...
llvm-svn: 19634
2005-01-17 17:14:43 +00:00
Chris Lattner
783a9d8893
Add methods
...
llvm-svn: 19627
2005-01-17 02:24:59 +00:00
Chris Lattner
8dd332e4e5
Add comments
...
Add fields to hold the result type of setcc operations and shift amounts.
llvm-svn: 19618
2005-01-16 23:59:30 +00:00
Chris Lattner
e38f72316d
Revamp supported ops. Instead of just being supported or not, we now keep
...
track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.
llvm-svn: 19609
2005-01-16 07:27:49 +00:00
Reid Spencer
5d058e0ec8
Provide support for HP/UX aCC compiler's variant of hash_map and hash_set
...
(RogueWave). These are implemented in rw/stdex/hash_map.h and
rw/stdex/hash_set.h on HP/UX.
llvm-svn: 19600
2005-01-16 02:58:39 +00:00
Chris Lattner
605b9a23a2
Improve compatiblity with HPUX on Itanium, patch by Duraid Madina
...
llvm-svn: 19586
2005-01-16 01:31:31 +00:00
Chris Lattner
dfb3741f64
Improve compatibility with aCC on HPUX. Patch by Duraid Madina
...
llvm-svn: 19585
2005-01-16 01:22:18 +00:00
Chris Lattner
1d0e1ffe02
Move some information out of LegalizeDAG into the generic Target interface.
...
llvm-svn: 19581
2005-01-16 01:10:58 +00:00
Chris Lattner
ee53940434
Add some helper methods.
...
llvm-svn: 19570
2005-01-15 06:52:18 +00:00