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

47059 Commits

Author SHA1 Message Date
Chris Lattner
eb664fc504 I got J and K backward, many thanks to Eli for spotting this!
llvm-svn: 73372
2009-06-15 04:39:05 +00:00
Chris Lattner
1970e7ad34 remove some old CVS-specific arguments that don't work with SVN.
llvm-svn: 73369
2009-06-15 04:18:54 +00:00
Chris Lattner
dfaaf63aff add a new static method to portably determine whether a patch is
absolute or not, based on a patch by Gregory Curfman!

llvm-svn: 73368
2009-06-15 04:17:07 +00:00
Chris Lattner
e427a956ca implement support for the 'K' asm constraint, PR4347
llvm-svn: 73366
2009-06-15 04:01:39 +00:00
Dan Gohman
111f127d23 Fix old-style type names in comments.
llvm-svn: 73362
2009-06-14 23:30:43 +00:00
Dan Gohman
d3a8d79c0d Implement more aggressive folding of add operand lists when
they contain multiplications of constants with add operations.
This helps simplify several kinds of things; in particular it
helps simplify expressions like ((-1 * (%a + %b)) + %a) to %b,
as expressions like this often come up in loop trip count
computations.

llvm-svn: 73361
2009-06-14 22:58:51 +00:00
Dan Gohman
dda7e316db Specialize DenseMapInfo for SCEVHandle, so that SCEVHandles can be
used as keys in DenseMaps.

llvm-svn: 73360
2009-06-14 22:55:07 +00:00
Dan Gohman
bee566c1ce Check for the short-circuiting condition before performing
the potentially expensive erase.

llvm-svn: 73359
2009-06-14 22:53:57 +00:00
Dan Gohman
d1c7be715c Do compare constant SCEV values in SCEVComplexityCompare, because
even though the order doesn't matter at the top level of an expression,
it does matter when the constant is a subexpression of an n-ary
expression, because n-ary expressions are sorted lexicographically.

llvm-svn: 73358
2009-06-14 22:51:25 +00:00
Dan Gohman
d895ed43c8 Convert several parts of the ScalarEvolution framework to use
SmallVector instead of std::vector.

llvm-svn: 73357
2009-06-14 22:47:23 +00:00
Dan Gohman
973025e678 Add another item to the list of things that indvars does.
llvm-svn: 73355
2009-06-14 22:38:41 +00:00
Duncan Sands
3a4ae072d0 Testcase for PR4332.
llvm-svn: 73353
2009-06-14 22:22:42 +00:00
Evan Cheng
1607bd1fa9 Move register allocation preference (or hint) from LiveInterval to MachineRegisterInfo. This allows more passes to set them.
llvm-svn: 73346
2009-06-14 20:22:55 +00:00
Torok Edwin
6240e2ef53 Fix CMake build. Patch from Ingmar Vanhassel.
llvm-svn: 73342
2009-06-14 13:39:56 +00:00
Owen Anderson
6aa3d83630 Add an early implementation of a partial inlining pass. The idea behind this
is that, for functions whose bodies are entirely guarded by an if-statement, it
can be profitable to pull the test out of the callee and into the caller.

This code has had some cursory testing, but still has a number of known issues
on the LLVM test suite.

llvm-svn: 73338
2009-06-14 08:26:32 +00:00
Bruno Cardoso Lopes
d73d79eaf9 Introduce new BinaryObject (blob) class, ELF Writer modified to use it. BinaryObject.h by Aaron Gray
llvm-svn: 73333
2009-06-14 07:53:21 +00:00
Douglas Gregor
28685e02db Add output of the SFINAE bit for Clang's diagnostics
llvm-svn: 73331
2009-06-14 07:24:49 +00:00
Shantonu Sen
622f9b3511 Add myself, test commit
llvm-svn: 73320
2009-06-14 02:03:17 +00:00
Nick Lewycky
e74c3c6d46 Unlike the other instructions, GEP really does need to look at the type of a
pointer. This fixes kimwitu++. Pointed out by Frits van Bommel on review!

