Commit Graph

4289 Commits

Author SHA1 Message Date
Chris Lattner
8de353df9d Add ctor that initializes from a range.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29560 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-08 00:37:50 +00:00
Chris Lattner
d0337c1678 Remove assertions from the SmallVector class. They slow down clients of
smallvector too much in a release build.  Removing them speeds up isel 4%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29556 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 23:41:59 +00:00
Chris Lattner
51a4911121 New CSEMap datastructure impl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29555 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 23:31:24 +00:00
Reid Spencer
dc4f6bea6c Remove the use of "IncludeFile" from this support facility. The mechanism
to build a loadable module is now correctly defined and documented so this
workaround isn't needed any longer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29553 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 23:20:15 +00:00
Chris Lattner
a5682853b9 Revamp the "CSEMap" datastructure used in the SelectionDAG class. This
eliminates a bunch of std::map's in the SelectionDAG, replacing them with a
home-grown hashtable.

This is still a work in progress: not all the maps have been moved over and the
hashtable never resizes.  That said, this still speeds up llc 20% on kimwitu++
with -fast -regalloc=local using a release build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29550 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 23:03:03 +00:00
Evan Cheng
fe8dc2e2c8 Move DAGSize to SelectionDAGISel; it's used in tablegen'd isel code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29547 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 22:16:08 +00:00
Chris Lattner
f5e42bfed1 Add a clear method to SmallVector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-07 05:45:34 +00:00
Chris Lattner
cfb3ba060a Silence a warning on x86-64, reported by chandlerc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29535 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-06 18:12:50 +00:00
Evan Cheng
e6ffe61c84 This causes some random crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29534 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-05 17:31:00 +00:00
Reid Spencer
a773bd54f3 Update the auto* tools: autoconf 2.60, libtool 1.5.22, automake 1.9.6.
Update ltld.[ch] to version 1.5.22.
Correct the notes about updating these tools (autoconf/README.TXT)
Add configure options for getting the correct option for including a whole
archive when linking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29529 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 18:18:08 +00:00
Chris Lattner
190a418bf6 Make SelectionDAG::RemoveDeadNodes iterative instead of recursive, which
also make it simpler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29524 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 17:45:20 +00:00
Chris Lattner
1eaf0ac1dc update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29507 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 18:57:28 +00:00
Chris Lattner
fb1fcf08c9 remove some more dead sparcv9 support stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29506 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 18:55:44 +00:00
Devang Patel
a5eee6e586 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29497 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 16:34:35 +00:00
Devang Patel
a89d47f54d Add new tool, lto, to do link time optimization. This tool installs
dynamic library that linker can use to optimize llvm byte codes at
link time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29494 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 15:44:57 +00:00
Evan Cheng
09fd736058 AssignTopologicalOrder now returns the vector of SDNode* by reference to
avoid the expensive operation of copying a vector.
It also returns a maximum id by value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29478 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-02 21:58:44 +00:00
Jim Laskey
eb577ba3b8 Final polish on machine pass registries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29471 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-02 12:30:23 +00:00
Jim Laskey
9b9528d8f6 Breaking out specialized classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29470 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-02 12:27:50 +00:00
Chris Lattner
6aba48338f Add dominates/properlyDominates queries to IDom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29456 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 22:24:47 +00:00
Jim Laskey
9373beba60 Now that the ISel is available, it's possible to create a default instruction
scheduler creator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29452 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 19:14:14 +00:00
Jim Laskey
9ff542f2cc 1. Change use of "Cache" to "Default".
2. Added argument to instruction scheduler creators so the creators can do
special things.
3. Repaired target hazard code.
4. Misc.

