Commit Graph

5812 Commits

Author SHA1 Message Date
Evan Cheng
e5f6204cd5 Enabling new condition code modeling scheme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42459 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-29 00:00:36 +00:00
Evan Cheng
22a529990b If two instructions are both two-address code, favors (schedule closer to
terminator) the one that has a CopyToReg use. This fixes
2006-05-11-InstrSched.ll with -new-cc-modeling-scheme.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42453 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 22:32:30 +00:00
Evan Cheng
74d2fd8dd8 Trim some unneeded fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42442 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 19:24:24 +00:00
Owen Anderson
303f47b1dd Have PostDomTree use the newly templated DFSPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42427 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 01:23:47 +00:00
Dale Johannesen
317096ab37 Add sqrt and powi intrinsics for long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-28 01:08:20 +00:00
Owen Anderson
58ec8825d4 Convert DFSPass into a templated friend function, in preparation for making it common to DomTree and PostDomTree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42420 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 23:23:00 +00:00
Dan Gohman
82482944ed TargetAsmInfo::getAddressSize() was incorrect for x86-64 and 64-bit targets
other than PPC64. Instead of fixing it, just remove it and fix all the
places that use it to use TargetData::getPointerSize() instead, as there
aren't very many. Most of the references were in DwarfWriter.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42419 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 23:12:31 +00:00
Gordon Henriksen
fc3282221f CollectorMetadata abstractly describes stack maps for a function.
It includes:

 - location and of each safe point in machine code (identified by a
   label)
 - location of each root within the stack frame (identified by an
   offset), including the metadata tag provided to llvm.gcroot in
   the user program
 - size of the stack frame (for collectors which want to cheat on
   stack crawling :)
 - and eventually will include liveness

It is to be populated by back-ends during code-generation.

CollectorModuleMetadata aggregates this information across the
entire module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 22:18:46 +00:00
Gordon Henriksen
d9900c9442 My previous Registry.h header, as well as Collectors.h, which is the
registry for dynamically-loaded garbage collection compiler plugins.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42415 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 19:34:27 +00:00
Evan Cheng
8ed3ffee53 Oops. Forgot this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42377 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 21:38:03 +00:00
Neil Booth
117acf9e36 Whitespace cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42374 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 21:35:05 +00:00
Evan Cheng
ff11026575 - Added MRegisterInfo::getCrossCopyRegClass() hook. For register classes where reg to reg copies are not possible, this returns another register class which registers in the specified register class can be copied to (and copy back from).
- X86 copyRegToReg() now supports copying between EFLAGS and GR32 / GR64 registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42372 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 21:31:07 +00:00
Gordon Henriksen
46abf91f73 Added C and Ocaml bindings for functions, basic blocks, and
instruction creation. No support yet for instruction introspection.

Also eliminated allocas from the Ocaml bindings for portability,
and avoided unnecessary casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42367 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 20:56:12 +00:00
Evan Cheng
9efce638d3 Allow copyRegToReg to emit cross register classes copies.
Tested with "make check"!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42346 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 06:25:56 +00:00
Daniel Berlin
9f711252f5 Fix small bug in operator== for iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42331 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 00:11:59 +00:00
Duncan Sands
d98164e6ee Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42296 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25 13:53:22 +00:00
Evan Cheng
a6fb1b6743 Added major new capabilities to scheduler (only BURR for now) to support physical register dependency. The BURR scheduler can now backtrace and duplicate instructions in order to avoid "expensive / impossible to copy" values (e.g. status flag EFLAGS for x86) from being clobbered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42284 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25 01:54:36 +00:00
Evan Cheng
a3602685b3 New temporary option -new-cc-modeling-scheme to test the new cc modeling scheme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42283 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-25 01:50:04 +00:00
Daniel Berlin
e6f0479aee Comment fixups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42279 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 22:20:45 +00:00
Dan Gohman
72252732c8 Merge hasDotLoc and hasDotFile into hasDotLocAndDotFile since .loc and .file
aren't really usable without each other. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42274 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 21:09:53 +00:00
Dan Gohman
189f80dc25 Add a routine for emitting .file directives, for setting up
file numbers to use with .loc directives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42272 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 20:58:13 +00:00
Daniel Berlin
d81ccc2806 Implement offline variable substitution in order to reduce memory
and time usage.
Fixup operator == to make this work, and add a resize method to DenseMap
so we can resize our hashtable once we know how big it should be.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42269 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 19:45:49 +00:00
Dan Gohman
746767b097 explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42262 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 15:48:49 +00:00
Dan Gohman
11a7dbf127 Remove an unnecessary static_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42261 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 15:46:02 +00:00
Owen Anderson
1dcca6b2d0 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42256 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 02:33:22 +00:00
Owen Anderson
68099d58cb Merge significant portions of the DomTree and PostDomTree implementations.
The two remaining unmerged parts are DFSPass, and the Calculate().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42255 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 02:29:29 +00:00
Owen Anderson
04fa569320 Factor the calculation details for PostDomTree out of PostDominators.cpp and
into a separate header file.

