Rafael Espindola
d6c021a8d7
Revert 93648.
...
Mangler::getMangledName is used from lto
Mangler::setUseQuotes is used in the AsmPrinter
Mangler::setSymbolsCanStartWithDigit is used in the AsmPrinter
llvm-svn: 93652
2010-01-16 20:27:59 +00:00
Chris Lattner
16324d20f6
Mangler::getMangledName is now dead, remove it and all the other stuff in Mangler that is now transitively dead. woo.
...
llvm-svn: 93648
2010-01-16 19:08:51 +00:00
Chris Lattner
b8765fdca1
switch liblto to use the new getNameWithPrefix() method instead of getMangledName.
...
llvm-svn: 93643
2010-01-16 18:12:14 +00:00
Chris Lattner
c88095b986
add an inefficient version of getNameWithPrefix that returns an std::string.
...
llvm-svn: 93641
2010-01-16 18:06:34 +00:00
Benjamin Kramer
92e94ed8c6
Revive dead assert.
...
llvm-svn: 93638
2010-01-16 16:14:55 +00:00
Devang Patel
3bbca51dcd
Replace DebugLocTuple with DILocation.
...
llvm-svn: 93630
2010-01-16 06:09:35 +00:00
Bill Wendling
921cd93e85
Temporarily revert r93581. It was causing failures in the ExecutionEngine tests
...
on the build bots.
llvm-svn: 93606
2010-01-16 01:06:58 +00:00
Ted Kremenek
bb1779e022
BumpPtrAllocator: Have the DefaultSlabAllocator created at runtime, not initialization time. This removes one of the 'init_constructors' reported in <rdar://problem/7545356>.
...
llvm-svn: 93581
2010-01-15 23:29:34 +00:00
Tobias Grosser
fc9e55b439
Add getSource() to SuccIterator
...
Get the source BB of an iterator.
llvm-svn: 93364
2010-01-13 22:21:43 +00:00
Tobias Grosser
44e38a98c5
Extend SuccIterator
...
Implement most of the missing methods to make SuccIterator random access.
operator[] is still missing.
llvm-svn: 93363
2010-01-13 22:21:28 +00:00
Chris Lattner
e73ff5ecc3
makeNameProper is now private!
...
llvm-svn: 93357
2010-01-13 21:31:39 +00:00
Chris Lattner
951cfb6b8b
ugh, my last patch just sped up a method and changed all the clients
...
that I want to completely eliminate. Add fixme's so I remember this
in the future, and add the missing helper that they should be upgraded
to use instead.
llvm-svn: 93300
2010-01-13 07:01:09 +00:00
Chris Lattner
3c2fad1fc6
change Mangler::makeNameProper to return its result in a SmallVector
...
instead of returning it in an std::string. Based on this change:
1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef
2. Change a bunch of targets to call makeNameProper with a smallstring,
making several of them *much* more efficient.
3. Rewrite Mangler::makeNameProper to not build names and then prepend
prefixes, not use temporary std::strings, and to avoid other crimes.
llvm-svn: 93298
2010-01-13 06:38:18 +00:00
Chris Lattner
23127baf26
my mistake, Mangler::makeNameProper wants to take a twine, not a stringref!
...
llvm-svn: 93296
2010-01-13 05:02:57 +00:00
Chris Lattner
b8f828a848
change makeNameProper to take a stringref instead of std::string.
...
llvm-svn: 93295
2010-01-13 04:55:33 +00:00
Duncan Sands
fa59842d87
Correct spelling.
...
llvm-svn: 92910
2010-01-07 09:05:26 +00:00
David Greene
ede60e521f
Fix a build error by adding a missing commit.
...
llvm-svn: 92670
2010-01-05 01:36:30 +00:00
Chris Lattner
89b1b63bdf
teach instcombine to optimize pointer difference idioms involving constant
...
expressions. This is a step towards comment #4 in PR3351.
llvm-svn: 92401
2010-01-01 22:29:12 +00:00
Chris Lattner
f1704b24be
remove #include that comes in from ConstantFolder.h
...
llvm-svn: 92232
2009-12-28 21:52:06 +00:00
Chris Lattner
28de6cdbf5
remove #include of Function.h from IRBuilder
...
llvm-svn: 92231
2009-12-28 21:50:56 +00:00
Chris Lattner
e70c40e8ac
move debug info stuff out of line, allowing two #includes
...
to go away from IRBuilder.h
llvm-svn: 92230
2009-12-28 21:45:40 +00:00
Chris Lattner
e0b9847223
split code that doesn't need to be templated out of IRBuilder into a new
...
non-templated IRBuilderBase class. Move that large CreateGlobalString
out of line, eliminating the need to #include GlobalVariable.h in IRBuilder.h
llvm-svn: 92227
2009-12-28 21:28:46 +00:00
Chris Lattner
13e5945d1d
rename ivar to be more descriptive.
...
llvm-svn: 92226
2009-12-28 21:12:29 +00:00
Chris Lattner
cd3aa9d1ff
rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind
...
doesn't exist already, eliminate registerMDKind. Tidy up a bunch
of random stuff.
llvm-svn: 92225
2009-12-28 20:45:51 +00:00
Bill Wendling
baec6e54f4
Add an "ATTRIBUTE_UNUSED" macro (and use it). It's for variables which are
...
mainly used in debugging and/or assert situations. It should make the compiler
and the static analyzer stop nagging us about them.
llvm-svn: 92181
2009-12-28 01:20:29 +00:00
David Greene
d411e1b728
Fix a comment.
...
llvm-svn: 92082
2009-12-23 23:19:43 +00:00
David Greene
ac142c7e5d
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92016
2009-12-23 18:25:37 +00:00
David Greene
3f7cf289ed
Provide dbgs(), a circular-buffering debug output stream. By default it
...
simply passes output to errs(). If -debug-buffer-size=N is set N > 0,
dbgs() buffers its output until program termination and dumps the last N
characters sent to it. This is handy when debugging very large inputs.
llvm-svn: 92002
2009-12-23 16:39:06 +00:00
David Greene
f1f78a15e1
Add circular_raw_ostream, which buffers its output in a circular queue
...
and outputs it when explicitly flushed. The intent is to use it in
situations such as debug output logging where a signal handler can take
care of flushing the buffer at program termination.
llvm-svn: 92001
2009-12-23 16:08:15 +00:00
Anton Korobeynikov
903c2a0cb5
Restore snprintf weirdness for VCPP only
...
llvm-svn: 91918
2009-12-22 20:11:00 +00:00
Chris Lattner
e1abf0437c
don't run GVN at -O1, GCC doesn't do it's equivalent at that optimization level.
...
llvm-svn: 91886
2009-12-22 04:47:41 +00:00
Anton Korobeynikov
299ec7d3e7
Remove uber-gross hack. The define _snprintf to snprintf is invalid due to two reasons: 1. Accroding to C++ standard snprintf should be available in std namespace (and __gnu_cxx in case of GCC to). Such ifdef will change all snprintf's to _snprintf's, but won't bring snprintf to all necessary namespaces. Thus e.g. any locale-using code on mingw will yield an error (include this file + string to see the result) 2. MSVCRT's _snprintf does not comply with C99 standard. Standard one is snprintf.
...
llvm-svn: 91842
2009-12-21 20:19:37 +00:00
Chris Lattner
e390b70e2c
Make some methods const. The only interesting change here is that
...
it changes raw_fd_ostream::preferred_buffer_size to return zero on
a scary stat failure instead of setting the stream to an error state.
This method really should not mutate the stream.
llvm-svn: 91740
2009-12-19 01:38:42 +00:00
Dan Gohman
3ceb7c0c47
Add utility routines for NSW multiply.
...
llvm-svn: 91664
2009-12-18 03:10:26 +00:00
Dan Gohman
6bb50740f4
Add utility routines for creating integer negation operators with NSW set.
...
Integer negation only overflows with INT_MIN, but that's an important case.
llvm-svn: 91662
2009-12-18 02:58:50 +00:00
Chris Lattner
f1a0d32b5f
improve isPodLike to know that all non-class types are pod.
...
llvm-svn: 91425
2009-12-15 07:40:44 +00:00
Chris Lattner
587962c667
Remove isPod() from DenseMapInfo, splitting it out to its own
...
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.
llvm-svn: 91421
2009-12-15 07:26:43 +00:00
Chris Lattner
05651d4544
add an ALWAYS_INLINE macro, which does the obvious thing.
...
llvm-svn: 91416
2009-12-15 06:14:33 +00:00
Dan Gohman
8e0956f734
Micro-optimize these functions in the case where they are not inlined.
...
llvm-svn: 91316
2009-12-14 19:32:31 +00:00
Jeffrey Yasskin
9cba192e78
Make it easier to use the llvm_unreachable and DEBUG macros without "using
...
namespace llvm" by qualifying their implementations with ::llvm::.
llvm-svn: 91206
2009-12-12 04:08:32 +00:00
Anders Carlsson
25a1bae472
Add qualifiers for calls to member functions in dependent bases.
...
llvm-svn: 91087
2009-12-11 01:04:42 +00:00
Chris Lattner
aee232cb03
Add helper methods for forming shift operations with a constant
...
shift amount.
llvm-svn: 90694
2009-12-06 01:56:22 +00:00
Bob Wilson
b8002101b4
Fix indentation.
...
llvm-svn: 90613
2009-12-04 22:46:47 +00:00
Mike Stump
cbbfda910a
Create yet another helper for Invoke.
...
llvm-svn: 90514
2009-12-04 01:53:15 +00:00
Mike Stump
9bc36df3e7
Add some helpers for Invoke to mirror CreateCall helpers.
...
llvm-svn: 90508
2009-12-04 01:26:26 +00:00
Benjamin Kramer
49b3c58272
Fix odd declaration.
...
llvm-svn: 90138
2009-11-30 15:52:29 +00:00
Tobias Grosser
74c7605daf
Remove ShortNames from getNodeLabel in DOTGraphTraits
...
llvm-svn: 90134
2009-11-30 12:38:47 +00:00
Tobias Grosser
48d8ba7043
Instantiate DefaultDOTGraphTraits
...
llvm-svn: 90133
2009-11-30 12:38:13 +00:00
Tobias Grosser
4b6d3d58f6
Do not point edge heads to source labels
...
If no destination label is available, just point to the node itself
instead of pointing to some source label. Source and destination labels are
not related in any way.
llvm-svn: 90132
2009-11-30 12:37:39 +00:00
Tobias Grosser
72a78e2a22
Only print edgeSourceLabels if they are not empty
...
Graphviz can layout the graphs better if a node does not contain source
ports. Therefore only print the ports if the source ports are useful,
that means are not labeled with the empty string "".
This patch also simplifies graphs without any edgeSourceLabels e.g. the
dominance trees.
llvm-svn: 90131
2009-11-30 12:24:40 +00:00