Dan Gohman
698138384e
Fix the bitcode reader to clear out function-specific state
...
from MDValueList between each function, now that the bitcode
writer is reusing the index space for function-local metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112082 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:22:53 +00:00
Dan Gohman
56e2a57744
Fix a bug found by inspection.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112081 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:20:21 +00:00
Dan Gohman
6b9cb84f8c
Add a comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112080 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:17:19 +00:00
Benjamin Kramer
7b83c26051
MCELF: Use precomputed symbol indices, patch by Roman Divacky.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112079 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 20:09:43 +00:00
Michael J. Spencer
bf252bef67
MC: Fix inconsistant naming in COFF object writer. Patch by Cameron Esfahani.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112076 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 19:27:27 +00:00
Jim Grosbach
f78ee6316b
Don't override the var from the enclosing scope.
...
When doing copy/paste/modify, it's apparently rather important to remember
the 'modify' bit...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112075 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 19:11:34 +00:00
Chris Lattner
574aab5700
zap dead code
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112073 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 19:00:00 +00:00
Devang Patel
1955cf1950
DIGlobalVariable can be used to encode debug info for globals that are directly folded into a constant by FE.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112072 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 18:52:02 +00:00
Benjamin Kramer
fc19695c9a
Remove dead recursive function. Yay for clang -Wunused-function.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112060 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 17:27:58 +00:00
Dan Gohman
848c9aedd7
Clear FunctionLocalMDs in purgeFunction along with the rest of the
...
function-specific state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 17:11:16 +00:00
Dan Gohman
5c18fa2736
Fix whitespace.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112056 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 17:09:50 +00:00
Dan Gohman
879d811563
Eliminate an unnecessary cast.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112055 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 17:09:03 +00:00
Daniel Dunbar
3cc3283fcb
ARM/Thumb2: Fix a misselect in getARMCmp, when attempting to adjust a signed
...
comparison that would overflow.
- The other under/overflow cases can't actually happen because the immediates
which would trigger them are legal (so we don't enter this code), but
adjusted the style to make it clear the transform is always valid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112053 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 16:58:05 +00:00
Eric Christopher
61c3f9ae06
Do type checks before we bother to do everything else.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112039 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 08:43:57 +00:00
Anton Korobeynikov
9f7f83b861
Fix nasty mingw32 bug, which e.g. prevented llvm-gcc bootstrap there.
...
Mark _alloca call as clobberring EFLAGS, otherwise some DCE might remove
other flags-clobberring stuff (e.g. cmp instructions) occuring after
_alloca call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112034 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 07:50:11 +00:00
Eric Christopher
b1cc848d1a
Reorganize load mechanisms. Handle types in a little less fixed way.
...
Fix some todos. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112031 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 07:23:49 +00:00
Bruno Cardoso Lopes
f76c55aa40
PUNPCKLDQ should also be used for v4f32
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112020 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 02:55:40 +00:00
Bruno Cardoso Lopes
7338bbd32a
teach lowering to get target specific nodes for pshufd, emulating the same isel behavior for now, so we can pass all vector shuffle tests
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112017 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 02:35:37 +00:00
Owen Anderson
6cd2075549
In the default address space, any GEP off of null results in a trap value if you try to load it. Thus,
...
any load in the default address space that completes implies that the base value that it GEP'd from
was not null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112015 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-25 01:16:47 +00:00
Dan Gohman
7548fb37f1
Don't include the is-function-local bit in the FoldingSetNodeID
...
for MDNodes, since this information is effectively implied by
the operands. This allow allows the code to avoid doing a
recursive is-it-really-function-local check in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111995 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:21:12 +00:00
Chris Lattner
3ac1884509
split the vector case of getCopyFromParts out to its own function,
...
no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111994 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:20:40 +00:00
Dan Gohman
365c53e328
Use Bits.data() instead of &Bits[0].
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111993 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:16:53 +00:00
Chris Lattner
a13b860f4d
split the vector case out of getCopyToParts into its own function. No
...
functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111990 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 23:10:06 +00:00
Chris Lattner
549fa267ef
tidy up, reduce indentation
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111982 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:43:11 +00:00
Eric Christopher
992ea38e0e
Fix predicate and add a comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111981 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:34:11 +00:00
Eric Christopher
e24d66f525
Rework braindead conditionals I put in yesterday.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111974 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:07:27 +00:00
Eric Christopher
9f782d4dcf
Fix thumb2 mode loads to have the correct operand ordering. Add a todo
...
to fix this in the port.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111973 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:03:02 +00:00
Owen Anderson
7bef92ac7a
NULL loads are only invalid in the default address space.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111972 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:00:55 +00:00
Owen Anderson
dae90c6afb
Add support for inferring values for the default cases of switches.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111971 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 21:59:42 +00:00
Jim Grosbach
3197380143
Add ARM heuristic for when to allocate a virtual base register for stack
...
access. rdar://8277890&7352504
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111968 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 21:19:33 +00:00
Kevin Enderby
6d8f1a9a18
Change the parsing of .loc back to allow the LineNumber field to be optional as
...
it is with other assemblers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111967 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 21:14:47 +00:00
Michael J. Spencer
82c84fdd23
Fix COFF x86-64 relocations. PR7960.
...
Multiple symbol reloc handling part of the patch by Cameron Esfahani.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 21:04:52 +00:00
Owen Anderson
c8ef750605
Add support for inferring that a load from a pointer implies that it is not null.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111959 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 20:47:29 +00:00
Kevin Enderby
c1840b3da2
First bit of support for the dwarf .loc directive. This patch updates the
...
needed parsing for the .loc directive and saves the current info from that
into the context. The next patch will take the current loc info after an
instruction is assembled and save that info into a vector for each section for
use to build the line number tables. The patch after that will encode the info
from those vectors into the output file as the dwarf line tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111956 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 20:32:42 +00:00
Bill Wendling
4e34d50272
- Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.
...
- Support the LinkerWeak*Linkage types in llvm-nm and in LinkModules.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111952 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 20:00:52 +00:00
Daniel Dunbar
fba88d49e3
MC/X86: Tweak imul recognition, previous hack only applies for the imul form
...
taking immediates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111950 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 19:37:56 +00:00
Dan Gohman
e422d1b162
Link NamedMDNodes after linking GlobalValues, so that MDNodes
...
which reference GlobalValues are properly remapped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111949 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 19:37:11 +00:00
Dan Gohman
e5835fbe7f
When linking NamedMDNodes, remap their operands.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 19:31:04 +00:00
Daniel Dunbar
ae528f65ba
MC/X86: Add custom hack for recognizing "imul $12, %eax" and friends.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111947 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 19:24:18 +00:00
Daniel Dunbar
e17edff28f
MC/AsmParser: Change ParseExpression to use ParseIdentifier(), to support
...
dollars in identifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111946 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 19:13:42 +00:00
Daniel Dunbar
ee9102587e
MC/X86: Warn on scale factors > 1 without index register, instead of erroring,
...
for 'as' compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111945 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 19:13:38 +00:00
Jim Grosbach
a273442891
Move enabling the local stack allocation pass into the target where it belongs.
...
For now it's still a command line option, but the interface to the generic
code doesn't need to know that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111942 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 19:05:43 +00:00
Dan Gohman
05ea54e886
Use MapValue in the Linker instead of having a private function
...
which does the same thing. This eliminates redundant code and
handles MDNodes better. MDNode linking still doesn't fully
work yet though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111941 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 18:50:07 +00:00
Daniel Dunbar
1f1b865c40
MC/Parser: Accept leading dollar signs in identifiers.
...
- Implemented by manually splicing the tokens. If this turns out to be
problematically platform specific, a more elegant solution would be to
implement some context dependent lexing support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111934 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 18:12:12 +00:00
Dan Gohman
c47a474802
Don't cast away qualifiers with C-style casts.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111933 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 18:09:44 +00:00
Jim Grosbach
cd59dc5e81
add ARM cmd line option to force always using virtual base regs when possible.
...
Intended to help ease reproducing problems by increasing base register usage
after heuristics for only using the when needed are in place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111930 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 18:04:52 +00:00
Benjamin Kramer
2f6e0e68a4
Relocate against parent if the symbol is not in section or it's a common symbol, from Roman Divacky.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111925 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 17:34:39 +00:00
Owen Anderson
53c36c41ae
Turn LVI on, previously detected failures should be fixed now.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111923 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 17:21:18 +00:00
Dan Gohman
4ce307f963
MapValue support for MDNodes. This is similar to r109117, except
...
that it avoids a lot of unnecessary cloning by avoiding remapping
MDNode cycles when none of the nodes in the cycle actually need to
be remapped. Also it uses the new temporary MDNode mechanism.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111922 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 17:10:10 +00:00
Dan Gohman
92b651fb19
Fix X86's isLegalAddressingMode to recognize that static addresses
...
need not be RIP-relative in small mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111917 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 15:55:12 +00:00