1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

55 Commits

Author SHA1 Message Date
Nate Begeman
928566cbfe Feedback from chris
llvm-svn: 50271
2008-04-25 17:45:52 +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
Nate Begeman
26b6f640a1 Teach the PruningFunctionCloner how to look through loads with
ConstantExpression GEPs pointing into constant globals.

llvm-svn: 50256
2008-04-25 06:37:06 +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
Anton Korobeynikov
48f56482e8 Preserve calling convention during function cloning
llvm-svn: 48708
2008-03-23 16:03:00 +00:00
Nick Lewycky
5dd879d5b5 Turn unwind_to into "unwinds to".
llvm-svn: 48123
2008-03-10 02:20:00 +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
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
5ca42cd342 Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe.  While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".

llvm-svn: 44817
2007-12-10 22:53:04 +00:00
Duncan Sands
3602011bec Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls.  This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll).  Hopefully
a bitcode guru (who might that be? :) ) will fix it.

llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Anton Korobeynikov
369f4381ea Forget to commit users part of value mapper interface
llvm-svn: 43940
2007-11-09 12:27:04 +00:00
Dan Gohman
d0a0ea9916 Change uses of Function::front to Function::getEntryBlock for readability.
llvm-svn: 35265
2007-03-22 16:38:57 +00:00
Chris Lattner
4fbb8286bf switch the inliner from being recursive to being iterative.
llvm-svn: 34832
2007-03-02 03:11:20 +00:00
Reid Spencer
8749d297f5 Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.

llvm-svn: 33939
2007-02-05 23:32:05 +00:00
Chris Lattner
71fe09f397 Switch inliner over to use DenseMap instead of std::map for ValueMap. This
speeds up the inliner 16%.

llvm-svn: 33801
2007-02-03 00:08:31 +00:00
Chris Lattner
618f24b0ed Fix bugs in the inliner having to do with single-entry phi nodes and valuemap
updating.  These were exposed by Devang's recent passmgr changes (with
non-default passorderings) because now the inliner can be interleved with
the LCSSA pass.

llvm-svn: 33760
2007-02-01 18:48:38 +00:00
Chris Lattner
7db51ec161 Adjust #includes to match movement of constant folding code from transformutils to libanalysis.
llvm-svn: 33680
2007-01-30 23:46:24 +00:00
Chris Lattner
23628987e2 The inliner/cloner can now optionally take TargetData info, which can be
used by constant folding.

llvm-svn: 33676
2007-01-30 23:22:39 +00:00
Chris Lattner
659afcca15 Change constant folding APIs to take an optional TargetData, and change
ConstantFoldInstOperands/ConstantFoldCall to take a pointer to an array
of operands + size, instead of an std::vector.

In some cases, switch to using a SmallVector instead of a vector.
This allows us to get rid of some special case gross code that was there
to avoid the cost of constructing a vector.

llvm-svn: 33670
2007-01-30 23:13:49 +00:00
Reid Spencer
3d986f6487 Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.

llvm-svn: 33110
2007-01-12 04:24:46 +00:00
Zhou Sheng
23d24526b2 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.

llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Reid Spencer
4428c3483b For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.

llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Jeff Cohen
e1003da1a2 Unbreak VC++ build.
llvm-svn: 31464
2006-11-05 19:31:28 +00:00
Reid Spencer
4bafa71dc1 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Chris Lattner
60207ce1f7 Second half of the fix for Transforms/Inline/inline_cleanup.ll
This folds unconditional branches that are often produced by code
specialization.

llvm-svn: 30307
2006-09-13 21:27:00 +00:00
Chris Lattner
3300df2fb9 Remove dead #include
llvm-svn: 28642
2006-06-01 20:02:28 +00:00
Chris Lattner
93c46b83b6 Make the "pruning cloner" smarter. As it propagates constants through the
code (while cloning) it often gets the branch/switch instructions.  Since it
knows that edges of the CFG are dead, it need not clone (or even look) at
the obviously dead blocks.  This should speed up the inliner substantially on
code where there are lots of inlinable calls to functions with constant
arguments.  On C++ code in particular, this kicks in.

llvm-svn: 28641
2006-06-01 19:19:23 +00:00
Chris Lattner
0189e09b89 Fix some regression from the inliner patch I committed last night. This fixes
ldecod, lencod, and SPASS.

llvm-svn: 28523
2006-05-27 17:28:13 +00:00
Chris Lattner
12c9d54f79 Implement a new method, CloneAndPruneFunctionInto, as documented.
llvm-svn: 28519
2006-05-27 01:22:24 +00:00
Chris Lattner
67fb415248 Allow the code cloning interfaces to capture some important info about the
code being cloned if the client wants.

llvm-svn: 25281
2006-01-13 18:39:17 +00:00
Misha Brukman
53e199440e Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Chris Lattner
4b688a1c70 This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!

llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Misha Brukman
58104df77b Fix #includes of i*.h => Instructions.h as per PR403.
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Brian Gaeke
9adf9d8bfc Move RemapInstruction() to ValueMapper, so that it can be shared with
CloneTrace, and because it is primarily an operation on ValueMaps.  It
is now a global (non-static) function which can be pulled in using
ValueMapper.h.

llvm-svn: 13600
2004-05-19 09:08:12 +00:00
Chris Lattner
342b7276d6 Minor speedup, don't query ValueMap each time through the loop
llvm-svn: 11123
2004-02-04 21:44:26 +00:00
Chris Lattner
aa44b4de3e Give CloneBasicBlock an optional function argument to specify which function
to add the cloned block to.  This allows the block to be added to the function
immediately, and all of the instructions to be immediately added to the function
symbol table, which speeds up the inliner from 3.7 -> 3.38s on the PR209.

llvm-svn: 11107
2004-02-04 01:19:43 +00:00
Chris Lattner
031bd7e9f3 Finegrainify namespacification
llvm-svn: 10727
2004-01-09 06:12:26 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
f171f30deb Refactor CloneFunction to expose the new CloneBasicBlock function
llvm-svn: 5806
2003-04-18 03:50:09 +00:00
Chris Lattner
fa4f750f3e Add new linkage types to support a real frontend
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Chris Lattner
6aa0ec26d5 Initial checkin of Module cloning support stuff
llvm-svn: 4788
2002-11-20 20:47:41 +00:00
Chris Lattner
ec0df74910 Fix minor bugs
llvm-svn: 4778
2002-11-20 18:32:31 +00:00
Chris Lattner
62629300d3 Remove unneccesary #include
llvm-svn: 4772
2002-11-19 23:12:53 +00:00
Chris Lattner
4053d2dd12 Implement the CloneFunction function
llvm-svn: 4771
2002-11-19 23:12:22 +00:00
Chris Lattner
e5a05ec13b Minor changes to cloning interface
llvm-svn: 4770
2002-11-19 22:54:01 +00:00
Chris Lattner
aff50cfe1d Fix two fixmes: integrate with inlining, and document
llvm-svn: 4769
2002-11-19 22:04:49 +00:00
Chris Lattner
27bf5916fb Rework inline pass to use cloning infrastructure to do the dirty work
llvm-svn: 4766
2002-11-19 21:54:07 +00:00
Chris Lattner
ccb8790bc4 Start using the new function cloning header
llvm-svn: 4764
2002-11-19 20:59:41 +00:00
Chris Lattner
a590093513 *** empty log message ***
llvm-svn: 2813
2002-06-30 16:25:25 +00:00