Next step: merging PostDominatorCalculation.h with DominatorCalculation.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42251 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-23 22:21:00 +00:00
Owen Anderson
eefb31094f Move DFSPass back down into DominatorTree. I need to figure out what the difference is between it
and the PostDomTree version first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42250 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-23 22:16:38 +00:00
Owen Anderson
d20c824b20 Factor the dominator tree calculation details out into DominatorCalculation.h. This
change is not useful in and of itself, but it lays the groundwork for combining
the dominator and postdominator implementations.

Also, factor a few methods that are common to DominatorTree and PostDominatorTree
into DominatorTreeBase.  Again, this will make merging the two calculation methods
simpler in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42248 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-23 21:31:44 +00:00
Dale Johannesen
f1fc3a8fa6 Fix PR 1681. When X86 target uses +sse -sse2,
keep f32 in SSE registers and f64 in x87.  This
is effectively a new codegen mode.
Change addLegalFPImmediate to permit float and
double variants to do different things.
Adjust callers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-23 14:52:20 +00:00
Tanya Lattner
b636788914 Adding support for __builtin_annotation with an intrinsic called llvm.annotation. This is similar to llvm.var.annotation but is applied to expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42211 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-21 22:59:12 +00:00
Dale Johannesen
910993e8dc Change APFloat::convertFromInteger to take the incoming
bit width instead of number of words allocated, which
makes it actually work for int->APF conversions.
Adjust callers.  Add const to one of the APInt constructors
to prevent surprising match when called with const
argument.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42210 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-21 22:09:37 +00:00
Owen Anderson
4938d34772 Fix CopyFrom for non-POD data types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42208 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-21 20:55:54 +00:00
Dan Gohman
66018ea1b2 There is no {rsqrt,rcp}{p,s}d.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42190 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-21 15:24:00 +00:00
Dale Johannesen
73328d14ac More long double fixes. x86_64 should build now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42155 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 23:55:34 +00:00
Ted Kremenek
96345186a5 Previously GraphWriter assumed operator*() for node_iterator always
returned a reference type.  This patch allows operator*() to return a
non-reference type while still maintaining the old behavior when it
does return a reference type.

