Owen Anderson
2f82e2735a
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
2f55027012
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
ec131d1fd7
Add output of the SFINAE bit for Clang's diagnostics
...
llvm-svn: 73331
2009-06-14 07:24:49 +00:00
Shantonu Sen
f4ba1e62f9
Add myself, test commit
...
llvm-svn: 73320
2009-06-14 02:03:17 +00:00
Nick Lewycky
47b71c5844
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
c16c947071
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
426901aa19
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
8db2edcf7f
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
185c9ef0a2
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
64e6529e76
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
77444cba6d
Type change cleanup on JCE and MCE. Patch by Aaron Gray
...
llvm-svn: 73271
2009-06-12 23:51:56 +00:00
Dan Gohman
32cbbec335
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
9fd76cc19c
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
c59a7cb8cc
Improve style.
...
llvm-svn: 73258
2009-06-12 22:07:19 +00:00
Owen Anderson
eaac7a42fe
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
d0428da398
Now with less iterator invalidation, and other forms of crashing!
...
llvm-svn: 73256
2009-06-12 21:41:29 +00:00
Evan Cheng
b6cf8dbb96
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
3dd5c5d28a
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
d93b5b672f
Mark some pattern-less instructions as neverHasSideEffects.
...
llvm-svn: 73252
2009-06-12 20:46:18 +00:00
Devang Patel
310fd4ad03
Document noredzone and noimplicitfloat function attributes.
...
llvm-svn: 73246
2009-06-12 19:45:19 +00:00
Devang Patel
c1fee72162
Clear AbstractInstanceRootMap at the end of the function.
...
llvm-svn: 73244
2009-06-12 19:24:05 +00:00
Dan Gohman
9377b086f5
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
17fb0d24eb
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
9ebb4d2127
Testcase for llvm-gcc patch 73238.
...
llvm-svn: 73239
2009-06-12 18:41:53 +00:00
Bill Wendling
2ec94e44c7
Waste time fixing something that should have been fixed before.
...
llvm-svn: 73236
2009-06-12 18:02:40 +00:00
Nick Lewycky
ec06695579
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
e3a018d707
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
d5bf51faa2
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
25675ac14a
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
768042812c
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
b1a9091298
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
42ded7042c
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
945203bbbe
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
c523393900
Credits for Edward O'Callaghan.
...
llvm-svn: 73223
2009-06-12 12:52:24 +00:00
Nick Lewycky
e04dc22ebd
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
cf4e1dff31
Fix regular expression.
...
llvm-svn: 73221
2009-06-12 05:39:02 +00:00
Nick Lewycky
a879819918
Don't remove aggregate-typed module level constants before encoding functions
...
since functions may contain aggregate constants too.
llvm-svn: 73220
2009-06-12 05:20:12 +00:00
Nick Lewycky
e68347bde5
In an XFAIL line, treat "XFAIL: foo*bar" as a regular expression to be matched
...
against the target triple, instead of equivalent to "XFAIL: *".
llvm-svn: 73219
2009-06-12 05:18:32 +00:00
Oscar Fuentes
46fed3b475
CMake: New variable LLVM_LIBDIR_SUFFIX.
...
Patch by Ingmar Vanhassel!
llvm-svn: 73216
2009-06-12 02:49:53 +00:00
Misha Brukman
15b8bc18a3
Update script to tell the user where to get the CodeSourcery crosstool, if it's
...
not found.
llvm-svn: 73213
2009-06-12 02:04:47 +00:00
Misha Brukman
7a017c6f96
Added two scripts to aid with building Linux/x86 -> Linux/ARM crosstools, using
...
CodeSourcery's provided GCC-based crosstools, from which we use binutils.
llvm-svn: 73212
2009-06-12 01:55:57 +00:00
Nick Lewycky
225ab16b07
XFAIL this on PPC Linux. This keeps showing up in the buildbot and isn't easy to fix, and I'd like it to stop masking
...
real failures.
llvm-svn: 73211
2009-06-11 23:43:02 +00:00
Eli Friedman
32ad5e9c08
Misc x86 README updates: remove a couple of already-fixed issues,
...
add a few suggestions from looking at some assembly code.
llvm-svn: 73210
2009-06-11 23:07:04 +00:00
Bruno Cardoso Lopes
66189503ef
Use forward declarations and move TargetELFWriterInfo impl to a new file.
...
llvm-svn: 73209
2009-06-11 22:13:00 +00:00
Dale Johannesen
4bd5463617
Test for rev 73205 (PR 4349)
...
llvm-svn: 73206
2009-06-11 20:48:09 +00:00
Bill Wendling
3b022b1d57
Alphabetize.
...
llvm-svn: 73203
2009-06-11 20:13:35 +00:00
Bill Wendling
21f0e49c2c
Remove unused parameter warnings.
...
llvm-svn: 73202
2009-06-11 20:10:02 +00:00
Bruno Cardoso Lopes
1656366e4d
Support for ELF Visibility
...
Emission for globals, using the correct data sections
Function alignment can be computed for each target using TargetELFWriterInfo
Some small fixes
llvm-svn: 73201
2009-06-11 19:16:03 +00:00
Chris Lattner
61797e3291
Fix 4366: store to null in non-default addr space should not be
...
turned into unreachable.
llvm-svn: 73195
2009-06-11 17:54:56 +00:00
Sanjiv Gupta
5dce37298f
Generate libcalls for floating point arithmetic and casting operations.
...
llvm-svn: 73194
2009-06-11 16:50:48 +00:00