Commit Graph

80541 Commits

Author SHA1 Message Date
Bob Wilson bc5af98f42 Stop trying to merge identical jump tables. This had been inadvertently
disabled for several months (since svn r88806) and no one noticed.  My fix
for pr6543 yesterday reenabled it, but broke the ARM port's code for using
TBB/TBH.  Rather than adding a target hook to disable merging for Thumb2 only,
I'm just taking this out.  It is not common to have identical jump tables,
the code we used to merge them was O(N^2), and it only helps code size, not
performance.

llvm-svn: 98977
2010-03-19 19:05:41 +00:00
John McCall ce5cbdc4ff Promote enum types during -Wsign-compare. Fixes some spurious warnings,
mostly during conditional expressions.

llvm-svn: 98975
2010-03-19 18:53:26 +00:00
Daniel Dunbar 1a81ad3559 MC/Mach-O/x86_64: Add relocation support.
- This is "extraordinarily" Darwin 'as' compatible. See the litany of FIXMEs littered about for more information.
 - There are a few cases which seem to clearly be 'as' bugs which I have left unsupported, and there is one cases where we diverge but should fix if it blocks diffing .o files (Darwin 'as' ends up widening a jump unnecessarily).
 - 403.gcc build, runs, and diffs equivalently to the 'as' built version now (using llvm-mc). However, it builds so slowly that I wouldn't recommend trying it quite yet. :)

llvm-svn: 98974
2010-03-19 18:07:55 +00:00
Daniel Dunbar abf6e3657e llvm-mc: Fix target selection for --disassemble to use GetTarget.
llvm-svn: 98973
2010-03-19 18:07:50 +00:00
Daniel Dunbar c532697372 MC/X86: Rename alternate spellings of {ADD64,CMP64} and mark as "code gen only" so they don't get selected by the asm matcher.
llvm-svn: 98972
2010-03-19 18:07:48 +00:00
Daniel Dunbar c069cc8eaa FileCheck: Don't print "possibly intended match" line if it would match the
"scanning from here" one.

llvm-svn: 98971
2010-03-19 18:07:43 +00:00
Fariborz Jahanian d5bb8cb348 Diagnose conversion of 'Class' to/from objective-c
object pointer types.
Fixes radar 7634850.

llvm-svn: 98970
2010-03-19 18:06:10 +00:00
Torok Edwin bc8eed000f Set numThreads to 1 by default when Python is older than 2.5.2.
Python 2.4 always hits this bug: http://bugs.python.org/issue1731717
when running check-lit on multi-core systems.
Setting numThreads to 1 makes it slower, but at least the results reported are
correct.

llvm-svn: 98969
2010-03-19 17:54:21 +00:00
Chris Lattner 6d765ebc0d make FillWithPossibleTypes take a predicate to filter types so that
we don't blow the smallvector as often.  No functionality change.

llvm-svn: 98968
2010-03-19 17:41:26 +00:00
Johnny Chen 0dab68f3d0 Renumber LdStExFrm from 28 to 11 and shift the existing format values to make
room for it.  This is in preparation for another patch which is adding NEON
subformats to facilitate disassembly.

llvm-svn: 98967
2010-03-19 17:39:00 +00:00
Douglas Gregor 7dc8722bd3 Make the preprocessing record a PPCallbacks subclass itself,
eliminating the extra PopulatePreprocessingRecord object. This will
become useful once we start writing the preprocessing record to
precompiled headers.

llvm-svn: 98966
2010-03-19 17:12:43 +00:00
Douglas Gregor 7f6d60dcc2 Optionally store a PreprocessingRecord in the preprocessor itself, and
tie its creation to a CC1 flag -detailed-preprocessing-record.

llvm-svn: 98963
2010-03-19 16:15:56 +00:00
Douglas Gregor 45a967cd62 Acccess control is lame
llvm-svn: 98962
2010-03-19 15:36:58 +00:00
Douglas Gregor c09217c2f1 struct -> class, to silence a Clang warning
llvm-svn: 98961
2010-03-19 15:31:09 +00:00
Douglas Gregor fc7a4813ab Try to improve computation of the main file name for debug
information, to address recent gdb failures.