More to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29450 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:29:48 +00:00
Chris Lattner
0d167276dd Remove some now-dead methods. Use getFileStatus instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:16:02 +00:00
Jim Laskey
c6a0a117a6 Forgot the added files for plugable machine passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29436 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 16:31:08 +00:00
Jim Laskey
13ec702c43 Introducing plugable register allocators and instruction schedulers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29434 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 14:21:23 +00:00
Evan Cheng
e6f35d8a5c Added AssignTopologicalOrder() to assign each node an unique id based on their topological order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29431 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 08:20:41 +00:00
Chris Lattner
1bebfb5ae4 Modify setStatusInfoOnDisk to not throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29402 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:36:17 +00:00
Chris Lattner
0c33231eff Modify Path::eraseFromDisk to not throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29400 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:29:50 +00:00
Chris Lattner
86ca12988a Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29398 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:09:37 +00:00
Chris Lattner
252ad03d7d Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29395 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:03:44 +00:00
Chris Lattner
d91e5f911f The smallvector dtor should destroy the elements.
Implement pop_back.
Chage some code to use 'iterator' instead of T*.  This unbreaks operators=.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 05:03:42 +00:00
Evan Cheng
f2dfafcbc1 Rename IsFoldableBy to CanBeFoldedleBy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29376 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 01:03:48 +00:00
Evan Cheng
2641cad180 Remove InFlightSet hack. No longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29373 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 00:47:19 +00:00
Jim Laskey
33a0a6ddf5 Working toward registration of register allocators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29360 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 20:05:00 +00:00
Evan Cheng
f141cc46fa Resolve BB references with relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29351 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 18:21:10 +00:00
Evan Cheng
b4e80f8857 Add basic block machine relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29349 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 18:18:13 +00:00
Evan Cheng
7c16d776cb AssignNodeIds should return unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29343 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 07:36:47 +00:00
Evan Cheng
b9ee9e60a9 Remove NodeDepth; Add NodeId which is a unique id per node per DAG. It can only be set by SelectionDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29336 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 06:38:21 +00:00
Evan Cheng
b2c121ac14 Let each target specific isel provide routine to check if a chain producing node is foldable by another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29335 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 06:36:49 +00:00
Evan Cheng
55b5053b8e Move synchronizeICache from TargetJITInfo into a static function in JITEmitter.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29334 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 06:33:55 +00:00
Chris Lattner
825405c0c1 Use std::copy instead of custom loops to take advantage of STL optimizations.
Add a new append method for appending a range.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 03:38:08 +00:00
Nate Begeman
2f1ae88445 Support jump tables when in PIC relocation model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 01:13:04 +00:00
Chris Lattner
35d86fef1f Rename RelocModel::PIC to PIC_, to avoid conflicts with -DPIC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29307 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 21:12:04 +00:00
Reid Spencer
23dd3327a0 For PR780:
Put the rest of lib/System into LinkAllVMCore.h. This makes all of
lib/System available to programs that #include LinkALlVMCore.h so that
loadable modules linked into those programs can depend on all of lib/System
being available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29288 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 16:55:39 +00:00
Reid Spencer
7107c3badf For PR780:
1. Move IncludeFile.h to System library
2. Move IncludeFile.cpp to System library
3. #1 and #2 required to prevent cyclic library dependencies for libSystem
4. Convert all existing uses of Support/IncludeFile.h to System/IncludeFile.h
5. Add IncludeFile support to various lib/System classes.
6. Add new lib/System classes to LinkAllVMCore.h
All this in an attempt to pull in lib/System to what's required for VMCore


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 16:18:00 +00:00
Chris Lattner
f282654021 Add a new llvm::SmallVector template, which is similar to the vector class, but
contains optimizations to avoid heap allocation if the vector size is smaller
than some threshold.  This can significantly improve the performance of code
that allocates many small vectors by eliminating tons of small malloc/free's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 06:22:30 +00:00
Jim Laskey
a25dfd2963 Moving this function to a permanent home to prevent a dependency cycle created
by the inline heuristic.  Was preventing llvm-gcc4 from building.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-25 23:22:00 +00:00
Evan Cheng
55fc28076f - Refactor the code that resolve basic block references to a TargetJITInfo
method.
- Added synchronizeICache() to TargetJITInfo. It is called after each block
  of code is emitted to flush the icache. This ensures correct execution
  on targets that have separate dcache and icache.
