1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

451 Commits

Author SHA1 Message Date
Dan Gohman
2181ea3b6c Add count{Leading,Trailing}Ones_{32,64} functions with simple implementations.
llvm-svn: 47084
2008-02-13 20:54:54 +00:00
Ted Kremenek
f06b7ac532 Added "Profile" method to APFloat for use with FoldingSet.
Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary
objects to a profile via dispatch to FoldingSetTrait<T>::Profile().

Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their
functionality is now replaced using the above mentioned member template.

llvm-svn: 46957
2008-02-11 17:24:50 +00:00
Chris Lattner
266b518f13 make this 64-bit safe
llvm-svn: 46402
2008-01-26 19:50:30 +00:00
Ted Kremenek
faa43d4b3c Added special escape sequences "\{", "\}", and "\|" when processing
getNodeLabel(); these sequences allow the user to specify the characters '{',
'}', and '|' in the label, which facilitate breaking the label into multiple
record segments.

llvm-svn: 46283
2008-01-23 22:29:58 +00:00
Anton Korobeynikov
67f0de9810 Silence a warning. Should we turn this into configure-time check?
llvm-svn: 46251
2008-01-22 11:01:23 +00:00
Gordon Henriksen
26e9b6653c Fix a memory correctness error noticed by valgrind (harmless in practice).
Thanks to Duncan Sands for noticing it.

llvm-svn: 46007
2008-01-15 20:02:11 +00:00
Chris Lattner
a39e69f292 add match support for casts.
llvm-svn: 45744
2008-01-08 07:02:44 +00:00
Chris Lattner
9ec341b120 Split param attr implementation out from Function.cpp into its
own file.  Don't #include ParameterAttributes.h into any major
public header files: just move methods out of line as appropriate.

llvm-svn: 45517
2008-01-02 23:42:30 +00:00
Chris Lattner
7a9b0bf0eb remove attribution from a variety of miscellaneous files.
llvm-svn: 45425
2007-12-29 22:59:10 +00:00
Chris Lattner
e0b1ee937a Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)

llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Chris Lattner
545c1c43be Add m_Zero().
llvm-svn: 45255
2007-12-20 04:47:44 +00:00
Duncan Sands
56f3add5b7 When inlining through an 'nounwind' call, mark inlined
calls 'nounwind'.  It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.

llvm-svn: 45218
2007-12-19 21:13:37 +00:00
Duncan Sands
242f80be86 Rename isNoReturn to doesNotReturn, and isNoUnwind to
doesNotThrow.

llvm-svn: 45160
2007-12-18 09:59:50 +00:00
Devang Patel
3d301e65ad Add cast operators in LLVMFoldingBuilder.
Patch by Richard Pennington.

llvm-svn: 45115
2007-12-17 19:06:26 +00:00
Duncan Sands
bf62f62058 Make instcombine promote inline asm calls to 'nounwind'
calls.  Remove special casing of inline asm from the
inliner.  There is a potential problem: the verifier
rejects invokes of inline asm (not sure why).  If an
asm call is not marked "nounwind" in some .ll, and
instcombine is not run, but the inliner is run, then
an illegal module will be created.  This is bad but
I'm not sure what the best approach is.  I'm tempted
to remove the check in the verifier...

llvm-svn: 45073
2007-12-16 15:51:49 +00:00
Anton Korobeynikov
4ef9822114 Constify graph arguments
llvm-svn: 45066
2007-12-16 00:42:19 +00:00
Dan Gohman
40634cd710 Fix a typo in a comment.
llvm-svn: 45031
2007-12-14 15:11:58 +00:00
Gordon Henriksen
aadbdd1a62 Delete the CollectorNamePool if it should become empty.
llvm-svn: 44775
2007-12-10 03:35:18 +00:00
Gordon Henriksen
3d1a3ce823 Fix a very silly typo.
llvm-svn: 44732
2007-12-09 01:12:08 +00:00
Gordon Henriksen
902a20040f Incorporating review feedback from Reid.
llvm-svn: 44713
2007-12-08 20:10:40 +00:00
Gordon Henriksen
e187dc4bfa Adding a StringPool data structure, which GC will use.
llvm-svn: 44705
2007-12-08 17:07:47 +00:00
Duncan Sands
1e2e4972ff Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).

llvm-svn: 44544
2007-12-03 20:06:50 +00:00
Duncan Sands
1b0feb42e2 Add some convenience methods for querying attributes, and
use them.

llvm-svn: 44403
2007-11-28 17:07:01 +00:00
Duncan Sands
3602011bec Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls.  This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll).  Hopefully
a bitcode guru (who might that be? :) ) will fix it.

llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Chris Lattner
56d872fcbb Fix the Linker testcase regressions, by making MemoryBuffer::getFileOrSTDIN return
a valid but empty buffer if stdin is empty.

