1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

148 Commits

Author SHA1 Message Date
Owen Anderson
9df206d02d Push LLVMContexts through the IntegerType APIs.
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Owen Anderson
d0e6352c97 Move getTrue() and getFalse() to 2.5-like APIs.
llvm-svn: 77685
2009-07-31 17:39:07 +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
8496064116 More migration to raw_ostream, the water has dried up around the iostream hole.
- Some clients which used DOUT have moved to DEBUG. We are deprecating the
   "magic" DOUT behavior which avoided calling printing functions when the
   statement was disabled. In addition to being unnecessary magic, it had the
   downside of leaving code in -Asserts builds, and of hiding potentially
   unnecessary computations.

llvm-svn: 77019
2009-07-25 00:23:56 +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
Owen Anderson
cc287b28c9 Get rid of the Pass+Context magic.
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Owen Anderson
7f61f8dc30 Rename getConstantInt{True|False} to get{True|False} at Chris' behest.
llvm-svn: 76598
2009-07-21 18:03:38 +00:00
Dan Gohman
81885d5b80 Make makeLoopInvariant report whether it made any changes or not,
and use this to simplify more code.

llvm-svn: 75722
2009-07-15 01:25:43 +00:00
Dan Gohman
493855541b Update LoopSimplify and LoopUnswitch to use the new makeLoopInvariant
function.

llvm-svn: 75584
2009-07-14 01:37:59 +00:00
Owen Anderson
49226b1075 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
llvm-svn: 75200
2009-07-09 23:48:35 +00:00
Owen Anderson
ad3229d281 Thread LLVMContext through the constant folding APIs, which touches a lot of files.
llvm-svn: 74844
2009-07-06 18:42:36 +00:00
Owen Anderson
6795819c9e Second batch of passes using LLVMContext.
llvm-svn: 74753
2009-07-03 00:54:20 +00:00
Duncan Sands
880eaf5278 Allow readonly functions to unwind exceptions. Teach
the optimizers about this.  For example, a readonly
function with no uses cannot be removed unless it is
also marked nounwind.

llvm-svn: 71071
2009-05-06 06:49:50 +00:00
Nick Lewycky
a0dcd7e173 Remove strange extra semicolons.
llvm-svn: 67287
2009-03-19 05:51:39 +00:00
Devang Patel
ffd9b999f8 If "optimize for size" attribute is set then block non-trivial loop unswitches but allow trivial loop unswitches.
llvm-svn: 63670
2009-02-03 22:04:27 +00:00
Duncan Sands
aee16d4916 Rename getAnalysisToUpdate to getAnalysisIfAvailable.
llvm-svn: 63198
2009-01-28 13:14:17 +00:00
Devang Patel
82fb6bc606 Undo previous patch.
llvm-svn: 60701
2008-12-08 17:02:37 +00:00
Chris Lattner
f72f8e3b74 switch a couple more calls to use array_pod_sort.
llvm-svn: 60337
2008-12-01 06:52:57 +00:00
Devang Patel
c959b4dbd3 Ignore conditions that are outside the loop.
llvm-svn: 58631
2008-11-03 19:38:07 +00:00
Daniel Dunbar
5447f9679d Change create*Pass factory functions to return Pass* instead of
LoopPass*.
 - Although less precise, this means they can be used in clients
   without RTTI (who would otherwise need to include LoopPass.h, which
   eventually includes things using dynamic_cast). This was the
   simplest solution that presented itself, but I am happy to use a
   better one if available.

llvm-svn: 58010
2008-10-22 23:32:42 +00:00
Dan Gohman
133708df57 Use 0 instead of false to return a null pointer.
llvm-svn: 57660
2008-10-17 00:56:52 +00:00
Devang Patel
47a504c87c Implement function notes as function attributes.
llvm-svn: 56716
2008-09-26 23:51:19 +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
25ecdc49d9 Put FN_NOTE_AlwaysInline and others in FnAttr namespace.
llvm-svn: 56527
2008-09-24 00:06:15 +00:00
Devang Patel
b39defd763 Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.
Do not check isDeclaration() in hasNote(). It is clients' responsibility.

