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

2405 Commits

Author SHA1 Message Date
Daniel Dunbar
40ba5f6f58 Fix -Asserts warnings.
llvm-svn: 79849
2009-08-23 10:29:55 +00:00
Chris Lattner
e9861c1cb8 remove uses of llvm/Support/Streams.h.
llvm-svn: 79838
2009-08-23 07:33:14 +00:00
Chris Lattner
f536c93134 convert LoopInfo.h and GraphWriter.h to use raw_ostream
llvm-svn: 79836
2009-08-23 07:19:13 +00:00
Chris Lattner
89d3d59e83 remove a few DOUTs here and there.
llvm-svn: 79832
2009-08-23 06:35:02 +00:00
Chris Lattner
1c0452caeb Change Pass::print to take a raw ostream instead of std::ostream,
update all code that this affects.

llvm-svn: 79830
2009-08-23 06:03:38 +00:00
Chris Lattner
ea2bfd7a9f eliminate the std::ostream form of WriteAsOperand and update clients.
This also updates dominator related stuff.

llvm-svn: 79825
2009-08-23 05:17:37 +00:00
Chris Lattner
01dae858b6 eliminate the "Value" printing methods that print to a std::ostream.
This required converting a bunch of stuff off DOUT and other cleanups.

llvm-svn: 79819
2009-08-23 04:37:46 +00:00
Dan Gohman
aac0378610 Don't assume that the operand of an inttoptr is an pointer-sized integer.
llvm-svn: 79651
2009-08-21 18:27:26 +00:00
Dan Gohman
d240c19451 Change getelementptr folding to use APInt instead of uint64_t for
offset computations. This fixes a truncation bug on targets that
don't have 64-bit pointers.

llvm-svn: 79639
2009-08-21 16:52:54 +00:00
Richard Pennington
2d2ff4d30e bug 4530: Make debug information static to it is preservered during bitcode linking.
llvm-svn: 79616
2009-08-21 11:10:31 +00:00
Dan Gohman
6ec8176e22 Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrap
and hasNoSignedWrap, for consistency with the nuw and nsw properties.

llvm-svn: 79539
2009-08-20 17:11:38 +00:00
Dan Gohman
d9766dcb85 Various comment and whitespace cleanups.
llvm-svn: 79533
2009-08-20 16:42:55 +00:00
Dan Gohman
cc511acf87 Fix a bug in the over-index constant folding. When over-indexing an
array member of a struct, it's possible to land in an arbitrary position
inside that struct, such that attempting to find further getelementptr
indices will fail. In such cases, folding cannot be done.

llvm-svn: 79485
2009-08-19 22:46:59 +00:00
Dan Gohman
ba656de4a4 Use hasDefinitiveInitializer() instead of testing the same thing
by hand, and fix a few places that were using hasInitializer() that
appear to depend on the initializer value.

llvm-svn: 79441
2009-08-19 18:20:44 +00:00
Dan Gohman
bc59c24278 Canonicalize indices in a constantexpr GEP. If Indices exceed the
static extents of the static array type, it causes GlobalOpt and
other passes to be more conservative. This canonicalization also
allows the constant folder to add "inbounds" to GEPs.

llvm-svn: 79440
2009-08-19 18:18:36 +00:00
Andreas Neustifter
7cffe838a8 Broke line before break.
llvm-svn: 79404
2009-08-19 05:44:39 +00:00
Dan Gohman
807652ac3a Fix SimplifyLibcalls and ValueTracking to check mayBeOverridden
before performing optimizations based on constant string values.

llvm-svn: 79384
2009-08-19 00:11:12 +00:00
Dan Gohman
b0cf049a1e Generalize ScalarEvolution to be able to analyze GEPs when
TargetData is not present. It still uses TargetData when available.
This generalization also fixed some limitations in the TargetData
case; the attached testcase covers this.

llvm-svn: 79344
2009-08-18 16:46:41 +00:00
Devang Patel
b3c1574994 Oops. find all llvm.dbg.global_variables.
llvm-svn: 79274
2009-08-17 20:36:20 +00:00
Dan Gohman
7c8c5606ce Fix more missing newlines.
llvm-svn: 79244
2009-08-17 15:29:31 +00:00
Owen Anderson
dc11fe967d Actually privatize a IntegerTypes, and fix a few bugs exposed by this.
llvm-svn: 78955
2009-08-13 23:27:32 +00:00
Owen Anderson
9df206d02d Push LLVMContexts through the IntegerType APIs.
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Dan Gohman
fdfa3dc188 Fix a missing newline (now that Value*'s operator<< doesn't append one).
llvm-svn: 78814
2009-08-12 16:48:27 +00:00
Dan Gohman
cf73a006f0 Use isa instead of dyn_cast when the result is only converted to bool.
llvm-svn: 78685
2009-08-11 17:20:16 +00:00
Dan Gohman
24939b2c4f Tidy #includes.
llvm-svn: 78677
2009-08-11 16:02:12 +00:00
Dan Gohman
08e747855c Don't assume that external global variables are aligned at their preferred
alignment. Only the minimum alignment guaranteed by the ABI may be assumed.