This patch was motivated when I tried to use "df_iterator" (see
llvm/ADT/DepthFirstIterator.h) as a "node_iterator", as df_iterator
does not return a reference type and thus we would get a compilation
error when trying to take the address of a temporary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42151 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 21:26:49 +00:00
Owen Anderson
742f9b6682 Add a flag to mark a dirty cache entry. This is not yet used, but will eventually
help non-local memdep caching.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42137 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 16:13:57 +00:00
Evan Cheng
713a98dee8 Use struct SDep instead of std::pair for SUnit pred and succ lists. First step
in tracking physical register output dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42125 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 01:38:40 +00:00
Evan Cheng
a3ca3149f2 Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value
between two registers in the specific class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42123 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 01:35:01 +00:00
Gordon Henriksen
344be5fbec Tests of the ocaml (and thus C) bindings for constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42101 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 18:07:51 +00:00
Bill Wendling
ce613280f9 Don't pass back a reference to a temporary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42086 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 09:10:16 +00:00
Bill Wendling
5f19cf5df8 The exception handling function info should be reset for each new
function. The information isn't used heavily -- it's only used at the end
of exception handling emission -- so there's no need to cache it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42078 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 05:03:44 +00:00
Gordon Henriksen
8b94a14a78 C bindings for libLLVMCore.a and libLLVMBitWriter.a.
- The naming prefix is LLVM.
- All types are represented using opaque references.
- Functions are not named LLVM{Type}{Method}; the names became
  unreadable goop. Instead, they are named LLVM{ImperativeSentence}.
- Where an attribute only appears once in the class hierarchy (e.g.,
  linkage only applies to values; parameter types only apply to
  function types), the class is omitted from identifiers for
  brevity. Tastes like methods.
- Strings are C strings or string/length tuples on a case-by-case
  basis.
- APIs which give the caller ownership of an object are not mapped
  (removeFromParent, certain constructor overloads). This keeps
  keep memory management as simple as possible.

For each library with bindings:

  llvm-c/<LIB>.h       - Declares the bindings.
  lib/<LIB>/<LIB>.cpp  - Implements the bindings.

So just link with the library of your choice and use the C header
instead of the C++ one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42077 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 03:18:57 +00:00
Gordon Henriksen
04bdf20ec1 Fixing an comment in Module.h that refers to a nonexistent parameter.
Also adding some missing svn:ignores that've been bothering me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 02:09:34 +00:00
Bill Wendling
6e19896999 Objective-C was generating EH frame info like this:
"_-[NSString(local) isNullOrNil]".eh = 0
        .no_dead_strip  "_-[NSString(local) isNullOrNil]".eh

