1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

2351 Commits

Author SHA1 Message Date
Chris Lattner
7a310366a6 Add a new ConstantExpr::getWithOperands that takes any array of operands
instead of requiring an std::vector.

llvm-svn: 55084
2008-08-20 22:27:40 +00:00
Chris Lattner
2b6a31501e more cleanups, random methods shouldn't return ostreams.
llvm-svn: 54984
2008-08-19 05:26:17 +00:00
Chris Lattner
8cc806c9be more cleanup, eliminate getLLVMName when printing out
type names at the top of the file.

llvm-svn: 54983
2008-08-19 05:16:28 +00:00
Chris Lattner
b665916d8d random cleanups, factor some printing code for linkage and visibility
llvm-svn: 54982
2008-08-19 05:06:27 +00:00
Chris Lattner
6df4ed8bfd Change WriteTypeSymbolic/WriteAsOperand to return void instead of
an ostream, which is just weird.

Rename SC_DEBUG -> ST_DEBUG

Remove static indentation strangeness from WriteConstantInt.  This makes it 
so that large structs are not broken down and printed on multiple lines.  If
there is demand for this to return, there are better ways to implement this.

llvm-svn: 54981
2008-08-19 04:47:09 +00:00
Chris Lattner
b4cfc1a85e whitespace cleanup
llvm-svn: 54980
2008-08-19 04:45:47 +00:00
Chris Lattner
50a2b09df9 rearrange code and make more legible.
llvm-svn: 54976
2008-08-19 04:36:02 +00:00
Chris Lattner
de5c9e9be5 put SlotTracker in an anon namespace since it is private.
llvm-svn: 54975
2008-08-19 04:28:07 +00:00
Chris Lattner
c6e031668d Reid had to call this class "slot machine" out of some strange reference
to the gambling device.  Name it something more meaningful.

llvm-svn: 54974
2008-08-19 04:26:57 +00:00
Chris Lattner
467a8dc22e Fix a bug daniel pointed out to me, where asmprinter started
printing ascii code for hex numbers instead of the hex numbers 
themselves.

llvm-svn: 54936
2008-08-18 19:41:26 +00:00
Gordon Henriksen
2cc861a6c1 Rename some GC classes so that their roll will hopefully be clearer.
In particular, Collector was confusing to implementors. Several
thought that this compile-time class was the place to implement
their runtime GC heap. Of course, it doesn't even exist at runtime.
Specifically, the renames are:

  Collector               -> GCStrategy
  CollectorMetadata       -> GCFunctionInfo
  CollectorModuleMetadata -> GCModuleInfo
  CollectorRegistry       -> GCRegistry
  Function::getCollector  -> getGC (setGC, hasGC, clearGC)

Several accessors and nested types have also been renamed to be
consistent. These changes should be obvious.

llvm-svn: 54899
2008-08-17 18:44:35 +00:00
Chris Lattner
aa7b21d49b getLLVMName is only used for types now, which always pass in LocalPrefix. Specialize on it.
llvm-svn: 54897
2008-08-17 17:28:37 +00:00
Chris Lattner
2dc591352d switch valuemap's from std::map to densemap. This speeds up llvm-dis
on a stripped kc++ .bc file from 0.83 to 0.77s (8%)

llvm-svn: 54896
2008-08-17 17:25:25 +00:00
Chris Lattner
661710bbd1 avoid an extraneous std::string construction
llvm-svn: 54875
2008-08-17 07:24:08 +00:00
Chris Lattner
c0610874cc Rework the routines that convert AP[S]Int into a string. Now, instead of
returning an std::string by value, it fills in a SmallString/SmallVector
passed in.  This significantly reduces string thrashing in some cases.

More specifically, this:
 - Adds an operator<< and a print method for APInt that allows you to 
   directly send them to an ostream.
 - Reimplements APInt::toString to be much simpler and more efficient
   algorithmically in addition to not thrashing strings quite as much.

This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the
asmprinter.  This also fixes a bug I introduced into the asmwriter in a
previous patch w.r.t. alias printing.

llvm-svn: 54873
2008-08-17 07:19:36 +00:00
Chris Lattner
332a173cff avoid string thrashing when formatting names in output. This
speeds up release-asserts llvm-dis on kc++ from 1.86s to 1.04s (~79%)

llvm-svn: 54868
2008-08-17 04:40:13 +00:00
Chris Lattner
ba25bb349e random cleanups.
llvm-svn: 54866
2008-08-17 04:17:45 +00:00
Chris Lattner
f991487f21 Inline the fastpath of PATypeHolder::get(). This is a small speedup in
instcombine among other things.

llvm-svn: 54814
2008-08-15 15:16:50 +00:00
Devang Patel
b5abdd4c33 The pass manager is not able to schedule -loop-deletion -loop-index-split.
The loop-deletion pass does not preserve dom frontier, which is required by
loop-index-split. When the PM checks dom frontier for loop-index-split, it has
already verified that lcssa is availalble. However, new dom frontier forces new
loop pass manager, which does not  have lcssa yet.

The PM should recheck availability of required analysis passes in such cases.