- Added PPC / Mac OS X specific code to do icache flushing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29276 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-25 20:40:54 +00:00
Jim Laskey
60f09928a0 Use an enumeration to eliminate data relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29249 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 20:57:35 +00:00
Devang Patel
753d94a1c8 Add new constructor to accept vector of exported names while creating
InternalizePass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29222 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 17:48:05 +00:00
Evan Cheng
3b0c0148ed Make sub- and super- register classes const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29200 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 05:58:18 +00:00
Chris Lattner
08e682ecf4 Move MVT::getVectorType out of line, it is large and shouldn't be inlined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 00:40:45 +00:00
Chris Lattner
917d2c9dc2 Add an out-of-line virtual method for the sdnode class to give it a home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29192 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-19 00:00:37 +00:00
Chris Lattner
433fd76e51 Add an out-of-line virtual method to provide a home for the cl::option class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29191 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 23:59:33 +00:00
Chris Lattner
0683c8cad9 Add functions to compute ceil(log2(N)) to match functions for floor(log2(N))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29168 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-18 00:47:10 +00:00
Chris Lattner
efb9b813fa Add an out-of-line virtual function to home class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29154 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 23:08:47 +00:00
Chris Lattner
1e36126f5e Add two helper functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29150 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 22:54:06 +00:00
Chris Lattner
6b8408e910 Add another helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29147 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 22:19:18 +00:00
Chris Lattner
79ce587cda Add a new method for bugpoint to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29142 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-14 19:37:01 +00:00
Chris Lattner
d85340f4ec Change the callgraph representation to store the callsite along with the
target CG node.  This allows the inliner to properly update the callgraph
when using the pruning inliner.  The pruning inliner may not copy over all
call sites from a callee to a caller, so the edges corresponding to those
call sites should not be copied over either.

This fixes PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29120 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-12 18:29:36 +00:00
Jim Laskey
e2a78f2e3d 1. Support for c++ mangled names.
2. Support for private/protected class members.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 15:58:09 +00:00
Reid Spencer
8d8a7ffe58 Finish removal of EH usage from the Archive library. The REQUIRES_EH flag
in lib/Bytecode/Archive/Makefile is now removed. One small step closer to
a smaller LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29067 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 20:56:50 +00:00
Reid Spencer
3039b99697 Remove EH use from the Archive library and adjust its users accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29066 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 19:09:14 +00:00
Chris Lattner
ff74ac103d #include <iosfwd> not <ostream>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29061 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 18:10:59 +00:00
Chris Lattner
bed22d8902 Change AllocateRWX/DeallocateRWX to not throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29058 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:32:37 +00:00
Chris Lattner
adcbce0ad4 Change LoadLibraryPermanently to not throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29048 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:12:36 +00:00
Chris Lattner
bbf34398a0 This patch (written by Reid) changes compressor to never throw an exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29045 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 17:00:12 +00:00
Chris Lattner
408a39b3a0 Fix an embarassing bug reid noticed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29031 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 00:01:01 +00:00
Chris Lattner
148f440635 Modify the SlowOperationInformer interface to not throw exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29028 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 22:34:06 +00:00
Chris Lattner
0300f3e712 Change the ModuleProvider interface to not throw exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29024 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 21:35:01 +00:00
Chris Lattner
1d662a6afc Change the verifier to never throw an exception. Instead verifyModule can
optionally return the string error, which is an easier api for clients to
use anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29016 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 18:00:01 +00:00
Evan Cheng
152ed05353 Added option -code-model to set code model (only used in 64-bit) mode. Valid
values include small, kernel, medium, large, and default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29009 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 01:53:36 +00:00
Evan Cheng
322812e603 Ugly hack! Add helper functions InsertInFlightSetEntry and
RemoveInFlightSetEntry. They are used in place of direct set operators to
reduce instruction selection function stack size.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28987 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 23:57:05 +00:00
Evan Cheng
2d2cec1e9e Add support to print 4-, 8-, and 16- byte constant literals in special
sections. e.g. On Darwin that would be .literal4 and .literal8.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28977 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 00:26:09 +00:00
Chris Lattner
c521409d4c Add support for hidden visibility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28968 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 21:38:04 +00:00
Evan Cheng
c9094dbbe9 Allow EmitConstantPool to be redefined by derived classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28952 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-28 00:52:32 +00:00
Reid Spencer
9d5b532de9 For PR801:
Refactor the Graph writing code to use a common implementation which is
now in lib/Support/GraphWriter.cpp. This completes the PR.

