Ted Kremenek
fa7348b283
Deallocate() methods now take a 'const void*' instead of a 'void *', matching observed behavior with how 'delete[]' can be used.
...
llvm-svn: 63956
2009-02-06 19:34:14 +00:00
Chris Lattner
2f95b79fee
add a method to BumpPtrAllocator that allows allocating elements
...
with a specified alignment.
llvm-svn: 63629
2009-02-03 07:39:50 +00:00
Mike Stump
4c8ca99bb1
Improve -fno-opt style option processing to not require an extra
...
option to make the -fno- form on the option. We also document the new
form in the CommandLine documentation.
llvm-svn: 63559
2009-02-02 22:48:49 +00:00
Mike Stump
a0b25f92ce
Add opposite_of and inverse_opt to support -fno- style options. This
...
is necessary for eventual gcc commmand line compatibility.
llvm-svn: 63384
2009-01-30 08:19:46 +00:00
Ted Kremenek
d8045c9154
Add method raw_fd_ostream::seek() for random access within a file.
...
llvm-svn: 63044
2009-01-26 21:42:04 +00:00
Devang Patel
d980abaae2
Introduce two DWARF attribute extentions DW_AT_APPLE_optimized, DW_AT_APPLE_flags.
...
DW_AT_APPLE_optimized flag is set when a compile_unit is optimized. The debugger takes advantage of this information some way.
DW_AT_APPLE_flags encodes command line options when certain env. variable is set. This is used by build engineers to track various gcc command lines used by by a project, irrespective of whether the project used makefile, Xcode or something else.
llvm-gcc patch is next.
llvm-svn: 62888
2009-01-23 22:33:47 +00:00
Gabor Greif
d56b0a8c03
introduce a useful abstraction to find out if a Use is in the call position of an instruction
...
llvm-svn: 62788
2009-01-22 21:35:57 +00:00
Dale Johannesen
a5699a1e8b
Do not use host floating point types when emitting
...
ASCII IR; loading and storing these can change the
bits of NaNs on some hosts. Remove or add warnings
at a few other places using host floating point;
this is a bad thing to do in general.
llvm-svn: 62712
2009-01-21 20:32:55 +00:00
Devang Patel
2f92bb62a8
indentation...
...
llvm-svn: 62603
2009-01-20 19:23:29 +00:00
Devang Patel
ccc3162f69
Need only one set of debug info versions enum.
...
llvm-svn: 62602
2009-01-20 19:22:03 +00:00
Gabor Greif
d46326b0da
make comparisons a bist faster
...
llvm-svn: 62428
2009-01-17 19:03:45 +00:00
Mikhail Glushenkov
b0aa02acee
Support for multi-valued options in CommandLine
...
Makes possible to specify options that take multiple arguments (a-la
-sectalign on Darwin). See documentation for details.
llvm-svn: 62372
2009-01-16 22:54:19 +00:00
Mikhail Glushenkov
49be18cfc6
Registry.h should not depend on CommandLine.h.
...
Split Support/Registry.h into two files so that we have less to
recompile every time CommandLine.h is changed.
llvm-svn: 62312
2009-01-16 07:02:28 +00:00
Mikhail Glushenkov
5000223556
Delete trailing whitespace.
...
llvm-svn: 62307
2009-01-16 06:53:46 +00:00
Rafael Espindola
0aba6c9435
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Ted Kremenek
da4930d361
Add member template MallocAllocator::Allocate(Num) (to match the same function in BumpPtrAllocator).
...
llvm-svn: 62202
2009-01-14 00:38:21 +00:00
Rafael Espindola
2fed481c49
Remove some dead code from the days llvm had type planes.
...
There might be more dead code, but with llvm-gcc bootstrap broken on linux x86-64 it is had to test :-(
llvm-svn: 62088
2009-01-12 15:53:25 +00:00
Gabor Greif
436a7dd98c
drats! remove tabs
...
llvm-svn: 62056
2009-01-11 22:39:04 +00:00
Gabor Greif
20c5fd503d
simplify CallSite helper class to not consult the Instruction's
...
opcode on each delegation.
Instead the information is cached on construction and the cached flag used thereafter.
Introduced two predicates: isCall and isInvoke.
llvm-svn: 62055
2009-01-11 22:33:22 +00:00
Chris Lattner
0e3c4e89eb
remove DebugInfoBuilder, it has been subsumed by Analysis/DebugInfo.h
...
llvm-svn: 61898
2009-01-07 23:25:06 +00:00
Chris Lattner
ff7c07ce73
no need to negate the APInt for 0.
...
llvm-svn: 61777
2009-01-06 00:06:25 +00:00
Chris Lattner
33b4e3aad4
Change m_ConstantInt and m_SelectCst to take their constant integers
...
as template arguments instead of as instance variables, exposing more
optimization opportunities to the compiler earlier.
llvm-svn: 61776
2009-01-05 23:53:12 +00:00
Chris Lattner
e10764369d
make m_ConstantInt(int64_t) safely match ConstantInt's that are larger than i64.
...
This fixes an instcombine crash on PR3235.
llvm-svn: 61775
2009-01-05 23:45:50 +00:00
Dan Gohman
8271066844
Tidy up #includes, deleting a bunch of unnecessary #includes.
...
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Chris Lattner
486c88dbf1
add #include guards, thanks Dan.
...
llvm-svn: 61619
2009-01-04 01:28:00 +00:00
Misha Brukman
2d4b2dd2d3
* Alphabetized system headers per the style guide
...
* Minor spacing and comment cleanups
llvm-svn: 61590
2009-01-02 20:26:30 +00:00
Chris Lattner
6eb2690ea4
newline at end of phile
...
llvm-svn: 60744
2008-12-09 06:32:32 +00:00
Chris Lattner
14f67ea7b5
pred_iterator got a lot slower since use-diet landed. This is a
...
really simple cache class for these queries. Hopefully this can
be removed if pred_iterator speeds back up.
llvm-svn: 60742
2008-12-09 06:27:07 +00:00
Ted Kremenek
a851e459e1
Have raw_fd_ostream keep track of the position in the file to make tell() go faster by not requiring a flush().
...
llvm-svn: 60560
2008-12-04 22:51:11 +00:00
Ted Kremenek
b31e49cd47
Add 'tell' method to raw_fd_ostream that clients can use to query the current location in the file the stream is writing to.
...
llvm-svn: 60085
2008-11-26 03:33:13 +00:00
Nuno Lopes
821f6d257e
change AnnotationManager to use 'const char*' instead of std::string. this fixes the leakage of those strings and avoids the creation of such strings in static cosntructors (should result in a little improvement of startup time)
...
llvm-svn: 60064
2008-11-26 00:00:44 +00:00
Scott Michel
d8a57b624e
Roll back rev 59890, since Chris says this can never happen.
...
llvm-svn: 59914
2008-11-23 19:22:48 +00:00
Scott Michel
0da772db1c
Check for NULL before traversing the isa<> type hierarchy checking with a
...
NULL-based reference.
Note: Encountered this a few times on Tiger + gcc 4.0.1. Might just be a
platform-specific compiler issue, but it's good defensive programming in any
case.
llvm-svn: 59890
2008-11-22 23:49:26 +00:00
Chris Lattner
e111ce1265
add a write method.
...
llvm-svn: 59595
2008-11-19 06:45:06 +00:00
Chris Lattner
047dc0a77a
add a new m_Specific pattern that matches only if we have a specific Value*.
...
llvm-svn: 59393
2008-11-16 04:38:30 +00:00
Chris Lattner
f612178d64
add a new template for matching a select between two constants.
...
llvm-svn: 59391
2008-11-16 04:33:10 +00:00
Nick Lewycky
3889c7ebf0
Clean up some strange whitespace.
...
llvm-svn: 59373
2008-11-15 20:32:33 +00:00
Daniel Dunbar
a830cb14f3
Add Binary flag to raw_fd_ostream constructor.
...
Document raw_fd_ostream's treatment of "-".
llvm-svn: 59219
2008-11-13 05:01:07 +00:00
Anton Korobeynikov
d47d0bc96c
Symbol visibility is unsupported on cygwin too.
...
Patch by Jay Foad!
llvm-svn: 58520
2008-10-31 18:05:01 +00:00
Dan Gohman
50061675c5
Canonicalize sext(i1) to i1?-1:0, and update various instcombine
...
optimizations accordingly.
llvm-svn: 58457
2008-10-30 20:40:10 +00:00
Bill Wendling
b8d234c2e3
Revert r58411. The user needs to #define this when using the JITMemoryManager.h header.
...
llvm-svn: 58414
2008-10-30 01:22:58 +00:00
Bill Wendling
9ebb27a645
Revert part of r58048. It was breaking on SnowLeopard claiming that
...
"__STDC_CONSTANT_MACROS" needs to be #defined first.
llvm-svn: 58411
2008-10-30 00:11:55 +00:00
Dan Gohman
8edffdd299
Fix the name of the include guard to match the filename.
...
llvm-svn: 58310
2008-10-28 00:52:46 +00:00
Oscar Fuentes
5021ba82e0
CMake: Sync'ed DataTypes.h.cmake with DataTypes.h.in.
...
llvm-svn: 58131
2008-10-25 03:25:11 +00:00
Ted Kremenek
b04b85f615
Added raw_fd_ostream::close().
...
llvm-svn: 58052
2008-10-23 23:49:09 +00:00
Steve Naroff
ea17111230
Changes to make the Windows build work...
...
- Add a file to the VC++ project.
- Make sure the clang driver links against the Transforms library.
- Incorporate changes from patch by Dan Gohman.
llvm-svn: 58048
2008-10-23 23:28:23 +00:00
Argyrios Kyrtzidis
6ffea1355c
Introduce INT64_C macro and unbreak LLVM on MSVC.
...
llvm-svn: 58039
2008-10-23 17:20:39 +00:00
Daniel Dunbar
aa7a7ae8d5
Clear raw_fd_ostream error string on success and explain behavior in
...
documentation.
Add C++ header marker.
llvm-svn: 57923
2008-10-21 19:53:10 +00:00
Daniel Dunbar
553c69eecd
Rename IRBuilder::IsNonNull -> IsNotNull in response to feedback.
...
llvm-svn: 56953
2008-10-02 17:05:03 +00:00
Daniel Dunbar
fe82c1180a
Add IRBuilder::{CreateIsNull, CreateIsNonNull} helper methods.
...
- I'm open to the idea that these could have better names. I think
these read better than CreateEQNull and CreateNENull.
llvm-svn: 56757
2008-09-27 23:22:55 +00:00
Devang Patel
64dd7a2e89
Large mechanical patch.
...
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56622
2008-09-25 21:00:45 +00:00
Devang Patel
a3e9bf1bca
s/ParameterAttributes/Attributes/g
...
llvm-svn: 56513
2008-09-23 23:03:40 +00:00
Oscar Fuentes
0f25988689
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Nuno Lopes
8d481ade2f
plug memleak: destroy internal buffer
...
llvm-svn: 55632
2008-09-02 12:06:08 +00:00
Evan Cheng
20b295388f
Add DebugInfoBuilder. Patch by Talin!
...
llvm-svn: 55409
2008-08-27 06:51:14 +00:00
Ted Kremenek
5f192023b2
Grammar fix.
...
llvm-svn: 55371
2008-08-26 16:41:15 +00:00
Ted Kremenek
909c1c36e2
Added "str()" method to raw_string_ostream.
...
str() mirrors the same method in std::ostringstream.
str() flushes the buffered stream contents to string and returns a reference to the string.
llvm-svn: 55370
2008-08-26 16:34:01 +00:00
Chris Lattner
3ad9fe55e5
Add raw_stream adaptors that write into an std::string and SmallVector/SmallString.
...
llvm-svn: 55265
2008-08-23 22:43:04 +00:00
Chris Lattner
fe3155fc62
Switch the asmprinter (.ll) and all the stuff it requires over to
...
use raw_ostream instead of std::ostream. Among other goodness,
this speeds up llvm-dis of kc++ with a release build from 0.85s
to 0.49s (88% faster).
Other interesting changes:
1) This makes Value::print be non-virtual.
2) AP[S]Int and ConstantRange can no longer print to ostream directly,
use raw_ostream instead.
3) This fixes a bug in raw_os_ostream where it didn't flush itself
when destroyed.
4) This adds a new SDNode::print method, instead of only allowing "dump".
A lot of APIs have both std::ostream and raw_ostream versions, it would
be useful to go through and systematically anihilate the std::ostream
versions.
This passes dejagnu, but there may be minor fallout, plz let me know if
so and I'll fix it.
llvm-svn: 55263
2008-08-23 22:23:09 +00:00
Chris Lattner
719fad27a8
Split format() out to its own file, add support for formatting
...
up to three values in one call.
llvm-svn: 55251
2008-08-23 19:48:00 +00:00
Chris Lattner
9ef2c187a0
conditionalize this to work on windows, untested but it should work
...
according to the intarnetz
llvm-svn: 55248
2008-08-23 19:27:03 +00:00
Chris Lattner
b7914ec04e
add a simple mechanism for formatted output. This gives raw_ostream's
...
all the power and risk of fprintf format strings. Use them like this:
OS << format("%10.4f", 42.0) << "\n" << format("%x", 42) << '\n';
llvm-svn: 55246
2008-08-23 19:23:10 +00:00
Nicolas Geoffray
00aced70f5
Also overload for char, since the "char" type depends on the host.
...
llvm-svn: 55173
2008-08-22 08:44:47 +00:00
Owen Anderson
e17306778c
Overload for both signed and unsigned char.
...
llvm-svn: 55171
2008-08-22 07:42:25 +00:00
Owen Anderson
5a542e7eda
Move non-trivial methods out of line to avoid code-size bloat.
...
llvm-svn: 55138
2008-08-21 20:58:52 +00:00
Owen Anderson
902453c302
Implement operator<< in terms of basic types rather than [u]int*_t, which is better for portability. There might be some way to factor this all with metaprogramming magic, but I'm not sure how offhand.
...
llvm-svn: 55114
2008-08-21 06:20:47 +00:00
Eli Friedman
fdab2ca258
Remove size_t operator; this unbreaks the build on Linux. Committing on
...
the suggestion of resistor.
If this breaks some other platform, please go ahead and back this out.
llvm-svn: 55106
2008-08-21 04:28:31 +00:00
Owen Anderson
2c1d54952b
Use raw_ostream throughout the AsmPrinter.
...
llvm-svn: 55092
2008-08-21 00:14:44 +00:00
Chris Lattner
f155e446fd
add raw_ostream method for emitting an unsigned.
...
llvm-svn: 54972
2008-08-19 04:23:02 +00:00
Gordon Henriksen
0a5e079b8e
Don't require Registry specializations to define random static variables.
...
llvm-svn: 54902
2008-08-17 19:08:34 +00:00
Cedric Venet
e1e9213f95
Make it compile on VC2005:
...
- update VC projects.
- Add an overload to llvm::Stream for <<, since std::hex and std::dec have type std::ios_base& (*)(std::ios_base&) in VC++. (templating the function don't work, due to ambiguities)
- add ../ on several include in X86/AsmPrinter/
llvm-svn: 54898
2008-08-17 18:24:26 +00:00
Nick Lewycky
7d6a6f4509
Fix build on GCC 4.3.
...
llvm-svn: 54870
2008-08-17 06:40:16 +00:00
Chris Lattner
dab4a64423
add support for a cout/cerr analog (outs()/errs()) as well as
...
a simple adaptor class to give raw output capabilities to
something that wants to write to an ostream.
llvm-svn: 54865
2008-08-17 04:13:37 +00:00
Chris Lattner
eef022091c
rename OutputData to 'write' to match ostream.
...
llvm-svn: 54857
2008-08-17 01:46:05 +00:00
Chris Lattner
fd2dd46dcd
remove accidental comment.
...
llvm-svn: 54856
2008-08-17 01:35:54 +00:00
Chris Lattner
312d8de59b
add a new raw_ostream class which is an extremely high performance ostream that
...
can *only* output data (no seeking, reading, etc). This is adapted from the
clang "-E outputter", and is roughly 10% faster than stdio on darwin and 30%
(or more) faster than std::ostream.
llvm-svn: 54855
2008-08-17 01:35:29 +00:00
Duncan Sands
77e09ca5d0
Rename this, in case people think that NullFolder
...
has something to do with folding null values.
llvm-svn: 54725
2008-08-13 08:56:48 +00:00
Duncan Sands
0f1ba9dee5
Add a NullFolder class that doesn't fold constants.
...
This may be used as the second IRBuilder template
parameter, the idea being that people learning LLVM
may find it helpful (several people asked on IRC
if it was possible to turn off constant folding
because it made it hard for them to see what was
going on). Compiles, but otherwise completely
untested.
llvm-svn: 54698
2008-08-12 20:39:27 +00:00
Duncan Sands
ceacf7d17b
Point people to ConstantExpr and ConstantFolding,
...
in case they get the wrong idea. Fit in 80 columns.
llvm-svn: 54676
2008-08-12 09:43:15 +00:00
Duncan Sands
cac74d2a10
Make it possible to use different constant
...
folding policies with IRBuilder. The default,
provided by ConstantFolder, is to do minimal
folding like now: what ConstantExpr provides.
An alternative is to use TargetFolder, which
uses target information to fold constants more.
llvm-svn: 54640
2008-08-11 15:29:30 +00:00
Duncan Sands
310343bae7
Unbreak the llvm-gcc build: recent changes to
...
IRBuilder are not expecting null names.
llvm-svn: 54581
2008-08-09 15:14:59 +00:00
Chris Lattner
270ee0cb58
Make 'Insert' set the name for Loads, instead of passing the name into the
...
LoadInst ctor, which causes std::string thrashing.
llvm-svn: 54577
2008-08-09 06:26:23 +00:00
Eric Christopher
dcd4752642
Have IRBuilder take a template argument on whether or not to preserve
...
names. This can save a lot of allocations if you aren't going to be
looking at the output.
llvm-svn: 54546
2008-08-08 19:39:37 +00:00
Dan Gohman
9653b21dc2
Fold the useful features of alist and alist_node into ilist, and
...
a new ilist_node class, and remove them. Unlike alist_node,
ilist_node doesn't attempt to manage storage itself, so it avoids
the associated problems, including being opaque in gdb.
Adjust the Recycler class so that it doesn't depend on alist_node.
Also, change it to use explicit Size and Align parameters, allowing
it to work when the largest-sized node doesn't have the greatest
alignment requirement.
Change MachineInstr's MachineMemOperand list from a pool-backed
alist to a std::list for now.
llvm-svn: 54146
2008-07-28 21:51:04 +00:00
Dan Gohman
7ae5bf35a2
Don't use reinterpret_cast when it isn't needed.
...
llvm-svn: 54130
2008-07-27 23:12:19 +00:00
Dan Gohman
c28f2265a4
Rename the version of CreateRet that's a convenience method for creating
...
multiple-valued return values, so that the name CreateRet is just for
creating plain ret statements.
llvm-svn: 54053
2008-07-25 20:36:15 +00:00
Chris Lattner
e92598ef91
Make CreateBinOp/CreateNeg/CreateNot do constant folding.
...
llvm-svn: 53950
2008-07-23 06:58:10 +00:00
Dan Gohman
6564581be0
Enable first-class aggregates support.
...
Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.
The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.
llvm-svn: 53941
2008-07-23 00:34:11 +00:00
Dan Gohman
b7d67aaa88
Add insertvalue and extractvalue folding support in IRBuilder.
...
llvm-svn: 53931
2008-07-22 20:19:25 +00:00
Dan Gohman
12c36eae69
IRBuilder support for insertvalue and extractvalue.
...
llvm-svn: 53926
2008-07-22 18:25:25 +00:00
Dan Gohman
b024b0eedd
Enhance the GraphWriter support for edge destinations, and teach the
...
SelectionDAG graph writer to make use of them. Now, nodes with multiple
values are displayed as such, with incoming edges pointing to the
specific value they use.
llvm-svn: 53875
2008-07-21 21:06:55 +00:00
Dan Gohman
8762ce04fd
Make the GraphWriter be more consistent about the string
...
used for the graph "title" and the graph "label", as there
are differences in interpretation of these strings
between viewers.
llvm-svn: 53871
2008-07-21 19:57:57 +00:00
Dan Gohman
8981962672
Add a new function, ReplaceAllUsesOfValuesWith, which handles bulk
...
replacement of multiple values. This is slightly more efficient
than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically
could be optimized even further. However, an important property of this
new function is that it handles the case where the source value set and
destination value set overlap. This makes it feasible for isel to use
SelectNodeTo in many very common cases, which is advantageous because
SelectNodeTo avoids a temporary node and it doesn't require CSEMap
updates for users of values that don't change position.
Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to
handle operand lists more efficiently, and to correctly handle a number
of corner cases to which its new wider use exposes it.
This commit also includes a change to the encoding of post-isel opcodes
in SDNodes; now instead of being sandwiched between the target-independent
pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel
opcodes are now represented as negative values. This makes it possible
to test if an opcode is pre-isel or post-isel without having to know
the size of the current target's post-isel instruction set.
These changes speed up llc overall by 3% and reduce memory usage by 10%
on the InstructionCombining.cpp testcase with -fast and -regalloc=local.
llvm-svn: 53728
2008-07-17 19:10:17 +00:00
Devang Patel
a6c5ff690a
Mark function used by asm block as used, otherwise optimizer may not see the use and may delete the function.
...
llvm-svn: 53692
2008-07-16 17:54:34 +00:00
Dan Gohman
e76fd33ee5
Reapply 53476 and 53480, with a fix so that it properly updates
...
the BB member to the current basic block after emitting
instructions.
llvm-svn: 53567
2008-07-14 18:19:29 +00:00
Evan Cheng
ebf7ff4531
Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.
...
llvm-svn: 53502
2008-07-12 01:38:51 +00:00
Dan Gohman
6ee2195ab1
Add support for putting NamedRegionTimers in TimerGroups, and
...
use a timer group for the timers in SelectionDAGISel. Also,
Split scheduling out from emitting, to give each their own
timer.
llvm-svn: 53476
2008-07-11 21:54:34 +00:00
Bill Wendling
7e2acf0dc9
Pull r53428 from Gaz into mainline:
...
Remove warnings about unused/shadowed variables.
llvm-svn: 53430
2008-07-10 22:57:49 +00:00
Dan Gohman
c3f346dc55
Tidy up #includes.
...
llvm-svn: 53426
2008-07-10 22:26:19 +00:00
Dan Gohman
bb0847c84c
Escape the graph name. This unbreaks -view-cfg.
...
llvm-svn: 53417
2008-07-10 19:55:54 +00:00
Evan Cheng
80f6966c7f
- Replace use of std::map<std::string, ..> with StringMap. Replace use of std::map with DenseMap, std::set with SmallPtrSet. This results in minor speed up.
...
- Some code clean up.
llvm-svn: 53379
2008-07-10 00:04:23 +00:00
Dan Gohman
e2169bec88
The graph name really does matter for configurations that use gv.
...
llvm-svn: 53259
2008-07-08 23:33:46 +00:00
Matthijs Kooijman
4cf0a68307
Add CallSite::getArgumentNo() to be able to translate an operand number into a
...
argument number.
llvm-svn: 53225
2008-07-08 08:51:47 +00:00
Matthijs Kooijman
8aaa85f108
Add CallSite::getArgumentOffset() to hide the differences in operands betwen
...
Call and Invoke in a single method instead of having it hardcoded in multiple
places.
llvm-svn: 53224
2008-07-08 08:50:32 +00:00
Duncan Sands
b854603cb5
Add some convenience methods for manipulating
...
call attributes.
llvm-svn: 53223
2008-07-08 08:38:44 +00:00
Dan Gohman
60e964b34c
Add some basic Pool-allocation infrastructure. This adds a Recycler class,
...
for handling bookkeeping for deleted objects, as well as the alist class
template, for keeping lists of objects allocated from Recyclers, and some
related utilities.
llvm-svn: 53210
2008-07-07 22:58:06 +00:00
Dan Gohman
ddcc08e98f
Make BumpPtrAllocator noncopyable.
...
llvm-svn: 53188
2008-07-07 18:38:14 +00:00
Dan Gohman
68abfdf98d
Add a space between * and /* to help simple-minded lexers.
...
llvm-svn: 53187
2008-07-07 18:34:27 +00:00
Dan Gohman
dd9c91e583
Remove uses of "llvm/Support/Debug.h" from LLVM include files, which
...
all happened be unnecessary.
llvm-svn: 53182
2008-07-07 18:14:29 +00:00
Dan Gohman
955fdc7a4c
Add explicit keywords.
...
llvm-svn: 53179
2008-07-07 18:00:37 +00:00
Eric Christopher
4c3e39e220
Add a couple more helper functions to deal with
...
creating global constant strings and pointers
to global constant strings.
llvm-svn: 53051
2008-07-02 22:57:59 +00:00
Dan Gohman
9d5c1f8b60
Fix apostrophes in a comment.
...
llvm-svn: 52972
2008-07-01 18:12:31 +00:00
Owen Anderson
6ba41f78c9
Add a NextPowerOf2 function to calculate the next power of two greater than a given integer.
...
llvm-svn: 52839
2008-06-27 21:48:21 +00:00
Chris Lattner
f55505b7be
Tweak IRBuilder to explicitly call the setName(const char*) method on Value
...
instead of passing the name into the instruction ctors. Since most
instruction ctors take their name as an std::string, this avoids copying the
string to the heap and a malloc and free.
Patch by Pratik Solanki!
llvm-svn: 52832
2008-06-27 18:49:21 +00:00
Bill Wendling
36ebc296c1
Remove warnings about shadowed and unused variables.
...
llvm-svn: 52791
2008-06-26 18:11:45 +00:00
Owen Anderson
fd1b58fd7b
Use a DenseMap instead of an std::map for mangled name lookup. This is
...
improves AsmPrinter runtime on instcombine from 0.3920s to 0.3836s.
llvm-svn: 52787
2008-06-26 17:20:16 +00:00
Dan Gohman
7ee5cc0883
Make Allocate<T>() return a T* instead of a void*. And use
...
static_cast instead of reinterpret_cast.
llvm-svn: 52686
2008-06-24 17:49:26 +00:00
Matthijs Kooijman
6216df14cb
* Make CallSite::hasArgument const and let it take a const parameter.
...
llvm-svn: 51989
2008-06-05 08:04:58 +00:00
Matthijs Kooijman
de47a7518d
Add CallSite::hasArgument to allow for seeing if a call passes a certain value as an argument quickly.
...
llvm-svn: 51946
2008-06-04 16:31:12 +00:00
Evan Cheng
ce2c3b07ba
Revert 51775.
...
llvm-svn: 51795
2008-05-30 22:47:19 +00:00
Evan Cheng
8ebaae9d1c
Patches for building llvm on Solaris x86. Contributed by Nathan Keynes.
...
llvm-svn: 51775
2008-05-30 17:16:20 +00:00
Bill Wendling
2ba98ca60f
Remove more iostream header includes. Needed to implement a "FlushStream"
...
function to flush a specified std::ostream.
llvm-svn: 51705
2008-05-29 21:46:33 +00:00
Anton Korobeynikov
f77142326f
For PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"
...
llvm-svn: 51687
2008-05-29 17:41:17 +00:00
Steve Naroff
a1c616ae1d
Silence a warning about "*/" outside a comment.
...
llvm-svn: 51287
2008-05-20 00:46:15 +00:00
Bill Wendling
1866fa680f
Remove warnings about unused parameters and shadowed variables.
...
llvm-svn: 51266
2008-05-19 20:15:12 +00:00
Gabor Greif
d61f20217a
API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)
...
llvm-svn: 51200
2008-05-16 19:29:10 +00:00
Dan Gohman
821bf58428
IR support for extractvalue and insertvalue instructions. Also, begin
...
moving toward making structs and arrays first-class types.
llvm-svn: 51157
2008-05-15 19:50:34 +00:00
Nate Begeman
472144535b
Add support to IR builder for new vicmp, vfcmp routines
...
llvm-svn: 51127
2008-05-14 20:29:46 +00:00
Nate Begeman
b5b1e1353b
Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
...
for details. CodeGen support coming in a follow up patch
llvm-svn: 50985
2008-05-12 19:01:56 +00:00
Chris Lattner
69724eed32
add support for pattern matching 'neg'
...
llvm-svn: 50883
2008-05-09 05:20:27 +00:00
Dan Gohman
a84b75df17
Remove uses of llvm/System/IncludeFile.h that are no longer needed.
...
llvm-svn: 50695
2008-05-06 01:32:53 +00:00
Bill Wendling
9facb00af6
Using "unsigned" was masking the "size_t" version of this method.
...
llvm-svn: 50668
2008-05-05 20:51:58 +00:00
Evan Cheng
d9353009b7
Fix more -Wshorten-64-to-32 warnings.
...
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Chris Lattner
3835284f4c
Add CreateCall3/CreateCall4 at Eric's request.
...
llvm-svn: 50515
2008-05-01 05:23:45 +00:00
Chris Lattner
09cf777a96
Add a spiffy little "CreateCall2" method, which can be used to make
...
a function call that takes two Value*'s as arguments.
llvm-svn: 50514
2008-05-01 05:11:00 +00:00
Ted Kremenek
fd04109260
Add more alignment enums.
...
llvm-svn: 50363
2008-04-28 17:58:20 +00:00
Mikhail Glushenkov
4c358b3125
Add support for response files to the CommandLine library.
...
llvm-svn: 50355
2008-04-28 16:44:25 +00:00
Nick Lewycky
1f831c0f57
Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989
...
r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123.
llvm-svn: 50265
2008-04-25 16:53:59 +00:00
Nick Lewycky
97179cb16f
Whoops! Undo r50087, unbreak the build.
...
llvm-svn: 50088
2008-04-22 05:20:06 +00:00
Nick Lewycky
e708ae5ffd
Reverse r47989. Part of removing 'unwinds to' support.
...
llvm-svn: 50087
2008-04-22 05:16:51 +00:00
Scott Michel
4b37c88f48
Workaround for PR2207, in which pred_iterator assert gets triggered due to a
...
wee problem in Xcode 2.[45]/gcc 4.0.1.
llvm-svn: 49831
2008-04-16 23:46:39 +00:00
Gabor Greif
32b4942a0a
merge of r49785 (from branches/ggreif/use-diet): pass V to dyn_cast by const reference, this avoids copy-constructing and destructing all the time. especially important if these constructors are not accessible
...
llvm-svn: 49787
2008-04-16 11:43:47 +00:00
Chris Lattner
f5e5f92891
Add support for equality comparison of CallSite's.
...
llvm-svn: 49616
2008-04-13 19:40:26 +00:00
Duncan Sands
c5f548f784
Merge LLVMBuilder and FoldingBuilder, calling
...
the result IRBuilder. Patch by Dominic Hamon.
llvm-svn: 49604
2008-04-13 06:22:09 +00:00
Devang Patel
f08f0a6de6
Add CreateGetResult()
...
llvm-svn: 49398
2008-04-08 20:41:22 +00:00
Devang Patel
dd9f2ea01f
Add multiple value return instruction constructor.
...
llvm-svn: 49374
2008-04-08 07:30:13 +00:00
Gabor Greif
6c6b8a57f3
API changes for class Use size reduction, wave 1.
...
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Duncan Sands
9931451472
If a value is cast to its own type, then the cast
...
is not needed.
llvm-svn: 49210
2008-04-04 08:28:13 +00:00
Torok Edwin
b96b953a5c
Add new file Support/DataFlow.h.
...
It allows Use-Def and Def-Use relations to be treated as graphs.
llvm-svn: 49088
2008-04-02 14:57:52 +00:00
Chris Lattner
d141d16ed7
Change the MemoryBuffer::getFile* methods to take just a pointer to the
...
start of a filename, not a filename+length. All clients can produce a
null terminated name, and the system api's require null terminated
strings anyway.
llvm-svn: 49041
2008-04-01 18:04:03 +00:00