llvm-svn: 98959
2010-03-19 14:49:09 +00:00
Gabor Greif 6c56ed847e back out r98957, it broke http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite
llvm-svn: 98958
2010-03-19 13:50:02 +00:00
Gabor Greif 8335f9c0bf Recommit r80858 again (which has been backed out in r80871).
This time I did a self-hosted bootstrap on Linux x86-64,
with no problems. Let's see how darwin 64-bit self-hosting
goes. At the first sign of failure I'll back this out.

Maybe the valgrind bots give me a hint of what may be wrong
(it at all).

llvm-svn: 98957
2010-03-19 11:55:53 +00:00
Daniel Dunbar 4d7c8645fd MC: Add TargetAsmBackend::createObjectWriter.
- MCAssembler is now object-file independent, although we will surely need more work to fully support ELF/COFF.

llvm-svn: 98955
2010-03-19 10:43:26 +00:00
Daniel Dunbar eaa367f5ae MCCodeEmitter: Add target independent fixup flag for is-pc-relative.
llvm-svn: 98954
2010-03-19 10:43:23 +00:00
Daniel Dunbar 1bd7171c95 MC: Sink code emitter into MCAssembler.
llvm-svn: 98953
2010-03-19 10:43:18 +00:00
Daniel Dunbar 79e0e5a631 MC/Mach-O: Move to MachObjectWriter.{h,cpp}.
llvm-svn: 98952
2010-03-19 10:43:15 +00:00
Daniel Dunbar c5084cccc8 MC: Add TargetAsmBackend::isVirtualSection hook.
llvm-svn: 98950
2010-03-19 09:29:03 +00:00
Daniel Dunbar f027abf7de MC: Split MCObjectWriter out of MCAssembler.cpp.
llvm-svn: 98949
2010-03-19 09:28:59 +00:00
Daniel Dunbar 49e5a8ac2a MCAssembler: Pull out MCObjectWriter class.
llvm-svn: 98948
2010-03-19 09:28:55 +00:00
Daniel Dunbar f0517efc6c MCAssembler: Move ApplyFixup to the TargetAsmBackend, this is a target specific not object writer specific task.
llvm-svn: 98947
2010-03-19 09:28:12 +00:00
John McCall ef01f71a5a Pretty-print anonymous types using their kind and presumed location.
Fixes PR6643.  Patch by Mike M!

llvm-svn: 98946
2010-03-19 07:56:44 +00:00
John McCall a0296f7987 Remember the "found declaration" for an overload candidate, which is the
entity (if applicable) which was actually looked up.  If a candidate was found
via a using declaration, this is the UsingShadowDecl;  otherwise, if
the candidate is template specialization, this is the template;  otherwise,
this is the function.

The point of this exercise is that "found declarations" are the entities
we do access control for, not their underlying declarations.  Broadly speaking,
this patch fixes access control for using declarations.

There is a *lot* of redundant code calling into the overload-resolution APIs;
we really ought to clean that up.

llvm-svn: 98945
2010-03-19 07:35:19 +00:00
Daniel Dunbar 3cab275783 MC/Mach-O: Lift the fixup evaluation and application up (to the same place), and eliminate MCAsmFixup::FixedValue.
llvm-svn: 98944
2010-03-19 07:09:47 +00:00
Daniel Dunbar d84d196a86 MC/Mach-O: Factor out ExecutePostLayoutBinding, to separate the post-layout changes the object writer may need to make to the assembler from the actual .o writing.
llvm-svn: 98943
2010-03-19 07:09:33 +00:00
Daniel Dunbar 563d40eda6 MC/Mach-O: Lift relocation emission logic a bit higher to separate evaluation / relocation handling from the actual .o writing.
llvm-svn: 98942
2010-03-19 07:09:18 +00:00
Jeffrey Yasskin 22a411ff5b Remove a memory leak from the CBackend.
llvm-svn: 98941
2010-03-19 07:06:46 +00:00
Douglas Gregor 51c2351d30 Fix a longstanding (but previously unknown) bug in the lazy
deserialization of precompiled headers, where the deserialization of
the source location entry for a buffer (e.g., macro instantiation
scratch space) would overwrite a one-element FileID cache in the
source manager. When tickled at the wrong time, we would return the
wrong decomposed source location and eventually cause c-index-test to
crash.

Found by dumb luck. It's amazing this hasn't shown up before.