llvm-svn: 54805
2008-08-14 23:07:48 +00:00
Owen Anderson
3c7772990a Have LeakDetector use a SmallPtrSet instead of an std::set.
llvm-svn: 54785
2008-08-14 20:40:10 +00:00
Dan Gohman
b0f5e18201 Improve support for vector casts in LLVM IR and CodeGen.
llvm-svn: 54784
2008-08-14 20:04:46 +00:00
Dale Johannesen
c3d88ff804 Add read/write support for X86's sseregparm.
llvm-svn: 54744
2008-08-13 18:40:23 +00:00
Devang Patel
d0aabe5ce6 Use SmallVector instead of std::vector
llvm-svn: 54685
2008-08-12 15:44:31 +00:00
Devang Patel
670f3a9e03 Use DenseMap to keep track of last users.
Use inversed map for faster queries.

llvm-svn: 54662
2008-08-12 00:26:16 +00:00
Devang Patel
404762f720 Keep track of analysis usage information for passes. Avoid invoking
getAnalysisUsage() repeatedly.

llvm-svn: 54650
2008-08-11 21:13:39 +00:00
Gordon Henriksen
78a53c516d Delete a redundant binding, LLVMHasInitializer.
Please use !LLVMIsDeclaration instead.

llvm-svn: 54572
2008-08-09 02:13:58 +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
Chris Lattner
a4e876cf8a Don't call getAnalysisUsage unless -debug-pass is enabled. This speeds
up the passmgr by avoiding useless work.

llvm-svn: 54528
2008-08-08 15:14:09 +00:00
Chris Lattner
c1ca63307d Speed up the passmgr by avoiding heap thrashing on vectors.
llvm-svn: 54515
2008-08-08 05:33:04 +00:00
Chris Lattner
863d710738 Don't verify passes when assertions are disabled.
llvm-svn: 54446
2008-08-07 07:34:50 +00:00
Dan Gohman
51a5eb52c5 Fix the AsmWriter to not print extra spaces after parameter attributes.
llvm-svn: 54351
2008-08-05 15:51:44 +00:00
Dan Gohman
de163bb39d Fix several const-correctness issues, resolving some -Wcast-qual warnings.
llvm-svn: 54349
2008-08-05 14:45:15 +00:00
Duncan Sands
573c01d5da Fix comment typos.
llvm-svn: 54266
2008-08-01 12:23:49 +00:00
Mon P Wang
fb483982f5 Added support for overloading intrinsics (atomics) based on pointers
to different address spaces.  This alters the naming scheme for those
intrinsics, e.g., atomic.load.add.i32 => atomic.load.add.i32.p0i32

llvm-svn: 54195
2008-07-30 04:36:53 +00:00
Nate Begeman
9a71580e21 Add vector shifts to the IR, patch by Eli Friedman.
CodeGen & Clang work coming next.

llvm-svn: 54161
2008-07-29 15:49:41 +00:00
Matthijs Kooijman
6ef5a25c7f Add a GetElementPtrInst::getIndexedType that accepts uint64_t's instead of just Value*'s.
llvm-svn: 54157
2008-07-29 08:46:11 +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
Nate Begeman
a6cdff50b0 Remove unnecessary implicit argument
llvm-svn: 54031
2008-07-25 17:56:27 +00:00
Nate Begeman
ce064348d9 Fix minor issues with VICmp/VFCmp constant expressions
llvm-svn: 54030
2008-07-25 17:35:37 +00:00
Nate Begeman
8c76bda987 Allow verifier to be run on partially materialized modules.
llvm-svn: 54028
2008-07-25 17:28:23 +00:00
Nate Begeman
d340dc3fab Tab removal
llvm-svn: 54025
2008-07-25 17:24:13 +00:00
Evan Cheng
e91c8c4508 Rename instance variables, parameter argument names to eliminate a bunch of compilation warnings with -Wshadow.
llvm-svn: 53970
2008-07-24 00:08:56 +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
cb26a8abeb Fix multiple-return-value-to-first-class-aggregates autoupgrade to
correctly handle the case where multiple-return-value constructs
were used to return one or zero values.

llvm-svn: 53890
2008-07-22 00:36:48 +00:00
Dan Gohman
183bd17a66 InsertValue and ExtractValue constant expressions are always
folded. Remove code that handled the case where they aren't
folded, and remove bitcode reader/writer support for them.

llvm-svn: 53887
2008-07-21 23:30:30 +00:00
Chris Lattner
0429684d2d verify limits-fndefn.c from the GCC testsuite before the
heat death of the universe, fixing an O(N^2) problem in the
size of a basic block.

llvm-svn: 53749
2008-07-18 05:23:39 +00:00
Chris Lattner
b786d147c9 Fix a bunch of bugs handling vector compare constant expressions, fixing
PR2317.

llvm-svn: 53544
2008-07-14 05:17:31 +00:00
Chris Lattner
accde0a86b Document and fix Constant::getVectorElements to return an empty vector
when presented with a constant expr.

If ConstantExpr::getV[IF]Cmp to work when ConstantFoldCompareInstruction
returns an undef or constant expr.  

llvm-svn: 53541
2008-07-14 05:10:41 +00:00
Dan Gohman
d1342570f2 Use find instead of lower_bound.
llvm-svn: 53474
2008-07-11 20:58:19 +00:00
Chris Lattner
7797bfa0fd SImplify ConstantVector::get a bit and make it turn a vector
of all undefs into a single undef value.

llvm-svn: 53384
2008-07-10 00:44:03 +00:00