Patch by Anton Korobeynikov. Thanks, Anton!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 16:49:46 +00:00
Chris Lattner
69fd7a3973 Add a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28915 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-26 19:20:25 +00:00
Jim Laskey
89d67faf30 Add and sort "sections" in debug lines. This always stepping through
code in sections other than ".text", including weak sections like ctors and
dtors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28909 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-23 12:51:53 +00:00
Evan Cheng
52b510b4c4 Added jump table address relocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28908 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-23 01:02:37 +00:00
Reid Spencer
72a8e6f58c Whoops, missed a couple more C-style casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28905 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 22:19:00 +00:00
Reid Spencer
54cb98578a Use C++ style casts instead of C-style casts to shut up compiler warnings
when compiling with -pedantic. Passes regression tests on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28904 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 21:54:54 +00:00
Chris Lattner
70aa33ee37 Add some out-of-line virtual dtors so that the class has a "home", preventing
vtables for (e.g.) Instruction from being emitted into every .o file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28898 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 16:53:47 +00:00
Evan Cheng
76f6115424 Fix non-64-bit clean code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28891 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 00:29:14 +00:00
Andrew Lenharth
a51139f446 Fix build on old compilers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28869 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-20 15:32:17 +00:00
Andrew Lenharth
ab390d045a Do partial inlining in BU. This resolves more call sites. Also add options to merge in globals during recursion and to back annotate DSNodes when function pointers are resolved. This makes PA work for a whole lot more things (unresolved call sites being what has been killing various DSA based passes)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28859 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-19 18:23:36 +00:00
Evan Cheng
61496683b3 Clean up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28851 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-17 01:42:20 +00:00
Chris Lattner
c91dc678e9 Simplify the targetdata ctor by not passing in a "targetname" which is always
ignored.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28829 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:21:53 +00:00
Chris Lattner
acbc07aa22 Remove ctor with each piece specifyable (which causes overload ambiguities),
add a new init method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28828 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:11:26 +00:00
Andrew Lenharth
73a38a9071 move header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28818 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 14:33:53 +00:00
Jim Laskey
7089f45987 1. Revise vector debug support.
2. Update docs for vector debug support and new version control.

3. Simplify serialization of DebugDescInfo subclasses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28816 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 13:14:03 +00:00
Jim Laskey
f8a01a9661 1. Support standard dwarf format (was bootstrapping in Apple format.)
2. Add vector support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28807 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 20:51:43 +00:00
Chris Lattner
1f2d22ab94 Add some more matcher classes for shifts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28804 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 19:25:28 +00:00
Evan Cheng
f4432fac14 Avoid undesirable behavior when assert is not enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28793 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:10:27 +00:00
Evan Cheng
8d3af5e7d0 Instructions with variable operands (variable_ops) can have a number required
operands. e.g.
def CALL32r : I<0xFF, MRM2r, (ops GR32:$dst, variable_ops),
                "call {*}$dst", [(X86call GR32:$dst)]>;
TableGen should emit operand informations for the "required" operands.

