Commit Graph

32862 Commits

Author SHA1 Message Date
Devang Patel
1619dc3b9e s/DebugLoc.CompileUnit/DebugLoc.Scope/g
s/DebugLoc.InlinedLoc/DebugLoc.InlinedAtLoc/g



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 23:28:53 +00:00
Devang Patel
228ebd0f4c Check void type before using RAUWd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84049 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 22:56:32 +00:00
Bob Wilson
e72142aa5b More Neon clean-up: avoid the need for custom-lowering vld/st-lane intrinsics
by creating TargetConstants during instruction selection instead of during
legalization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 22:29:24 +00:00
Kevin Enderby
cfe0724016 More bits of the ARM target assembler for llvm-mc to parse immediates.
Also fixed a couple of coding style things that crept in.  And added more
to the temporary hacked up ARMAsmParser::MatchInstruction() method for testing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 22:19:02 +00:00
Evan Cheng
50a5914e12 Teach basic AA about PHI nodes. If all operands of a phi NoAlias another value than it's safe to declare the PHI NoAlias the value. Ditto for MustAlias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84038 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 22:02:20 +00:00
Bob Wilson
73d64a6fd3 NEON VLD/VST are now fully implemented. For operations that expand to
multiple instructions, the expansion is done during selection so there is
no need to do anything special during legalization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 21:55:24 +00:00
Devang Patel
1bf5ebc7be Do not check use_empty() before replaceAllUsesWith(). This gives ValueHandles a chance to get properly updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84033 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 21:41:20 +00:00
Jeffrey Yasskin
e5f879825f Keep track of stubs that are created. This fixes PR5162 and probably PR4822 and
4406. Patch by Nick Lewycky!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84032 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 21:32:57 +00:00
Duncan Sands
3a66a68b0c Introduce new convenience methods for sign extending or
truncating an SDValue (depending on whether the target
type is bigger or smaller than the value's type); or zero
extending or truncating it.  Use it in a few places (this
seems to be a popular operation, but I only modified cases
of it in SelectionDAGBuild).  In particular, the eh_selector
lowering was doing this wrong due to a repeated rather than
inverted test, fixed with this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 21:04:12 +00:00
Bob Wilson
765cc0b9d5 Revise ARM inline assembly memory operands to require the memory address to
be in a register.  The previous use of ARM address mode 2 was completely
arbitrary and inappropriate for Thumb.  Radar 7137468.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 20:50:28 +00:00
Dale Johannesen
4360298d2b Add an "msasm" flag to inline asm as suggested in PR 5125.
A little ugliness is accepted to keep the binary file format
compatible.  No functional change yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 20:46:56 +00:00
Sandeep Patel
4e1ed88026 Fix method name in comment, per Bob Wilson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84017 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 20:25:58 +00:00
Dan Gohman
597c5e2d32 Use the new CodeMetrics class to compute code size instead of
manually counting instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84016 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 20:12:23 +00:00
Dan Gohman
497f61940a Compute a full cost value even when a setjmp call is found.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84015 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 20:10:10 +00:00
Dan Gohman
e7f0ed5ace Split code not specific to Function inlining out into a separate class,
named CodeMetrics. Move it to be a non-nested class. Rename RegionInfo
back to FunctionInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 19:58:07 +00:00
David Goodwin
d452ea6a64 Add debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 19:16:03 +00:00
Sandeep Patel
47eedaa8fa Add ARMv6T2 SBFX/UBFX instructions. Approved by Anton Korobeynikov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84009 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:59:48 +00:00
Ted Kremenek
59e00d31d1 Update CMake file (lexically order files).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84008 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:57:27 +00:00
Devang Patel
5192e30a72 Do not write empty METADATA_ATTACHMENT record.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84006 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:51:28 +00:00
Devang Patel
a917bfe8c2 Remove unnecessary assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84004 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:51:03 +00:00
Benjamin Kramer
56bfa4d5d0 Update the other CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84003 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:50:54 +00:00
Devang Patel
6225d64ba2 Parse GEP with attached custom metadata. This happens during libprofile_rt.bca build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:49:55 +00:00
Ted Kremenek
db9d3206c0 Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84001 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:48:07 +00:00
Evan Cheng
094f04b429 Refactor some code. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84000 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:42:04 +00:00
Dan Gohman
a7471de2bf Commit the removal of this file, which is now moved to lib/Analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83999 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:37:20 +00:00
Dan Gohman
e4aeec003f Move the InlineCost code from Transforms/Utils to Analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83998 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:30:07 +00:00
Dan Gohman
9b39cf5ac8 Start refactoring the inline cost estimation code so that it can be used
for purposes other than inlining.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83997 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:24:11 +00:00
Chris Lattner
11f15dbb28 change simplifycfg to not duplicate 'unwind' instructions. Hopefully
this will increase the likelihood of common code getting sunk towards
the unwind.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83996 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 18:13:05 +00:00
Dan Gohman
b24f6c7495 Make LoopUnswitch's cost estimation count Instructions, rather than
BasicBlocks, so that it doesn't blindly procede in the presence of
large individual BasicBlocks. This addresses a class of code-size
expansion problems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83992 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 17:50:43 +00:00
Jeffrey Yasskin
4c5b23b24f Make the ExecutionEngine automatically remove global mappings on when their
GlobalValue is destroyed.  Function destruction still leaks machine code and
can crash on leaked stubs, but this is some progress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83987 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 17:42:08 +00:00
Devang Patel
549e81f7de "there is not any instruction with attached debug info in this module" does not mean "there is no debug info in this module". :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83984 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 17:35:35 +00:00
Bob Wilson
5361cd2c7d Add some ARM instruction encoding bits.
Patch by Johnny Chen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83983 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 17:35:30 +00:00
Bob Wilson
4796ba2e70 Fix regression introduced by r83894.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83982 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 17:29:13 +00:00
Devang Patel
740d0db812 Copy metadata when value is RAUW'd. It is debatable whether this is the right approach for custom metadata data in general. However, right now the only custom data user, "dbg", expects this behavior while FE is constructing llvm IR with debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83977 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 17:00:54 +00:00
Bob Wilson
a7fcb9b840 Fix a tab. Thanks to Johnny Chen for pointing it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83973 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 15:27:23 +00:00
Nick Lewycky
321333e51e Force memory use markers to have a ConstantInt for the size argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 07:57:33 +00:00
Nick Lewycky
5c9be67cff Teach BasicAA a little something about the atomic intrinsics: they can only
modify through the pointer they're given.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83959 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 07:48:38 +00:00
Daniel Dunbar
6e4bdfc229 Fix a -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 06:47:08 +00:00
Victor Hernandez
5c78736f85 Memory dependence analysis was incorrectly stopping to scan for stores to a pointer at bitcast uses of a malloc call.
It should continue scanning until the malloc call, and this patch fixes that.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83931 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 01:42:53 +00:00
Devang Patel
6ef7517314 Find enclosing subprogram info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83922 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 23:11:24 +00:00
Devang Patel
1f03471a2d Set default location for a function if it is not set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83921 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 23:10:55 +00:00
Kevin Enderby
6bd266e567 Fix two warnings about unused variables that are only used in assert() calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83917 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 22:51:49 +00:00
Bob Wilson
af4b735219 Delete a comment that makes no sense to me. The statement that moving a CPE
before its reference is only supported on ARM has not been true for a while.
In fact, until recently, that was only supported for Thumb.  Besides that,
CPEs are always a multiple of 4 bytes in size, so inserting a CPE should have
no effect on Thumb alignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 22:49:05 +00:00
Kevin Enderby
9d36962ab6 Fix a problem in the code where ARMAsmParser::ParseShift() second argument
should have been a pointer to a reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83915 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 22:39:54 +00:00
Evan Cheng
67d1d1f832 Make licm debug message readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83908 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 22:25:23 +00:00
Bob Wilson
757652c5ba Change CreateNewWater method to return NewMBB by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83905 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 21:39:43 +00:00
Bob Wilson
f98032ef64 Last week, ARMConstantIslandPass was failing to converge for the
MultiSource/Benchmarks/MiBench/automotive-susan test.  The failure has
since been masked by an unrelated change (just randomly), so I don't have
a testcase for this now.  Radar 7291928.

The situation where this happened is that a constant pool entry (CPE) was
placed at a lower address than the load that referenced it.  There were in
fact 2 CPEs placed at adjacent addresses and referenced by 2 loads that were
close together in the code.  The distance from the loads to the CPEs was
right at the limit of what they could handle, so that only one of the CPEs
could be placed within range.  On every iteration, the first CPE was found
to be out of range, causing a new CPE to be inserted.  The second CPE had
been in range but the newly inserted entry pushed it too far away.  Thus the
second CPE was also replaced by a new entry, which in turn pushed the first
CPE out of range.  Etc.

Judging from some comments in the code, the initial implementation of this
pass did not support CPEs placed _before_ their references.  In the case
where the CPE is placed at a higher address, the key to making the algorithm
terminate is that new CPEs are only inserted at the end of a group of adjacent
CPEs.  This is implemented by removing a basic block from the "WaterList"
once it has been used, and then adding the newly inserted CPE block to the
list so that the next insertion will come after it.  This avoids the ping-pong
effect where CPEs are repeatedly moved to the beginning of a group of
adjacent CPEs.  This does not work when going backwards, however, because the
entries at the end of an adjacent group of CPEs are closer than the CPEs
earlier in the group.

To make this pass terminate, we need to maintain a property that changes can
only happen in some sort of monotonic fashion.  The fix used here is to require
that the CPE for a particular constant pool load can only move to lower
addresses.  This is a very simple change to the code and should not cause
any significant degradation in the results.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83902 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 21:23:15 +00:00
Bob Wilson
32c50e8f99 Another minor clean-up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83897 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 20:45:53 +00:00
Bob Wilson
d637c1a495 Remove redundant parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 20:37:23 +00:00
Bob Wilson
3b7573517c Use early exit to reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83874 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12 19:04:03 +00:00