1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

851 Commits

Author SHA1 Message Date
Dan Gohman
bc6b14ba00 This void is implicit in C++.
llvm-svn: 78848
2009-08-12 22:10:57 +00:00
Dan Gohman
a255ba7c44 Add a GetBufferSize() member to raw_ostream and use it to
simplify some formatted_raw_ostream code.

llvm-svn: 78836
2009-08-12 20:52:45 +00:00
Dan Gohman
9a6b2f19e5 Remove a bunch more now-unnecessary Context arguments.
llvm-svn: 78809
2009-08-12 16:23:25 +00:00
Jakob Stoklund Olesen
7ec5ee575e Move immediate constant predicate templates from the Blackfin target to MathExtras.h
llvm-svn: 78793
2009-08-12 06:22:07 +00:00
Dan Gohman
b0c54f532c Add convenience functions for creating nsw add operators.
llvm-svn: 78707
2009-08-11 20:20:39 +00:00
Dan Gohman
aed57ee5b0 Add convenience functions for creating inbounds GEPs.
llvm-svn: 78695
2009-08-11 17:57:01 +00:00
Chris Lattner
be69fa08b6 add a trivial line # cache to SourceMgr to make repeated queries to
FindLineNumber much faster when in sequence.

llvm-svn: 78693
2009-08-11 17:49:14 +00:00
Benjamin Kramer
9a590500ea Make LLVMContext and LLVMContextImpl classes instead of structs.
llvm-svn: 78690
2009-08-11 17:45:13 +00:00
Benjamin Kramer
15a20278ff Fix struct/class mismatch.
llvm-svn: 78686
2009-08-11 17:27:20 +00:00
Dan Gohman
cf73a006f0 Use isa instead of dyn_cast when the result is only converted to bool.
llvm-svn: 78685
2009-08-11 17:20:16 +00:00
Dan Gohman
82b3823bb7 Add convenience functions for creating exact sdiv operators, and
use them in CreatePtrDiff.

llvm-svn: 78682
2009-08-11 17:05:24 +00:00
Dan Gohman
0c6e8e18aa Add an explicit keyword.
llvm-svn: 78675
2009-08-11 15:57:42 +00:00
Dan Gohman
8e39bf3fb6 ConstantFolder and NoFolder no longer require their Context members.
llvm-svn: 78673
2009-08-11 15:56:12 +00:00
Dan Gohman
3056a83ca5 Use the default copy-ctor, copy-assignment, and destructor.
llvm-svn: 78670
2009-08-11 15:52:30 +00:00
Erick Tryzelaar
64635cc637 Convert comments to C90-style so llvm-c can import DataTypes.h.
llvm-svn: 78590
2009-08-10 19:44:53 +00:00
David Greene
91e0e06670 Add support for printing loop structure information in asm comments.
This definitely slows down asm output so put it under an -asm-exuberant
flag.

This information is useful when doing static analysis of performance
issues.

llvm-svn: 78567
2009-08-10 16:38:07 +00:00
Daniel Dunbar
86ddd268b4 Add support for a user supplied pointer argument to llvm_install_error_handler.
llvm-svn: 78553
2009-08-10 03:36:26 +00:00
Daniel Dunbar
60887bf820 Add DEBUG_WITH_TYPE as a clean alternative to tweaking DEBUG_TYPE.
This:
--
#undef DEBUG_TYPE
#define DEBUG_TYPE "foo"
DEBUG(...)
#undef DEBUG_TYPE
#define DEBUG_TYPE ""
--
becomes this:
--
DEBUG_WITH_TYPE("foo", ...)
--

llvm-svn: 78435
2009-08-07 23:48:59 +00:00
Argyrios Kyrtzidis
36a6dfff07 Modifications to dyn_cast/cast to make them work for objects too, instead of only pointers.
The use case is if you have a wrapper class:

class Base {
  void *Ptr;
public:
  Base() : Ptr(0) { }
  operator bool() const { return Ptr; }
.....
}

and sub-wrappers that have exactly the same size:

class Sub : public Base {
public:
....
static bool classof(const Base*);
}

and in the code you would do:

void f(Base b) {
  Sub sub = dyn_cast<Sub>(b);
  if (sub) {
    ....
  }
}

llvm-svn: 78424
2009-08-07 22:49:24 +00:00
Jeffrey Yasskin
20848835bf To catch bugs like the one fixed in
http://llvm.org/viewvc/llvm-project?view=rev&revision=78127, I'm changing the
ExecutionEngine's global mappings to hold AssertingVH<const GlobalValue>. That
way, if unregistering a mapping fails to actually unregister it, we'll get an
assert. Running the jit nightly tests didn't uncover any actual instances of
the problem.

This also uncovered the fact that AssertingVH<const X> didn't work, so I fixed
that too.

llvm-svn: 78400
2009-08-07 19:54:29 +00:00
Dan Gohman
ba72f59923 Fix FindExecutable to use sys::Path::GetMainExecutable instead of
just argv[0]. And remove the code for searching the current
working directory and for searching PATH; the point of FindExecutable
is not to find whatever version of the executable can be found by
searching around, but to find an executable that accompanies the
current executable.

Update the tools to use sys::Program::FindProgramByName when they
want PATH searching.