llvm-svn: 56524
2008-09-23 23:52:03 +00:00
Devang Patel
ad8ca34acd Use parameter attribute store (soon to be renamed) for
Function Notes also. Function notes are stored at index ~0.

llvm-svn: 56511
2008-09-23 22:35:17 +00:00
Devang Patel
c7fc5ed65f Add hasNote() to check note associated with a function.
llvm-svn: 56477
2008-09-22 22:32:29 +00:00
Devang Patel
3d42ac68df A loop may be unswitched multiple times. Reconstruct dom info. at the end.
llvm-svn: 55806
2008-09-04 22:43:59 +00:00
Devang Patel
25b88b66e8 Initialize loop data first.
llvm-svn: 55792
2008-09-04 20:36:36 +00:00
Devang Patel
c96f319a3c Do not unswitch if the function notes say we're optimizing this function for size.
llvm-svn: 55786
2008-09-04 18:55:13 +00:00
Dan Gohman
e1f9be27bc Tidy up several unbeseeming casts from pointer to intptr_t.
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Devang Patel
dcfd567cc5 Do not try to update dominator info while manipulating CFG. This code does not handle all cases and keeps invalid dom info around some cases, which misleads other passes down stream.
Right now, dom info is recaluclated in the end if the loop is switched.

llvm-svn: 53106
2008-07-03 17:37:52 +00:00
Bill Wendling
c4b5d8e1c3 Remove unused function.
llvm-svn: 53090
2008-07-03 07:10:03 +00:00
Devang Patel
7a65306299 Remove extra FIXME
llvm-svn: 53087
2008-07-03 06:50:04 +00:00
Devang Patel
889fe6f848 Reconstruct dom info, if loop is unswitched.
llvm-svn: 53086
2008-07-03 06:48:21 +00:00
Devang Patel
f999e47e64 LoopUnswitch does not preserve dominator info in all cases.
llvm-svn: 53085
2008-07-03 05:55:03 +00:00
Devang Patel
f9e8484756 Undo previous patch. It is not that simple to fix dom info here.
llvm-svn: 53062
2008-07-03 00:08:13 +00:00
Devang Patel
db4a6944ec Preserve dom info while simplifing loop after the unswitch.
llvm-svn: 53052
2008-07-02 22:58:54 +00:00
Devang Patel
5d8e832471 reuse vectors.
llvm-svn: 53007
2008-07-02 01:44:29 +00:00
Devang Patel
9140e998b4 Fix comment.
llvm-svn: 53006
2008-07-02 01:31:19 +00:00
Devang Patel
68d9a25bcd Preserve loop data so that it is not fetched everytime it is needed.
Keep track of currentLoop.

llvm-svn: 53005
2008-07-02 01:18:13 +00:00
Devang Patel
8f157a3670 Preserve dominance frontier while trivially unswitching loop.
llvm-svn: 52438
2008-06-18 02:16:38 +00:00
Devang Patel
b1798d2be0 Update dom tree. Fix PR 2372.
llvm-svn: 51887
2008-06-02 22:52:56 +00:00
Dan Gohman
8b6f4366ae Tidy up BasicBlock::getFirstNonPHI, and change a bunch of places to
use it instead of duplicating its functionality.

llvm-svn: 51499
2008-05-23 21:05:58 +00:00
Dan Gohman
bab18cae46 Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.

llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Dan Gohman
d4a670284c Make several variable declarations static.
llvm-svn: 50696
2008-05-06 01:53:16 +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
Chris Lattner
34894abd7f fit some more code in 80 cols.
llvm-svn: 50016
2008-04-21 00:25:49 +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
Nick Lewycky
50c8d20ca2 Update the block cloner which fixes bugpoint on code using unwind_to (phew!)
and also update the cloning interface's major user, the loop optimizations.

llvm-svn: 48088
2008-03-09 05:24:34 +00:00