llvm-svn: 44219
2007-11-18 18:52:28 +00:00
Duncan Sands
edf7e3b5f4 Move MinAlign to MathExtras.h.
llvm-svn: 43944
2007-11-09 13:41:39 +00:00
Duncan Sands
b494fb97a4 The guaranteed alignment of ptr+offset is only the minimum of
of offset and the alignment of ptr if these are both powers of
2.  While the ptr alignment is guaranteed to be a power of 2,
there is no reason to think that offset is.  For example, if
offset is 12 (the size of a long double on x86-32 linux) and
the alignment of ptr is 8, then the alignment of ptr+offset
will in general be 4, not 8.  Introduce a function MinAlign,
lifted from gcc, for computing the minimum guaranteed alignment.
I've tried to fix up everywhere under lib/CodeGen/SelectionDAG/.
I also changed some places that weren't wrong (because both values
were a power of 2), as a defensive change against people copying
and pasting the code.
Hopefully someone who cares about alignment will review the rest
of LLVM and fix up the remaining places.  Since I'm on x86 I'm
not very motivated to do this myself...

llvm-svn: 43421
2007-10-28 12:59:45 +00:00
Chris Lattner
ecbffce0b7 remove dead file
llvm-svn: 43131
2007-10-18 16:12:54 +00:00
Ted Kremenek
c00b2095fa Changed the return type of type-specific Allocate() methods to return
void*.  This is hint that we are returning uninitialized memory rather
than a constructed object.

Patched ImutAVLTree to conform to this new interface.

llvm-svn: 43106
2007-10-18 00:30:14 +00:00
Ted Kremenek
bf43a92ef5 Removed inclusion of cassert, which is no longer needed.
llvm-svn: 43099
2007-10-17 22:12:14 +00:00
Ted Kremenek
a9c650d43e Added template function alignof() which provides a clean
function-based interface to getting the alignment of a type.

llvm-svn: 43096
2007-10-17 22:08:55 +00:00
Ted Kremenek
9008297075 Added member template functions to MallocAllocator and
BumpPtrAllocator that implement allocations that return a properly
typed pointer.  For BumpPtrAllocator, the allocated memory is
automatically aligned to the minimum alignment of the type (as
calculated by llvm::AlignOf::Alignment).

llvm-svn: 43087
2007-10-17 21:10:21 +00:00
Ted Kremenek
d82172cc2c Added llvm::AlignOf, a template class whose purpose is to portably
compute the minimum memory alignment of arbitrary types.

llvm-svn: 43086
2007-10-17 20:56:47 +00:00
Hartmut Kaiser
ed12f66488 Updated VC++ build system.
Silenced some VC warnings.

I'm getting linker errors, though: unresolved externals:

llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)

and

llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)

Where are these defined?

llvm-svn: 43073
2007-10-17 14:56:40 +00:00
Chris Lattner
ba2ff1f992 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
Chris Lattner
a65ec649fd Add new MemoryBuffer::getMemBufferCopy method.
llvm-svn: 42815
2007-10-09 21:46:38 +00:00
Devang Patel
779882dd87 Fix indentation.
llvm-svn: 42814
2007-10-09 21:41:00 +00:00
Devang Patel
6020d2e01d Add LLVMFoldingBuilder
llvm-svn: 42806
2007-10-09 19:49:19 +00:00
Dan Gohman
d174f83e57 Remove an unnecessary friend declaration.
llvm-svn: 42805
2007-10-09 18:39:48 +00:00
Chris Lattner
03d9efc98a update prototype, fixing build error
llvm-svn: 42789
2007-10-09 16:27:44 +00:00
Dan Gohman
2fb0a249d7 Pass argc by value, not by reference, since it isn't modified.
llvm-svn: 42788
2007-10-09 16:04:57 +00:00
Dan Gohman
8c31acb71e Fix grammar in a comment.
llvm-svn: 42748
2007-10-08 15:10:04 +00:00
Dan Gohman
7fa473514d Add explicit keywords.
llvm-svn: 42747
2007-10-08 15:08:41 +00:00
Gordon Henriksen
543f859a00 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
Dan Gohman
50ba8a297c Add empty() member functions to a few container-like classes.
llvm-svn: 42487
2007-10-01 16:01:23 +00:00
Gordon Henriksen
b3d98e2023 Demoting CHelpers.h to include/llvm/Support.
llvm-svn: 42465
2007-09-29 01:38:42 +00:00
Gordon Henriksen
2571db23f1 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
Ted Kremenek
c924fd3edf 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
Bill Wendling
d269356b02 Add support for appending a suffix to the end of a mangled name.
llvm-svn: 42071
2007-09-17 22:39:32 +00:00
Evan Cheng
5977c55f5d 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