llvm-svn: 98940
2010-03-19 06:12:06 +00:00
Chris Lattner 90a7859ebc fix an MCInstPrinter leak that jyasskin pointed out:
createAsmStreamer now takes ownership of the instprinter.

llvm-svn: 98939
2010-03-19 05:48:53 +00:00
Chris Lattner bb34b4e10f resolve fixme: we now infer the instruction-level 'isvariadic' bit
from the pattern if present, and we use it instead of the bit.

llvm-svn: 98938
2010-03-19 05:34:15 +00:00
Chris Lattner 0433699ef0 set SDNPVariadic on nodes throughout the rest of the targets that
need them.

llvm-svn: 98937
2010-03-19 05:33:51 +00:00
Jeffrey Yasskin 4822dfcc9a Remove a memory leak from ThumbTargetMachine.
llvm-svn: 98936
2010-03-19 05:25:28 +00:00
Douglas Gregor 5272e80ce5 Visit preprocessing elements (macro instantiations and macro
definitions) as part of the translation unit, so that normal
visitation, token-annotation, and cursor-at retrieval all see
preprocessing elements.

llvm-svn: 98935
2010-03-19 05:22:59 +00:00
Chris Lattner 83aeaab462 add a new SDNPVariadic SDNP node flag, and use it in
dag isel gen instead of instruction properties.  This
allows the oh-so-useful behavior of matching a variadic
non-root node.

llvm-svn: 98934
2010-03-19 05:07:09 +00:00
Chris Lattner be6b17f927 rewrite EnforceSmallerThan to be less bone headed.
llvm-svn: 98933
2010-03-19 04:54:36 +00:00
Chris Lattner e5ac9382ce remove some damaged sign extend patterns that can never match.
llvm-svn: 98932
2010-03-19 04:53:47 +00:00
Chris Lattner 6d984166fc disable some illegal blackfin patterns. sext from i32 to i32 can never
match.  Jakob, please take a look when you get a chance.

llvm-svn: 98931
2010-03-19 04:53:21 +00:00
Chris Lattner 607795f917 comment out a bunch of parallel store patterns that apparently
can't match or just have no testcases.  Will remove after 
confirmation from dan that they really are dead.

llvm-svn: 98930
2010-03-19 04:14:21 +00:00
Bob Wilson 4f559a3042 Revert 98907 since it is breaking buildbots.
--- Reverse-merging r98907 into '.':
D    test/Index/c-index-getCursor-pp.c
U    tools/CIndex/CIndex.cpp

llvm-svn: 98929
2010-03-19 03:57:57 +00:00
Daniel Dunbar 857955243e Fix -Asserts warnings.
llvm-svn: 98928
2010-03-19 03:18:23 +00:00
Daniel Dunbar ec71ba25e5 Fix -Asserts warning.
llvm-svn: 98927
2010-03-19 03:18:20 +00:00
Daniel Dunbar 0f7fbb3d00 MC/Mach-O: Add isScatteredFixupFullyResolved, which implements the correct algorithm (used on x86_64) for determining whether an evaluated fixup is fully resolved (doesn't need relocation).
- Test cases will follow, once we have x86_64 relocation support.

llvm-svn: 98926
2010-03-19 03:18:18 +00:00
Daniel Dunbar 6e13bb07fb MC/Mach-O/x86_64: Add getAtom[ForAddress].
- These find the defining symbol which identifies the containing atom for a symbol or address. They are currently very slow, but will be eliminated eventually.

llvm-svn: 98925
2010-03-19 03:18:15 +00:00
Daniel Dunbar 5ec4bdd1b3 MC/Mach-O: Factor out isScatteredFixupFullyResolvedSimple predicate, and fix some corner cases.
llvm-svn: 98924
2010-03-19 03:18:12 +00:00
Daniel Dunbar c558ec211f MC/Mach-O: Factor out isSymbolLinkerVisible method; "linker visible" is a made up term to refer to non-temporary labels + temporary labels in sections-which-require symbols. For Darwin, it corresponds to symbols which effectively define an atom.
llvm-svn: 98923
2010-03-19 03:18:09 +00:00
Daniel Dunbar fab9b02fc8 Drop KLEE blurb, we don't have anything new.
llvm-svn: 98922
2010-03-19 03:18:05 +00:00