llvm-svn: 73299
2009-06-13 19:09:52 +00:00
Sanjiv Gupta
693a8c54e4 The subprogram descriptor for a function may be missing (llvm-ld linking two static functions with same name), so pick up the compilation unit for the function from the first valid debug loc of its instructions.
This patch also emits debug info for structure (aggregate types in 
general) types.

llvm-svn: 73295
2009-06-13 17:35:54 +00:00
Dan Gohman
37fef35e88 Teach SCEVExpander's visitAddRecExpr to reuse an existing canonical
induction variable when the addrec to be expanded does not require
a wider type. This eliminates the need for IndVarSimplify to
micro-manage SCEV expansions, because SCEVExpander now
automatically expands them in the form that IndVarSimplify considers
to be canonical. (LSR still micro-manages its SCEV expansions,
because it's optimizing for the target, rather than for
other optimizations.)

Also, this uses the new getAnyExtendExpr, which has more clever
expression simplification logic than the IndVarSimplify code it
replaces, and this cleans up some ugly expansions in code such as
the included masked-iv.ll testcase.

llvm-svn: 73294
2009-06-13 16:25:49 +00:00
Dan Gohman
25827fdc12 Add a ScalarEvolution::getAnyExtendExpr utility function for performing
extension with unspecified bits.

llvm-svn: 73293
2009-06-13 15:56:47 +00:00
Evan Cheng
d0a66e438f Add a ARM specific pre-allocation pass that re-schedule loads / stores from
consecutive addresses togther. This makes it easier for the post-allocation pass
to form ldm / stm.

This is step 1. We are still missing a lot of ldm / stm opportunities because
of register allocation are not done in the desired order. More enhancements
coming.

llvm-svn: 73291
2009-06-13 09:12:55 +00:00
Devang Patel
bcc1187643 llvm.dbg.region.end() intrinsic is not required to be in _last_ basic block in a function. If that happens then any basic block that follows (lexically) the block with regin.end will not have scope info available. LexicalScopeStack relies on processing basic block in CFG order, but this processing order is not guaranteed. Things get complicated when the optimizer gets a chance to optimizer IR with dbg intrinsics.
Apply defensive patch to preserve at least one lexical scope till the end of function.

llvm-svn: 73282
2009-06-13 02:16:18 +00:00
Bruno Cardoso Lopes
9cb41aaf57 Type change cleanup on JCE and MCE. Patch by Aaron Gray
llvm-svn: 73271
2009-06-12 23:51:56 +00:00
Dan Gohman
67ec24b541 Adjust this test's regex strings so that they work regardless
of the target's pointer size. This avoids the need for -m32 on
the llvm-gcc command-line, which some targets may not support.

llvm-svn: 73270
2009-06-12 23:31:14 +00:00
Dan Gohman
e27a52f9b1 Add -m32 to llvm-gcc commands, so that this test behaves as expected
on systems which default to a 64-bit target.

llvm-svn: 73265
2009-06-12 23:02:02 +00:00
Owen Anderson
a3bb398631 Improve style.
llvm-svn: 73258
2009-06-12 22:07:19 +00:00
Owen Anderson
247bdbde16 This is supposed to be a preorder numbering of the dominator tree, not the CFG.
llvm-svn: 73257
2009-06-12 21:50:22 +00:00
Owen Anderson
8c879bba61 Now with less iterator invalidation, and other forms of crashing!
llvm-svn: 73256
2009-06-12 21:41:29 +00:00
Evan Cheng
98216808fe If killed register is defined by implicit_def, do not clear it since it's live range may overlap another def of same register.
llvm-svn: 73255
2009-06-12 21:34:26 +00:00
Chris Lattner
75c88a3730 second half of fix for PR4366: don't zap store to null of
non-default addrspaces.

