Chris Lattner
a2ebb9aadd
Fix 80 col violation
...
llvm-svn: 42976
2007-10-15 05:30:27 +00:00
Neil Booth
5fe658b21d
Consolidate logic for creating NaNs. Silence compiler warning.
...
llvm-svn: 42966
2007-10-14 10:39:51 +00:00
Evan Cheng
8d6da9142c
When coalescing an EXTRACT_SUBREG and the dst register is a physical register,
...
the source register will be coalesced to the super register of the LHS. Properly
merge in the live ranges of the resulting coalesced interval that were part of
the original source interval to the live interval of the super-register.
llvm-svn: 42961
2007-10-14 10:08:34 +00:00
Evan Cheng
cdf3609130
Revert 42908 for now.
...
llvm-svn: 42960
2007-10-14 05:57:21 +00:00
Evan Cheng
7082dcf605
Change unfoldMemoryOperand(). User is now responsible for passing in the
...
register used by the unfolded instructions. User can also specify whether to
unfold the load, the store, or both.
llvm-svn: 42946
2007-10-13 02:35:06 +00:00
Evan Cheng
9490e0d078
Optionally create a MachineInstr without default implicit operands.
...
llvm-svn: 42945
2007-10-13 02:23:01 +00:00
Arnold Schwaighofer
1f0da1fefb
Corrected many typing errors. And removed 'nest' parameter handling
...
for fastcc from X86CallingConv.td. This means that nested functions
are not supported for calling convention 'fastcc'.
llvm-svn: 42934
2007-10-12 21:30:57 +00:00
Chris Lattner
e6f1c3813d
don't use intptr_t without including it.
...
llvm-svn: 42921
2007-10-12 18:16:23 +00:00
Chris Lattner
4c461477bd
Make this compute the correct offset, handling alignment of the element
...
pointer correctly.
llvm-svn: 42918
2007-10-12 17:49:52 +00:00
Neil Booth
b93d90e98c
Implement correctly-rounded decimal->binary conversion, i.e. conversion
...
from user input strings.
Such conversions are more intricate and subtle than they may appear;
it is unlikely I have got it completely right first time. I would
appreciate being informed of any bugs and incorrect roundings you
might discover.
llvm-svn: 42912
2007-10-12 16:02:31 +00:00
Dan Gohman
dc35bd79ca
Change the names used for internal labels to use the current
...
function symbol name instead of a codegen-assigned function
number.
Thanks Evan! :-)
llvm-svn: 42908
2007-10-12 14:53:36 +00:00
Evan Cheng
aa2d6ef81d
EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like
...
(almost) a register copy. However, it always coalesced to the register of the
RHS (the super-register). All uses of the result of a EXTRACT_SUBREG are sub-
register uses which adds subtle complications to load folding, spiller rewrite,
etc.
llvm-svn: 42899
2007-10-12 08:50:34 +00:00
Evan Cheng
6fd54fd19c
Cosmetic.
...
llvm-svn: 42897
2007-10-12 08:40:44 +00:00
Chris Lattner
7119397fa1
make operator== work with non-equal sized bitvectors, as long as
...
the extra bits are all zeros. This allows "010" and "010000" to be
treated as equal.
llvm-svn: 42889
2007-10-12 03:48:59 +00:00
Dan Gohman
be37007e64
Add intrinsics for sin, cos, and pow. These use llvm_anyfloat_ty, and so
...
may be overloaded with vector types. And add a testcase for codegen for
these.
llvm-svn: 42885
2007-10-12 00:01:22 +00:00
Dan Gohman
fd66486950
Add runtime library names for pow.
...
llvm-svn: 42880
2007-10-11 23:09:10 +00:00
Dan Gohman
daee002438
Add an ISD::FPOW node type.
...
llvm-svn: 42879
2007-10-11 23:06:37 +00:00
Ted Kremenek
3b74526054
Provided accessors to internal allocator for ImutAVLTree and ImmutableSet.
...
Added postfix ++,-- support for ImmutableSet::iterator.
llvm-svn: 42877
2007-10-11 21:51:04 +00:00
Arnold Schwaighofer
9ccea99165
Added tail call optimization to the x86 back end. It can be
...
enabled by passing -tailcallopt to llc. The optimization is
performed if the following conditions are satisfied:
* caller/callee are fastcc
* elf/pic is disabled OR
elf/pic enabled + callee is in module + callee has
visibility protected or hidden
llvm-svn: 42870
2007-10-11 19:40:01 +00:00
Dale Johannesen
007aa378ad
Next PPC long double bits. First cut at constants.
...
No compile-time support for constant operations yet,
just format transformations. Make readers and
writers work. Split constants into 2 doubles in
Legalize.
llvm-svn: 42865
2007-10-11 18:07:22 +00:00
Chris Lattner
bbd5530754
make bitvector &= do the right thing if vectors have mismatched length.
...
llvm-svn: 42860
2007-10-11 06:12:33 +00:00
Chris Lattner
fc668d1233
Add a new use_iterator::atEnd() method, which allows us to shrink
...
pred_iterator down to a single ivar.
llvm-svn: 42859
2007-10-11 04:18:11 +00:00
Ted Kremenek
41eee516d7
Added iterators to ImmutableSet.
...
llvm-svn: 42851
2007-10-11 00:14:49 +00:00
Ted Kremenek
6a97cf6d65
Added some doxygen comments to ImmutableSet.
...
llvm-svn: 42850
2007-10-10 23:47:03 +00:00
Ted Kremenek
abd77cccb8
Removed uninformative assertions that catch problems that will
...
fire anyway at runtime due to a NULL dereference.
llvm-svn: 42848
2007-10-10 23:35:04 +00:00
Ted Kremenek
4d984579da
Removed "height" of an AVL tree node from its Profile. This is
...
implicitly captured by using the addresses of its children in the
profile.
llvm-svn: 42847
2007-10-10 23:32:01 +00:00
Ted Kremenek
4479f86c0f
Removed spurious forward declaration to a structure that will no longer be used.
...
llvm-svn: 42839
2007-10-10 20:45:34 +00:00
Ted Kremenek
45f3bb8239
Added some doxygen comments to a few methods of ImutAVLTree.
...
llvm-svn: 42837
2007-10-10 20:44:21 +00:00
Ted Kremenek
6c5107ced1
Added preliminary support for iterators in ImutAVLTree.
...
Implemented ImutAVLTree::isEqual.
llvm-svn: 42833
2007-10-10 18:11:16 +00:00
Ted Kremenek
0818f6e7e4
Renamed internal method "Create" of ImutAVLTree to "CreateNode".
...
llvm-svn: 42825
2007-10-10 16:27:33 +00:00
Bill Wendling
f7c7ed2740
Fix 80-column violations
...
llvm-svn: 42823
2007-10-10 05:45:59 +00:00
Dale Johannesen
666323eacd
Next PPC long double bits: ppcf128->i32 conversion.
...
Surprisingly complicated.
Adds getTargetNode for 2 outputs, no inputs (missing).
llvm-svn: 42822
2007-10-10 01:01:31 +00:00
Chris Lattner
f5ea386698
Add new MemoryBuffer::getMemBufferCopy method.
...
llvm-svn: 42815
2007-10-09 21:46:38 +00:00
Devang Patel
1999d22b7f
Fix indentation.
...
llvm-svn: 42814
2007-10-09 21:41:00 +00:00
Ted Kremenek
12bfa1ccbc
Added implementation of immutable (functional) maps and sets, as
...
implemented on top of a functional AVL tree. The AVL balancing code
is inspired by the OCaml implementation of Map, which also uses a functional
AVL tree.
Documentation is currently limited and cleanups are planned, but this code
compiles and has been tested.
llvm-svn: 42813
2007-10-09 21:38:09 +00:00
Devang Patel
530f975cf0
Add LLVMFoldingBuilder
...
llvm-svn: 42806
2007-10-09 19:49:19 +00:00
Dan Gohman
850ff11022
Remove an unnecessary friend declaration.
...
llvm-svn: 42805
2007-10-09 18:39:48 +00:00
Chris Lattner
fc16c0a026
update prototype, fixing build error
...
llvm-svn: 42789
2007-10-09 16:27:44 +00:00
Dan Gohman
66966403ce
Pass argc by value, not by reference, since it isn't modified.
...
llvm-svn: 42788
2007-10-09 16:04:57 +00:00
Chris Lattner
38d49f5d90
Fix problems where DenseMap used operator!= instead of correctly
...
calling the traits implementation of isEqual.
llvm-svn: 42782
2007-10-09 05:42:12 +00:00
Chris Lattner
5c50f59690
Change a #include into a forward declaration
...
llvm-svn: 42781
2007-10-09 03:40:30 +00:00
Dan Gohman
ac546cc28f
Mark the prefetch intrinsic as IntrWriteArgMem, instead of the
...
default of IntrWriteMem, to at least indicate that it doesn't
"capture" the argument pointer.
llvm-svn: 42768
2007-10-08 21:15:07 +00:00
Gordon Henriksen
44dd8fbd26
C and Objective Caml bindings for PHINode::addIncoming etc.
...
llvm-svn: 42760
2007-10-08 18:14:39 +00:00
Dan Gohman
b08c8bfe41
Add convenience overloads of SelectionDAG::getNode that take a SDVTList
...
and individual SDOperand operands.
llvm-svn: 42753
2007-10-08 15:49:58 +00:00
Dan Gohman
ea3c73629f
Fix grammar in a comment.
...
llvm-svn: 42748
2007-10-08 15:10:04 +00:00
Dan Gohman
13ab93efde
Add explicit keywords.
...
llvm-svn: 42747
2007-10-08 15:08:41 +00:00
Neil Booth
b618216e56
Add a new function tcExtract for extracting a bignum from an
...
arbitrary range of bits embedded in the middle of another bignum.
This kind of operation is desirable in many cases of software
floating point, e.g. converting bignum integers to floating point
numbers of fixed precision (you want to extract the precision most
significant bits).
Elsewhere, add an assertion, and exit the shift functions early if
the shift count is zero.
llvm-svn: 42745
2007-10-08 13:47:12 +00:00
Owen Anderson
74529b7d5f
Begin the process of allowing DomTree on MBB's. Step One: template DomTreeNode by making it a typedef of a templated DomTreeNodeBase.
...
llvm-svn: 42743
2007-10-08 07:44:39 +00:00
Chris Lattner
bcd30bb0cd
Allow passes to just pass up "FunctionPass(&ID)" instead of "FunctionPass((intptr_t)&ID)"
...
llvm-svn: 42741
2007-10-08 03:45:44 +00:00
Gordon Henriksen
783f7bbabd
C and Objective Caml bindings for getFunction and getNamedGlobal. Also enhanced
...
the Objective Caml 'declare_*' functions to behave more or less like
getOrInsertFunction.
llvm-svn: 42740
2007-10-08 03:45:09 +00:00
Chris Lattner
7cdae91966
Finish off PR1723, by working around some strange compiler bug.
...
llvm-svn: 42737
2007-10-07 17:57:10 +00:00
Gordon Henriksen
751ebf7b9a
C and Objective Caml bindings for GlobalVariable::isConstant.
...
llvm-svn: 42736
2007-10-07 17:31:42 +00:00
Neil Booth
03f58ab706
Add back convertFromSignExtendedInteger.
...
llvm-svn: 42735
2007-10-07 12:15:41 +00:00
Neil Booth
6c1c8588ae
Reimplement convertFromUnsignedInteger so it is passed a const bignum.
...
It used to modify its argument in-place.
This interface is saner and the implementation more efficient. It will
be needed for decimal->binary conversion.
llvm-svn: 42733
2007-10-07 12:07:53 +00:00
Neil Booth
5f00973393
convertFromInteger, as originally written, expected sign-extended
...
input. APInt unfortunately zero-extends signed integers, so Dale
modified the function to expect zero-extended input. Make this
assumption explicit in the function name.
llvm-svn: 42732
2007-10-07 11:45:55 +00:00
Neil Booth
d3985924f4
combineLostFractions does not need to be a member function
...
llvm-svn: 42729
2007-10-07 08:51:21 +00:00
Daniel Berlin
fb6a79cdd5
Some more problems noticed by Curtis
...
llvm-svn: 42717
2007-10-07 04:47:57 +00:00
Gordon Henriksen
ffb4876cfb
C and Objective Caml bindings for PATypeHolder.
...
llvm-svn: 42713
2007-10-07 00:13:35 +00:00
Gordon Henriksen
c3d661a0ee
Bindings for the verifier.
...
llvm-svn: 42707
2007-10-06 21:00:36 +00:00
Gordon Henriksen
ed7beaa3fa
Adopting a uniform naming convention for type constructors in bindings.
...
llvm-svn: 42698
2007-10-06 16:05:20 +00:00
Gordon Henriksen
1046c73d12
Adopting a uniform naming convention for constant constructors in bindings.
...
llvm-svn: 42697
2007-10-06 15:11:06 +00:00
Gordon Henriksen
7ce3176696
Adding C and Ocaml bindings for ConstantExpr.
...
llvm-svn: 42696
2007-10-06 14:29:36 +00:00
Anton Korobeynikov
8d8f94c278
Include DataTypes.h to provide intptr_t type. This fixes OpenBSD compilation of this file.
...
Inspired by Laurence Tratt's patch
llvm-svn: 42695
2007-10-06 13:07:11 +00:00
Evan Cheng
8ff5335bb6
Oops. Forgot this.
...
llvm-svn: 42691
2007-10-06 08:09:29 +00:00
Neil Booth
0ea72a9a91
Generalize tcFullMultiply so that the operands can be of differing
...
part widths. Also, return the number of parts actually required to
hold the result's value.
Remove an over-cautious condition from rounding of float->hex conversion.
llvm-svn: 42669
2007-10-06 00:24:48 +00:00
Gordon Henriksen
1d0d24c4fd
Wrapping Value::dump.
...
llvm-svn: 42668
2007-10-06 00:08:49 +00:00
Gordon Henriksen
7330acdec7
Removing the silly CHelpers header by rolling wrap and unwrap into the C
...
bindings headers themselves, hidden behind #ifdef __cplusplus.
llvm-svn: 42666
2007-10-05 23:59:36 +00:00
Dale Johannesen
c0154c06d6
First round of ppc long double. call/return and
...
basic arithmetic works.
Rename RTLIB long double functions to distinguish
different flavors of long double; the lib functions
have different names, alas.
llvm-svn: 42644
2007-10-05 20:04:43 +00:00
Chris Lattner
f85527e131
Mark count method const.
...
llvm-svn: 42639
2007-10-05 17:40:38 +00:00
Dan Gohman
3c2c1c3cce
SMUL_LOHI and UMUL_LOHI are commutative.
...
llvm-svn: 42633
2007-10-05 14:09:33 +00:00
Dan Gohman
5b89b1ef8f
Define target-indepenent SDNode types for multiply and divide that
...
produce two results.
llvm-svn: 42632
2007-10-05 14:07:56 +00:00
Duncan Sands
99452793ac
Fix typo in comment.
...
llvm-svn: 42631
2007-10-05 10:37:00 +00:00
Daniel Berlin
f86366ec2d
Fix intersectWithComplement bug noticed by Curtis Dunham
...
Optimize |= case for empty RHS
llvm-svn: 42629
2007-10-05 05:10:53 +00:00
Evan Cheng
79e9713b11
If a node that defines a physical register that is expensive to copy. The
...
scheduler will try a number of tricks in order to avoid generating the
copies. This may not be possible in case the node produces a chain value
that prevent movement. Try unfolding the load from the node before to allow
it to be moved / cloned.
llvm-svn: 42625
2007-10-05 01:39:18 +00:00
Evan Cheng
f4cf5dcdd2
- Added a few target hooks to generate load / store instructions from / to any
...
address (not just from / to frameindexes).
- Added target hooks to unfold load / store instructions / SDNodes into separate
load, data processing, store instructions / SDNodes.
llvm-svn: 42621
2007-10-05 01:32:41 +00:00
Evan Cheng
4852303bdb
Add a variant of getTargetNode() that takes a vector of MVT::ValueType.
...
llvm-svn: 42620
2007-10-05 01:10:49 +00:00
Daniel Berlin
f5009110bf
Fix the previous bug a slightly different way (by modifying how find_next works)
...
llvm-svn: 42613
2007-10-04 21:27:17 +00:00
Daniel Berlin
c1973961c9
Fix off by one error in iterator
...
llvm-svn: 42612
2007-10-04 21:18:20 +00:00
Daniel Berlin
ffffead7df
It helps a lot when you check for the end of your list before randomly
...
dereferencing things.
llvm-svn: 42605
2007-10-04 05:29:36 +00:00
Daniel Berlin
2738730c0f
Make SparseBitVector::set actually work properly when sets are not in ascending or descending order.
...
llvm-svn: 42604
2007-10-04 05:25:51 +00:00
Neil Booth
8f1946fa22
Add APFloat -> hexadecimal string conversion, as per %a and %A in C99.
...
Useful for diagnostics and debugging.
llvm-svn: 42598
2007-10-03 22:26:02 +00:00
Owen Anderson
8313e75ea7
Completely merge the implementation details of DomTree and PostDomTree.
...
Also, add a FIXME for a bug in PostDomTree calculation I noticed while writing this,
llvm-svn: 42593
2007-10-03 21:25:45 +00:00
Owen Anderson
87337924d5
Add a GraphTraits partial specialization to make the inverse of an inverse be the same as the underlying graph.
...
llvm-svn: 42592
2007-10-03 21:24:38 +00:00
Chris Lattner
99f6ab7e4c
Add initial iterator support for folding set.
...
llvm-svn: 42589
2007-10-03 21:12:09 +00:00
Dan Gohman
8c43e41d9b
Fix a using namespace llvm; in a header file.
...
llvm-svn: 42584
2007-10-03 19:04:09 +00:00
Neil Booth
1ca1f80b38
Tweak RoundAwayFromZero the bit number below which is truncated, and make
...
it const.
Preparation for APFloat -> hexadecimal string conversion.
llvm-svn: 42576
2007-10-03 15:16:41 +00:00
Gordon Henriksen
80f35e0d4c
Regenerate.
...
llvm-svn: 42575
2007-10-03 12:07:14 +00:00
Owen Anderson
b60f254975
Factor some code from the DomTree and PostDomTree calculate methods up into
...
each one's runOnFunction method.
llvm-svn: 42563
2007-10-03 03:20:17 +00:00
Dale Johannesen
4d4e77af8e
Rewrite sqrt and powi to use anyfloat. By popular demand.
...
llvm-svn: 42537
2007-10-02 17:43:59 +00:00
Evan Cheng
a3a67596f6
Remove simple scheduler.
...
llvm-svn: 42499
2007-10-01 20:44:07 +00:00
Dale Johannesen
28e19a48ce
Add getABITypeSize, getABITypeSizeInBits
...
llvm-svn: 42488
2007-10-01 16:03:14 +00:00
Dan Gohman
9b943453f5
Add empty() member functions to a few container-like classes.
...
llvm-svn: 42487
2007-10-01 16:01:23 +00:00
Chris Lattner
b06396c588
Add a helper useful when mapping from a map element to its hash node.
...
llvm-svn: 42480
2007-09-30 08:31:46 +00:00
Owen Anderson
46ade4eb9b
Template-ize more of the DomTree internal implementation details. Only the calculate() methods for DomTree and PostDomTree remain to be merged/template-ized.
...
llvm-svn: 42476
2007-09-30 04:17:16 +00:00
Chris Lattner
18a9273e61
Add a new DenseSet abstraction.
...
llvm-svn: 42474
2007-09-30 00:47:20 +00:00
Duncan Sands
7b908dda92
Add newline at end of file.
...
llvm-svn: 42470
2007-09-29 16:38:37 +00:00
Gordon Henriksen
37ca83d4e9
Collector is the base class for garbage collection code generators.
...
This version enhances the previous patch to add root initialization
as discussed here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053455.html
Collector gives its subclasses control over generic algorithms:
unsigned NeededSafePoints; //< Bitmask of required safe points.
bool CustomReadBarriers; //< Default is to insert loads.
bool CustomWriteBarriers; //< Default is to insert stores.
bool CustomRoots; //< Default is to pass through to backend.
bool InitRoots; //< If set, roots are nulled during lowering.
It also has callbacks which collectors can hook:
/// If any of the actions are set to Custom, this is expected to
/// be overriden to create a transform to lower those actions to
/// LLVM IR.
virtual Pass *createCustomLoweringPass() const;
/// beginAssembly/finishAssembly - Emit module metadata as
/// assembly code.
virtual void beginAssembly(Module &M, std::ostream &OS,
AsmPrinter &AP,
const TargetAsmInfo &TAI) const;
virtual void finishAssembly(Module &M,
CollectorModuleMetadata &CMM,
std::ostream &OS, AsmPrinter &AP,
const TargetAsmInfo &TAI) const;
Various other independent algorithms could be implemented, but were
not necessary for the initial two collectors. Some examples are
listed here:
http://llvm.org/docs/GarbageCollection.html#collector-algos
llvm-svn: 42466
2007-09-29 02:13:43 +00:00
Gordon Henriksen
6547e5a2bc
Demoting CHelpers.h to include/llvm/Support.
...
llvm-svn: 42465
2007-09-29 01:38:42 +00:00
Evan Cheng
5fb5a1f389
Enabling new condition code modeling scheme.
...
llvm-svn: 42459
2007-09-29 00:00:36 +00:00
Evan Cheng
a5e595d23a
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.
llvm-svn: 42453
2007-09-28 22:32:30 +00:00
Evan Cheng
038dcc5136
Trim some unneeded fields.
...
llvm-svn: 42442
2007-09-28 19:24:24 +00:00
Owen Anderson
0fbef94cd0
Have PostDomTree use the newly templated DFSPass.
...
llvm-svn: 42427
2007-09-28 01:23:47 +00:00
Dale Johannesen
25a00a63eb
Add sqrt and powi intrinsics for long double.
...
llvm-svn: 42423
2007-09-28 01:08:20 +00:00
Owen Anderson
ee73e0b8cb
Convert DFSPass into a templated friend function, in preparation for making it common to DomTree and PostDomTree.
...
llvm-svn: 42420
2007-09-27 23:23:00 +00:00
Dan Gohman
a1d46c7d0a
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.
llvm-svn: 42419
2007-09-27 23:12:31 +00:00
Gordon Henriksen
613afce430
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.
llvm-svn: 42418
2007-09-27 22:18:46 +00:00
Gordon Henriksen
658c57eb66
My previous Registry.h header, as well as Collectors.h, which is the
...
registry for dynamically-loaded garbage collection compiler plugins.
llvm-svn: 42415
2007-09-27 19:34:27 +00:00
Evan Cheng
478134e5f4
Oops. Forgot this.
...
llvm-svn: 42377
2007-09-26 21:38:03 +00:00
Neil Booth
0fa3ea79ac
Whitespace cleanup.
...
llvm-svn: 42374
2007-09-26 21:35:05 +00:00
Evan Cheng
8728c3376a
- 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.
llvm-svn: 42372
2007-09-26 21:31:07 +00:00
Gordon Henriksen
c23b66c58b
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.
llvm-svn: 42367
2007-09-26 20:56:12 +00:00
Evan Cheng
c1e4e3743b
Allow copyRegToReg to emit cross register classes copies.
...
Tested with "make check"!
llvm-svn: 42346
2007-09-26 06:25:56 +00:00
Daniel Berlin
08f8188adc
Fix small bug in operator== for iterators
...
llvm-svn: 42331
2007-09-26 00:11:59 +00:00
Duncan Sands
4a229e908a
Fix spelling.
...
llvm-svn: 42296
2007-09-25 13:53:22 +00:00
Evan Cheng
5924bf7d3b
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.
...
llvm-svn: 42284
2007-09-25 01:54:36 +00:00
Evan Cheng
8a7dec736d
New temporary option -new-cc-modeling-scheme to test the new cc modeling scheme.
...
llvm-svn: 42283
2007-09-25 01:50:04 +00:00
Daniel Berlin
c82c9f078a
Comment fixups
...
llvm-svn: 42279
2007-09-24 22:20:45 +00:00
Dan Gohman
0cc9d1b93b
Merge hasDotLoc and hasDotFile into hasDotLocAndDotFile since .loc and .file
...
aren't really usable without each other.
llvm-svn: 42274
2007-09-24 21:09:53 +00:00
Dan Gohman
bd8331da87
Add a routine for emitting .file directives, for setting up
...
file numbers to use with .loc directives.
llvm-svn: 42272
2007-09-24 20:58:13 +00:00
Daniel Berlin
5d7136a1df
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.
llvm-svn: 42269
2007-09-24 19:45:49 +00:00
Dan Gohman
75470c3bf1
explicit keywords.
...
llvm-svn: 42262
2007-09-24 15:48:49 +00:00
Dan Gohman
043689cf7d
Remove an unnecessary static_cast.
...
llvm-svn: 42261
2007-09-24 15:46:02 +00:00
Owen Anderson
32eed1542e
Fix typo.
...
llvm-svn: 42256
2007-09-24 02:33:22 +00:00
Owen Anderson
4f7c390939
Merge significant portions of the DomTree and PostDomTree implementations.
...
The two remaining unmerged parts are DFSPass, and the Calculate().
llvm-svn: 42255
2007-09-24 02:29:29 +00:00
Owen Anderson
15efb43db7
Factor the calculation details for PostDomTree out of PostDominators.cpp and
...
into a separate header file.
Next step: merging PostDominatorCalculation.h with DominatorCalculation.h.
llvm-svn: 42251
2007-09-23 22:21:00 +00:00
Owen Anderson
da853a400f
Move DFSPass back down into DominatorTree. I need to figure out what the difference is between it
...
and the PostDomTree version first.
llvm-svn: 42250
2007-09-23 22:16:38 +00:00
Owen Anderson
84c357fc26
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.
llvm-svn: 42248
2007-09-23 21:31:44 +00:00
Dale Johannesen
e36c400255
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.
llvm-svn: 42246
2007-09-23 14:52:20 +00:00
Tanya Lattner
293c037336
Adding support for __builtin_annotation with an intrinsic called llvm.annotation. This is similar to llvm.var.annotation but is applied to expressions.
...
llvm-svn: 42211
2007-09-21 22:59:12 +00:00
Dale Johannesen
4230512f32
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.
llvm-svn: 42210
2007-09-21 22:09:37 +00:00
Owen Anderson
3e466535cf
Fix CopyFrom for non-POD data types.
...
llvm-svn: 42208
2007-09-21 20:55:54 +00:00
Dan Gohman
3bb3452dbc
There is no {rsqrt,rcp}{p,s}d.
...
llvm-svn: 42190
2007-09-21 15:24:00 +00:00
Dale Johannesen
7d67e547b5
More long double fixes. x86_64 should build now.
...
llvm-svn: 42155
2007-09-19 23:55:34 +00:00
Ted Kremenek
ebc5500e50
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.
llvm-svn: 42151
2007-09-19 21:26:49 +00:00
Owen Anderson
c201cbc802
Add a flag to mark a dirty cache entry. This is not yet used, but will eventually
...
help non-local memdep caching.
llvm-svn: 42137
2007-09-19 16:13:57 +00:00
Evan Cheng
0effc3a6b8
Use struct SDep instead of std::pair for SUnit pred and succ lists. First step
...
in tracking physical register output dependencies.
llvm-svn: 42125
2007-09-19 01:38:40 +00:00
Evan Cheng
f73fb6261b
Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value
...
between two registers in the specific class.
llvm-svn: 42123
2007-09-19 01:35:01 +00:00
Gordon Henriksen
dc88c06732
Tests of the ocaml (and thus C) bindings for constants.
...
llvm-svn: 42101
2007-09-18 18:07:51 +00:00
Bill Wendling
e8c885f261
Don't pass back a reference to a temporary.
...
llvm-svn: 42086
2007-09-18 09:10:16 +00:00
Bill Wendling
69833b61ac
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.
llvm-svn: 42078
2007-09-18 05:03:44 +00:00
Gordon Henriksen
76a0374b25
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.
llvm-svn: 42077
2007-09-18 03:18:57 +00:00
Gordon Henriksen
64e72c034a
Fixing an comment in Module.h that refers to a nonexistent parameter.
...
Also adding some missing svn:ignores that've been bothering me.
llvm-svn: 42076
2007-09-18 02:09:34 +00:00
Bill Wendling
067f1d8e95
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.
llvm-svn: 42074
2007-09-18 01:47:22 +00:00
Bill Wendling
5752f692ed
Add support for appending a suffix to the end of a mangled name.
...
llvm-svn: 42071
2007-09-17 22:39:32 +00:00
Devang Patel
00064e1bab
Do not hide APInt::dump() inside #ifndef NDEBUG.
...
llvm-svn: 42068
2007-09-17 22:24:00 +00:00
Dale Johannesen
a1336cf57e
Implement x86 long double in jit (not really
...
complete, but common cases work)
llvm-svn: 42043
2007-09-17 18:44:13 +00:00
Chris Lattner
0625bd6472
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.
llvm-svn: 42042
2007-09-17 18:34:04 +00:00
Daniel Berlin
bd590a8287
That's what i get for using carbon emacs in a terminal
...
llvm-svn: 42040
2007-09-17 18:05:59 +00:00
Daniel Berlin
28ae955181
Fix iterator so it doesn't sometimes report bits that aren't in the bitmap
...
llvm-svn: 42039
2007-09-17 18:04:21 +00:00
Dan Gohman
e903c1021f
Add a utility function to SDOperand for testing if a value is unused.
...
llvm-svn: 42038
2007-09-17 17:44:31 +00:00
Daniel Berlin
90aaa1dcf7
Fix bug in andersen's related to test_and_set.
...
Add operator == and != to SparseBitVector.
Simplify code for test_and_set
llvm-svn: 42018
2007-09-16 23:59:53 +00:00
Daniel Berlin
c637abee96
Fix a few bugs related to zero'ing of elements
...
llvm-svn: 42017
2007-09-16 22:31:47 +00:00
Chris Lattner
4f230451e1
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.
llvm-svn: 41983
2007-09-15 06:51:03 +00:00
Owen Anderson
3454dd3750
Remove RLE from the headers, since the pass itself is gone now.
...
llvm-svn: 41971
2007-09-14 22:54:46 +00:00
Dale Johannesen
98d3a08d8f
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).
llvm-svn: 41967
2007-09-14 22:26:36 +00:00
Dan Gohman
14cf78cde5
And an FoldingSetImpl::NodeID::AddInteger overload for int64_t, to avoid
...
ambiguity.
llvm-svn: 41960
2007-09-14 20:48:42 +00:00
Dan Gohman
9da02f5ee2
Remove isReg, isImm, and isMBB, and change all their users to use
...
isRegister, isImmediate, and isMachineBasicBlock, which are equivalent,
and more popular.
llvm-svn: 41958
2007-09-14 20:33:02 +00:00
Dan Gohman
58c468fb09
Remove spurious consts. This fixes warnings with compilers that
...
are strict about such things.
llvm-svn: 41956
2007-09-14 20:08:19 +00:00
Chris Lattner
3fd6bf8275
remove dead enum value.
...
llvm-svn: 41925
2007-09-13 06:18:04 +00:00
Chris Lattner
6ff85b2e5a
Make single-argument ctors explicit to avoid tricky bugs :)
...
llvm-svn: 41924
2007-09-13 06:15:57 +00:00
Evan Cheng
b2c42621df
Added getNumDefs().
...
llvm-svn: 41901
2007-09-13 00:16:29 +00:00
Evan Cheng
bb6a574def
Yet another getTargetNode variant.
...
llvm-svn: 41898
2007-09-12 23:39:49 +00:00
Daniel Berlin
a3bba5ce20
Move dump out of class, use "\n" instead of endl
...
llvm-svn: 41872
2007-09-11 22:58:27 +00:00
Dale Johannesen
245dceb06d
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).
llvm-svn: 41858
2007-09-11 18:32:33 +00:00
Daniel Berlin
32ef96186f
Convert to use ilist and non-pointer lists for extra goodness
...
llvm-svn: 41855
2007-09-11 17:42:22 +00:00
Bill Wendling
beb541544d
Add accessor method.
...
llvm-svn: 41854
2007-09-11 17:24:38 +00:00
Bill Wendling
74fb0f1a1c
Add a bool to indicate if we should set the "indirect encoding" bit in the Dwarf
...
information for EH.
llvm-svn: 41852
2007-09-11 17:20:55 +00:00
Duncan Sands
86e0119822
Fold the adjust_trampoline intrinsic into
...
init_trampoline. There is now only one
trampoline intrinsic.
llvm-svn: 41841
2007-09-11 14:10:23 +00:00
Bill Wendling
2b8fc31df9
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.
llvm-svn: 41838
2007-09-11 08:27:17 +00:00
Owen Anderson
887ecdeb01
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.
llvm-svn: 41837
2007-09-11 05:08:05 +00:00
Owen Anderson
d7a698afc5
Don't bother to initialize values corresponding to empty or tombstone
...
keys.
llvm-svn: 41834
2007-09-11 04:43:51 +00:00
Daniel Berlin
d10be14a97
Fix bugs with &=, intersect with complement. Add three argument version of intersect with complement.
...
llvm-svn: 41832
2007-09-11 04:11:28 +00:00
Owen Anderson
4484d0d51a
Fix non-deterministic behavior in the DenseMap copy constructor.
...
llvm-svn: 41831
2007-09-11 03:48:08 +00:00
Daniel Berlin
2b6e98b89a
Add remaining functions necessary for andersen's
...
llvm-svn: 41830
2007-09-11 01:38:07 +00:00
Daniel Berlin
e80ca9c2c6
Add SparseBitVector implementation
...
llvm-svn: 41790
2007-09-09 01:10:40 +00:00
Chuck Rose III
bf19e0a556
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.
...
llvm-svn: 41784
2007-09-08 04:17:08 +00:00
Rafael Espindola
1de0c86717
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.
llvm-svn: 41768
2007-09-07 14:52:14 +00:00
Anton Korobeynikov
122bf4be7e
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 :)
llvm-svn: 41763
2007-09-07 11:39:35 +00:00
Owen Anderson
e2f23a3abf
Add lengthof and endof templates that hide a lot of sizeof computations.
...
Patch by Sterling Stein!
llvm-svn: 41758
2007-09-07 04:06:50 +00:00
David Greene
517d5d8ebe
Constify to catch bugs.
...
llvm-svn: 41751
2007-09-06 19:46:46 +00:00
Dale Johannesen
bed9dc423c
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.)
llvm-svn: 41747
2007-09-06 18:13:44 +00:00
David Greene
65d2a697dc
Pluggable coalescers inplementation.
...
llvm-svn: 41743
2007-09-06 16:18:45 +00:00
Evan Cheng
26038c3918
Accidentially left this out.
...
llvm-svn: 41730
2007-09-05 21:58:18 +00:00
Evan Cheng
db53aef53e
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.
...
llvm-svn: 41729
2007-09-05 21:46:51 +00:00
Evan Cheng
3dba41bf37
Added Reset() to free all allocated memory regions and reset state to be the same as right after ctor.
...
llvm-svn: 41728
2007-09-05 21:41:34 +00:00
Dale Johannesen
427faa9247
fix reversal bug in preceding checkin
...
llvm-svn: 41705
2007-09-04 17:32:27 +00:00
David Greene
c656cbb8c2
Update GEP constructors to use an iterator interface to fix
...
GLIBCXX_DEBUG issues.
llvm-svn: 41697
2007-09-04 15:46:09 +00:00
Dale Johannesen
446b900192
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.
llvm-svn: 41664
2007-08-31 23:34:27 +00:00
Dale Johannesen
da7469f2b5
Revise per review of previous patch.
...
llvm-svn: 41645
2007-08-31 17:03:33 +00:00
Evan Cheng
91becf4ffa
Remove an unnecessary element, saving 4 bytes per LiveInterval.
...
llvm-svn: 41641
2007-08-31 08:26:44 +00:00
Dale Johannesen
3cf889f75e
Enhance APFloat to retain bits of NaNs (fixes oggenc).
...
Use APFloat interfaces for more references, mostly
of ConstantFPSDNode.
llvm-svn: 41632
2007-08-31 04:03:46 +00:00
Ted Kremenek
ed99b8a2a8
Added Graphviz escaping for the '|' character.
...
llvm-svn: 41610
2007-08-30 17:01:41 +00:00
Evan Cheng
9a25d98c86
Add a variant of foldMemoryOperand to fold any load / store, not just load / store from / to stack slots.
...
llvm-svn: 41597
2007-08-30 05:52:20 +00:00
Evan Cheng
ecf5342104
Added CreateFrameIndex to create a FrameIndex MachineOperand without a MachineInstr.
...
llvm-svn: 41596
2007-08-30 05:50:32 +00:00
Dale Johannesen
d246b2ca5c
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.
llvm-svn: 41587
2007-08-30 00:23:21 +00:00
Evan Cheng
1ad4a6117b
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.
llvm-svn: 41579
2007-08-29 20:45:00 +00:00
Chris Lattner
2198ea9097
Silence implicit 64->32-bit conversion warnings.
...
llvm-svn: 41567
2007-08-29 16:32:50 +00:00
Chris Lattner
2408d769eb
getMinSignedBits needs to take into consider the sign bit when the value is positive.
...
llvm-svn: 41566
2007-08-29 16:21:18 +00:00
Dan Gohman
81b62e1218
Add an option, -view-sunit-dags, for viewing the actual SUnit DAGs used by
...
scheduling.
llvm-svn: 41556
2007-08-28 20:32:58 +00:00
Evan Cheng
a5b10b334f
Recover most of the compile time regression due to recent live interval changes.
...
1. Eliminate the costly live interval "swapping".
2. Change ValueNumberInfo container from SmallVector to std::vector. The former
performs slowly when the vector size is very large.
llvm-svn: 41536
2007-08-28 08:28:51 +00:00