Added a target instruction info flag M_VARIABLE_OPS to indicate the target
instruction may have more operands in addition to the minimum required
operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 07:22:16 +00:00
Jim Laskey
ed4e566dda Change versioning to per debug info descriptor (merged with tag.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 14:45:39 +00:00
Jim Laskey
014f98c7e5 Place dwarf headers at earliest possible point. Well behaved when skipping
functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-14 11:35:03 +00:00
Andrew Lenharth
232c910b8a Start on my todo list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28752 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-12 16:07:18 +00:00
Owen Anderson
c2cc15cf9d Re-commit the safe parts of my 6/9 patch. Still working on fixing the unsafe parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-11 19:22:28 +00:00
Evan Cheng
b9b2b309d3 Back out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28747 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-11 09:32:57 +00:00
Owen Anderson
f25c19c6b5 Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert
on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 18:33:30 +00:00
Owen Anderson
a452932171 Update some comments, and expose LCSSAID in preparation for having other passes
require LCSSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28734 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 20:02:53 +00:00
Reid Spencer
393830a33a For PR804:
Change the file size field of StatusInfo to be uint64_t instead of size_t
so that we know it is always 64 bits. This prevents some overflow on
systems where size_t is 32 bits when it ought to be 64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 17:00:08 +00:00
Vladimir Prus
dd49dbfe44 New method BasicBlock::getFirstNonPHI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28724 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 15:46:18 +00:00
Reid Spencer
32f5553c03 For PR787:
Provide new llvm::sys::Program facilities for converting the stdout and
stdin to binary mode. There is no standard way to do this and the available
mechanisms are platform specific. Adjust the bytecode reader and writer to
use these methods when their input is stdin or output is stdout. THis avoids
the problem with \n writing CRLF to a bytecode file on windows.

Patch Contributed by Michael Smith.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28722 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:18:34 +00:00
Reid Spencer
af303d53e6 For PR780:
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28719 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:03:13 +00:00
Chris Lattner
3bdac5171b Add a virtual dtor to the InlineAsm class so that the principle method of
the class can be defined in InlineAsm.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28718 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:47:44 +00:00
Reid Spencer
454d85be66 Previous version of this file wasn't supposed to be committed. This version
attempts to get all of libVMCore.a through the least number of declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28716 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:09:38 +00:00
Reid Spencer
4f1bd9e996 For PR780:
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace
2. Replace the previous explicit mechanism in all the .h and .cpp files
   with the macros in IncludeFile.h
This gets us a consistent mechanism throughout LLVM for ensuring linkage.
Next step is to make sure its used in enough places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28715 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:00:26 +00:00
Reid Spencer
170da9b058 For PR780:
This change was suggested by Chris so that we can select an alternate
(or even no-op) implementation of the link assurance. I'm committing this
for your review, Chris. If the names and definitions are okay, I'll adjust
all the .h and .cpp files in a later patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28712 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 20:35:46 +00:00
Reid Spencer
6df60a9eff For PR780:
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 20:00:19 +00:00
Chris Lattner
fc790168a2 Move toolrunner out of libsupport into the bugpoint tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 22:31:36 +00:00
Chris Lattner
001db453f5 Add PowerPC intrinsics to support dcbz[l]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 21:29:23 +00:00
Reid Spencer
51ab5c8862 Add the -Xlinker option to bugpoint which allows an option to be passed
through to gcc when its being used as a linker. This allows -L and -l
(and any other) options to be added so that non-complete bytecode files
can be processed with bugpoint. The -Xlinker option can be added as many
times as needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 00:00:42 +00:00
Reid Spencer
bddcb9427c For PR778:
Move file-scoped documentation to class-scoped so it is more readily
accessible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28689 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 16:29:06 +00:00
Reid Spencer
515b5b379f Make it possible to override the standard version printer. Not all tools
built with CommandLine.h will want the --version option to report that the
tool belongs to LLVM. To override simply pass a void func() to the
cl::SetVersionPrinter() function and that void func() will be called when
it is time to print the version information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 16:22:56 +00:00
Reid Spencer
cdb08a3691 For PR633:
Add configure checks for setjmp/longjmp for Chris. I can't believe this easy
PR has been outstanding for so long. If I don't get to something, please
remind me! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 16:11:07 +00:00
Reid Spencer
caf0ecec9e Some enhancements for gv/graphviz/dot/dotty support and better handling of
paths under MingW.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 15:54:38 +00:00
Reid Spencer
ecbd242833 For PR798:
Have configure find the "dotty" program and adjust configuration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28674 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 23:13:18 +00:00
Chris Lattner
191b0ba97e Force anything that #includes llvm/Transforms/Utils/UnifyFunctionExitNodes.h
to link in the implementation.  Thanks to Anton Korobeynikov for figuring out
what was going on here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28660 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:40:06 +00:00
Reid Spencer
76c8710697 Remove some flags backed out from earlier attempts at getting MING32W
configuration settled down.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28651 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 00:40:35 +00:00
Chris Lattner
080e25d884 Fix -pedantic warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28634 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:17:46 +00:00
Reid Spencer
484fc8e384 Provide support for detecting if the Win32 imaghlp and psapi libraries
are available. These libraries are used in lib/System and should be
included on the link line or if not available generate an error when
building lib/System.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28628 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 16:55:59 +00:00
Reid Spencer
79818a40d7 Favor C++ casts over C casts in C++ code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28622 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:03:53 +00:00
Reid Spencer
192913e281 Change from using a stub function to a stub variable for passing to the
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:02:51 +00:00
Chris Lattner
6fb568f77e Fix utostr once and for all, by making there only be one function named
utostr.  To keep the efficiency in the 32-bit case, make it check to see if
the value is 32-bits and if so switch over to the faster 32-bit case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28601 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 21:25:50 +00:00
Andrew Lenharth
9e3264a1ea 4 billion names is enough for anyone. And really fix the build on alpha this time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28598 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 20:40:36 +00:00
Andrew Lenharth
37e8bde141 Fix build breakage on alpha, without causing it on x86. as a bonus, all platforms can invent the same number of unique names now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28596 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 20:18:28 +00:00
Andrew Lenharth
f48ec61fbd revert for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28595 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 19:16:26 +00:00
Andrew Lenharth
cffba3a6e9 make 64-bit safe and fix the build on alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 18:56:42 +00:00
Reid Spencer
0b2375edfe Make the getNamedFunction and getNamedGlobal methods be const. They don't
change the module in any way and we should enforce that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28588 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 16:40:28 +00:00
Vladimir Prus
e2e83c9994 Clarify type naming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28587 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 16:03:20 +00:00
Vladimir Prus
ef27d899fd Improve InstVisitor docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28586 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 15:30:18 +00:00
Reid Spencer
461bed2b75 Provide a simpler interface for getting a ConstantArray from a character
string. Instead of specifying the length, just specify whether the user
wants a terminating null or not. The default is "true" to retain the same
behavior as previously provided by this function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28562 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 18:15:07 +00:00
Vladimir Prus
e167af3023 Make doc comment visible in doxygen output. Clarify Type construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28555 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 15:49:30 +00:00
Reid Spencer
efcaa42c28 Properly document the second form of ConstArray::get()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28553 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 08:26:13 +00:00
Reid Spencer
8949477ae4 Adjust the interface to ConstantArray::get. The previous
implementation always added a null byte to the end of the string. It turns
out that this is not always wanted. By adding a length parameter we preserve
this behavior when length==0 (default value) but also allow other lengths
(not null terminated) to be created.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28552 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 08:23:18 +00:00
Andrew Lenharth
632cd52162 Since there was interest on the mailing list, this is a utility pass that
uses DSA to make find targets of calls.  It provides a very convinient
interface to DSA results to do things with indirect calls, such as
write a devirtualizer (which I have and may commit one of these days).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28545 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 22:58:38 +00:00
Reid Spencer
3ccc7b4654 Replace an old C-style cast with a C++ cast (squelch warning)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28533 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 02:32:43 +00:00
Chris Lattner
c83769ae33 Fix pastos in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28522 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 06:57:55 +00:00
Chris Lattner
f72716d81f Implement a new method: CloneAndPruneFunctionInto, as documented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28518 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 01:21:50 +00:00
Chris Lattner
b5a554ec80 Add an interface to constant fold and instruction given it's opcode, type
and operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28516 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 01:17:40 +00:00
Chris Lattner
3258ed6a36 Add a new sentry node type, allowing assertions to catch trivial
use-after-deleted errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28513 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 00:40:15 +00:00
Evan Cheng
8e7d056bc5 Change RET node to include signness information of the return values. e.g.
RET chain, value1, sign1, value2, sign2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28509 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-26 23:09:09 +00:00
Owen Anderson
11f510b577 Skeletal LCSSA pass. This is currently non-functional. Expect functionality
and documentation updates soo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28495 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-26 13:58:26 +00:00
Chris Lattner
32cdb6617e Fix breakage on platforms where string/cassert don't pull in int64_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-25 05:59:50 +00:00
Evan Cheng
9657eac240 CALL node change: now containing signness of each argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28460 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-25 00:54:33 +00:00
Reid Spencer
19b7e0e0ca For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 19:21:13 +00:00
Chris Lattner
d74ea2bbd8 Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 17:04:05 +00:00
Evan Cheng
80235d508e -enable-unsafe-fp-math implies -enable-finite-only-fp-math
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28437 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-23 18:18:46 +00:00
Vladimir Prus
1fd8a4f65d Make class comment visible in Doxygen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28436 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-23 15:32:15 +00:00
Evan Cheng
95942d76f4 Added option -enable-finite-only-fp-math. When on, the codegen can assume that
FP arithmetic arguments and results are never NaNs or +=Infs. This includes
ignoring parity flag (PF) when checking for FP equality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28432 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-23 06:39:12 +00:00
Owen Anderson
bcd8a8264e Make TargetData strings less redundant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28423 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-20 23:28:54 +00:00
Chris Lattner
91b18484ae Add new calling convention, as documented in LangRef.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28404 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 21:19:02 +00:00
Reid Spencer
c773de6d61 Fix some doxygen usage in these headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28394 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 19:07:54 +00:00
Chris Lattner
6fe8ff48bd Use class tags instead of struct tags. The coding standards specify this
for public classes for improved win32 compatibility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28391 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 17:17:12 +00:00
Evan Cheng
21d03f2de0 lib/Target/Target.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28386 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 20:42:07 +00:00
Owen Anderson
1d8b8535ec Change Module to use TargetData-compatible strings internally.
This is part of the on-going work on PR 761.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28379 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-18 02:10:31 +00:00
Evan Cheng
7e399c14ab Another typo. Pointed out by Nate Begeman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28353 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 18:22:14 +00:00
Evan Cheng
5beaacc189 Fix a mis-leading comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28350 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 18:08:20 +00:00
Chris Lattner
782e60150e Add a CloneModule call that exposes the mapping of values from the old module
to the new module.  Patch provided by Nick Lewycky!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28349 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 18:05:35 +00:00
Chris Lattner
6c0bfc7237 Add a new CALL node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28337 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 22:52:27 +00:00
Chris Lattner
6cacaee724 There is now a default impl of this method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28336 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 22:52:11 +00:00
Andrew Lenharth
dae9cbe8d4 Move this code to a common place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28329 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 17:42:15 +00:00
Chris Lattner
c1a8ad71e1 Add a chain to FORMAL_ARGUMENTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28319 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 06:43:59 +00:00
Reid Spencer
6413fb78ab For PR778:
Improve doxygenification of this header file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28317 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-16 06:27:31 +00:00
Chris Lattner
6460becced Improve comments, patch provided by Vladimir Prus!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28305 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-15 17:25:05 +00:00
Reid Spencer
f1925cb05c Doxygenify the comments, bringing the file level comments down to be attached
with the class that it documents. Patch suggested by Vladimir Prus.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28304 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-15 16:12:01 +00:00
Chris Lattner
c3bb700f36 improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28296 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 19:10:22 +00:00
Chris Lattner
59e8de386d Improve documentation on throwing, it is not complete still though. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28294 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 19:07:07 +00:00
Chris Lattner
fd50080fe2 This is a proper fix for the compiler warning. A termination condition is
not needed, as it can never be reached: an edge must exist.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28282 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 02:01:22 +00:00
Reid Spencer
ca960c9946 Fix an infinite loop bug that Vladimir Prus identified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-13 18:11:32 +00:00
Reid Spencer
c7365a9ec9 Add a #include <cassert> for situations where Casting.h is used standalone.
Patch contributed by Vladimir Prus.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28280 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-13 17:50:38 +00:00
Evan Cheng
ee00a1d12c Revert an un-intended change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-13 05:53:47 +00:00
Reid Spencer
3e41da29fb Don't use old-style casts. This prevents compiler warnings when CommandLine.h
is used in projects that have stricter warning control than LLVM. This also
helps us find casts more easily if we ever need to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28263 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 19:20:55 +00:00
Owen Anderson
2577c22131 Add a method to generate a string representation from a TargetData.
This continues the work on PR 761.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28239 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 07:01:44 +00:00
Owen Anderson
07000c6f01 Refactor a bunch of includes so that TargetMachine.h doesn't have to include
TargetData.h.  This should make recompiles a bit faster with my current
TargetData tinkering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28238 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 06:33:49 +00:00
Evan Cheng
647c15e58e Backing out fix for PR770. Need to re-apply it after live range splitting is possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28236 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 06:06:34 +00:00
Owen Anderson
8f60c56a06 Add a new constructor to TargetData that builds a TargetData from its
string representation.

This is part of PR 761.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28234 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 05:49:47 +00:00
Evan Cheng
13d41b9d72 Add capability to scheduler to commute nodes for profit.
If a two-address code whose first operand has uses below, it should be commuted
when possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28230 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 01:58:24 +00:00
Evan Cheng
e165a78551 Refactor scheduler code. Move register-reduction list scheduler to a
separate file. Added an initial implementation of top-down register pressure
reduction list scheduler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28226 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-11 23:55:42 +00:00
Evan Cheng
c3580cace2 Also add super- register class info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28222 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-11 07:31:44 +00:00
Chris Lattner
b77780e11e Add alloca/malloc ctors that don't take array sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28211 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-10 04:38:35 +00:00
Chris Lattner
631a19d894 This method doesn't need to be virtual, thanks to Reid for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28206 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 17:29:17 +00:00
Evan Cheng
e73701df94 PR 770 - permit coallescing of registers in subset register classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28197 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 06:37:48 +00:00
Evan Cheng
696736be8b Added sub- register classes information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28196 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 06:35:30 +00:00
Chris Lattner
b6c76ec46e Implement MASM sections correctly, without a "has masm sections flag" and a
bunch of special case code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28193 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 05:33:28 +00:00
Chris Lattner
f668ffc4c2 Split SwitchSection into the SwitchTo{Text|Data}Section functions, to better
support assemblers that distinguish the two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28183 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 04:59:30 +00:00
Chris Lattner
683d1bb712 Move methods out of line so that MutexGuard.h isn't required in the header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28178 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-08 22:00:26 +00:00
Chris Lattner
023cfb6871 Move the definition of value_use_iterator::getOperandNo to User.h where the
definition of the User class is available, this fixes the  build with some
compiler versions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28163 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-08 05:59:36 +00:00
Nate Begeman
f01f31eceb Remove unncessary include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28160 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-08 01:33:11 +00:00
Chris Lattner
a0d513ba75 Add some new methods for computing sign bit information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-06 09:26:22 +00:00
Nate Begeman
7328797b16 Somehow, I missed this part of the checkin a couple days ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28116 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-05 01:13:11 +00:00
Chris Lattner
71fe0f4a43 Add a helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28114 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-05 00:51:42 +00:00
Chris Lattner
ed5b016f0e Fix this to be a proper copy ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28111 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 21:17:35 +00:00
Chris Lattner
6e994b7492 Final pass of minor cleanups for MachineInstr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28110 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 19:36:09 +00:00
Chris Lattner
943b5e117f Remove redundancy and a level of indirection when creating machine operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28107 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 19:14:44 +00:00
Chris Lattner
02597f3b88 Move register numbers out of "extra" into "contents". Other minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 18:25:20 +00:00
Chris Lattner
8b915b4ed2 Remove and simplify some more machineinstr/machineoperand stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28105 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 18:16:01 +00:00
Chris Lattner
2d90ac7ca6 Rename MO_VirtualRegister -> MO_Register. Clean up immediate handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 18:05:43 +00:00
Chris Lattner
68ab4c6367 remove hasAllocatedReg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28103 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 17:56:20 +00:00