llvm-svn: 73253
2009-06-12 21:01:07 +00:00
Evan Cheng
2f784781aa Mark some pattern-less instructions as neverHasSideEffects.
llvm-svn: 73252
2009-06-12 20:46:18 +00:00
Devang Patel
95b4743214 Document noredzone and noimplicitfloat function attributes.
llvm-svn: 73246
2009-06-12 19:45:19 +00:00
Devang Patel
8d9aa4249a Clear AbstractInstanceRootMap at the end of the function.
llvm-svn: 73244
2009-06-12 19:24:05 +00:00
Dan Gohman
f9b0419cd8 Don't do (x - (y - z)) --> (x + (z - y)) on floating-point types, because
it may round differently. This fixes PR4374.

llvm-svn: 73243
2009-06-12 19:23:25 +00:00
Dan Gohman
43f66023c3 Give Instruction::isSameOperationAs a corresponding comment to note
the relationship with MergeFunctions.cpp's isEquivalentOperation,
and make a trivial code reordering so that the two functions are
easier to compare.

Fix the name of Instruction::isSameOperationAs in MergeFunction.cpp's
isEquivalentOperation's comment, and fix a nearby 80-column violation.

llvm-svn: 73241
2009-06-12 19:03:05 +00:00
Dale Johannesen
b5be21ef41 Testcase for llvm-gcc patch 73238.
llvm-svn: 73239
2009-06-12 18:41:53 +00:00
Bill Wendling
94a47465af Waste time fixing something that should have been fixed before.
llvm-svn: 73236
2009-06-12 18:02:40 +00:00
Nick Lewycky
32fec8ff24 Keep callers of a weak function calling it, instead of the non-weak equivalent.
llvm-svn: 73235
2009-06-12 17:16:48 +00:00
Arnold Schwaighofer
780e3addf8 Fix Bug 4278: X86-64 with -tailcallopt calling convention
out of sync with regular cc.

The only difference between the tail call cc and the normal
cc was that one parameter register - R9 - was reserved for
calling functions through a function pointer. After time the
tail call cc has gotten out of sync with the regular cc. 

We can use R11 which is also caller saved but not used as
parameter register for potential function pointers and
remove the special tail call cc on x86-64.

llvm-svn: 73233
2009-06-12 16:26:57 +00:00
Nick Lewycky
effec6b472 Don't forget to match the calling convention when producing a thunk.
llvm-svn: 73231
2009-06-12 16:04:00 +00:00
Nick Lewycky
1e36649f95 Given two identical weak functions, produce one internal function and two weak
thunks.

llvm-svn: 73230
2009-06-12 15:56:56 +00:00
Duncan Sands
92153907f3 Tweak GenLibDeps.pl so it works on solaris.
Patch by Edward O'Callaghan.

llvm-svn: 73228
2009-06-12 14:23:42 +00:00
Nicolas Geoffray
72523163ad After obtaining the lock, look if the function has been codegen'd by
another thread.

llvm-svn: 73227
2009-06-12 14:11:08 +00:00
Nick Lewycky
cc239d7680 This test is wrong. If you have two weak functions F and G you can't make
either one call the other since either one can be replaced at link time, and
they need to be independent.

llvm-svn: 73225
2009-06-12 13:24:41 +00:00
Duncan Sands
f0b761540d Add clang support to the nightly test script.
Patch by Edward O'Callaghan.

llvm-svn: 73224
2009-06-12 13:02:52 +00:00
Duncan Sands
7d79ddff64 Credits for Edward O'Callaghan.
llvm-svn: 73223
2009-06-12 12:52:24 +00:00
Nick Lewycky
5b80791480 Add an "are types equivalent" operation that ignores the types that a pointer
points to while analyzing all other fields.

Use FoldingSetNodeID to produce a good hash. This dramatically decreases run
times.

Emit thunks. This means that it can look at all functions regardless of what
the linkage is or if the address is taken, but unfortunately some small
functions can be even shorter than the thunk because our backend doesn't yet
realize it can just turn these into jumps. This means that this pass will
pessimize code on average.

llvm-svn: 73222
2009-06-12 08:04:51 +00:00
Nick Lewycky
61f78a2674 Fix regular expression.
llvm-svn: 73221
2009-06-12 05:39:02 +00:00