The ".eh" should be inside the quotes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42074 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 01:47:22 +00:00
Bill Wendling
ecd9137758 Add support for appending a suffix to the end of a mangled name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42071 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 22:39:32 +00:00
Devang Patel
8feb1f4467 Do not hide APInt::dump() inside #ifndef NDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42068 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 22:24:00 +00:00
Dale Johannesen
1abac0d725 Implement x86 long double in jit (not really
complete, but common cases work)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42043 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 18:44:13 +00:00
Chris Lattner
76c1b97e40 Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo
Add a new DenseMapInfo::isEqual method to allow clients to redefine
the equality predicate used when probing the hash table.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42042 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 18:34:04 +00:00
Daniel Berlin
430817ba18 That's what i get for using carbon emacs in a terminal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42040 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 18:05:59 +00:00
Daniel Berlin
8180cf65a5 Fix iterator so it doesn't sometimes report bits that aren't in the bitmap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42039 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 18:04:21 +00:00
Dan Gohman
e1b50639a8 Add a utility function to SDOperand for testing if a value is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42038 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-17 17:44:31 +00:00
Daniel Berlin
c6d939818b Fix bug in andersen's related to test_and_set.
Add operator == and != to SparseBitVector.
Simplify code for test_and_set


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42018 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-16 23:59:53 +00:00
Daniel Berlin
7f44657c2f Fix a few bugs related to zero'ing of elements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42017 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-16 22:31:47 +00:00
Chris Lattner
5bda9e49ec Fix PR1666, SPASS with the CBE and 254.gap with the CBE.
GCC optimizes away things like ptr < NULL  to false.  To "fix" this,
have the CBE emit casts of pointers to intptr_t when doing relational
pointer comparisons.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41983 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-15 06:51:03 +00:00
Owen Anderson
7e9edda51d Remove RLE from the headers, since the pass itself is gone now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41971 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-14 22:54:46 +00:00
Dale Johannesen
9e3d3abd93 Remove the assumption that FP's are either float or
double from some of the many places in the optimizers
it appears, and do something reasonable with x86
long double.
Make APInt::dump() public, remove newline, use it to
dump ConstantSDNode's.
Allow APFloats in FoldingSet.
Expand X86 backend handling of long doubles (conversions
to/from int, mostly).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41967 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-14 22:26:36 +00:00
Dan Gohman
f82e1e66ce And an FoldingSetImpl::NodeID::AddInteger overload for int64_t, to avoid
ambiguity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41960 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-14 20:48:42 +00:00
Dan Gohman
92dfe2001e Remove isReg, isImm, and isMBB, and change all their users to use
isRegister, isImmediate, and isMachineBasicBlock, which are equivalent,
and more popular.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41958 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-14 20:33:02 +00:00
Dan Gohman
cb648f90a2 Remove spurious consts. This fixes warnings with compilers that
are strict about such things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41956 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-14 20:08:19 +00:00
Chris Lattner
53698d7694 remove dead enum value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41925 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13 06:18:04 +00:00
Chris Lattner
8a901985bc Make single-argument ctors explicit to avoid tricky bugs :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41924 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13 06:15:57 +00:00
Evan Cheng
ffddf97e5d Added getNumDefs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41901 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-13 00:16:29 +00:00
Evan Cheng
05e69c1f23 Yet another getTargetNode variant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41898 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-12 23:39:49 +00:00
Daniel Berlin
ec39cb98d3 Move dump out of class, use "\n" instead of endl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41872 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 22:58:27 +00:00
Dale Johannesen
3f6eb7419d Add APInt interfaces to APFloat (allows directly
access to bits).  Use them in place of float and
double interfaces where appropriate.
First bits of x86 long double constants handling 
(untested, probably does not work).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41858 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 18:32:33 +00:00
Daniel Berlin
6320260e06 Convert to use ilist and non-pointer lists for extra goodness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41855 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 17:42:22 +00:00
Bill Wendling
4e319a30ba Add accessor method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41854 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 17:24:38 +00:00
Bill Wendling
ef4a661725 Add a bool to indicate if we should set the "indirect encoding" bit in the Dwarf
information for EH.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41852 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 17:20:55 +00:00
Duncan Sands
f7331b3dd7 Fold the adjust_trampoline intrinsic into
init_trampoline.  There is now only one
trampoline intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41841 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 14:10:23 +00:00
Bill Wendling
d60da495cd The personality function on Darwin needs a global stub. We then refer to
that global stub instead of doing the ".set" thingy we were doing before.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41838 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 08:27:17 +00:00
Owen Anderson
29ce95511f Add a ValueInfoT template parameter to DenseMap so that it can properly make decisions
based on whether the key AND the value require ctors/dtors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41837 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 05:08:05 +00:00
Owen Anderson
98153ecbc1 Don't bother to initialize values corresponding to empty or tombstone
keys.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41834 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 04:43:51 +00:00
Daniel Berlin
16ebc260bd Fix bugs with &=, intersect with complement. Add three argument version of intersect with complement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41832 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 04:11:28 +00:00
Owen Anderson
9544dc294f Fix non-deterministic behavior in the DenseMap copy constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41831 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 03:48:08 +00:00
Daniel Berlin
1b6998e8d6 Add remaining functions necessary for andersen's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41830 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-11 01:38:07 +00:00
Daniel Berlin
2f5d5937ec Add SparseBitVector implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41790 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-09 01:10:40 +00:00
Chuck Rose III
418d360518 Fix for VisualStudio. It is treating a 2 bit enum as a signed int for comparison purposes, causing failures. Using an extra bit fixes it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41784 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-08 04:17:08 +00:00
Rafael Espindola
588af2fb99 Add support for having different alignment for objects on call frames.
The x86-64 ABI states that objects passed on the stack have
8 byte alignment. Implement that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41768 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 14:52:14 +00:00
Anton Korobeynikov
8806c7b1f5 Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed, because they just "mark" register
liveins and we let frontend solve type issue, not lowering code :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41763 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 11:39:35 +00:00
Owen Anderson
718cb665ca Add lengthof and endof templates that hide a lot of sizeof computations.
Patch by Sterling Stein!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41758 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-07 04:06:50 +00:00
David Greene
af992f782f Constify to catch bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41751 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06 19:46:46 +00:00
Dale Johannesen
43421b3dd7 Next round of APFloat changes.
Use APFloat in UpgradeParser and AsmParser.
Change all references to ConstantFP to use the
APFloat interface rather than double.  Remove
the ConstantFP double interfaces.
Use APFloat functions for constant folding arithmetic
and comparisons.
(There are still way too many places APFloat is
just a wrapper around host float/double, but we're
getting there.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41747 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06 18:13:44 +00:00
David Greene
2c17c4d8d9 Pluggable coalescers inplementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41743 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-06 16:18:45 +00:00
Evan Cheng
38a90969ea Accidentially left this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41730 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-05 21:58:18 +00:00
Evan Cheng
f3bb2e65d1 Use pool allocator for all the VNInfo's to improve memory access locality. This reduces coalescing time on siod Mac OS X PPC by 35%. Also remove the back ptr from VNInfo to LiveInterval and other tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41729 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-05 21:46:51 +00:00
Evan Cheng
188b5224fd Added Reset() to free all allocated memory regions and reset state to be the same as right after ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41728 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-05 21:41:34 +00:00
Dale Johannesen
6d5e7d917b fix reversal bug in preceding checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41705 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 17:32:27 +00:00
David Greene
b8f74793b9 Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41697 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-04 15:46:09 +00:00
Dale Johannesen
c4dd3c3b51 Add mod, copysign, abs operations to APFloat.
Implement some constant folding in SelectionDAG and
DAGCombiner using APFloat.  Remove double versions
of constructor and getValue from ConstantFPSDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41664 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 23:34:27 +00:00
Dale Johannesen
ee8476847d Revise per review of previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41645 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 17:03:33 +00:00
Evan Cheng
d4e4937b79 Remove an unnecessary element, saving 4 bytes per LiveInterval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41641 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 08:26:44 +00:00
Dale Johannesen
eaf089430e Enhance APFloat to retain bits of NaNs (fixes oggenc).
Use APFloat interfaces for more references, mostly
of ConstantFPSDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 04:03:46 +00:00
Ted Kremenek
1a0190f4f0 Added Graphviz escaping for the '|' character.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41610 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 17:01:41 +00:00
Evan Cheng
35b35c5c32 Add a variant of foldMemoryOperand to fold any load / store, not just load / store from / to stack slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41597 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 05:52:20 +00:00
Evan Cheng
42a0f9a4fb Added CreateFrameIndex to create a FrameIndex MachineOperand without a MachineInstr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41596 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 05:50:32 +00:00
Dale Johannesen
f04afdbb48 Change LegalFPImmediates to use APFloat.
Add APFloat interfaces to ConstantFP, SelectionDAG.
Fix integer bit in double->APFloat conversion.
Convert LegalizeDAG to use APFloat interface in
ConstantFPSDNode uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41587 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-30 00:23:21 +00:00
Evan Cheng
7ecb38be0a Change LiveRange so it keeps a pointer to the VNInfo rather than an index.
Changes related modules so VNInfo's are not copied. This decrease
copy coalescing time by 45% and overall compilation time by 10% on siod.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41579 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-29 20:45:00 +00:00
Chris Lattner
a5c0d1ec77 Silence implicit 64->32-bit conversion warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41567 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-29 16:32:50 +00:00
Chris Lattner
cd3c4cac6e getMinSignedBits needs to take into consider the sign bit when the value is positive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41566 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-29 16:21:18 +00:00