llvm-svn: 78240
2009-08-05 20:21:17 +00:00
Andrew Lenharth
dd4ec41e89 only point to dest labels if the graph has them
llvm-svn: 78192
2009-08-05 15:04:22 +00:00
Owen Anderson
cf2c39dc30 Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
not hideous.  Also, fix some MSVC compile errors.

llvm-svn: 78115
2009-08-04 22:41:48 +00:00
Douglas Gregor
60425b2194 Add some type traits that are used for Clang's statically-checked
canonical types.

llvm-svn: 78076
2009-08-04 17:04:52 +00:00
Daniel Dunbar
9bbadad09d Fix some comments referring to std::cerr.
llvm-svn: 77931
2009-08-03 01:02:24 +00:00
Benjamin Kramer
c2015778ee Remove duplicated colons and spaces.
llvm-svn: 77892
2009-08-02 12:13:02 +00:00
Dan Gohman
c4369ff556 Use the default copy ctor and copy-assignment operators.
llvm-svn: 77793
2009-08-01 19:11:31 +00:00
Owen Anderson
1dc40e205b Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.

llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Dan Gohman
c4f0d838a9 Remove Annotation.h, which is no longer used in the LLVM tree.
llvm-svn: 77706
2009-07-31 18:36:25 +00:00
Dan Gohman
0f6a4a4daa Teach ValueHandleBase to treat DenseMap's special Empty and Tombstone
values the same way it treats null pointers. This is needed to allow
CallbackVH to be used as a key in a DenseMap.

llvm-svn: 77695
2009-07-31 18:20:18 +00:00
Owen Anderson
93ccaf5c60 Move more code back to 2.5 APIs.
llvm-svn: 77635
2009-07-30 23:03:37 +00:00
Daniel Dunbar
79e9ed1d26 Add raw_ostream::write_hex
llvm-svn: 77614
2009-07-30 18:21:23 +00:00
Devang Patel
cef1863706 Fix comment.
llvm-svn: 77603
2009-07-30 17:25:33 +00:00
Owen Anderson
881d928f9b Move types back to the 2.5 API.
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Owen Anderson
0ce2151b36 Move ConstantExpr to 2.5 API.
llvm-svn: 77494
2009-07-29 18:55:55 +00:00
David Greene
04545750d9 Re-apply previous changes and improve column padding performance some more.
llvm-svn: 77461
2009-07-29 16:08:27 +00:00
Daniel Dunbar
02fa03ef37 Revert r77397, it causes significant regressions in llc performance.
llvm-svn: 77425
2009-07-29 03:04:22 +00:00
David Greene
6c6f368805 Improve performance of PadToColumn by eliminating flushes.
llvm-svn: 77397
2009-07-28 23:26:34 +00:00
David Greene
6098de1019 Add some protected interfaces to allow subclass access to the buffer.
llvm-svn: 77395
2009-07-28 23:24:58 +00:00
Owen Anderson
aa8c94b051 Change ConstantArray to 2.5 API.
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Stefanus Du Toit
591ef9fa8c Include cmath/math.h in DataTypes.h regardless of whether MSVC is being used.
Fixes MSVC build of LiveInterval.cpp.

Patch by Nicolas Capens.

llvm-svn: 77317
2009-07-28 13:41:07 +00:00
Dan Gohman
40bd748448 Make raw_null_ostream flush its buffer in its destructor, so that
it conforms to the assertion added in r77245. This fixes a failure
in qa_override.c in clang's testsuite.

llvm-svn: 77255
2009-07-27 21:46:02 +00:00
Owen Anderson
256c2c250e Move ConstantFP construction back to the 2.5-ish API.
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Sean Callanan
3b5de0fa36 Thanks, Bill!
llvm-svn: 77240
2009-07-27 19:45:28 +00:00
Sean Callanan
34d4b90554 Many of Daniel's fixes.
I'm returning the number of bytes actually copied so that the client has some
warning when it reads past the end of the buffer.

I'm keeping the distinction between getByte() and getBytes() for now for
subclasses that use functions like ptrace() on Linux and only have a restricted
interface.  This makes their implementation easier, and subclasses can always
write a one-line implementation of readByte() that uses their custom 
readBytes().

llvm-svn: 77225
2009-07-27 18:33:24 +00:00
Dan Gohman
8d8a8adebf Remove spurious semicolons.
llvm-svn: 77077
2009-07-25 16:00:54 +00:00
Eric Christopher
df9c86fc26 Move ExtractElementInst to ::Create instead of new. Update all uses.
llvm-svn: 77044
2009-07-25 02:28:41 +00:00
Sean Callanan
555ef2f462 MemoryObject - Abstract base class for contiguous addressable memory.
Necessary for cases in which the memory is in another process, in a
  file, or on a remote machine.

The primary use for this is the llvm-mc disassemblers, so that they
can be targeted at arbitrary objects, not just in-process memory.

llvm-svn: 77023
2009-07-25 00:30:51 +00:00
Owen Anderson
cc33e89571 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
llvm-svn: 77011
2009-07-24 23:12:02 +00:00
Daniel Dunbar
076387bcc0 Allow llvm_report_error to accept a Twine.
llvm-svn: 76961
2009-07-24 07:58:10 +00:00