llvm-svn: 78668
2009-08-11 15:50:03 +00:00
Devang Patel
86894d4e56 Keep track of DIType.
llvm-svn: 78602
2009-08-10 22:09:58 +00:00
Daniel Dunbar
9d9f5741a8 Some ProfileInfo cleanups.
- Part of optimal static profiling patch sequence by Andreas Neustifter.

llvm-svn: 78485
2009-08-08 18:59:03 +00:00
Daniel Dunbar
6eb6029bc2 Add a basic static ProfileInfo provider (ProfileEstimatorPass).
- Part of optimal static profiling patch sequence by Andreas Neustifter.

llvm-svn: 78484
2009-08-08 18:44:18 +00:00
Daniel Dunbar
87825212a4 More ProfileInfo improvements.
- Part of optimal static profiling patch sequence by Andreas Neustifter.

 - Store edge, block, and function information separately for each functions
   (instead of in one giant map).

 - Return frequencies as double instead of int, and use a sentinel value for
   missing information.

llvm-svn: 78477
2009-08-08 17:43:09 +00:00
Andreas Bolka
5356a5f16b Fix copy-pasto.
llvm-svn: 78426
2009-08-07 22:55:26 +00:00
Andreas Bolka
7ded8b7bdf SIV/MIV classification for LDA.
LoopDependenceAnalysis::getLoops is currently O(N*M) for a loop-nest of
depth N and a compound SCEV of M atomic SCEVs. As both N and M will
typically be very small, this should not be a problem. If it turns out
to be one, rewriting getLoops as SCEVVisitor will reduce complexity to
O(M).

llvm-svn: 78394
2009-08-07 18:23:41 +00:00
Daniel Dunbar
6782bf5556 Remove unused function.
llvm-svn: 78366
2009-08-07 03:52:07 +00:00
Dan Gohman
1c41d60c4a Fix a bunch of namespace pollution.
llvm-svn: 78363
2009-08-07 01:32:21 +00:00
Devang Patel
86c0c7abf1 Remove dead code.
llvm-svn: 78335
2009-08-06 20:57:44 +00:00
Andreas Bolka
eb5ba4eddf Simplify the ZIV tester to the max.
As suggested by Nick Lewycky.

llvm-svn: 78277
2009-08-06 03:10:33 +00:00
Owen Anderson
3d0e1b855d Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
llvm-svn: 78258
2009-08-05 23:16:16 +00:00
Daniel Dunbar
49dc5e993d Make block and function count available via ProfileInfo.
- Part of optimal static profiling patch sequence by Andreas Neustifter.

llvm-svn: 78247
2009-08-05 21:51:16 +00:00
Daniel Dunbar
eabd825693 Remove unnecessary ProfileInfoLoader methods.
- Part of optimal static profiling patch sequence by Andreas Neustifter.

llvm-svn: 78199
2009-08-05 15:55:56 +00:00
Andreas Bolka
4d59f26912 ZIV tester for LDA.
llvm-svn: 78157
2009-08-05 04:26:05 +00:00
Andreas Bolka
fcea3a23a0 Restrict LDA to GEPs with the same pointer offset.
We can not simply apply ZIV testing to the pointer offsets, as this
would incorrectly return independence for e.g. (GEP x,0,i; GEP x,1,-i).

llvm-svn: 78155
2009-08-05 04:13:41 +00:00
Andreas Bolka
6fc741e683 Restrict LDA to affine subscripts.
llvm-svn: 77932
2009-08-03 01:03:48 +00:00
Dan Gohman
40e39492e8 LibCallAliasAnalysis doesn't use TargetData.
llvm-svn: 77729
2009-07-31 20:56:29 +00:00
Dan Gohman
5e41986999 Make TargetData optional in MemoryDependenceAnalysis.
llvm-svn: 77727
2009-07-31 20:53:12 +00:00
Dan Gohman
9c6c4d57be Remove an unnecessary header.
llvm-svn: 77725
2009-07-31 20:47:45 +00:00
Owen Anderson
1dc40e205b Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.

llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Dan Gohman
173cfdc02f Fix some problems with ASTCallbackVH in its use as a DenseMap key.
llvm-svn: 77696
2009-07-31 18:21:48 +00:00
Devang Patel
34cec19943 Process DbgDeclareInst.
llvm-svn: 77694
2009-07-31 18:18:52 +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